blob: 1cc045b8380fb1b8f1bbb8113d44d5c3b6ece830 [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#
Benjamin Petersoncc8929b2016-08-03 22:01:32 -07006# Report bugs to <https://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
Benjamin Petersoncc8929b2016-08-03 22:01:32 -0700271$0: https://bugs.python.org/ about your system, including
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000272$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'
Benjamin Petersoncc8929b2016-08-03 22:01:32 -0700586PACKAGE_BUGREPORT='https://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
Martin Panterbc82de02016-07-29 05:52:32 +0000738GENERATED_COMMENT
doko@python.orgd65e2ba2013-01-31 23:52:03 +0100739PYTHON_FOR_BUILD
740host_os
741host_vendor
742host_cpu
743host
744build_os
745build_vendor
746build_cpu
747build
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
Benjamin Petersoncc8929b2016-08-03 22:01:32 -07001548Report bugs to <https://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;}
Benjamin Petersoncc8929b2016-08-03 22:01:32 -07001770( $as_echo "## --------------------------------------- ##
1771## Report this to https://bugs.python.org/ ##
1772## --------------------------------------- ##"
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
doko@python.orgd65e2ba2013-01-31 23:52:03 +01002802ac_aux_dir=
2803for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2804 if test -f "$ac_dir/install-sh"; then
2805 ac_aux_dir=$ac_dir
2806 ac_install_sh="$ac_aux_dir/install-sh -c"
2807 break
2808 elif test -f "$ac_dir/install.sh"; then
2809 ac_aux_dir=$ac_dir
2810 ac_install_sh="$ac_aux_dir/install.sh -c"
2811 break
2812 elif test -f "$ac_dir/shtool"; then
2813 ac_aux_dir=$ac_dir
2814 ac_install_sh="$ac_aux_dir/shtool install -c"
2815 break
2816 fi
2817done
2818if test -z "$ac_aux_dir"; then
2819 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2820fi
2821
2822# These three variables are undocumented and unsupported,
2823# and are intended to be withdrawn in a future Autoconf release.
2824# They can cause serious problems if a builder's source tree is in a directory
2825# whose full name contains unusual characters.
2826ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2827ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2828ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2829
2830
2831# Make sure we can run config.sub.
2832$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2833 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2834
2835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2836$as_echo_n "checking build system type... " >&6; }
2837if ${ac_cv_build+:} false; then :
2838 $as_echo_n "(cached) " >&6
2839else
2840 ac_build_alias=$build_alias
2841test "x$ac_build_alias" = x &&
2842 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2843test "x$ac_build_alias" = x &&
2844 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2845ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2846 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2847
2848fi
2849{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2850$as_echo "$ac_cv_build" >&6; }
2851case $ac_cv_build in
2852*-*-*) ;;
2853*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2854esac
2855build=$ac_cv_build
2856ac_save_IFS=$IFS; IFS='-'
2857set x $ac_cv_build
2858shift
2859build_cpu=$1
2860build_vendor=$2
2861shift; shift
2862# Remember, the first character of IFS is used to create $*,
2863# except with old shells:
2864build_os=$*
2865IFS=$ac_save_IFS
2866case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2867
2868
2869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2870$as_echo_n "checking host system type... " >&6; }
2871if ${ac_cv_host+:} false; then :
2872 $as_echo_n "(cached) " >&6
2873else
2874 if test "x$host_alias" = x; then
2875 ac_cv_host=$ac_cv_build
2876else
2877 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2878 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2879fi
2880
2881fi
2882{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2883$as_echo "$ac_cv_host" >&6; }
2884case $ac_cv_host in
2885*-*-*) ;;
2886*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2887esac
2888host=$ac_cv_host
2889ac_save_IFS=$IFS; IFS='-'
2890set x $ac_cv_host
2891shift
2892host_cpu=$1
2893host_vendor=$2
2894shift; shift
2895# Remember, the first character of IFS is used to create $*,
2896# except with old shells:
2897host_os=$*
2898IFS=$ac_save_IFS
2899case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2900
2901
2902
2903
2904
Ned Deily983df862014-08-22 13:30:59 -07002905# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2906rm -f pybuilddir.txt
2907
doko@python.orgd65e2ba2013-01-31 23:52:03 +01002908if test "$cross_compiling" = yes; then
2909 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2910$as_echo_n "checking for python interpreter for cross build... " >&6; }
2911 if test -z "$PYTHON_FOR_BUILD"; then
2912 for interp in python$PACKAGE_VERSION python2 python; do
2913 which $interp >/dev/null 2>&1 || continue
2914 if $interp -c 'import sys;sys.exit(not (sys.version_info[:2] >= (2,7) and sys.version_info[0] < 3))'; then
2915 break
2916 fi
2917 interp=
2918 done
2919 if test x$interp = x; then
2920 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2921 fi
2922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2923$as_echo "$interp" >&6; }
doko@ubuntu.coma50b0de2015-04-13 21:55:59 +02002924 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 +01002925 fi
Martin Panterbc82de02016-07-29 05:52:32 +00002926 # Used to comment out stuff for rebuilding generated files
2927 GENERATED_COMMENT='#'
doko@python.orgd65e2ba2013-01-31 23:52:03 +01002928elif test "$cross_compiling" = maybe; then
2929 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
2930else
2931 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
Martin Panterbc82de02016-07-29 05:52:32 +00002932 GENERATED_COMMENT=''
doko@python.orgd65e2ba2013-01-31 23:52:03 +01002933fi
2934
2935
Martin v. Löwis11437992002-04-12 09:54:03 +00002936
Martin Panter801110b2016-07-28 01:28:27 +00002937
Georg Brandlbcd64a32009-03-31 21:45:18 +00002938if test "$prefix" != "/"; then
2939 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2940fi
2941
2942
Martin v. Löwis11437992002-04-12 09:54:03 +00002943
2944
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002945# We don't use PACKAGE_ variables, and they cause conflicts
2946# with other autoconf-based packages that include Python.h
2947grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2948rm confdefs.h
2949mv confdefs.h.new confdefs.h
2950
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002951
Martin v. Löwis174440b2008-10-03 08:59:41 +00002952VERSION=2.7
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002953
Martin v. Löwis1142de32002-03-29 16:28:31 +00002954
2955SOVERSION=1.0
2956
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002957# The later defininition of _XOPEN_SOURCE disables certain features
2958# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2959
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002960$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002961
2962
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002963# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2964# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2965# them.
2966
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002967$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002968
2969
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002970# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2971# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2972# them.
2973
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002974$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002975
2976
Martin v. Löwisd6320502004-08-12 13:45:08 +00002977# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2978# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2979
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002980$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002981
2982
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002983# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2984# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2985# them.
2986
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002987$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002988
2989
2990
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002991define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002992
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002993# Arguments passed to configure.
2994
2995CONFIG_ARGS="$ac_configure_args"
2996
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2998$as_echo_n "checking for --enable-universalsdk... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002999# Check whether --enable-universalsdk was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003000if test "${enable_universalsdk+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003001 enableval=$enable_universalsdk;
Ronald Oussoren988117f2006-04-29 11:31:35 +00003002 case $enableval in
3003 yes)
3004 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003005 if test ! -d "${enableval}"
3006 then
3007 enableval=/
3008 fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00003009 ;;
3010 esac
3011 case $enableval in
3012 no)
3013 UNIVERSALSDK=
3014 enable_universalsdk=
3015 ;;
3016 *)
3017 UNIVERSALSDK=$enableval
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003018 if test ! -d "${UNIVERSALSDK}"
3019 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003020 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003021 fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00003022 ;;
3023 esac
3024
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003025
Ronald Oussoren988117f2006-04-29 11:31:35 +00003026else
3027
3028 UNIVERSALSDK=
3029 enable_universalsdk=
3030
Martin v. Löwiseba40652007-08-30 20:10:57 +00003031fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00003032
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003033if test -n "${UNIVERSALSDK}"
3034then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3036$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003037else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3039$as_echo "no" >&6; }
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003040fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00003041
Martin v. Löwiseba40652007-08-30 20:10:57 +00003042
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +00003043
Ned Deily8e60f6e2013-05-30 00:14:29 -07003044ARCH_RUN_32BIT=""
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +00003045
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003046UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren92919a62009-12-24 13:30:58 +00003047
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3049$as_echo_n "checking for --with-universal-archs... " >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003050
3051# Check whether --with-universal-archs was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003052if test "${with_universal_archs+set}" = set; then :
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003053 withval=$with_universal_archs;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003054 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
3055$as_echo "$withval" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003056 UNIVERSAL_ARCHS="$withval"
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00003057 if test "${enable_universalsdk}" ; then
3058 :
3059 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003060 as_fn_error $? "--with-universal-archs without --enable-universalsdk. See Mac/README" "$LINENO" 5
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00003061 fi
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003062
3063else
3064
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 32-bit" >&5
3066$as_echo "32-bit" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003067
3068fi
3069
3070
3071
3072
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003073
3074# Check whether --with-framework-name was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003075if test "${with_framework_name+set}" = set; then :
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003076 withval=$with_framework_name;
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00003077 if test "${enable_framework}"; then
3078 :
3079 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003080 as_fn_error $? "--with-framework-name without --enable-framework. See Mac/README" "$LINENO" 5
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00003081 fi
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003082 PYTHONFRAMEWORK=${withval}
3083 PYTHONFRAMEWORKDIR=${withval}.framework
3084 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3085
3086else
3087
3088 PYTHONFRAMEWORK=Python
3089 PYTHONFRAMEWORKDIR=Python.framework
3090 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3091
3092fi
3093
Martin v. Löwiseba40652007-08-30 20:10:57 +00003094# Check whether --enable-framework was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003095if test "${enable_framework+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003096 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003097 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003098 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003099 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003100 esac
3101 case $enableval in
3102 no)
3103 PYTHONFRAMEWORK=
3104 PYTHONFRAMEWORKDIR=no-framework
3105 PYTHONFRAMEWORKPREFIX=
3106 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003107 FRAMEWORKINSTALLFIRST=
3108 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00003109 FRAMEWORKALTINSTALLFIRST=
3110 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00003111 if test "x${prefix}" = "xNONE"; then
3112 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3113 else
3114 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3115 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003116 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003117 ;;
3118 *)
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003119 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003120 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003121 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003122 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure bininstall maninstall"
Ronald Oussoren92919a62009-12-24 13:30:58 +00003123 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3124 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003125 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003126
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00003127 if test "x${prefix}" = "xNONE" ; then
3128 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003129
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00003130 else
3131 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3132 fi
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003133
3134 case "${enableval}" in
3135 /System*)
3136 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3137 if test "${prefix}" = "NONE" ; then
3138 # See below
3139 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3140 fi
3141 ;;
3142
3143 /Library*)
3144 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3145 ;;
3146
3147 */Library/Frameworks)
3148 MDIR="`dirname "${enableval}"`"
3149 MDIR="`dirname "${MDIR}"`"
3150 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3151
3152 if test "${prefix}" = "NONE"; then
3153 # User hasn't specified the
3154 # --prefix option, but wants to install
3155 # the framework in a non-default location,
3156 # ensure that the compatibility links get
3157 # installed relative to that prefix as well
3158 # instead of in /usr/local.
3159 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3160 fi
3161 ;;
3162
3163 *)
3164 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3165 ;;
3166 esac
3167
Jack Jansen127e56e2001-09-11 14:41:54 +00003168 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Ronald Oussoren836b0392006-05-14 19:56:34 +00003169
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003170 # Add files for Mac specific code to the list of output
Ronald Oussoren836b0392006-05-14 19:56:34 +00003171 # files:
Martin v. Löwiseba40652007-08-30 20:10:57 +00003172 ac_config_files="$ac_config_files Mac/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00003173
Martin v. Löwiseba40652007-08-30 20:10:57 +00003174 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00003175
Martin v. Löwiseba40652007-08-30 20:10:57 +00003176 ac_config_files="$ac_config_files Mac/IDLE/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00003177
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003178 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3179
3180 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3181
Jack Jansene578a632001-08-15 01:27:14 +00003182 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003183
Guido van Rossum563e7081996-09-10 18:20:48 +00003184else
Martin v. Löwis11437992002-04-12 09:54:03 +00003185
Jack Jansene578a632001-08-15 01:27:14 +00003186 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003187 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003188 PYTHONFRAMEWORKPREFIX=
3189 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003190 FRAMEWORKINSTALLFIRST=
3191 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00003192 FRAMEWORKALTINSTALLFIRST=
3193 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00003194 if test "x${prefix}" = "xNONE" ; then
3195 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3196 else
3197 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3198 fi
Jack Jansene578a632001-08-15 01:27:14 +00003199 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003200
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003201
Martin v. Löwiseba40652007-08-30 20:10:57 +00003202fi
3203
Michael W. Hudson54241132001-12-07 15:38:26 +00003204
3205
3206
3207
Jack Jansene578a632001-08-15 01:27:14 +00003208
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003209
3210
Ronald Oussoren5b787322006-06-06 19:50:24 +00003211
3212
3213
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003214
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003215
Jack Jansene578a632001-08-15 01:27:14 +00003216##AC_ARG_WITH(dyld,
Matthias Klose22520ea2010-05-08 10:14:46 +00003217## AS_HELP_STRING([--with-dyld],
3218## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003219##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003220# Set name for machine-dependent library files
3221
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3223$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003224if test -z "$MACHDEP"
3225then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003226 # avoid using uname for cross builds
3227 if test "$cross_compiling" = yes; then
3228 # ac_sys_system and ac_sys_release are only used for setting
3229 # `define_xopen_source' in the case statement below. For the
3230 # current supported cross builds, this macro is not adjusted.
3231 case "$host" in
3232 *-*-linux*)
3233 ac_sys_system=Linux
3234 ;;
3235 *-*-cygwin*)
3236 ac_sys_system=Cygwin
3237 ;;
3238 *)
3239 # for now, limit cross builds to known configurations
3240 MACHDEP="unknown"
3241 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3242 esac
3243 ac_sys_release=
3244 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003245 ac_sys_system=`uname -s`
Georg Brandlfe18a112009-09-04 07:55:14 +00003246 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003247 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003248 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003249 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003250 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003251 fi
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003252 fi
3253 ac_md_system=`echo $ac_sys_system |
3254 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3255 ac_md_release=`echo $ac_sys_release |
3256 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3257 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003258
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003259 case $MACHDEP in
Victor Stinneracacbaa2011-08-20 14:02:38 +02003260 linux*) MACHDEP="linux2";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003261 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003262 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003263 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00003264 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003265 '') MACHDEP="unknown";;
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003266 esac
3267fi
3268
3269
3270if test "$cross_compiling" = yes; then
3271 case "$host" in
3272 *-*-linux*)
3273 case "$host_cpu" in
3274 arm*)
3275 _host_cpu=arm
3276 ;;
3277 *)
3278 _host_cpu=$host_cpu
3279 esac
3280 ;;
3281 *-*-cygwin*)
3282 _host_cpu=
3283 ;;
3284 *)
3285 # for now, limit cross builds to known configurations
3286 MACHDEP="unknown"
3287 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003288 esac
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003289 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003290fi
Guido van Rossum91922671997-10-09 20:24:13 +00003291
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003292# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3293# disable features if it is defined, without any means to access these
3294# features as extensions. For these systems, we skip the definition of
3295# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3296# some feature, make sure there is no alternative way to access this
3297# feature. Also, when using wildcards, make sure you have verified the
3298# need for not defining _XOPEN_SOURCE on all systems matching the
3299# wildcard, and that the wildcard does not include future systems
3300# (which may remove their limitations).
3301case $ac_sys_system/$ac_sys_release in
3302 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3303 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003304 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis7875ef62010-02-15 21:41:12 +00003305 # In addition, Stefan Krah confirms that issue #1244610 exists through
3306 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali97781b02011-07-22 23:43:42 +02003307 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Martin v. Löwiscb78de62007-12-29 18:49:21 +00003308 define_xopen_source=no
3309 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3310 # also defined. This can be overridden by defining _BSD_SOURCE
3311 # As this has a different meaning on Linux, only define it on OpenBSD
3312
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003313$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwiscb78de62007-12-29 18:49:21 +00003314
3315 ;;
Charles-François Natali97781b02011-07-22 23:43:42 +02003316 OpenBSD/*)
Martin v. Löwis5e2dd862010-02-15 08:32:00 +00003317 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3318 # also defined. This can be overridden by defining _BSD_SOURCE
3319 # As this has a different meaning on Linux, only define it on OpenBSD
3320
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003321$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis5e2dd862010-02-15 08:32:00 +00003322
3323 ;;
Martin v. Löwis4d542ec2006-11-25 15:39:19 +00003324 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3325 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3326 # Marc Recht
Benjamin Petersoneac68f42008-11-16 17:54:55 +00003327 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 +00003328 define_xopen_source=no;;
Martin v. Löwisb41afb52010-05-28 15:28:47 +00003329 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3330 # request to enable features supported by the standard as a request
3331 # to disable features not supported by the standard. The best way
3332 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3333 # entirely and define __EXTENSIONS__ instead.
3334 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003335 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003336 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3337 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003338 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003339 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003340 define_xopen_source=no;;
3341 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003342 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003343 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003344 define_xopen_source=no;;
Martin v. Löwisbb86d832008-11-04 20:40:09 +00003345 # On FreeBSD 4, the math functions C89 does not cover are never defined
3346 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3347 FreeBSD/4.*)
3348 define_xopen_source=no;;
3349 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3350 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3351 # identifies itself as Darwin/7.*
3352 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3353 # disables platform specific features beyond repair.
3354 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3355 # has no effect, don't bother defining them
3356 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003357 define_xopen_source=no;;
Ronald Oussorena55af9a2010-01-17 16:25:57 +00003358 Darwin/1[0-9].*)
3359 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003360 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3361 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3362 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003363 AIX/4)
3364 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003365 AIX/5)
3366 if test `uname -r` -eq 1; then
3367 define_xopen_source=no
3368 fi
3369 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00003370 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3371 # defining NI_NUMERICHOST.
3372 QNX/6.3.2)
3373 define_xopen_source=no
3374 ;;
Martin v. Löwisa0588362006-04-04 06:03:50 +00003375
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003376esac
3377
3378if test $define_xopen_source = yes
3379then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003380
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003381$as_echo "#define _XOPEN_SOURCE 600" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003382
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003383
3384 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3385 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3386 # several APIs are not declared. Since this is also needed in some
3387 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003388
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003389$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003390
3391
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003392
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003393$as_echo "#define _POSIX_C_SOURCE 200112L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003394
3395
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003396fi
3397
Guido van Rossum91922671997-10-09 20:24:13 +00003398#
3399# SGI compilers allow the specification of the both the ABI and the
3400# ISA on the command line. Depending on the values of these switches,
Martin Panterb1d867f2016-05-26 05:28:50 +00003401# different and often incompatible code will be generated.
Guido van Rossum91922671997-10-09 20:24:13 +00003402#
3403# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3404# thus supply support for various ABI/ISA combinations. The MACHDEP
3405# variable is also adjusted.
3406#
3407
3408if test ! -z "$SGI_ABI"
3409then
3410 CC="cc $SGI_ABI"
3411 LDFLAGS="$SGI_ABI $LDFLAGS"
3412 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3413fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003414{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3415$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003416
doko@ubuntu.coma50b0de2015-04-13 21:55:59 +02003417
3418PLATDIR=plat-$MACHDEP
3419
Jack Jansen83f898c2002-12-30 22:23:40 +00003420# And add extra plat-mac for darwin
3421
Jack Jansen7b59b422003-03-17 15:44:10 +00003422
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking EXTRAPLATDIR" >&5
3424$as_echo_n "checking EXTRAPLATDIR... " >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00003425if test -z "$EXTRAPLATDIR"
3426then
3427 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00003428 darwin)
3429 EXTRAPLATDIR="\$(PLATMACDIRS)"
3430 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
3431 ;;
3432 *)
3433 EXTRAPLATDIR=""
3434 EXTRAMACHDEPPATH=""
3435 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00003436 esac
3437fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003438{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRAPLATDIR" >&5
3439$as_echo "$EXTRAPLATDIR" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00003440
Jack Jansen6b08a402004-06-03 12:41:45 +00003441# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3442# it may influence the way we can build extensions, so distutils
3443# needs to check it
3444
Ronald Oussoren988117f2006-04-29 11:31:35 +00003445
Jack Jansen6b08a402004-06-03 12:41:45 +00003446CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Ronald Oussoren988117f2006-04-29 11:31:35 +00003447EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003448
Guido van Rossum627b2d71993-12-24 10:39:16 +00003449# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003450
3451# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3452# for debug/optimization stuff. BASECFLAGS is for flags that are required
3453# just to get things to compile and link. Users are free to override OPT
3454# when running configure or make. The build should not break if they do.
3455# BASECFLAGS should generally not be messed with, however.
3456
3457# XXX shouldn't some/most/all of this code be merged with the stuff later
3458# on that fiddles with OPT and BASECFLAGS?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3460$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003461
Martin v. Löwiseba40652007-08-30 20:10:57 +00003462# Check whether --with-gcc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003463if test "${with_gcc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003464 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003465 case $withval in
Mark Dickinson04b27232009-01-04 12:29:36 +00003466 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003467 without_gcc=yes;;
3468 yes) CC=gcc
3469 without_gcc=no;;
3470 *) CC=$withval
3471 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003472 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003473else
Martin v. Löwis11437992002-04-12 09:54:03 +00003474
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003475 case $ac_sys_system in
Antoine Pitrou285cd162010-09-21 15:23:17 +00003476 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003477 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003478 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003479 case $BE_HOST_CPU in
3480 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00003481 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003482 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00003483 BASECFLAGS="$BASECFLAGS -export pragma"
3484 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003485 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003486 ;;
3487 x86)
Fred Drake5790be12000-10-09 17:06:13 +00003488 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003489 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00003490 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003491 ;;
3492 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003493 as_fn_error $? "Unknown BeOS platform \"$BE_HOST_CPU\"" "$LINENO" 5
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003494 ;;
3495 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003496 AR="\$(srcdir)/Modules/ar_beos"
3497 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003498 ;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003499 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003500 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00003501fi
3502
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003503{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3504$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003505
Zachary Ware6ed42ea2015-12-21 11:43:03 -06003506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-icc" >&5
3507$as_echo_n "checking for --with-icc... " >&6; }
3508
3509# Check whether --with-icc was given.
3510if test "${with_icc+set}" = set; then :
3511 withval=$with_icc;
3512 case $withval in
3513 no) CC=${CC:-cc}
3514 with_icc=no;;
3515 yes) CC=icc
3516 CXX=icpc
3517 with_icc=yes;;
3518 *) CC=$withval
3519 with_icc=$withval;;
3520 esac
3521else
3522
3523 with_icc=no
3524fi
3525
3526{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icc" >&5
3527$as_echo "$with_icc" >&6; }
3528
Guido van Rossum8b131c51995-03-09 14:10:13 +00003529# If the user switches compilers, we can't believe the cache
3530if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3531then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003532 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003533(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003534fi
3535
Trent Nelson15daa352012-12-13 06:46:39 +00003536if test "$MACHDEP" = "irix6" && test "$CC" != "gcc"; then
3537 # Normally, MIPSpro CC treats #error directives as warnings, which means
3538 # a successful exit code is returned (0). This is a problem because IRIX
3539 # has a bunch of system headers with this guard at the top:
3540 #
3541 # #ifndef __c99
3542 # #error This header file is to be used only for c99 mode compilations
3543 # #else
3544 #
3545 # When autoconf tests for such a header, like stdint.h, this happens:
3546 #
3547 # configure:4619: cc -c conftest.c >&5
3548 # cc-1035 cc: WARNING File = /usr/include/stdint.h, Line = 5
3549 # #error directive: This header file is to be used only for c99 mode
3550 # compilations
3551 #
3552 # #error This header file is to be used only for c99 mode compilations
3553 # ^
3554 #
3555 # configure:4619: $? = 0
3556 # configure:4619: result: yes
3557 #
3558 # Therefore, we use `-diag_error 1035` to have the compiler treat the
3559 # warning as an error, which causes cc to return a non-zero result,
3560 # which autoconf can interpret correctly.
3561 CFLAGS="$CFLAGS -diag_error 1035"
3562 # Whilst we're here, we might as well make sure CXX defaults to something
3563 # sensible if we're not using gcc.
3564 if test -z "$CXX"; then
3565 CXX="CC"
3566 fi
3567fi
3568
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00003569# If the user set CFLAGS, use this instead of the automatically
3570# determined setting
3571preset_cflags="$CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +00003572ac_ext=c
3573ac_cpp='$CPP $CPPFLAGS'
3574ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3575ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3576ac_compiler_gnu=$ac_cv_c_compiler_gnu
3577if test -n "$ac_tool_prefix"; then
3578 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3579set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3581$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003582if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003583 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003584else
3585 if test -n "$CC"; then
3586 ac_cv_prog_CC="$CC" # Let the user override the test.
3587else
Martin v. Löwis11437992002-04-12 09:54:03 +00003588as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3589for as_dir in $PATH
3590do
3591 IFS=$as_save_IFS
3592 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003593 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003594 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003595 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003596 $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 +00003597 break 2
3598 fi
3599done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003600 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003601IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003602
Jack Jansendd19cf82001-12-06 22:36:17 +00003603fi
3604fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003605CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003606if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3608$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003609else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3611$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003612fi
3613
Martin v. Löwiseba40652007-08-30 20:10:57 +00003614
Martin v. Löwis11437992002-04-12 09:54:03 +00003615fi
3616if test -z "$ac_cv_prog_CC"; then
3617 ac_ct_CC=$CC
3618 # Extract the first word of "gcc", so it can be a program name with args.
3619set dummy gcc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3621$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003622if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003623 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003624else
3625 if test -n "$ac_ct_CC"; then
3626 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3627else
3628as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3629for as_dir in $PATH
3630do
3631 IFS=$as_save_IFS
3632 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003633 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003634 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003635 ac_cv_prog_ac_ct_CC="gcc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003636 $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 +00003637 break 2
3638 fi
3639done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003640 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003641IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003642
3643fi
3644fi
3645ac_ct_CC=$ac_cv_prog_ac_ct_CC
3646if test -n "$ac_ct_CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3648$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003649else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3651$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003652fi
3653
Martin v. Löwiseba40652007-08-30 20:10:57 +00003654 if test "x$ac_ct_CC" = x; then
3655 CC=""
3656 else
3657 case $cross_compiling:$ac_tool_warned in
3658yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003659{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3660$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00003661ac_tool_warned=yes ;;
3662esac
3663 CC=$ac_ct_CC
3664 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003665else
3666 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003667fi
3668
Jack Jansendd19cf82001-12-06 22:36:17 +00003669if test -z "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003670 if test -n "$ac_tool_prefix"; then
3671 # 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 +00003672set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3674$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003675if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003676 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003677else
3678 if test -n "$CC"; then
3679 ac_cv_prog_CC="$CC" # Let the user override the test.
3680else
Martin v. Löwis11437992002-04-12 09:54:03 +00003681as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3682for as_dir in $PATH
3683do
3684 IFS=$as_save_IFS
3685 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003686 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003687 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003688 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003689 $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 +00003690 break 2
3691 fi
3692done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003693 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003694IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003695
3696fi
3697fi
3698CC=$ac_cv_prog_CC
3699if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3701$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003702else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3704$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003705fi
3706
Martin v. Löwiseba40652007-08-30 20:10:57 +00003707
Martin v. Löwis11437992002-04-12 09:54:03 +00003708 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003709fi
3710if test -z "$CC"; then
3711 # Extract the first word of "cc", so it can be a program name with args.
3712set dummy cc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3714$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003715if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003716 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003717else
3718 if test -n "$CC"; then
3719 ac_cv_prog_CC="$CC" # Let the user override the test.
3720else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003721 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003722as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3723for as_dir in $PATH
3724do
3725 IFS=$as_save_IFS
3726 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003727 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003728 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003729 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3730 ac_prog_rejected=yes
3731 continue
3732 fi
3733 ac_cv_prog_CC="cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003734 $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 +00003735 break 2
3736 fi
3737done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003738 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003739IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003740
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003741if test $ac_prog_rejected = yes; then
3742 # We found a bogon in the path, so make sure we never use it.
3743 set dummy $ac_cv_prog_CC
3744 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003745 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003746 # We chose a different compiler from the bogus one.
3747 # However, it has the same basename, so the bogon will be chosen
3748 # first if we set CC to just the basename; use the full file name.
3749 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003750 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003751 fi
3752fi
3753fi
3754fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003755CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003756if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3758$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003759else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3761$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003762fi
3763
Martin v. Löwiseba40652007-08-30 20:10:57 +00003764
Martin v. Löwis11437992002-04-12 09:54:03 +00003765fi
3766if test -z "$CC"; then
3767 if test -n "$ac_tool_prefix"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003768 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003769 do
3770 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3771set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3773$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003774if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003775 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003776else
3777 if test -n "$CC"; then
3778 ac_cv_prog_CC="$CC" # Let the user override the test.
3779else
Martin v. Löwis11437992002-04-12 09:54:03 +00003780as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3781for as_dir in $PATH
3782do
3783 IFS=$as_save_IFS
3784 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003785 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003786 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003787 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003788 $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 +00003789 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003790 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003791done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003792 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003793IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003794
3795fi
3796fi
3797CC=$ac_cv_prog_CC
3798if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3800$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003801else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3803$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003804fi
3805
Martin v. Löwiseba40652007-08-30 20:10:57 +00003806
Martin v. Löwis11437992002-04-12 09:54:03 +00003807 test -n "$CC" && break
3808 done
3809fi
3810if test -z "$CC"; then
3811 ac_ct_CC=$CC
Martin v. Löwiseba40652007-08-30 20:10:57 +00003812 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003813do
3814 # Extract the first word of "$ac_prog", so it can be a program name with args.
3815set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3817$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003818if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003819 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003820else
3821 if test -n "$ac_ct_CC"; then
3822 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3823else
3824as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3825for as_dir in $PATH
3826do
3827 IFS=$as_save_IFS
3828 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003829 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003830 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003831 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003832 $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 +00003833 break 2
3834 fi
3835done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003836 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003837IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003838
Martin v. Löwis11437992002-04-12 09:54:03 +00003839fi
3840fi
3841ac_ct_CC=$ac_cv_prog_ac_ct_CC
3842if test -n "$ac_ct_CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3844$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003845else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3847$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003848fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003849
Martin v. Löwiseba40652007-08-30 20:10:57 +00003850
Martin v. Löwis11437992002-04-12 09:54:03 +00003851 test -n "$ac_ct_CC" && break
3852done
Michael W. Hudson54241132001-12-07 15:38:26 +00003853
Martin v. Löwiseba40652007-08-30 20:10:57 +00003854 if test "x$ac_ct_CC" = x; then
3855 CC=""
3856 else
3857 case $cross_compiling:$ac_tool_warned in
3858yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003859{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3860$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00003861ac_tool_warned=yes ;;
3862esac
3863 CC=$ac_ct_CC
3864 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003865fi
3866
3867fi
3868
3869
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003870test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3871$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003872as_fn_error $? "no acceptable C compiler found in \$PATH
Matthias Klose3cef2a92012-03-14 23:39:33 +01003873See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003874
3875# Provide some information about the compiler.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003876$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3877set X $ac_compile
3878ac_compiler=$2
3879for ac_option in --version -v -V -qversion; do
3880 { { ac_try="$ac_compiler $ac_option >&5"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003881case "(($ac_try" in
3882 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3883 *) ac_try_echo=$ac_try;;
3884esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003885eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3886$as_echo "$ac_try_echo"; } >&5
3887 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003888 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003889 if test -s conftest.err; then
3890 sed '10a\
3891... rest of stderr output deleted ...
3892 10q' conftest.err >conftest.er1
3893 cat conftest.er1 >&5
3894 fi
3895 rm -f conftest.er1 conftest.err
3896 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3897 test $ac_status = 0; }
3898done
Martin v. Löwis11437992002-04-12 09:54:03 +00003899
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003900cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003901/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003902
Martin v. Löwis11437992002-04-12 09:54:03 +00003903int
3904main ()
3905{
3906
3907 ;
3908 return 0;
3909}
3910_ACEOF
3911ac_clean_files_save=$ac_clean_files
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003912ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003913# Try to create an executable without -o first, disregard a.out.
3914# It will help us diagnose broken compilers, and finding out an intuition
3915# of exeext.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3917$as_echo_n "checking whether the C compiler works... " >&6; }
3918ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3919
3920# The possible output files:
3921ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3922
Martin v. Löwiseba40652007-08-30 20:10:57 +00003923ac_rmfiles=
3924for ac_file in $ac_files
3925do
3926 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003927 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00003928 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3929 esac
3930done
3931rm -f $ac_rmfiles
3932
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003933if { { ac_try="$ac_link_default"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003934case "(($ac_try" in
3935 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3936 *) ac_try_echo=$ac_try;;
3937esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003938eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3939$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003940 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003941 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003942 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3943 test $ac_status = 0; }; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003944 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3945# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3946# in a Makefile. We should not override ac_cv_exeext if it was cached,
3947# so that the user can short-circuit this test for compilers unknown to
3948# Autoconf.
3949for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003950do
3951 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003952 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003953 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003954 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003955 [ab].out )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003956 # We found the default executable, but exeext='' is most
3957 # certainly right.
3958 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003959 *.* )
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003960 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Martin v. Löwiseba40652007-08-30 20:10:57 +00003961 then :; else
3962 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3963 fi
3964 # We set ac_cv_exeext here because the later test for it is not
3965 # safe: cross compilers may not add the suffix if given an `-o'
3966 # argument, so we may need to know it at that point already.
3967 # Even if this section looks crufty: it has the advantage of
3968 # actually working.
Skip Montanarof0d5f792004-08-15 14:08:23 +00003969 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003970 * )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003971 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003972 esac
3973done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003974test "$ac_cv_exeext" = no && ac_cv_exeext=
3975
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003976else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003977 ac_file=''
3978fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003979if test -z "$ac_file"; then :
3980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3981$as_echo "no" >&6; }
3982$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003983sed 's/^/| /' conftest.$ac_ext >&5
3984
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003985{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3986$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003987as_fn_error 77 "C compiler cannot create executables
Matthias Klose3cef2a92012-03-14 23:39:33 +01003988See \`config.log' for more details" "$LINENO" 5; }
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003989else
3990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3991$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003992fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3994$as_echo_n "checking for C compiler default output file name... " >&6; }
3995{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3996$as_echo "$ac_file" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003997ac_exeext=$ac_cv_exeext
Michael W. Hudson54241132001-12-07 15:38:26 +00003998
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003999rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00004000ac_clean_files=$ac_clean_files_save
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4002$as_echo_n "checking for suffix of executables... " >&6; }
4003if { { ac_try="$ac_link"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004004case "(($ac_try" in
4005 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4006 *) ac_try_echo=$ac_try;;
4007esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004008eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4009$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00004010 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004011 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004012 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4013 test $ac_status = 0; }; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004014 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4015# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4016# work properly (i.e., refer to `conftest.exe'), while it won't with
4017# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00004018for ac_file in conftest.exe conftest conftest.*; do
4019 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00004020 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004021 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004022 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
Skip Montanarof0d5f792004-08-15 14:08:23 +00004023 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004024 * ) break;;
4025 esac
4026done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004027else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004028 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4029$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004030as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Matthias Klose3cef2a92012-03-14 23:39:33 +01004031See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004032fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004033rm -f conftest conftest$ac_cv_exeext
4034{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4035$as_echo "$ac_cv_exeext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004036
4037rm -f conftest.$ac_ext
4038EXEEXT=$ac_cv_exeext
4039ac_exeext=$EXEEXT
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004040cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4041/* end confdefs.h. */
4042#include <stdio.h>
4043int
4044main ()
4045{
4046FILE *f = fopen ("conftest.out", "w");
4047 return ferror (f) || fclose (f) != 0;
4048
4049 ;
4050 return 0;
4051}
Skip Montanaro6dead952003-09-25 14:50:04 +00004052_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004053ac_clean_files="$ac_clean_files conftest.out"
4054# Check that the compiler produces executables we can run. If not, either
4055# the compiler is broken, or we cross compile.
4056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4057$as_echo_n "checking whether we are cross compiling... " >&6; }
4058if test "$cross_compiling" != yes; then
4059 { { ac_try="$ac_link"
4060case "(($ac_try" in
4061 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4062 *) ac_try_echo=$ac_try;;
4063esac
4064eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4065$as_echo "$ac_try_echo"; } >&5
4066 (eval "$ac_link") 2>&5
4067 ac_status=$?
4068 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4069 test $ac_status = 0; }
4070 if { ac_try='./conftest$ac_cv_exeext'
4071 { { case "(($ac_try" in
4072 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4073 *) ac_try_echo=$ac_try;;
4074esac
4075eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4076$as_echo "$ac_try_echo"; } >&5
4077 (eval "$ac_try") 2>&5
4078 ac_status=$?
4079 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4080 test $ac_status = 0; }; }; then
4081 cross_compiling=no
4082 else
4083 if test "$cross_compiling" = maybe; then
4084 cross_compiling=yes
4085 else
4086 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4087$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004088as_fn_error $? "cannot run C compiled programs.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004089If you meant to cross compile, use \`--host'.
Matthias Klose3cef2a92012-03-14 23:39:33 +01004090See \`config.log' for more details" "$LINENO" 5; }
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004091 fi
4092 fi
4093fi
4094{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4095$as_echo "$cross_compiling" >&6; }
4096
4097rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4098ac_clean_files=$ac_clean_files_save
4099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4100$as_echo_n "checking for suffix of object files... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004101if ${ac_cv_objext+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004102 $as_echo_n "(cached) " >&6
4103else
4104 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004105/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004106
Martin v. Löwis11437992002-04-12 09:54:03 +00004107int
4108main ()
4109{
4110
4111 ;
4112 return 0;
4113}
4114_ACEOF
4115rm -f conftest.o conftest.obj
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004116if { { ac_try="$ac_compile"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004117case "(($ac_try" in
4118 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4119 *) ac_try_echo=$ac_try;;
4120esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004121eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4122$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00004123 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004124 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004125 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4126 test $ac_status = 0; }; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004127 for ac_file in conftest.o conftest.obj conftest.*; do
4128 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004129 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004130 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004131 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4132 break;;
4133 esac
4134done
4135else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004136 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004137sed 's/^/| /' conftest.$ac_ext >&5
4138
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004139{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4140$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004141as_fn_error $? "cannot compute suffix of object files: cannot compile
Matthias Klose3cef2a92012-03-14 23:39:33 +01004142See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004143fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004144rm -f conftest.$ac_cv_objext conftest.$ac_ext
4145fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004146{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4147$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004148OBJEXT=$ac_cv_objext
4149ac_objext=$OBJEXT
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4151$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004152if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004153 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004154else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004155 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004156/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004157
Martin v. Löwis11437992002-04-12 09:54:03 +00004158int
4159main ()
4160{
4161#ifndef __GNUC__
4162 choke me
4163#endif
4164
4165 ;
4166 return 0;
4167}
4168_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004169if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004170 ac_compiler_gnu=yes
4171else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004172 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004173fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004174rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004175ac_cv_c_compiler_gnu=$ac_compiler_gnu
4176
4177fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004178{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4179$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4180if test $ac_compiler_gnu = yes; then
4181 GCC=yes
4182else
4183 GCC=
4184fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004185ac_test_CFLAGS=${CFLAGS+set}
4186ac_save_CFLAGS=$CFLAGS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4188$as_echo_n "checking whether $CC accepts -g... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004189if ${ac_cv_prog_cc_g+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004190 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004191else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004192 ac_save_c_werror_flag=$ac_c_werror_flag
4193 ac_c_werror_flag=yes
4194 ac_cv_prog_cc_g=no
4195 CFLAGS="-g"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004196 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004197/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004198
Martin v. Löwis11437992002-04-12 09:54:03 +00004199int
4200main ()
4201{
4202
4203 ;
4204 return 0;
4205}
4206_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004207if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004208 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004209else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004210 CFLAGS=""
4211 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004212/* end confdefs.h. */
4213
4214int
4215main ()
4216{
4217
4218 ;
4219 return 0;
4220}
4221_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004222if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004223
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004224else
4225 ac_c_werror_flag=$ac_save_c_werror_flag
Martin v. Löwiseba40652007-08-30 20:10:57 +00004226 CFLAGS="-g"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004227 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004228/* end confdefs.h. */
4229
4230int
4231main ()
4232{
4233
4234 ;
4235 return 0;
4236}
4237_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004238if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004239 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004240fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004241rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004242fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004243rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4244fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004245rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4246 ac_c_werror_flag=$ac_save_c_werror_flag
4247fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004248{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4249$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004250if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004251 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004252elif test $ac_cv_prog_cc_g = yes; then
4253 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004254 CFLAGS="-g -O2"
4255 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004256 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004257 fi
4258else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004259 if test "$GCC" = yes; then
4260 CFLAGS="-O2"
4261 else
4262 CFLAGS=
4263 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004264fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4266$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004267if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004268 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004269else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004270 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004271ac_save_CC=$CC
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004272cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004273/* end confdefs.h. */
4274#include <stdarg.h>
4275#include <stdio.h>
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004276struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004277/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4278struct buf { int x; };
4279FILE * (*rcsopen) (struct buf *, struct stat *, int);
4280static char *e (p, i)
4281 char **p;
4282 int i;
4283{
4284 return p[i];
4285}
4286static char *f (char * (*g) (char **, int), char **p, ...)
4287{
4288 char *s;
4289 va_list v;
4290 va_start (v,p);
4291 s = g (p, va_arg (v,int));
4292 va_end (v);
4293 return s;
4294}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004295
4296/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4297 function prototypes and stuff, but not '\xHH' hex character constants.
4298 These don't provoke an error unfortunately, instead are silently treated
Martin v. Löwiseba40652007-08-30 20:10:57 +00004299 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004300 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4301 array size at least. It's necessary to write '\x00'==0 to get something
Martin v. Löwiseba40652007-08-30 20:10:57 +00004302 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004303int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4304
Martin v. Löwiseba40652007-08-30 20:10:57 +00004305/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4306 inside strings and character constants. */
4307#define FOO(x) 'x'
4308int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4309
Skip Montanaro6dead952003-09-25 14:50:04 +00004310int test (int i, double x);
4311struct s1 {int (*f) (int a);};
4312struct s2 {int (*f) (double a);};
4313int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4314int argc;
4315char **argv;
4316int
4317main ()
4318{
4319return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4320 ;
4321 return 0;
4322}
4323_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00004324for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4325 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004326do
4327 CC="$ac_save_CC $ac_arg"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004328 if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004329 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004330fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004331rm -f core conftest.err conftest.$ac_objext
4332 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004333done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004334rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004335CC=$ac_save_CC
4336
4337fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004338# AC_CACHE_VAL
4339case "x$ac_cv_prog_cc_c89" in
4340 x)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4342$as_echo "none needed" >&6; } ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00004343 xno)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4345$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004346 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00004347 CC="$CC $ac_cv_prog_cc_c89"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4349$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004350esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004351if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004352
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004353fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004354
Martin v. Löwis11437992002-04-12 09:54:03 +00004355ac_ext=c
4356ac_cpp='$CPP $CPPFLAGS'
4357ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4358ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4359ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004360
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00004361if test ! -z "$preset_cflags"
4362then
4363 CFLAGS=$preset_cflags
4364fi
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004365
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004366
4367
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4369$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004370
Martin v. Löwiseba40652007-08-30 20:10:57 +00004371# Check whether --with-cxx_main was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004372if test "${with_cxx_main+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004373 withval=$with_cxx_main;
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004374
4375 case $withval in
4376 no) with_cxx_main=no
4377 MAINCC='$(CC)';;
4378 yes) with_cxx_main=yes
4379 MAINCC='$(CXX)';;
4380 *) with_cxx_main=yes
4381 MAINCC=$withval
4382 if test -z "$CXX"
4383 then
4384 CXX=$withval
4385 fi;;
4386 esac
4387else
4388
4389 with_cxx_main=no
4390 MAINCC='$(CC)'
4391
Martin v. Löwiseba40652007-08-30 20:10:57 +00004392fi
4393
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004394{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4395$as_echo "$with_cxx_main" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004396
4397preset_cxx="$CXX"
4398if test -z "$CXX"
4399then
4400 case "$CC" in
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004401 gcc) if test -n "$ac_tool_prefix"; then
4402 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4403set dummy ${ac_tool_prefix}g++; ac_word=$2
4404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4405$as_echo_n "checking for $ac_word... " >&6; }
4406if ${ac_cv_path_CXX+:} false; then :
4407 $as_echo_n "(cached) " >&6
4408else
4409 case $CXX in
4410 [\\/]* | ?:[\\/]*)
4411 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4412 ;;
4413 *)
4414 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4415for as_dir in notfound
4416do
4417 IFS=$as_save_IFS
4418 test -z "$as_dir" && as_dir=.
4419 for ac_exec_ext in '' $ac_executable_extensions; do
4420 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4421 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4422 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4423 break 2
4424 fi
4425done
4426 done
4427IFS=$as_save_IFS
4428
4429 ;;
4430esac
4431fi
4432CXX=$ac_cv_path_CXX
4433if test -n "$CXX"; then
4434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4435$as_echo "$CXX" >&6; }
4436else
4437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4438$as_echo "no" >&6; }
4439fi
4440
4441
4442fi
4443if test -z "$ac_cv_path_CXX"; then
4444 ac_pt_CXX=$CXX
4445 # Extract the first word of "g++", so it can be a program name with args.
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004446set dummy g++; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4448$as_echo_n "checking for $ac_word... " >&6; }
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004449if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004450 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004451else
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004452 case $ac_pt_CXX in
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004453 [\\/]* | ?:[\\/]*)
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004454 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 +00004455 ;;
4456 *)
4457 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4458for as_dir in notfound
4459do
4460 IFS=$as_save_IFS
4461 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004462 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004463 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004464 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004465 $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 +00004466 break 2
4467 fi
4468done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004469 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004470IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004471
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004472 ;;
4473esac
4474fi
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004475ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4476if test -n "$ac_pt_CXX"; then
4477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4478$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004479else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4481$as_echo "no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004482fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004483
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004484 if test "x$ac_pt_CXX" = x; then
4485 CXX="g++"
4486 else
4487 case $cross_compiling:$ac_tool_warned in
4488yes:)
4489{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4490$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4491ac_tool_warned=yes ;;
4492esac
4493 CXX=$ac_pt_CXX
4494 fi
4495else
4496 CXX="$ac_cv_path_CXX"
4497fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004498 ;;
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004499 cc) if test -n "$ac_tool_prefix"; then
4500 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4501set dummy ${ac_tool_prefix}c++; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4503$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004504if ${ac_cv_path_CXX+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004505 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004506else
4507 case $CXX in
4508 [\\/]* | ?:[\\/]*)
4509 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4510 ;;
4511 *)
4512 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4513for as_dir in notfound
4514do
4515 IFS=$as_save_IFS
4516 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004517 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004518 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004519 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004520 $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 +00004521 break 2
4522 fi
4523done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004524 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004525IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004526
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004527 ;;
4528esac
4529fi
4530CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00004531if test -n "$CXX"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4533$as_echo "$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004534else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4536$as_echo "no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004537fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004538
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004539
4540fi
4541if test -z "$ac_cv_path_CXX"; then
4542 ac_pt_CXX=$CXX
4543 # Extract the first word of "c++", so it can be a program name with args.
4544set dummy c++; ac_word=$2
4545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4546$as_echo_n "checking for $ac_word... " >&6; }
4547if ${ac_cv_path_ac_pt_CXX+:} false; then :
4548 $as_echo_n "(cached) " >&6
4549else
4550 case $ac_pt_CXX in
4551 [\\/]* | ?:[\\/]*)
4552 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4553 ;;
4554 *)
4555 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4556for as_dir in notfound
4557do
4558 IFS=$as_save_IFS
4559 test -z "$as_dir" && as_dir=.
4560 for ac_exec_ext in '' $ac_executable_extensions; do
4561 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4562 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4563 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4564 break 2
4565 fi
4566done
4567 done
4568IFS=$as_save_IFS
4569
4570 ;;
4571esac
4572fi
4573ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4574if test -n "$ac_pt_CXX"; then
4575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4576$as_echo "$ac_pt_CXX" >&6; }
4577else
4578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4579$as_echo "no" >&6; }
4580fi
4581
4582 if test "x$ac_pt_CXX" = x; then
4583 CXX="c++"
4584 else
4585 case $cross_compiling:$ac_tool_warned in
4586yes:)
4587{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4588$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4589ac_tool_warned=yes ;;
4590esac
4591 CXX=$ac_pt_CXX
4592 fi
4593else
4594 CXX="$ac_cv_path_CXX"
4595fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004596 ;;
4597 esac
4598 if test "$CXX" = "notfound"
4599 then
4600 CXX=""
4601 fi
4602fi
4603if test -z "$CXX"
4604then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004605 if test -n "$ac_tool_prefix"; then
4606 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4607 do
4608 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4609set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4611$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004612if ${ac_cv_prog_CXX+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004613 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004614else
4615 if test -n "$CXX"; then
4616 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4617else
4618as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4619for as_dir in $PATH
4620do
4621 IFS=$as_save_IFS
4622 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004623 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004624 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004625 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004626 $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 +00004627 break 2
4628 fi
4629done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004630 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004631IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004632
4633fi
4634fi
4635CXX=$ac_cv_prog_CXX
4636if test -n "$CXX"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4638$as_echo "$CXX" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004639else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4641$as_echo "no" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004642fi
4643
Martin v. Löwiseba40652007-08-30 20:10:57 +00004644
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004645 test -n "$CXX" && break
4646 done
4647fi
4648if test -z "$CXX"; then
4649 ac_ct_CXX=$CXX
4650 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4651do
4652 # Extract the first word of "$ac_prog", so it can be a program name with args.
4653set dummy $ac_prog; ac_word=$2
4654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4655$as_echo_n "checking for $ac_word... " >&6; }
4656if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4657 $as_echo_n "(cached) " >&6
4658else
4659 if test -n "$ac_ct_CXX"; then
4660 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4661else
4662as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4663for as_dir in $PATH
4664do
4665 IFS=$as_save_IFS
4666 test -z "$as_dir" && as_dir=.
4667 for ac_exec_ext in '' $ac_executable_extensions; do
4668 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4669 ac_cv_prog_ac_ct_CXX="$ac_prog"
4670 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4671 break 2
4672 fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004673done
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004674 done
4675IFS=$as_save_IFS
4676
4677fi
4678fi
4679ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4680if test -n "$ac_ct_CXX"; then
4681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4682$as_echo "$ac_ct_CXX" >&6; }
4683else
4684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4685$as_echo "no" >&6; }
4686fi
4687
4688
4689 test -n "$ac_ct_CXX" && break
4690done
4691
4692 if test "x$ac_ct_CXX" = x; then
4693 CXX="notfound"
4694 else
4695 case $cross_compiling:$ac_tool_warned in
4696yes:)
4697{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4698$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4699ac_tool_warned=yes ;;
4700esac
4701 CXX=$ac_ct_CXX
4702 fi
4703fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004704
4705 if test "$CXX" = "notfound"
4706 then
4707 CXX=""
4708 fi
4709fi
4710if test "$preset_cxx" != "$CXX"
4711then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004712 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004713
4714 By default, distutils will build C++ extension modules with \"$CXX\".
4715 If this is not intended, then set CXX on the configure command line.
4716 " >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004717$as_echo "$as_me: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004718
4719 By default, distutils will build C++ extension modules with \"$CXX\".
4720 If this is not intended, then set CXX on the configure command line.
4721 " >&2;}
4722fi
4723
doko@python.org4e63fbe2013-01-25 13:08:27 +01004724MULTIARCH=$($CC --print-multiarch 2>/dev/null)
4725
4726
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004727
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004728# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004729
4730ac_ext=c
4731ac_cpp='$CPP $CPPFLAGS'
4732ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4733ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4734ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4736$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004737# On Suns, sometimes $CPP names a directory.
4738if test -n "$CPP" && test -d "$CPP"; then
4739 CPP=
4740fi
4741if test -z "$CPP"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +01004742 if ${ac_cv_prog_CPP+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004743 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004744else
Martin v. Löwis11437992002-04-12 09:54:03 +00004745 # Double quotes because CPP needs to be expanded
4746 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4747 do
4748 ac_preproc_ok=false
4749for ac_c_preproc_warn_flag in '' yes
4750do
4751 # Use a header file that comes with gcc, so configuring glibc
4752 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004753 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4754 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004755 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004756 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004757 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004758/* end confdefs.h. */
4759#ifdef __STDC__
4760# include <limits.h>
4761#else
4762# include <assert.h>
4763#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004764 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004765_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004766if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004767
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004768else
Martin v. Löwis11437992002-04-12 09:54:03 +00004769 # Broken: fails on valid input.
4770continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004771fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004772rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004773
Martin v. Löwiseba40652007-08-30 20:10:57 +00004774 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004775 # can be detected and how.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004776 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004777/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004778#include <ac_nonexistent.h>
4779_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004780if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004781 # Broken: success on invalid input.
4782continue
4783else
Martin v. Löwis11437992002-04-12 09:54:03 +00004784 # Passes both tests.
4785ac_preproc_ok=:
4786break
4787fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004788rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004789
4790done
4791# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004792rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004793if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004794 break
4795fi
4796
4797 done
4798 ac_cv_prog_CPP=$CPP
4799
4800fi
4801 CPP=$ac_cv_prog_CPP
4802else
4803 ac_cv_prog_CPP=$CPP
4804fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004805{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4806$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004807ac_preproc_ok=false
4808for ac_c_preproc_warn_flag in '' yes
4809do
4810 # Use a header file that comes with gcc, so configuring glibc
4811 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004812 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4813 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004814 # On the NeXT, cc -E runs the code through the compiler's parser,
4815 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004816 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004817/* end confdefs.h. */
4818#ifdef __STDC__
4819# include <limits.h>
4820#else
4821# include <assert.h>
4822#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004823 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004824_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004825if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004826
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004827else
Martin v. Löwis11437992002-04-12 09:54:03 +00004828 # Broken: fails on valid input.
4829continue
4830fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004831rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004832
Martin v. Löwiseba40652007-08-30 20:10:57 +00004833 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004834 # can be detected and how.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004835 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004836/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004837#include <ac_nonexistent.h>
4838_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004839if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004840 # Broken: success on invalid input.
4841continue
4842else
Martin v. Löwis11437992002-04-12 09:54:03 +00004843 # Passes both tests.
4844ac_preproc_ok=:
4845break
4846fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004847rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004848
4849done
4850# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004851rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004852if $ac_preproc_ok; then :
4853
Martin v. Löwis11437992002-04-12 09:54:03 +00004854else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004855 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4856$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004857as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
Matthias Klose3cef2a92012-03-14 23:39:33 +01004858See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004859fi
4860
4861ac_ext=c
4862ac_cpp='$CPP $CPPFLAGS'
4863ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4864ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4865ac_compiler_gnu=$ac_cv_c_compiler_gnu
4866
4867
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4869$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004870if ${ac_cv_path_GREP+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004871 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004872else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004873 if test -z "$GREP"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004874 ac_path_GREP_found=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004875 # Loop through the user's path and test for each of PROGNAME-LIST
4876 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00004877for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4878do
4879 IFS=$as_save_IFS
4880 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004881 for ac_prog in grep ggrep; do
4882 for ac_exec_ext in '' $ac_executable_extensions; do
4883 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004884 as_fn_executable_p "$ac_path_GREP" || continue
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004885# Check for GNU ac_path_GREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004886 # Check for GNU $ac_path_GREP
4887case `"$ac_path_GREP" --version 2>&1` in
4888*GNU*)
4889 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4890*)
4891 ac_count=0
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004892 $as_echo_n 0123456789 >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004893 while :
4894 do
4895 cat "conftest.in" "conftest.in" >"conftest.tmp"
4896 mv "conftest.tmp" "conftest.in"
4897 cp "conftest.in" "conftest.nl"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004898 $as_echo 'GREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004899 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4900 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004901 as_fn_arith $ac_count + 1 && ac_count=$as_val
Martin v. Löwiseba40652007-08-30 20:10:57 +00004902 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4903 # Best one so far, save it but keep looking for a better one
4904 ac_cv_path_GREP="$ac_path_GREP"
4905 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004906 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004907 # 10*(2^10) chars as input seems more than enough
4908 test $ac_count -gt 10 && break
4909 done
4910 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4911esac
4912
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004913 $ac_path_GREP_found && break 3
4914 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004915 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004916 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004917IFS=$as_save_IFS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004918 if test -z "$ac_cv_path_GREP"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004919 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 +00004920 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004921else
4922 ac_cv_path_GREP=$GREP
4923fi
4924
Martin v. Löwiseba40652007-08-30 20:10:57 +00004925fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004926{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4927$as_echo "$ac_cv_path_GREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00004928 GREP="$ac_cv_path_GREP"
4929
4930
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4932$as_echo_n "checking for egrep... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004933if ${ac_cv_path_EGREP+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004934 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +00004935else
4936 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4937 then ac_cv_path_EGREP="$GREP -E"
4938 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004939 if test -z "$EGREP"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004940 ac_path_EGREP_found=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004941 # Loop through the user's path and test for each of PROGNAME-LIST
4942 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00004943for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4944do
4945 IFS=$as_save_IFS
4946 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004947 for ac_prog in egrep; do
4948 for ac_exec_ext in '' $ac_executable_extensions; do
4949 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004950 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004951# Check for GNU ac_path_EGREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004952 # Check for GNU $ac_path_EGREP
4953case `"$ac_path_EGREP" --version 2>&1` in
4954*GNU*)
4955 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4956*)
4957 ac_count=0
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004958 $as_echo_n 0123456789 >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004959 while :
4960 do
4961 cat "conftest.in" "conftest.in" >"conftest.tmp"
4962 mv "conftest.tmp" "conftest.in"
4963 cp "conftest.in" "conftest.nl"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004964 $as_echo 'EGREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004965 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4966 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004967 as_fn_arith $ac_count + 1 && ac_count=$as_val
Martin v. Löwiseba40652007-08-30 20:10:57 +00004968 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4969 # Best one so far, save it but keep looking for a better one
4970 ac_cv_path_EGREP="$ac_path_EGREP"
4971 ac_path_EGREP_max=$ac_count
4972 fi
4973 # 10*(2^10) chars as input seems more than enough
4974 test $ac_count -gt 10 && break
4975 done
4976 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4977esac
4978
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004979 $ac_path_EGREP_found && break 3
4980 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004981 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004982 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004983IFS=$as_save_IFS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004984 if test -z "$ac_cv_path_EGREP"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004985 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 +00004986 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004987else
4988 ac_cv_path_EGREP=$EGREP
4989fi
4990
Martin v. Löwiseba40652007-08-30 20:10:57 +00004991 fi
4992fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004993{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4994$as_echo "$ac_cv_path_EGREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00004995 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00004996
4997
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4999$as_echo_n "checking for ANSI C header files... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005000if ${ac_cv_header_stdc+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005001 $as_echo_n "(cached) " >&6
5002else
5003 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00005004/* end confdefs.h. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005005#include <stdlib.h>
5006#include <stdarg.h>
5007#include <string.h>
5008#include <float.h>
5009
5010int
5011main ()
5012{
5013
5014 ;
5015 return 0;
5016}
5017_ACEOF
5018if ac_fn_c_try_compile "$LINENO"; then :
5019 ac_cv_header_stdc=yes
5020else
5021 ac_cv_header_stdc=no
5022fi
5023rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5024
5025if test $ac_cv_header_stdc = yes; then
5026 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5027 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5028/* end confdefs.h. */
5029#include <string.h>
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00005030
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00005031_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005032if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005033 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005034
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005035else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005036 ac_cv_header_stdc=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005037fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00005038rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005039
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005040fi
5041
5042if test $ac_cv_header_stdc = yes; then
5043 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5044 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5045/* end confdefs.h. */
5046#include <stdlib.h>
5047
5048_ACEOF
5049if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5050 $EGREP "free" >/dev/null 2>&1; then :
5051
5052else
5053 ac_cv_header_stdc=no
5054fi
5055rm -f conftest*
5056
5057fi
5058
5059if test $ac_cv_header_stdc = yes; then
5060 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5061 if test "$cross_compiling" = yes; then :
5062 :
5063else
5064 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5065/* end confdefs.h. */
5066#include <ctype.h>
5067#include <stdlib.h>
5068#if ((' ' & 0x0FF) == 0x020)
5069# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5070# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5071#else
5072# define ISLOWER(c) \
5073 (('a' <= (c) && (c) <= 'i') \
5074 || ('j' <= (c) && (c) <= 'r') \
5075 || ('s' <= (c) && (c) <= 'z'))
5076# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5077#endif
5078
5079#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5080int
5081main ()
5082{
5083 int i;
5084 for (i = 0; i < 256; i++)
5085 if (XOR (islower (i), ISLOWER (i))
5086 || toupper (i) != TOUPPER (i))
5087 return 2;
5088 return 0;
5089}
5090_ACEOF
5091if ac_fn_c_try_run "$LINENO"; then :
5092
5093else
5094 ac_cv_header_stdc=no
5095fi
5096rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5097 conftest.$ac_objext conftest.beam conftest.$ac_ext
5098fi
5099
5100fi
5101fi
5102{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5103$as_echo "$ac_cv_header_stdc" >&6; }
5104if test $ac_cv_header_stdc = yes; then
5105
5106$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5107
5108fi
5109
5110# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5111for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5112 inttypes.h stdint.h unistd.h
5113do :
5114 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5115ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5116"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00005117if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005118 cat >>confdefs.h <<_ACEOF
5119#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5120_ACEOF
5121
5122fi
5123
5124done
5125
5126
5127
5128 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 +01005129if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005130 MINIX=yes
5131else
5132 MINIX=
5133fi
5134
5135
5136 if test "$MINIX" = yes; then
5137
5138$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5139
5140
5141$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5142
5143
5144$as_echo "#define _MINIX 1" >>confdefs.h
5145
5146 fi
5147
5148
5149 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5150$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005151if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005152 $as_echo_n "(cached) " >&6
5153else
5154 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5155/* end confdefs.h. */
5156
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005157# define __EXTENSIONS__ 1
5158 $ac_includes_default
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005159int
5160main ()
5161{
5162
5163 ;
5164 return 0;
5165}
5166_ACEOF
5167if ac_fn_c_try_compile "$LINENO"; then :
5168 ac_cv_safe_to_define___extensions__=yes
5169else
5170 ac_cv_safe_to_define___extensions__=no
5171fi
5172rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5173fi
5174{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5175$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5176 test $ac_cv_safe_to_define___extensions__ = yes &&
5177 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5178
5179 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5180
5181 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5182
5183 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5184
5185 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5186
5187
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005188
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005189# Check for unsupported systems
5190case $ac_sys_system/$ac_sys_release in
5191atheos*|Linux*/1*)
5192 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5193 echo See README for details.
5194 exit 1;;
5195esac
5196
5197
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5199$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005200
5201# Check whether --with-suffix was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005202if test "${with_suffix+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005203 withval=$with_suffix;
5204 case $withval in
5205 no) EXEEXT=;;
5206 yes) EXEEXT=.exe;;
5207 *) EXEEXT=$withval;;
5208 esac
5209fi
5210
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005211{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5212$as_echo "$EXEEXT" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005213
5214# Test whether we're running on a non-case-sensitive system, in which
5215# case we give a warning if no ext is given
5216
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5218$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005219if test ! -d CaseSensitiveTestDir; then
5220mkdir CaseSensitiveTestDir
5221fi
5222
5223if test -d casesensitivetestdir
5224then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005225 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5226$as_echo "yes" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005227 BUILDEXEEXT=.exe
5228else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005229 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5230$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005231 BUILDEXEEXT=$EXEEXT
5232fi
5233rmdir CaseSensitiveTestDir
5234
5235case $MACHDEP in
5236bsdos*)
5237 case $CC in
5238 gcc) CC="$CC -D_HAVE_BSDI";;
5239 esac;;
5240esac
5241
5242case $ac_sys_system in
5243hp*|HP*)
5244 case $CC in
5245 cc|*/cc) CC="$CC -Ae";;
5246 esac;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005247SunOS*)
5248 # Some functions have a prototype only with that define, e.g. confstr
5249
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005250$as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005251
5252 ;;
5253esac
5254
5255
5256
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5258$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005259if test -z "$LIBRARY"
5260then
5261 LIBRARY='libpython$(VERSION).a'
5262fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005263{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5264$as_echo "$LIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005265
5266# LDLIBRARY is the name of the library to link against (as opposed to the
5267# name of the library into which to insert object files). BLDLIBRARY is also
5268# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5269# is blank as the main program is not linked directly against LDLIBRARY.
5270# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5271# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5272# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5273# DLLLIBRARY is the shared (i.e., DLL) library.
5274#
5275# RUNSHARED is used to run shared python without installed libraries
5276#
5277# INSTSONAME is the name of the shared library that will be use to install
5278# on the system - some systems like version suffix, others don't
5279
5280
5281
5282
5283
5284
5285LDLIBRARY="$LIBRARY"
5286BLDLIBRARY='$(LDLIBRARY)'
5287INSTSONAME='$(LDLIBRARY)'
5288DLLLIBRARY=''
5289LDLIBRARYDIR=''
5290RUNSHARED=''
5291
5292# LINKCC is the command that links the python executable -- default is $(CC).
5293# If CXX is set, and if it is needed to link a main function that was
5294# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5295# python might then depend on the C++ runtime
5296# This is altered for AIX in order to build the export list before
5297# linking.
5298
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5300$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005301if test -z "$LINKCC"
5302then
5303 LINKCC='$(PURIFY) $(MAINCC)'
5304 case $ac_sys_system in
5305 AIX*)
5306 exp_extra="\"\""
5307 if test $ac_sys_release -ge 5 -o \
5308 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5309 exp_extra="."
5310 fi
5311 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005312 QNX*)
5313 # qcc must be used because the other compilers do not
5314 # support -N.
5315 LINKCC=qcc;;
5316 esac
5317fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005318{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5319$as_echo "$LINKCC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005320
5321# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5322# make sure we default having it set to "no": this is used by
5323# distutils.unixccompiler to know if it should add --enable-new-dtags
5324# to linker command lines, and failing to detect GNU ld simply results
5325# in the same bahaviour as before.
5326
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5328$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005329ac_prog=ld
5330if test "$GCC" = yes; then
5331 ac_prog=`$CC -print-prog-name=ld`
5332fi
5333case `"$ac_prog" -V 2>&1 < /dev/null` in
5334 *GNU*)
5335 GNULD=yes;;
5336 *)
5337 GNULD=no;;
5338esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005339{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5340$as_echo "$GNULD" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005341
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5343$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005344# Check whether --enable-shared was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005345if test "${enable_shared+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005346 enableval=$enable_shared;
5347fi
5348
5349
5350if test -z "$enable_shared"
5351then
5352 case $ac_sys_system in
5353 CYGWIN* | atheos*)
5354 enable_shared="yes";;
5355 *)
5356 enable_shared="no";;
5357 esac
5358fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005359{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5360$as_echo "$enable_shared" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005361
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5363$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005364# Check whether --enable-profiling was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005365if test "${enable_profiling+set}" = set; then :
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005366 enableval=$enable_profiling;
5367fi
5368
5369if test "x$enable_profiling" = xyes; then
5370 ac_save_cc="$CC"
Benjamin Petersonb9be7bb2013-03-26 08:55:37 -04005371 CC="$CC -pg"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005372 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005373/* end confdefs.h. */
5374int main() { return 0; }
5375_ACEOF
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005376if ac_fn_c_try_link "$LINENO"; then :
5377
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005378else
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005379 enable_profiling=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005380fi
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005381rm -f core conftest.err conftest.$ac_objext \
5382 conftest$ac_exeext conftest.$ac_ext
5383 CC="$ac_save_cc"
5384else
5385 enable_profiling=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005386fi
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005387{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5388$as_echo "$enable_profiling" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005389
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005390if test "x$enable_profiling" = xyes; then
5391 BASECFLAGS="-pg $BASECFLAGS"
5392 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005393fi
5394
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5396$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005397
5398# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5399# library that we build, but we do not want to link against it (we
5400# will find it with a -framework option). For this reason there is an
5401# extra variable BLDLIBRARY against which Python and the extension
5402# modules are linked, BLDLIBRARY. This is normally the same as
5403# LDLIBRARY, but empty for MacOSX framework builds.
5404if test "$enable_framework"
5405then
5406 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005407 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005408 BLDLIBRARY=''
5409else
5410 BLDLIBRARY='$(LDLIBRARY)'
5411fi
5412
5413# Other platforms follow
5414if test $enable_shared = "yes"; then
5415
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005416$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005417
5418 case $ac_sys_system in
5419 BeOS*)
5420 LDLIBRARY='libpython$(VERSION).so'
5421 ;;
5422 CYGWIN*)
5423 LDLIBRARY='libpython$(VERSION).dll.a'
5424 DLLLIBRARY='libpython$(VERSION).dll'
5425 ;;
5426 SunOS*)
5427 LDLIBRARY='libpython$(VERSION).so'
5428 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005429 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005430 INSTSONAME="$LDLIBRARY".$SOVERSION
5431 ;;
Charles-François Natali3de8c732011-07-24 22:33:35 +02005432 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005433 LDLIBRARY='libpython$(VERSION).so'
5434 BLDLIBRARY='-L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005435 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005436 case $ac_sys_system in
5437 FreeBSD*)
5438 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
5439 ;;
5440 esac
5441 INSTSONAME="$LDLIBRARY".$SOVERSION
5442 ;;
5443 hp*|HP*)
5444 case `uname -m` in
5445 ia64)
5446 LDLIBRARY='libpython$(VERSION).so'
5447 ;;
5448 *)
5449 LDLIBRARY='libpython$(VERSION).sl'
5450 ;;
5451 esac
5452 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005453 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005454 ;;
5455 OSF*)
5456 LDLIBRARY='libpython$(VERSION).so'
5457 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005458 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005459 ;;
5460 atheos*)
5461 LDLIBRARY='libpython$(VERSION).so'
5462 BLDLIBRARY='-L. -lpython$(VERSION)'
5463 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
5464 ;;
5465 Darwin*)
5466 LDLIBRARY='libpython$(VERSION).dylib'
5467 BLDLIBRARY='-L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005468 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005469 ;;
Antoine Pitrouaabdceb2010-09-10 20:03:17 +00005470 AIX*)
5471 LDLIBRARY='libpython$(VERSION).so'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005472 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrouaabdceb2010-09-10 20:03:17 +00005473 ;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005474
5475 esac
5476else # shared is disabled
5477 case $ac_sys_system in
5478 CYGWIN*)
5479 BLDLIBRARY='$(LIBRARY)'
5480 LDLIBRARY='libpython$(VERSION).dll.a'
5481 ;;
5482 esac
5483fi
5484
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005485if test "$cross_compiling" = yes; then
5486 RUNSHARED=
5487fi
5488
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005489{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5490$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005491
5492if test -n "$ac_tool_prefix"; then
5493 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5494set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5496$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005497if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005498 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005499else
5500 if test -n "$RANLIB"; then
5501 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5502else
5503as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5504for as_dir in $PATH
5505do
5506 IFS=$as_save_IFS
5507 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005508 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005509 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005510 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005511 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005512 break 2
5513 fi
5514done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005515 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005516IFS=$as_save_IFS
5517
5518fi
5519fi
5520RANLIB=$ac_cv_prog_RANLIB
5521if test -n "$RANLIB"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5523$as_echo "$RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005524else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5526$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005527fi
5528
5529
5530fi
5531if test -z "$ac_cv_prog_RANLIB"; then
5532 ac_ct_RANLIB=$RANLIB
5533 # Extract the first word of "ranlib", so it can be a program name with args.
5534set dummy ranlib; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5536$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005537if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005538 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005539else
5540 if test -n "$ac_ct_RANLIB"; then
5541 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5542else
5543as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5544for as_dir in $PATH
5545do
5546 IFS=$as_save_IFS
5547 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005548 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005549 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005550 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005551 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005552 break 2
5553 fi
5554done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005555 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005556IFS=$as_save_IFS
5557
5558fi
5559fi
5560ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5561if test -n "$ac_ct_RANLIB"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5563$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005564else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5566$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005567fi
5568
5569 if test "x$ac_ct_RANLIB" = x; then
5570 RANLIB=":"
5571 else
5572 case $cross_compiling:$ac_tool_warned in
5573yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005574{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5575$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005576ac_tool_warned=yes ;;
5577esac
5578 RANLIB=$ac_ct_RANLIB
5579 fi
5580else
5581 RANLIB="$ac_cv_prog_RANLIB"
5582fi
5583
5584
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005585if test -n "$ac_tool_prefix"; then
5586 for ac_prog in ar aal
5587 do
5588 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5589set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5591$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005592if ${ac_cv_prog_AR+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005593 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005594else
5595 if test -n "$AR"; then
5596 ac_cv_prog_AR="$AR" # Let the user override the test.
5597else
5598as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5599for as_dir in $PATH
5600do
5601 IFS=$as_save_IFS
5602 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005603 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005604 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005605 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005606 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005607 break 2
5608 fi
5609done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005610 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005611IFS=$as_save_IFS
5612
5613fi
5614fi
5615AR=$ac_cv_prog_AR
5616if test -n "$AR"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5618$as_echo "$AR" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005619else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5621$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005622fi
5623
5624
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005625 test -n "$AR" && break
5626 done
5627fi
5628if test -z "$AR"; then
5629 ac_ct_AR=$AR
5630 for ac_prog in ar aal
5631do
5632 # Extract the first word of "$ac_prog", so it can be a program name with args.
5633set dummy $ac_prog; ac_word=$2
5634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5635$as_echo_n "checking for $ac_word... " >&6; }
5636if ${ac_cv_prog_ac_ct_AR+:} false; then :
5637 $as_echo_n "(cached) " >&6
5638else
5639 if test -n "$ac_ct_AR"; then
5640 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5641else
5642as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5643for as_dir in $PATH
5644do
5645 IFS=$as_save_IFS
5646 test -z "$as_dir" && as_dir=.
5647 for ac_exec_ext in '' $ac_executable_extensions; do
5648 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5649 ac_cv_prog_ac_ct_AR="$ac_prog"
5650 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5651 break 2
5652 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005653done
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005654 done
5655IFS=$as_save_IFS
5656
5657fi
5658fi
5659ac_ct_AR=$ac_cv_prog_ac_ct_AR
5660if test -n "$ac_ct_AR"; then
5661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5662$as_echo "$ac_ct_AR" >&6; }
5663else
5664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5665$as_echo "no" >&6; }
5666fi
5667
5668
5669 test -n "$ac_ct_AR" && break
5670done
5671
5672 if test "x$ac_ct_AR" = x; then
5673 AR="ar"
5674 else
5675 case $cross_compiling:$ac_tool_warned in
5676yes:)
5677{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5678$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5679ac_tool_warned=yes ;;
5680esac
5681 AR=$ac_ct_AR
5682 fi
5683fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005684
5685
5686# tweak ARFLAGS only if the user didn't set it on the command line
5687
5688if test -z "$ARFLAGS"
5689then
5690 ARFLAGS="rc"
5691fi
5692
5693
5694# Extract the first word of "svnversion", so it can be a program name with args.
5695set dummy svnversion; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5697$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005698if ${ac_cv_prog_SVNVERSION+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005699 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005700else
5701 if test -n "$SVNVERSION"; then
5702 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
5703else
5704as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5705for as_dir in $PATH
5706do
5707 IFS=$as_save_IFS
5708 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005709 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005710 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005711 ac_cv_prog_SVNVERSION="found"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005712 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005713 break 2
5714 fi
5715done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005716 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005717IFS=$as_save_IFS
5718
5719 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
5720fi
5721fi
5722SVNVERSION=$ac_cv_prog_SVNVERSION
5723if test -n "$SVNVERSION"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SVNVERSION" >&5
5725$as_echo "$SVNVERSION" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005726else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5728$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005729fi
5730
5731
5732if test $SVNVERSION = found
5733then
5734 SVNVERSION="svnversion \$(srcdir)"
5735else
5736 SVNVERSION="echo Unversioned directory"
5737fi
5738
Trent Nelsond86ceec2012-10-16 09:42:45 -04005739
Trent Nelsonabf20512012-10-17 04:32:49 -04005740if test "$abs_srcdir" != "$abs_builddir"; then
Trent Nelsond86ceec2012-10-16 09:42:45 -04005741 # If we're building out-of-tree make sure Include (in the current dir)
5742 # gets picked up before its $srcdir counterpart in order for Python-ast.h
5743 # and graminit.h to get picked up from the correct directory.
5744 # (A side effect of this is that these resources will automatically be
5745 # regenerated when building out-of-tree, regardless of whether or not
5746 # the $srcdir counterpart is up-to-date. This is an acceptable trade
5747 # off.)
5748 BASECPPFLAGS="-IInclude"
5749else
5750 BASECPPFLAGS=""
5751fi
5752
Georg Brandl3a5508e2011-03-06 10:42:21 +01005753
5754
5755
5756# Extract the first word of "hg", so it can be a program name with args.
5757set dummy hg; ac_word=$2
5758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5759$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005760if ${ac_cv_prog_HAS_HG+:} false; then :
Georg Brandl3a5508e2011-03-06 10:42:21 +01005761 $as_echo_n "(cached) " >&6
5762else
5763 if test -n "$HAS_HG"; then
5764 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
5765else
5766as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5767for as_dir in $PATH
5768do
5769 IFS=$as_save_IFS
5770 test -z "$as_dir" && as_dir=.
5771 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005772 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Georg Brandl3a5508e2011-03-06 10:42:21 +01005773 ac_cv_prog_HAS_HG="found"
5774 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5775 break 2
5776 fi
5777done
5778 done
5779IFS=$as_save_IFS
5780
5781 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
5782fi
5783fi
5784HAS_HG=$ac_cv_prog_HAS_HG
5785if test -n "$HAS_HG"; then
5786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
5787$as_echo "$HAS_HG" >&6; }
5788else
5789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5790$as_echo "no" >&6; }
5791fi
5792
5793
5794if test $HAS_HG = found
5795then
5796 HGVERSION="hg id -i \$(srcdir)"
5797 HGTAG="hg id -t \$(srcdir)"
5798 HGBRANCH="hg id -b \$(srcdir)"
5799else
5800 HGVERSION=""
5801 HGTAG=""
5802 HGBRANCH=""
5803fi
5804
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005805case $MACHDEP in
5806bsdos*|hp*|HP*)
5807 # install -d does not work on BSDI or HP-UX
5808 if test -z "$INSTALL"
5809 then
5810 INSTALL="${srcdir}/install-sh -c"
5811 fi
5812esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005813# Find a good install program. We prefer a C program (faster),
5814# so one script is as good as another. But avoid the broken or
5815# incompatible versions:
5816# SysV /etc/install, /usr/sbin/install
5817# SunOS /usr/etc/install
5818# IRIX /sbin/install
5819# AIX /bin/install
5820# AmigaOS /C/install, which installs bootblocks on floppy discs
5821# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5822# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5823# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5824# OS/2's system install, which has a completely different semantic
5825# ./install, which can be erroneously created by make from ./install.sh.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005826# Reject install programs that cannot install multiple files.
5827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5828$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005829if test -z "$INSTALL"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +01005830if ${ac_cv_path_install+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005831 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005832else
5833 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5834for as_dir in $PATH
5835do
5836 IFS=$as_save_IFS
5837 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005838 # Account for people who put trailing slashes in PATH elements.
5839case $as_dir/ in #((
5840 ./ | .// | /[cC]/* | \
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005841 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005842 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005843 /usr/ucb/* ) ;;
5844 *)
5845 # OSF1 and SCO ODT 3.0 have their own names for install.
5846 # Don't use installbsd from OSF since it installs stuff as root
5847 # by default.
5848 for ac_prog in ginstall scoinst install; do
5849 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005850 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005851 if test $ac_prog = install &&
5852 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5853 # AIX install. It has an incompatible calling convention.
5854 :
5855 elif test $ac_prog = install &&
5856 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5857 # program-specific install script used by HP pwplus--don't use.
5858 :
5859 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005860 rm -rf conftest.one conftest.two conftest.dir
5861 echo one > conftest.one
5862 echo two > conftest.two
5863 mkdir conftest.dir
5864 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5865 test -s conftest.one && test -s conftest.two &&
5866 test -s conftest.dir/conftest.one &&
5867 test -s conftest.dir/conftest.two
5868 then
5869 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5870 break 3
5871 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005872 fi
5873 fi
5874 done
5875 done
5876 ;;
5877esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005878
5879 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005880IFS=$as_save_IFS
5881
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005882rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005883
5884fi
5885 if test "${ac_cv_path_install+set}" = set; then
5886 INSTALL=$ac_cv_path_install
5887 else
5888 # As a last resort, use the slow shell script. Don't cache a
5889 # value for INSTALL within a source directory, because that will
5890 # break other packages using the cache if that directory is
5891 # removed, or if the value is a relative name.
5892 INSTALL=$ac_install_sh
5893 fi
5894fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005895{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5896$as_echo "$INSTALL" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005897
5898# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5899# It thinks the first close brace ends the variable substitution.
5900test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5901
5902test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5903
5904test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5905
Trent Nelsonf6407a12012-08-30 14:56:13 +00005906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
5907$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
5908if test -z "$MKDIR_P"; then
5909 if ${ac_cv_path_mkdir+:} false; then :
5910 $as_echo_n "(cached) " >&6
5911else
5912 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5913for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
5914do
5915 IFS=$as_save_IFS
5916 test -z "$as_dir" && as_dir=.
5917 for ac_prog in mkdir gmkdir; do
5918 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005919 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Trent Nelsonf6407a12012-08-30 14:56:13 +00005920 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
5921 'mkdir (GNU coreutils) '* | \
5922 'mkdir (coreutils) '* | \
5923 'mkdir (fileutils) '4.1*)
5924 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
5925 break 3;;
5926 esac
5927 done
5928 done
5929 done
5930IFS=$as_save_IFS
5931
5932fi
5933
5934 test -d ./--version && rmdir ./--version
5935 if test "${ac_cv_path_mkdir+set}" = set; then
5936 MKDIR_P="$ac_cv_path_mkdir -p"
5937 else
5938 # As a last resort, use the slow shell script. Don't cache a
5939 # value for MKDIR_P within a source directory, because that will
5940 # break other packages using the cache if that directory is
5941 # removed, or if the value is a relative name.
5942 MKDIR_P="$ac_install_sh -d"
5943 fi
5944fi
5945{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
5946$as_echo "$MKDIR_P" >&6; }
5947
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005948
5949# Not every filesystem supports hard links
5950
5951if test -z "$LN" ; then
5952 case $ac_sys_system in
5953 BeOS*) LN="ln -s";;
5954 CYGWIN*) LN="ln -s";;
5955 atheos*) LN="ln -s";;
5956 *) LN=ln;;
5957 esac
5958fi
5959
5960# Check for --with-pydebug
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5962$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005963
5964# Check whether --with-pydebug was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005965if test "${with_pydebug+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005966 withval=$with_pydebug;
5967if test "$withval" != no
5968then
5969
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005970$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005971
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5973$as_echo "yes" >&6; };
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005974 Py_DEBUG='true'
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005975else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5976$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005977fi
5978else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5980$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005981fi
5982
5983
5984# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5985# merged with this chunk of code?
5986
5987# Optimizer/debugger flags
5988# ------------------------
5989# (The following bit of code is complicated enough - please keep things
5990# indented properly. Just pretend you're editing Python code. ;-)
5991
5992# There are two parallel sets of case statements below, one that checks to
5993# see if OPT was set and one that does BASECFLAGS setting based upon
5994# compiler and platform. BASECFLAGS tweaks need to be made even if the
5995# user set OPT.
5996
5997# tweak OPT based on compiler and platform, only if the user didn't set
5998# it on the command line
5999
Benjamin Petersond4b721b2010-03-23 20:58:37 +00006000if test "${OPT-unset}" = "unset"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006001then
6002 case $GCC in
6003 yes)
6004 if test "$CC" != 'g++' ; then
6005 STRICT_PROTO="-Wstrict-prototypes"
6006 fi
6007 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6008 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6009 WRAP="-fwrapv"
6010 fi
Stefan Krah503e5e12011-09-14 15:19:42 +02006011
6012 # Clang also needs -fwrapv
Stefan Krah2bc1e8f2011-12-08 22:26:06 +01006013 case $CC in
6014 *clang*) WRAP="-fwrapv"
6015 ;;
6016 esac
Stefan Krah503e5e12011-09-14 15:19:42 +02006017
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006018 case $ac_cv_prog_cc_g in
6019 yes)
6020 if test "$Py_DEBUG" = 'true' ; then
6021 # Optimization messes up debuggers, so turn it off for
6022 # debug builds.
Mark Dickinsond2f3e3f2010-05-05 22:23:58 +00006023 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006024 else
6025 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
6026 fi
6027 ;;
6028 *)
6029 OPT="-O3 -Wall $STRICT_PROTO"
6030 ;;
6031 esac
6032 case $ac_sys_system in
6033 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6034 ;;
6035 esac
6036 ;;
6037
6038 *)
6039 OPT="-O"
6040 ;;
6041 esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006042fi
6043
6044
6045
6046# The -arch flags for universal builds on OSX
6047UNIVERSAL_ARCH_FLAGS=
6048
6049
6050# tweak BASECFLAGS based on compiler and platform
6051case $GCC in
6052yes)
6053 # Python violates C99 rules, by casting between incompatible
6054 # pointer types. GCC may generate bad code as a result of that,
6055 # so use -fno-strict-aliasing if supported.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006056 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -fno-strict-aliasing" >&5
6057$as_echo_n "checking whether $CC accepts -fno-strict-aliasing... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006058 ac_save_cc="$CC"
6059 CC="$CC -fno-strict-aliasing"
Matthias Klose3cef2a92012-03-14 23:39:33 +01006060 if ${ac_cv_no_strict_aliasing_ok+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006061 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00006062else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006063 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006064/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00006065
6066int
6067main ()
6068{
Mark Dickinson5e13e292010-05-11 08:55:06 +00006069
Gregory P. Smith373469a2009-11-01 21:03:38 +00006070 ;
6071 return 0;
6072}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006073_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006074if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006075 ac_cv_no_strict_aliasing_ok=yes
6076else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006077 ac_cv_no_strict_aliasing_ok=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006078fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00006079rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00006080fi
6081
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006082 CC="$ac_save_cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing_ok" >&5
6084$as_echo "$ac_cv_no_strict_aliasing_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006085 if test $ac_cv_no_strict_aliasing_ok = yes
6086 then
6087 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6088 fi
6089
6090 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
6091 # support. Without this, treatment of subnormals doesn't follow
6092 # the standard.
doko@python.orgd65e2ba2013-01-31 23:52:03 +01006093 case $host in
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006094 alpha*)
6095 BASECFLAGS="$BASECFLAGS -mieee"
6096 ;;
6097 esac
6098
6099 case $ac_sys_system in
6100 SCO_SV*)
6101 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
6102 ;;
6103 # is there any other compiler on Darwin besides gcc?
6104 Darwin*)
6105 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
6106 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006107 if test "${CC}" = gcc
6108 then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006109 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
6110$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006111 case "${UNIVERSALSDK}" in
6112 */MacOSX10.4u.sdk)
6113 # Build using 10.4 SDK, force usage of gcc when the
6114 # compiler is gcc, otherwise the user will get very
6115 # confusing error messages when building on OSX 10.6
6116 CC=gcc-4.0
6117 CPP=cpp-4.0
6118 ;;
6119 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
6121$as_echo "$CC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006122 fi
6123
6124 # Calculate the right deployment target for this build.
6125 #
Ned Deilyc40b9032014-06-25 13:48:46 -07006126 cur_target_major=`sw_vers -productVersion | \
6127 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
6128 cur_target_minor=`sw_vers -productVersion | \
6129 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
6130 cur_target="${cur_target_major}.${cur_target_minor}"
6131 if test ${cur_target_major} -eq 10 && \
6132 test ${cur_target_minor} -ge 3
6133 then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006134 cur_target=10.3
Ronald Oussoren25967582009-09-06 10:00:26 +00006135 if test ${enable_universalsdk}; then
6136 if test "${UNIVERSAL_ARCHS}" = "all"; then
6137 # Ensure that the default platform for a
6138 # 4-way universal build is OSX 10.5,
6139 # that's the first OS release where
6140 # 4-way builds make sense.
6141 cur_target='10.5'
Ronald Oussoren23d92532009-09-07 06:12:00 +00006142
6143 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
6144 cur_target='10.5'
6145
6146 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
6147 cur_target='10.5'
6148
6149 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
6150 cur_target='10.5'
Ronald Oussoren25967582009-09-06 10:00:26 +00006151 fi
6152 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00006153 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren25967582009-09-06 10:00:26 +00006154 # On Intel macs default to a deployment
6155 # target of 10.4, that's the first OSX
6156 # release with Intel support.
6157 cur_target="10.4"
6158 fi
6159 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006160 fi
6161 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
6162
6163 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
6164 # environment with a value that is the same as what we'll use
6165 # in the Makefile to ensure that we'll get the same compiler
6166 # environment during configure and build time.
6167 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
6168 export MACOSX_DEPLOYMENT_TARGET
6169 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
6170
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006171 if test "${enable_universalsdk}"; then
6172 UNIVERSAL_ARCH_FLAGS=""
6173 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
6174 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
6175 ARCH_RUN_32BIT=""
Ronald Oussoren75912852010-04-08 08:13:31 +00006176 LIPO_32BIT_FLAGS=""
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006177
6178 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
6179 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
6180 LIPO_32BIT_FLAGS=""
6181 ARCH_RUN_32BIT="true"
6182
6183 elif test "$UNIVERSAL_ARCHS" = "all" ; then
6184 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
6185 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren92397ce2010-01-17 19:32:00 +00006186 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006187
6188 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
6189 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
6190 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren92397ce2010-01-17 19:32:00 +00006191 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006192
6193 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
6194 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
6195 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren9922f172010-02-11 13:19:34 +00006196 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006197
6198 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006199 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 +00006200
6201 fi
6202
6203
Ronald Oussoren974eb5e2010-04-18 17:59:37 +00006204 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
6205 if test "${UNIVERSALSDK}" != "/"
6206 then
6207 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
6208 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
6209 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006210 fi
6211
6212 fi
6213
6214
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006215 ;;
6216 OSF*)
6217 BASECFLAGS="$BASECFLAGS -mieee"
6218 ;;
6219 esac
6220 ;;
6221
6222*)
6223 case $ac_sys_system in
6224 OpenUNIX*|UnixWare*)
6225 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
6226 ;;
6227 OSF*)
6228 BASECFLAGS="$BASECFLAGS -ieee -std"
6229 ;;
6230 SCO_SV*)
6231 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
6232 ;;
6233 esac
6234 ;;
6235esac
6236
Zachary Ware6ed42ea2015-12-21 11:43:03 -06006237# ICC needs -fp-model strict or floats behave badly
6238case "$CC" in
6239*icc*)
6240 BASECFLAGS="$BASECFLAGS -fp-model strict"
6241 ;;
6242esac
6243
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006244if test "$Py_DEBUG" = 'true'; then
6245 :
6246else
6247 OPT="-DNDEBUG $OPT"
6248fi
6249
6250if test "$ac_arch_flags"
6251then
6252 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
6253fi
6254
6255# disable check for icc since it seems to pass, but generates a warning
6256if test "$CC" = icc
6257then
6258 ac_cv_opt_olimit_ok=no
6259fi
6260
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -OPT:Olimit=0" >&5
6262$as_echo_n "checking whether $CC accepts -OPT:Olimit=0... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006263if ${ac_cv_opt_olimit_ok+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006264 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006265else
6266 ac_save_cc="$CC"
6267CC="$CC -OPT:Olimit=0"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006268cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006269/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00006270
6271int
6272main ()
6273{
Mark Dickinson5e13e292010-05-11 08:55:06 +00006274
Gregory P. Smith373469a2009-11-01 21:03:38 +00006275 ;
6276 return 0;
6277}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006278_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006279if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006280 ac_cv_opt_olimit_ok=yes
6281else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006282 ac_cv_opt_olimit_ok=no
Matthias Klosec511b472010-05-08 11:01:39 +00006283
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006284fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00006285rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006286CC="$ac_save_cc"
6287fi
6288
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006289{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_opt_olimit_ok" >&5
6290$as_echo "$ac_cv_opt_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006291if test $ac_cv_opt_olimit_ok = yes; then
6292 case $ac_sys_system in
6293 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
6294 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
6295 # environment?
6296 Darwin*)
6297 ;;
Trent Nelson34562e12012-10-17 18:01:12 -04006298 # XXX thankfully this useless troublemaker of a flag has been
6299 # eradicated in the 3.x line. For now, make sure it isn't picked
6300 # up by any of our other platforms that use CC.
6301 AIX*|SunOS*|HP-UX*|IRIX*)
6302 ;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006303 *)
6304 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
6305 ;;
6306 esac
6307else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006308 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Olimit 1500" >&5
6309$as_echo_n "checking whether $CC accepts -Olimit 1500... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006310 if ${ac_cv_olimit_ok+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006311 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006312else
6313 ac_save_cc="$CC"
6314 CC="$CC -Olimit 1500"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006315 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006316/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00006317
6318int
6319main ()
6320{
Mark Dickinson5e13e292010-05-11 08:55:06 +00006321
Gregory P. Smith373469a2009-11-01 21:03:38 +00006322 ;
6323 return 0;
6324}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006325_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006326if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006327 ac_cv_olimit_ok=yes
6328else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006329 ac_cv_olimit_ok=no
Matthias Klosec511b472010-05-08 11:01:39 +00006330
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006331fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00006332rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006333 CC="$ac_save_cc"
6334fi
6335
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_olimit_ok" >&5
6337$as_echo "$ac_cv_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006338 if test $ac_cv_olimit_ok = yes; then
Stefan Krah67473262012-11-29 00:17:05 +01006339 case $ac_sys_system in
6340 # Issue #16534: On HP-UX ac_cv_olimit_ok=yes is a false positive.
6341 HP-UX*)
6342 ;;
6343 *)
6344 BASECFLAGS="$BASECFLAGS -Olimit 1500"
6345 ;;
6346 esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006347 fi
6348fi
6349
6350# Check whether GCC supports PyArg_ParseTuple format
6351if test "$GCC" = "yes"
6352then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006353 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
6354$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006355 save_CFLAGS=$CFLAGS
Benjamin Petersonc8759662013-05-11 13:00:05 -05006356 CFLAGS="$CFLAGS -Werror -Wformat"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006357 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006358/* end confdefs.h. */
6359
6360 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006361int
6362main ()
6363{
6364
6365 ;
6366 return 0;
6367}
Matthias Klosec511b472010-05-08 11:01:39 +00006368
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006369_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006370if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006371
Matthias Klosec511b472010-05-08 11:01:39 +00006372
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006373$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006374
Matthias Klosec511b472010-05-08 11:01:39 +00006375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006376$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00006377
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006378else
Matthias Klosec511b472010-05-08 11:01:39 +00006379
6380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006381$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006382
6383fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006384rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6385 CFLAGS=$save_CFLAGS
6386fi
6387
Brett Cannon4ff151a2015-09-18 15:09:42 -07006388
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)c543a0f2016-06-02 23:44:40 +00006389# Enable LTO flags
6390
6391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6392$as_echo_n "checking for --with-lto... " >&6; }
6393
6394# Check whether --with-lto was given.
6395if test "${with_lto+set}" = set; then :
6396 withval=$with_lto;
6397if test "$withval" != no
6398then
6399 Py_LTO='true'
6400 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6401$as_echo "yes" >&6; };
6402else
6403 Py_LTO='false'
6404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6405$as_echo "no" >&6; };
6406fi
6407else
6408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6409$as_echo "no" >&6; }
6410fi
6411
6412if test "$Py_LTO" = 'true' ; then
6413 case $CC in
6414 *clang*)
6415 # Any changes made here should be reflected in the GCC+Darwin case below
6416 LTOFLAGS="-flto"
6417 ;;
6418 *gcc*)
6419 case $ac_sys_system in
6420 Darwin*)
6421 LTOFLAGS="-flto"
6422 ;;
6423 *)
6424 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6425 ;;
6426 esac
6427 ;;
6428 esac
6429fi
6430
6431
Brett Cannon4ff151a2015-09-18 15:09:42 -07006432# Enable PGO flags.
Zachary Ware6ed42ea2015-12-21 11:43:03 -06006433
6434
6435
6436
6437
6438
Brett Cannon4ff151a2015-09-18 15:09:42 -07006439# Extract the first word of "llvm-profdata", so it can be a program name with args.
6440set dummy llvm-profdata; ac_word=$2
6441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6442$as_echo_n "checking for $ac_word... " >&6; }
6443if ${ac_cv_prog_LLVM_PROF_FOUND+:} false; then :
6444 $as_echo_n "(cached) " >&6
6445else
6446 if test -n "$LLVM_PROF_FOUND"; then
6447 ac_cv_prog_LLVM_PROF_FOUND="$LLVM_PROF_FOUND" # Let the user override the test.
6448else
6449as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6450for as_dir in $PATH
6451do
6452 IFS=$as_save_IFS
6453 test -z "$as_dir" && as_dir=.
6454 for ac_exec_ext in '' $ac_executable_extensions; do
6455 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6456 ac_cv_prog_LLVM_PROF_FOUND="found"
6457 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6458 break 2
6459 fi
6460done
6461 done
6462IFS=$as_save_IFS
6463
6464 test -z "$ac_cv_prog_LLVM_PROF_FOUND" && ac_cv_prog_LLVM_PROF_FOUND="not-found"
6465fi
6466fi
6467LLVM_PROF_FOUND=$ac_cv_prog_LLVM_PROF_FOUND
6468if test -n "$LLVM_PROF_FOUND"; then
6469 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROF_FOUND" >&5
6470$as_echo "$LLVM_PROF_FOUND" >&6; }
6471else
6472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6473$as_echo "no" >&6; }
6474fi
6475
6476
6477LLVM_PROF_ERR=no
6478case $CC in
6479 *clang*)
6480 # Any changes made here should be reflected in the GCC+Darwin case below
6481 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6482 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
6483 LLVM_PROF_MERGER="llvm-profdata merge -output=code.profclangd *.profclangr"
6484 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6485 if test $LLVM_PROF_FOUND = not-found
6486 then
6487 LLVM_PROF_ERR=yes
6488 fi
6489 ;;
6490 *gcc*)
6491 case $ac_sys_system in
6492 Darwin*)
6493 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6494 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
6495 LLVM_PROF_MERGER="llvm-profdata merge -output=code.profclangd *.profclangr"
6496 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6497 if test $LLVM_PROF_FOUND = not-found
6498 then
6499 LLVM_PROF_ERR=yes
6500 fi
6501 ;;
6502 *)
6503 PGO_PROF_GEN_FLAG="-fprofile-generate"
6504 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6505 LLVM_PROF_MERGER="true"
6506 LLVM_PROF_FILE=""
6507 ;;
6508 esac
6509 ;;
Zachary Ware6ed42ea2015-12-21 11:43:03 -06006510 *icc*)
6511 PGO_PROF_GEN_FLAG="-prof-gen"
6512 PGO_PROF_USE_FLAG="-prof-use"
6513 LLVM_PROF_MERGER="true"
6514 LLVM_PROF_FILE=""
6515 ;;
Brett Cannon4ff151a2015-09-18 15:09:42 -07006516esac
6517
6518
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006519# On some compilers, pthreads are available without further options
6520# (e.g. MacOS X). On some of these systems, the compiler will not
6521# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
6522# So we have to see first whether pthreads are available without
6523# options before we can check whether -Kpthread improves anything.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
6525$as_echo_n "checking whether pthreads are available without options... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006526if ${ac_cv_pthread_is_default+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006527 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006528else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006529 if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006530 ac_cv_pthread_is_default=no
6531else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006532 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006533/* end confdefs.h. */
6534
Stefan Krahae66ca62012-11-22 22:36:57 +01006535#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006536#include <pthread.h>
6537
6538void* routine(void* p){return NULL;}
6539
6540int main(){
6541 pthread_t p;
6542 if(pthread_create(&p,NULL,routine,NULL)!=0)
6543 return 1;
6544 (void)pthread_detach(p);
6545 return 0;
6546}
6547
6548_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006549if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006550
6551 ac_cv_pthread_is_default=yes
6552 ac_cv_kthread=no
6553 ac_cv_pthread=no
6554
6555else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006556 ac_cv_pthread_is_default=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006557fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006558rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6559 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006560fi
6561
6562
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006563fi
6564
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006565{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
6566$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006567
6568
6569if test $ac_cv_pthread_is_default = yes
6570then
6571 ac_cv_kpthread=no
6572else
6573# -Kpthread, if available, provides the right #defines
6574# and linker options to make pthread_create available
6575# Some compilers won't report that they do not support -Kpthread,
6576# so we need to run a program to see whether it really made the
6577# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
6579$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006580if ${ac_cv_kpthread+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006581 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006582else
6583 ac_save_cc="$CC"
6584CC="$CC -Kpthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006585if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006586 ac_cv_kpthread=no
6587else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006588 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006589/* end confdefs.h. */
6590
Stefan Krahae66ca62012-11-22 22:36:57 +01006591#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006592#include <pthread.h>
6593
6594void* routine(void* p){return NULL;}
6595
6596int main(){
6597 pthread_t p;
6598 if(pthread_create(&p,NULL,routine,NULL)!=0)
6599 return 1;
6600 (void)pthread_detach(p);
6601 return 0;
6602}
6603
6604_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006605if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006606 ac_cv_kpthread=yes
6607else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006608 ac_cv_kpthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006609fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006610rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6611 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006612fi
6613
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006614CC="$ac_save_cc"
6615fi
6616
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006617{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
6618$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006619fi
6620
6621if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
6622then
6623# -Kthread, if available, provides the right #defines
6624# and linker options to make pthread_create available
6625# Some compilers won't report that they do not support -Kthread,
6626# so we need to run a program to see whether it really made the
6627# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
6629$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006630if ${ac_cv_kthread+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006631 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006632else
6633 ac_save_cc="$CC"
6634CC="$CC -Kthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006635if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006636 ac_cv_kthread=no
6637else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006638 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006639/* end confdefs.h. */
6640
Stefan Krahae66ca62012-11-22 22:36:57 +01006641#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006642#include <pthread.h>
6643
6644void* routine(void* p){return NULL;}
6645
6646int main(){
6647 pthread_t p;
6648 if(pthread_create(&p,NULL,routine,NULL)!=0)
6649 return 1;
6650 (void)pthread_detach(p);
6651 return 0;
6652}
6653
6654_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006655if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006656 ac_cv_kthread=yes
6657else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006658 ac_cv_kthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006659fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006660rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6661 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006662fi
6663
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006664CC="$ac_save_cc"
6665fi
6666
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006667{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
6668$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006669fi
6670
6671if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
6672then
6673# -pthread, if available, provides the right #defines
6674# and linker options to make pthread_create available
6675# Some compilers won't report that they do not support -pthread,
6676# so we need to run a program to see whether it really made the
6677# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
6679$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.orgfa3f9a32013-01-25 15:32:31 +01006680if ${ac_cv_pthread+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006681 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006682else
6683 ac_save_cc="$CC"
6684CC="$CC -pthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006685if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006686 ac_cv_pthread=no
6687else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006688 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006689/* end confdefs.h. */
6690
Stefan Krahae66ca62012-11-22 22:36:57 +01006691#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006692#include <pthread.h>
6693
6694void* routine(void* p){return NULL;}
6695
6696int main(){
6697 pthread_t p;
6698 if(pthread_create(&p,NULL,routine,NULL)!=0)
6699 return 1;
6700 (void)pthread_detach(p);
6701 return 0;
6702}
6703
6704_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006705if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006706 ac_cv_pthread=yes
6707else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006708 ac_cv_pthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006709fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006710rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6711 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006712fi
6713
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006714CC="$ac_save_cc"
6715fi
6716
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006717{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
6718$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006719fi
6720
6721# If we have set a CC compiler flag for thread support then
6722# check if it works for CXX, too.
6723ac_cv_cxx_thread=no
6724if test ! -z "$CXX"
6725then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
6727$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006728ac_save_cxx="$CXX"
6729
6730if test "$ac_cv_kpthread" = "yes"
6731then
6732 CXX="$CXX -Kpthread"
6733 ac_cv_cxx_thread=yes
6734elif test "$ac_cv_kthread" = "yes"
6735then
6736 CXX="$CXX -Kthread"
6737 ac_cv_cxx_thread=yes
6738elif test "$ac_cv_pthread" = "yes"
6739then
6740 CXX="$CXX -pthread"
6741 ac_cv_cxx_thread=yes
6742fi
6743
6744if test $ac_cv_cxx_thread = yes
6745then
6746 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
6747 $CXX -c conftest.$ac_ext 2>&5
6748 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
6749 && test -s conftest$ac_exeext && ./conftest$ac_exeext
6750 then
6751 ac_cv_cxx_thread=yes
6752 else
6753 ac_cv_cxx_thread=no
6754 fi
6755 rm -fr conftest*
6756fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006757{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
6758$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006759fi
6760CXX="$ac_save_cxx"
6761
6762
6763# checks for header files
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6765$as_echo_n "checking for ANSI C header files... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006766if ${ac_cv_header_stdc+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006767 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006768else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006769 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006770/* end confdefs.h. */
6771#include <stdlib.h>
6772#include <stdarg.h>
6773#include <string.h>
6774#include <float.h>
6775
6776int
6777main ()
6778{
6779
6780 ;
6781 return 0;
6782}
6783_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006784if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006785 ac_cv_header_stdc=yes
6786else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006787 ac_cv_header_stdc=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006788fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006789rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6790
6791if test $ac_cv_header_stdc = yes; then
6792 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006793 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006794/* end confdefs.h. */
6795#include <string.h>
6796
6797_ACEOF
6798if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006799 $EGREP "memchr" >/dev/null 2>&1; then :
6800
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006801else
6802 ac_cv_header_stdc=no
6803fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006804rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006805
6806fi
6807
6808if test $ac_cv_header_stdc = yes; then
6809 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006810 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006811/* end confdefs.h. */
6812#include <stdlib.h>
6813
6814_ACEOF
6815if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006816 $EGREP "free" >/dev/null 2>&1; then :
6817
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006818else
6819 ac_cv_header_stdc=no
6820fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006821rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006822
6823fi
6824
6825if test $ac_cv_header_stdc = yes; then
6826 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006827 if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006828 :
6829else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006830 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006831/* end confdefs.h. */
6832#include <ctype.h>
6833#include <stdlib.h>
6834#if ((' ' & 0x0FF) == 0x020)
6835# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6836# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6837#else
6838# define ISLOWER(c) \
6839 (('a' <= (c) && (c) <= 'i') \
6840 || ('j' <= (c) && (c) <= 'r') \
6841 || ('s' <= (c) && (c) <= 'z'))
6842# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6843#endif
6844
6845#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6846int
6847main ()
6848{
6849 int i;
6850 for (i = 0; i < 256; i++)
6851 if (XOR (islower (i), ISLOWER (i))
6852 || toupper (i) != TOUPPER (i))
6853 return 2;
6854 return 0;
6855}
6856_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006857if ac_fn_c_try_run "$LINENO"; then :
6858
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006859else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006860 ac_cv_header_stdc=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006861fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006862rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6863 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006864fi
6865
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006866fi
6867fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006868{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6869$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006870if test $ac_cv_header_stdc = yes; then
6871
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006872$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006873
6874fi
6875
doko@ubuntu.comf27ec3e2014-04-17 20:11:19 +02006876for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00006877fcntl.h grp.h \
doko@ubuntu.comf27ec3e2014-04-17 20:11:19 +02006878ieeefp.h io.h langinfo.h libintl.h poll.h process.h pthread.h \
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00006879shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006880unistd.h utime.h \
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00006881sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
6882sys/lock.h sys/mkdev.h sys/modem.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00006883sys/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 +00006884sys/termio.h sys/time.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00006885sys/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 +00006886sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimes3aa138f2013-06-18 13:25:24 +02006887bluetooth/bluetooth.h linux/tipc.h spawn.h util.h alloca.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006888do :
6889 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6890ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006891if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006892 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006893#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006894_ACEOF
6895
6896fi
6897
Guido van Rossum627b2d71993-12-24 10:39:16 +00006898done
6899
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006900ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006901for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006902 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6904$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006905if eval \${$as_ac_Header+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006906 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006907else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006908 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006909/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006910#include <sys/types.h>
6911#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006912
Martin v. Löwis11437992002-04-12 09:54:03 +00006913int
6914main ()
6915{
6916if ((DIR *) 0)
6917return 0;
6918 ;
6919 return 0;
6920}
6921_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006922if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006923 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006924else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006925 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006926fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006927rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006928fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006929eval ac_res=\$$as_ac_Header
6930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6931$as_echo "$ac_res" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006932if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006933 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006934#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006935_ACEOF
6936
6937ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006938fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006939
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006940done
6941# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6942if test $ac_header_dirent = dirent.h; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006943 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6944$as_echo_n "checking for library containing opendir... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006945if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006946 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006947else
Martin v. Löwis11437992002-04-12 09:54:03 +00006948 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006949cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006950/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006951
Martin v. Löwiseba40652007-08-30 20:10:57 +00006952/* Override any GCC internal prototype to avoid an error.
6953 Use char because int might match the return type of a GCC
6954 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006955#ifdef __cplusplus
6956extern "C"
6957#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006958char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006959int
6960main ()
6961{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006962return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006963 ;
6964 return 0;
6965}
6966_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006967for ac_lib in '' dir; do
6968 if test -z "$ac_lib"; then
6969 ac_res="none required"
6970 else
6971 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00006972 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00006973 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006974 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006975 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00006976fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006977rm -f core conftest.err conftest.$ac_objext \
6978 conftest$ac_exeext
Matthias Klose3cef2a92012-03-14 23:39:33 +01006979 if ${ac_cv_search_opendir+:} false; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006980 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00006981fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006982done
Matthias Klose3cef2a92012-03-14 23:39:33 +01006983if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006984
Martin v. Löwiseba40652007-08-30 20:10:57 +00006985else
6986 ac_cv_search_opendir=no
6987fi
6988rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006989LIBS=$ac_func_search_save_LIBS
6990fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006991{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6992$as_echo "$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006993ac_res=$ac_cv_search_opendir
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006994if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006995 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006996
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006997fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006998
Michael W. Hudson54241132001-12-07 15:38:26 +00006999else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007000 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7001$as_echo_n "checking for library containing opendir... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007002if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007003 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007004else
7005 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007006cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007007/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007008
Martin v. Löwiseba40652007-08-30 20:10:57 +00007009/* Override any GCC internal prototype to avoid an error.
7010 Use char because int might match the return type of a GCC
7011 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007012#ifdef __cplusplus
7013extern "C"
7014#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007015char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007016int
7017main ()
7018{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007019return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007020 ;
7021 return 0;
7022}
7023_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007024for ac_lib in '' x; do
7025 if test -z "$ac_lib"; then
7026 ac_res="none required"
7027 else
7028 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00007029 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00007030 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007031 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007032 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00007033fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007034rm -f core conftest.err conftest.$ac_objext \
7035 conftest$ac_exeext
Matthias Klose3cef2a92012-03-14 23:39:33 +01007036 if ${ac_cv_search_opendir+:} false; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007037 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00007038fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007039done
Matthias Klose3cef2a92012-03-14 23:39:33 +01007040if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007041
Martin v. Löwiseba40652007-08-30 20:10:57 +00007042else
7043 ac_cv_search_opendir=no
7044fi
7045rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007046LIBS=$ac_func_search_save_LIBS
7047fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007048{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7049$as_echo "$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007050ac_res=$ac_cv_search_opendir
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007051if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007052 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007053
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007054fi
7055
7056fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007057
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7059$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007060if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007061 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007062else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007063 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007064/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007065#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007066int
7067main ()
7068{
7069return makedev(0, 0);
7070 ;
7071 return 0;
7072}
7073_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007074if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007075 ac_cv_header_sys_types_h_makedev=yes
7076else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007077 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007078fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007079rm -f core conftest.err conftest.$ac_objext \
7080 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007081
7082fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007083{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7084$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007085
7086if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007087ac_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 +01007088if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007089
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007090$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007091
7092fi
7093
7094
7095
7096 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007097 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 +01007098if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007099
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007100$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007101
7102fi
7103
7104
7105 fi
7106fi
7107
Michael W. Hudson54241132001-12-07 15:38:26 +00007108
Martin v. Löwis11017b12006-01-14 18:12:57 +00007109# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007110for ac_header in linux/netlink.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007111do :
7112 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 +00007113#ifdef HAVE_ASM_TYPES_H
7114#include <asm/types.h>
7115#endif
7116#ifdef HAVE_SYS_SOCKET_H
7117#include <sys/socket.h>
7118#endif
7119
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007120"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007121if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007122 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007123#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007124_ACEOF
7125
7126fi
7127
7128done
7129
7130
Guido van Rossum627b2d71993-12-24 10:39:16 +00007131# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00007132was_it_defined=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
7134$as_echo_n "checking for clock_t in time.h... " >&6; }
7135cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007136/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007137#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007138
7139_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007140if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007141 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00007142 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007143else
Martin v. Löwis11437992002-04-12 09:54:03 +00007144
7145
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007146$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00007147
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007148
Guido van Rossum627b2d71993-12-24 10:39:16 +00007149fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00007150rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007151
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007152{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
7153$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00007154
Neal Norwitz11690112002-07-30 01:08:28 +00007155# Check whether using makedev requires defining _OSF_SOURCE
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
7157$as_echo_n "checking for makedev... " >&6; }
7158cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007159/* end confdefs.h. */
Jesus Cea616de772010-04-28 10:32:30 +00007160
7161#if defined(MAJOR_IN_MKDEV)
7162#include <sys/mkdev.h>
7163#elif defined(MAJOR_IN_SYSMACROS)
7164#include <sys/sysmacros.h>
7165#else
Neal Norwitz6eb37f02003-02-23 23:28:15 +00007166#include <sys/types.h>
Jesus Cea616de772010-04-28 10:32:30 +00007167#endif
Neal Norwitz11690112002-07-30 01:08:28 +00007168int
7169main ()
7170{
7171 makedev(0, 0)
7172 ;
7173 return 0;
7174}
7175_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007176if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007177 ac_cv_has_makedev=yes
7178else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007179 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007180fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007181rm -f core conftest.err conftest.$ac_objext \
7182 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00007183if test "$ac_cv_has_makedev" = "no"; then
7184 # we didn't link, try if _OSF_SOURCE will allow us to link
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007185 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007186/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00007187
Neal Norwitz6eb37f02003-02-23 23:28:15 +00007188#define _OSF_SOURCE 1
7189#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00007190
Neal Norwitz11690112002-07-30 01:08:28 +00007191int
7192main ()
7193{
7194 makedev(0, 0)
7195 ;
7196 return 0;
7197}
7198_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007199if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007200 ac_cv_has_makedev=yes
7201else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007202 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007203fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007204rm -f core conftest.err conftest.$ac_objext \
7205 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00007206 if test "$ac_cv_has_makedev" = "yes"; then
7207
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007208$as_echo "#define _OSF_SOURCE 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007209
7210 fi
7211fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007212{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
7213$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007214if test "$ac_cv_has_makedev" = "yes"; then
7215
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007216$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007217
7218fi
7219
Martin v. Löwis399a6892002-10-04 10:22:02 +00007220# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7221# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7222# defined, but the compiler does not support pragma redefine_extname,
7223# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7224# structures (such as rlimit64) without declaring them. As a
7225# work-around, disable LFS on such configurations
7226
7227use_lfs=yes
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
7229$as_echo_n "checking Solaris LFS bug... " >&6; }
7230cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007231/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007232
7233#define _LARGEFILE_SOURCE 1
7234#define _FILE_OFFSET_BITS 64
7235#include <sys/resource.h>
7236
Martin v. Löwis399a6892002-10-04 10:22:02 +00007237int
7238main ()
7239{
7240struct rlimit foo;
7241 ;
7242 return 0;
7243}
7244_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007245if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00007246 sol_lfs_bug=no
7247else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007248 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00007249fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007250rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007251{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
7252$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007253if test "$sol_lfs_bug" = "yes"; then
7254 use_lfs=no
7255fi
7256
7257if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00007258# Two defines needed to enable largefile support on various platforms
7259# These may affect some typedefs
Georg Brandl94800df2011-02-25 11:09:02 +00007260case $ac_sys_system/$ac_sys_release in
7261AIX*)
7262
7263$as_echo "#define _LARGE_FILES 1" >>confdefs.h
7264
7265 ;;
7266esac
Guido van Rossum810cc512001-09-09 23:51:39 +00007267
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007268$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007269
7270
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007271$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00007272
Martin v. Löwis399a6892002-10-04 10:22:02 +00007273fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007274
Guido van Rossum84e7b241996-08-19 21:59:00 +00007275# Add some code to confdefs.h so that the test for off_t works on SCO
7276cat >> confdefs.h <<\EOF
7277#if defined(SCO_DS)
7278#undef _OFF_T
7279#endif
7280EOF
7281
Guido van Rossumef2255b2000-03-10 22:30:29 +00007282# Type availability checks
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007283ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007284if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007285
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007286else
Martin v. Löwis11437992002-04-12 09:54:03 +00007287
7288cat >>confdefs.h <<_ACEOF
7289#define mode_t int
7290_ACEOF
7291
7292fi
7293
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007294ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007295if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007296
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007297else
Martin v. Löwis11437992002-04-12 09:54:03 +00007298
7299cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007300#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00007301_ACEOF
7302
7303fi
7304
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007305ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007306if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007307
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007308else
Martin v. Löwis11437992002-04-12 09:54:03 +00007309
7310cat >>confdefs.h <<_ACEOF
7311#define pid_t int
7312_ACEOF
7313
7314fi
7315
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007316
Martin v. Löwis11437992002-04-12 09:54:03 +00007317cat >>confdefs.h <<_ACEOF
Matthias Klosecbf54b12010-05-08 11:04:18 +00007318#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00007319_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007320
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007321ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007322if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007323
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007324else
Martin v. Löwis11437992002-04-12 09:54:03 +00007325
7326cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007327#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007328_ACEOF
7329
7330fi
7331
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
7333$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007334if ${ac_cv_type_uid_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007335 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007336else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007337 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007338/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007339#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007340
7341_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007342if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007343 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007344 ac_cv_type_uid_t=yes
7345else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007346 ac_cv_type_uid_t=no
7347fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00007348rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007349
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007350fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007351{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
7352$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007353if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007354
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007355$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007356
7357
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007358$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007359
7360fi
7361
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007362
7363# There are two separate checks for each of the exact-width integer types we
7364# need. First we check whether the type is available using the usual
7365# AC_CHECK_TYPE macro with the default includes (which includes <inttypes.h>
7366# and <stdint.h> where available). We then also use the special type checks of
7367# the form AC_TYPE_UINT32_T, which in the case that uint32_t is not available
7368# directly, #define's uint32_t to be a suitable type.
7369
7370ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
7371if test "x$ac_cv_type_uint32_t" = xyes; then :
7372
7373$as_echo "#define HAVE_UINT32_T 1" >>confdefs.h
7374
7375fi
7376
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007377ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
7378case $ac_cv_c_uint32_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007379 no|yes) ;; #(
7380 *)
7381
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007382$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007383
7384
7385cat >>confdefs.h <<_ACEOF
7386#define uint32_t $ac_cv_c_uint32_t
7387_ACEOF
7388;;
7389 esac
7390
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007391
7392ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
7393if test "x$ac_cv_type_uint64_t" = xyes; then :
7394
7395$as_echo "#define HAVE_UINT64_T 1" >>confdefs.h
7396
7397fi
7398
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007399ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
7400case $ac_cv_c_uint64_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007401 no|yes) ;; #(
7402 *)
7403
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007404$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007405
7406
7407cat >>confdefs.h <<_ACEOF
7408#define uint64_t $ac_cv_c_uint64_t
7409_ACEOF
7410;;
7411 esac
7412
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007413
7414ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
7415if test "x$ac_cv_type_int32_t" = xyes; then :
7416
7417$as_echo "#define HAVE_INT32_T 1" >>confdefs.h
7418
7419fi
7420
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007421ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
7422case $ac_cv_c_int32_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007423 no|yes) ;; #(
7424 *)
7425
7426cat >>confdefs.h <<_ACEOF
7427#define int32_t $ac_cv_c_int32_t
7428_ACEOF
7429;;
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007430esac
7431
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007432
7433ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
7434if test "x$ac_cv_type_int64_t" = xyes; then :
7435
7436$as_echo "#define HAVE_INT64_T 1" >>confdefs.h
7437
7438fi
7439
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007440ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
7441case $ac_cv_c_int64_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007442 no|yes) ;; #(
7443 *)
7444
7445cat >>confdefs.h <<_ACEOF
7446#define int64_t $ac_cv_c_int64_t
7447_ACEOF
7448;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007449esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00007450
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007451
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007452ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007453if test "x$ac_cv_type_ssize_t" = xyes; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007454
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007455$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00007456
7457fi
7458
Jack Jansendd19cf82001-12-06 22:36:17 +00007459
Michael W. Hudson54241132001-12-07 15:38:26 +00007460# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007461# ANSI C requires sizeof(char) == 1, so no need to check it
Martin v. Löwiseba40652007-08-30 20:10:57 +00007462# The cast to long int works around a bug in the HP C Compiler
7463# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7464# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7465# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
7467$as_echo_n "checking size of int... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007468if ${ac_cv_sizeof_int+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007469 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007470else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007471 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 +00007472
Martin v. Löwis11437992002-04-12 09:54:03 +00007473else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007474 if test "$ac_cv_type_int" = yes; then
7475 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7476$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007477as_fn_error 77 "cannot compute sizeof (int)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007478See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007479 else
7480 ac_cv_sizeof_int=0
7481 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007482fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007483
Martin v. Löwis11437992002-04-12 09:54:03 +00007484fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007485{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
7486$as_echo "$ac_cv_sizeof_int" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007487
7488
7489
Martin v. Löwis11437992002-04-12 09:54:03 +00007490cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007491#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007492_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007493
7494
Martin v. Löwiseba40652007-08-30 20:10:57 +00007495# The cast to long int works around a bug in the HP C Compiler
7496# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7497# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7498# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
7500$as_echo_n "checking size of long... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007501if ${ac_cv_sizeof_long+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007502 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007503else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007504 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 +00007505
Martin v. Löwis11437992002-04-12 09:54:03 +00007506else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007507 if test "$ac_cv_type_long" = yes; then
7508 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7509$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007510as_fn_error 77 "cannot compute sizeof (long)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007511See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007512 else
7513 ac_cv_sizeof_long=0
7514 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007515fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007516
Martin v. Löwis11437992002-04-12 09:54:03 +00007517fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007518{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
7519$as_echo "$ac_cv_sizeof_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007520
7521
7522
Martin v. Löwis11437992002-04-12 09:54:03 +00007523cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007524#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007525_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007526
7527
Martin v. Löwiseba40652007-08-30 20:10:57 +00007528# The cast to long int works around a bug in the HP C Compiler
7529# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7530# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7531# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
7533$as_echo_n "checking size of void *... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007534if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007535 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007536else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007537 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 +00007538
Martin v. Löwis11437992002-04-12 09:54:03 +00007539else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007540 if test "$ac_cv_type_void_p" = yes; then
7541 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7542$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007543as_fn_error 77 "cannot compute sizeof (void *)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007544See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007545 else
7546 ac_cv_sizeof_void_p=0
7547 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007548fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007549
Martin v. Löwis11437992002-04-12 09:54:03 +00007550fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007551{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
7552$as_echo "$ac_cv_sizeof_void_p" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007553
7554
7555
Martin v. Löwis11437992002-04-12 09:54:03 +00007556cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007557#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00007558_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007559
7560
Martin v. Löwiseba40652007-08-30 20:10:57 +00007561# The cast to long int works around a bug in the HP C Compiler
7562# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7563# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7564# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
7566$as_echo_n "checking size of short... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007567if ${ac_cv_sizeof_short+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007568 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007569else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007570 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 +00007571
Martin v. Löwis11437992002-04-12 09:54:03 +00007572else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007573 if test "$ac_cv_type_short" = yes; then
7574 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7575$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007576as_fn_error 77 "cannot compute sizeof (short)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007577See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007578 else
7579 ac_cv_sizeof_short=0
7580 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007581fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007582
Martin v. Löwis11437992002-04-12 09:54:03 +00007583fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007584{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
7585$as_echo "$ac_cv_sizeof_short" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007586
7587
7588
Martin v. Löwis11437992002-04-12 09:54:03 +00007589cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007590#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007591_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007592
7593
Martin v. Löwiseba40652007-08-30 20:10:57 +00007594# The cast to long int works around a bug in the HP C Compiler
7595# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7596# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7597# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
7599$as_echo_n "checking size of float... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007600if ${ac_cv_sizeof_float+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007601 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007602else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007603 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 +00007604
Martin v. Löwis11437992002-04-12 09:54:03 +00007605else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007606 if test "$ac_cv_type_float" = yes; then
7607 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7608$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007609as_fn_error 77 "cannot compute sizeof (float)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007610See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007611 else
7612 ac_cv_sizeof_float=0
7613 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007614fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007615
Martin v. Löwis11437992002-04-12 09:54:03 +00007616fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007617{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
7618$as_echo "$ac_cv_sizeof_float" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007619
7620
7621
Martin v. Löwis11437992002-04-12 09:54:03 +00007622cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007623#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007624_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007625
7626
Martin v. Löwiseba40652007-08-30 20:10:57 +00007627# The cast to long int works around a bug in the HP C Compiler
7628# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7629# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7630# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
7632$as_echo_n "checking size of double... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007633if ${ac_cv_sizeof_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007634 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007635else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007636 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 +00007637
Martin v. Löwis11437992002-04-12 09:54:03 +00007638else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007639 if test "$ac_cv_type_double" = yes; then
7640 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7641$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007642as_fn_error 77 "cannot compute sizeof (double)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007643See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007644 else
7645 ac_cv_sizeof_double=0
7646 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007647fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007648
Martin v. Löwis11437992002-04-12 09:54:03 +00007649fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007650{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
7651$as_echo "$ac_cv_sizeof_double" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007652
7653
7654
Martin v. Löwis11437992002-04-12 09:54:03 +00007655cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007656#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007657_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007658
7659
Martin v. Löwiseba40652007-08-30 20:10:57 +00007660# The cast to long int works around a bug in the HP C Compiler
7661# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7662# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7663# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
7665$as_echo_n "checking size of fpos_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007666if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007667 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007668else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007669 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 +00007670
Martin v. Löwis11437992002-04-12 09:54:03 +00007671else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007672 if test "$ac_cv_type_fpos_t" = yes; then
7673 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7674$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007675as_fn_error 77 "cannot compute sizeof (fpos_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007676See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007677 else
7678 ac_cv_sizeof_fpos_t=0
7679 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007680fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007681
Martin v. Löwis11437992002-04-12 09:54:03 +00007682fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007683{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
7684$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007685
7686
7687
Martin v. Löwis11437992002-04-12 09:54:03 +00007688cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007689#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007690_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007691
Michael W. Hudson54241132001-12-07 15:38:26 +00007692
Martin v. Löwiseba40652007-08-30 20:10:57 +00007693# The cast to long int works around a bug in the HP C Compiler
7694# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7695# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7696# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
7698$as_echo_n "checking size of size_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007699if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007700 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007701else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007702 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 +00007703
Martin v. Löwis18e16552006-02-15 17:27:45 +00007704else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007705 if test "$ac_cv_type_size_t" = yes; then
7706 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7707$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007708as_fn_error 77 "cannot compute sizeof (size_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007709See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007710 else
7711 ac_cv_sizeof_size_t=0
7712 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00007713fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007714
Martin v. Löwis18e16552006-02-15 17:27:45 +00007715fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007716{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
7717$as_echo "$ac_cv_sizeof_size_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007718
7719
7720
Martin v. Löwis18e16552006-02-15 17:27:45 +00007721cat >>confdefs.h <<_ACEOF
7722#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
7723_ACEOF
7724
7725
Christian Heimes951cc0f2008-01-31 23:08:23 +00007726# The cast to long int works around a bug in the HP C Compiler
7727# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7728# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7729# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
7731$as_echo_n "checking size of pid_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007732if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007733 $as_echo_n "(cached) " >&6
Christian Heimes951cc0f2008-01-31 23:08:23 +00007734else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007735 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 +00007736
Christian Heimes951cc0f2008-01-31 23:08:23 +00007737else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007738 if test "$ac_cv_type_pid_t" = yes; then
7739 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7740$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007741as_fn_error 77 "cannot compute sizeof (pid_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007742See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes951cc0f2008-01-31 23:08:23 +00007743 else
7744 ac_cv_sizeof_pid_t=0
7745 fi
7746fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007747
Christian Heimes951cc0f2008-01-31 23:08:23 +00007748fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007749{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
7750$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes951cc0f2008-01-31 23:08:23 +00007751
7752
7753
7754cat >>confdefs.h <<_ACEOF
7755#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
7756_ACEOF
7757
7758
Michael W. Hudson54241132001-12-07 15:38:26 +00007759
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
7761$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007762have_long_long=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007763cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007764/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007765
Martin v. Löwis11437992002-04-12 09:54:03 +00007766int
7767main ()
7768{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007769long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007770 ;
7771 return 0;
7772}
7773_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007774if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007775
7776
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007777$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007778
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007779 have_long_long=yes
7780
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007781fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007782rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007783{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
7784$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007785if test "$have_long_long" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00007786# The cast to long int works around a bug in the HP C Compiler
7787# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7788# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7789# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
7791$as_echo_n "checking size of long long... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007792if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007793 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007794else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007795 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 +00007796
Martin v. Löwis11437992002-04-12 09:54:03 +00007797else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007798 if test "$ac_cv_type_long_long" = yes; then
7799 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7800$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007801as_fn_error 77 "cannot compute sizeof (long long)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007802See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007803 else
7804 ac_cv_sizeof_long_long=0
7805 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007806fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007807
Martin v. Löwis11437992002-04-12 09:54:03 +00007808fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007809{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
7810$as_echo "$ac_cv_sizeof_long_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007811
7812
7813
Martin v. Löwis11437992002-04-12 09:54:03 +00007814cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007815#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007816_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007817
Michael W. Hudson54241132001-12-07 15:38:26 +00007818
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007819fi
7820
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
7822$as_echo_n "checking for long double support... " >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007823have_long_double=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007824cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007825/* end confdefs.h. */
7826
7827int
7828main ()
7829{
Matthias Klosec511b472010-05-08 11:01:39 +00007830long double x; x = (long double)0;
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007831 ;
7832 return 0;
7833}
7834_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007835if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007836
7837
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007838$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007839
7840 have_long_double=yes
7841
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007842fi
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007843rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007844{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
7845$as_echo "$have_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007846if test "$have_long_double" = yes ; then
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007847# The cast to long int works around a bug in the HP C Compiler
7848# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7849# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7850# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
7852$as_echo_n "checking size of long double... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007853if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007854 $as_echo_n "(cached) " >&6
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007855else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007856 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 +00007857
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007858else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007859 if test "$ac_cv_type_long_double" = yes; then
7860 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7861$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007862as_fn_error 77 "cannot compute sizeof (long double)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007863See \`config.log' for more details" "$LINENO" 5; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007864 else
7865 ac_cv_sizeof_long_double=0
7866 fi
7867fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007868
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007869fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007870{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
7871$as_echo "$ac_cv_sizeof_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007872
7873
7874
7875cat >>confdefs.h <<_ACEOF
7876#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7877_ACEOF
7878
7879
7880fi
7881
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7883$as_echo_n "checking for _Bool support... " >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007884have_c99_bool=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007885cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007886/* end confdefs.h. */
7887
7888int
7889main ()
7890{
7891_Bool x; x = (_Bool)0;
7892 ;
7893 return 0;
7894}
7895_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007896if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007897
7898
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007899$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007900
7901 have_c99_bool=yes
7902
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007903fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007904rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007905{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7906$as_echo "$have_c99_bool" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007907if test "$have_c99_bool" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00007908# The cast to long int works around a bug in the HP C Compiler
7909# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7910# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7911# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7913$as_echo_n "checking size of _Bool... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007914if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007915 $as_echo_n "(cached) " >&6
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007916else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007917 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 +00007918
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007919else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007920 if test "$ac_cv_type__Bool" = yes; then
7921 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7922$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007923as_fn_error 77 "cannot compute sizeof (_Bool)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007924See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007925 else
7926 ac_cv_sizeof__Bool=0
7927 fi
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007928fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007929
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007930fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007931{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7932$as_echo "$ac_cv_sizeof__Bool" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007933
7934
7935
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007936cat >>confdefs.h <<_ACEOF
7937#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7938_ACEOF
7939
7940
7941fi
7942
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007943ac_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 +00007944 #include <stdint.h>
7945 #endif
Antoine Pitrou7be5a652010-10-10 08:14:41 +00007946 #ifdef HAVE_INTTYPES_H
7947 #include <inttypes.h>
7948 #endif
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007949"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007950if test "x$ac_cv_type_uintptr_t" = xyes; then :
Martin v. Löwisebe26702006-10-02 14:55:51 +00007951
7952cat >>confdefs.h <<_ACEOF
7953#define HAVE_UINTPTR_T 1
7954_ACEOF
7955
Martin v. Löwiseba40652007-08-30 20:10:57 +00007956# The cast to long int works around a bug in the HP C Compiler
7957# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7958# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7959# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7961$as_echo_n "checking size of uintptr_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007962if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007963 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007964else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007965 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 +00007966
Martin v. Löwis11437992002-04-12 09:54:03 +00007967else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007968 if test "$ac_cv_type_uintptr_t" = yes; then
7969 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7970$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007971as_fn_error 77 "cannot compute sizeof (uintptr_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007972See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007973 else
7974 ac_cv_sizeof_uintptr_t=0
7975 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007976fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007977
Martin v. Löwis11437992002-04-12 09:54:03 +00007978fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007979{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7980$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007981
7982
7983
Martin v. Löwis11437992002-04-12 09:54:03 +00007984cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007985#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007986_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007987
Michael W. Hudson54241132001-12-07 15:38:26 +00007988
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007989fi
7990
Martin v. Löwisebe26702006-10-02 14:55:51 +00007991
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007992# The cast to long int works around a bug in the HP C Compiler
7993# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7994# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7995# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7997$as_echo_n "checking size of off_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007998if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007999 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008000else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008001 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008002#ifdef HAVE_SYS_TYPES_H
8003#include <sys/types.h>
8004#endif
8005
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008006"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008007
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008008else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008009 if test "$ac_cv_type_off_t" = yes; then
8010 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8011$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008012as_fn_error 77 "cannot compute sizeof (off_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01008013See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008014 else
8015 ac_cv_sizeof_off_t=0
8016 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008017fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008018
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008019fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008020{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8021$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008022
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008023
8024
Martin v. Löwis11437992002-04-12 09:54:03 +00008025cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008026#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008027_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008028
Michael W. Hudson54241132001-12-07 15:38:26 +00008029
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008030
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8032$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson0ef0b912009-12-31 21:11:48 +00008033if test "$have_long_long" = yes
8034then
8035if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008036 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008037
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008038$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008039
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8041$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008042else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8044$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008045fi
Mark Dickinson0ef0b912009-12-31 21:11:48 +00008046else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8048$as_echo "no" >&6; }
Mark Dickinson0ef0b912009-12-31 21:11:48 +00008049fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008050
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008051# The cast to long int works around a bug in the HP C Compiler
8052# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8053# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8054# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8056$as_echo_n "checking size of time_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008057if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008058 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008059else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008060 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008061#ifdef HAVE_SYS_TYPES_H
8062#include <sys/types.h>
8063#endif
8064#ifdef HAVE_TIME_H
8065#include <time.h>
8066#endif
8067
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008068"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008069
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008070else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008071 if test "$ac_cv_type_time_t" = yes; then
8072 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8073$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008074as_fn_error 77 "cannot compute sizeof (time_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01008075See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008076 else
8077 ac_cv_sizeof_time_t=0
8078 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008079fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008080
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008081fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008082{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8083$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008084
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008085
8086
Martin v. Löwis11437992002-04-12 09:54:03 +00008087cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008088#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008089_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008090
Michael W. Hudson54241132001-12-07 15:38:26 +00008091
8092
Trent Mick635f6fb2000-08-23 21:33:05 +00008093# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008094ac_save_cc="$CC"
8095if test "$ac_cv_kpthread" = "yes"
8096then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008097elif test "$ac_cv_kthread" = "yes"
8098then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008099elif test "$ac_cv_pthread" = "yes"
8100then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008101fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8103$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008104have_pthread_t=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008105cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008106/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00008107
8108 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008109int
8110main ()
8111{
Guido van Rossum12580492000-09-24 16:47:19 +00008112pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008113 ;
8114 return 0;
8115}
Matthias Klosec511b472010-05-08 11:01:39 +00008116
Martin v. Löwis11437992002-04-12 09:54:03 +00008117_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008118if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008119 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008120fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008121rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008122{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8123$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008124if test "$have_pthread_t" = yes ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008125 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008126# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8127# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8128# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8130$as_echo_n "checking size of pthread_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008131if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008132 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008133else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008134 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008135#ifdef HAVE_PTHREAD_H
8136#include <pthread.h>
8137#endif
8138
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008139"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008140
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008141else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008142 if test "$ac_cv_type_pthread_t" = yes; then
8143 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8144$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008145as_fn_error 77 "cannot compute sizeof (pthread_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01008146See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008147 else
8148 ac_cv_sizeof_pthread_t=0
8149 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008150fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008151
Trent Mick635f6fb2000-08-23 21:33:05 +00008152fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008153{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8154$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008155
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008156
8157
Martin v. Löwis11437992002-04-12 09:54:03 +00008158cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008159#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008160_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008161
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008162
Trent Mick635f6fb2000-08-23 21:33:05 +00008163fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008164CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008165
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-toolbox-glue" >&5
8167$as_echo_n "checking for --enable-toolbox-glue... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008168# Check whether --enable-toolbox-glue was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008169if test "${enable_toolbox_glue+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008170 enableval=$enable_toolbox_glue;
8171fi
Jack Jansene578a632001-08-15 01:27:14 +00008172
8173
8174if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +00008175then
Jack Jansene578a632001-08-15 01:27:14 +00008176 case $ac_sys_system/$ac_sys_release in
8177 Darwin/*)
8178 enable_toolbox_glue="yes";;
8179 *)
8180 enable_toolbox_glue="no";;
8181 esac
8182fi
8183case "$enable_toolbox_glue" in
8184yes)
Jack Jansene578a632001-08-15 01:27:14 +00008185 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008186 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +00008187
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008188$as_echo "#define USE_TOOLBOX_OBJECT_GLUE 1" >>confdefs.h
Jack Jansene578a632001-08-15 01:27:14 +00008189
8190 ;;
8191*)
Jack Jansene578a632001-08-15 01:27:14 +00008192 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00008193 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00008194 ;;
8195esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008196{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_toolbox_glue" >&5
8197$as_echo "$enable_toolbox_glue" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008198
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008199
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00008200
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008201case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +00008202 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008203 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8204 ;;
8205 Darwin/*)
8206 OTHER_LIBTOOL_OPT=""
8207 ;;
8208esac
8209
8210
Ronald Oussoren25967582009-09-06 10:00:26 +00008211
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008212case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +00008213 Darwin/[01567]\..*)
Ronald Oussoren988117f2006-04-29 11:31:35 +00008214 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8215 if test "${enable_universalsdk}"; then
8216 :
8217 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00008218 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Ronald Oussoren988117f2006-04-29 11:31:35 +00008219 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008220 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008221 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008222 Darwin/*)
Ronald Oussorena55af9a2010-01-17 16:25:57 +00008223 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008224 if test ${gcc_version} '<' 4.0
8225 then
8226 LIBTOOL_CRUFT="-lcc_dynamic"
8227 else
8228 LIBTOOL_CRUFT=""
8229 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008230 if test "$cross_compiling" = yes; then :
Ronald Oussoren23d92532009-09-07 06:12:00 +00008231 ac_osx_32bit=yes
Ronald Oussoren25967582009-09-06 10:00:26 +00008232else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008233 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren25967582009-09-06 10:00:26 +00008234/* end confdefs.h. */
Ronald Oussoren23d92532009-09-07 06:12:00 +00008235
Ronald Oussoren25967582009-09-06 10:00:26 +00008236 #include <unistd.h>
8237 int main(int argc, char*argv[])
8238 {
8239 if (sizeof(long) == 4) {
8240 return 0;
8241 } else {
8242 return 1;
8243 }
Ronald Oussoren84ddd722009-09-08 07:17:10 +00008244 }
Ronald Oussoren23d92532009-09-07 06:12:00 +00008245
Ronald Oussoren25967582009-09-06 10:00:26 +00008246_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008247if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren25967582009-09-06 10:00:26 +00008248 ac_osx_32bit=yes
8249else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008250 ac_osx_32bit=no
Ronald Oussoren25967582009-09-06 10:00:26 +00008251fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008252rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8253 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren25967582009-09-06 10:00:26 +00008254fi
8255
8256
Ronald Oussoren25967582009-09-06 10:00:26 +00008257 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00008258 case `/usr/bin/arch` in
Ronald Oussoren25967582009-09-06 10:00:26 +00008259 i386)
8260 MACOSX_DEFAULT_ARCH="i386"
8261 ;;
8262 ppc)
8263 MACOSX_DEFAULT_ARCH="ppc"
8264 ;;
8265 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008266 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren25967582009-09-06 10:00:26 +00008267 ;;
8268 esac
8269 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00008270 case `/usr/bin/arch` in
Ronald Oussoren25967582009-09-06 10:00:26 +00008271 i386)
8272 MACOSX_DEFAULT_ARCH="x86_64"
8273 ;;
8274 ppc)
8275 MACOSX_DEFAULT_ARCH="ppc64"
8276 ;;
8277 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008278 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren25967582009-09-06 10:00:26 +00008279 ;;
8280 esac
8281
8282 #ARCH_RUN_32BIT="true"
8283 fi
8284
8285 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00008286 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008287 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008288esac
8289
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
8291$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008292if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008293then
Skip Montanarodecc6a42003-01-01 20:07:49 +00008294 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00008295 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008296 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008297
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008298$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008299
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8301$as_echo "yes" >&6; }
Ronald Oussoren450d5612009-06-08 21:12:41 +00008302 if test $enable_shared = "yes"
8303 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008304 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 +00008305 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008306else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8308$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008309fi
8310
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
8312$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008313case $ac_sys_system/$ac_sys_release in
8314 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008315
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008316$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008317
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
8319$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008320 ;;
8321 *)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8323$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008324 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008325esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008326
Guido van Rossum0a516c91994-09-12 10:58:40 +00008327# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008328
Michael W. Hudson54241132001-12-07 15:38:26 +00008329
8330
8331
8332
Ronald Oussoren75912852010-04-08 08:13:31 +00008333
Guido van Rossum0a516c91994-09-12 10:58:40 +00008334# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00008335# -- usually .so, .sl on HP-UX, .dll on Cygwin
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
8337$as_echo_n "checking SO... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008338if test -z "$SO"
8339then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008340 case $ac_sys_system in
Neal Norwitz58e28882006-05-19 07:00:58 +00008341 hp*|HP*)
8342 case `uname -m` in
8343 ia64) SO=.so;;
8344 *) SO=.sl;;
8345 esac
8346 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00008347 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00008348 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008349 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +00008350else
8351 # this might also be a termcap variable, see #610332
8352 echo
8353 echo '====================================================================='
8354 echo '+ +'
8355 echo '+ WARNING: You have set SO in your environment. +'
8356 echo '+ Do you really mean to change the extension for shared libraries? +'
8357 echo '+ Continuing in 10 seconds to let you to ponder. +'
8358 echo '+ +'
8359 echo '====================================================================='
8360 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +00008361fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008362{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
8363$as_echo "$SO" >&6; }
Neal Norwitz58e28882006-05-19 07:00:58 +00008364
Ronald Oussoren79f90492009-01-02 10:44:46 +00008365
Neal Norwitz58e28882006-05-19 07:00:58 +00008366cat >>confdefs.h <<_ACEOF
8367#define SHLIB_EXT "$SO"
8368_ACEOF
8369
Guido van Rossum0a516c91994-09-12 10:58:40 +00008370# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00008371# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008372# (Shared libraries in this instance are shared modules to be loaded into
8373# Python, as opposed to building Python itself as a shared library.)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
8375$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008376if test -z "$LDSHARED"
8377then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008378 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008379 AIX*)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008380 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00008381 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008382 ;;
8383 BeOS*)
8384 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00008385 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008386 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008387 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008388 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008389 SunOS/5*)
Ronald Oussoren75912852010-04-08 08:13:31 +00008390 if test "$GCC" = "yes" ; then
8391 LDSHARED='$(CC) -shared'
8392 LDCXXSHARED='$(CXX) -shared'
8393 else
8394 LDSHARED='$(CC) -G'
8395 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a662000-05-26 12:22:54 +00008396 fi ;;
Thomas Hellerdc96a772008-04-04 10:07:55 +00008397 hp*|HP*)
Ronald Oussoren75912852010-04-08 08:13:31 +00008398 if test "$GCC" = "yes" ; then
8399 LDSHARED='$(CC) -shared'
8400 LDCXXSHARED='$(CXX) -shared'
8401 else
8402 LDSHARED='ld -b'
Thomas Hellerdc96a772008-04-04 10:07:55 +00008403 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +00008404 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +00008405 Darwin/1.3*)
Stefan Krah3a3e2032010-11-28 15:30:05 +00008406 LDSHARED='$(CC) -bundle'
8407 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00008408 if test "$enable_framework" ; then
8409 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008410 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8411 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008412 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008413 else
8414 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008415 LDSHARED="$LDSHARED -undefined suppress"
Ronald Oussoren75912852010-04-08 08:13:31 +00008416 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008417 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008418 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Stefan Krah3a3e2032010-11-28 15:30:05 +00008419 LDSHARED='$(CC) -bundle'
8420 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00008421 if test "$enable_framework" ; then
8422 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008423 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8424 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008425 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008426 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008427 # No framework, use the Python app as bundle-loader
8428 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00008429 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008430 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008431 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008432 Darwin/*)
8433 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
8434 # This allows an extension to be used in any Python
Ronald Oussoren38f1b982007-09-02 09:46:07 +00008435
Ned Deilyc40b9032014-06-25 13:48:46 -07008436 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
8437 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
8438 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
8439 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
8440 if test ${dep_target_major} -eq 10 && \
8441 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00008442 then
Ned Deilyc40b9032014-06-25 13:48:46 -07008443 # building for OS X 10.0 through 10.2
Stefan Krah3a3e2032010-11-28 15:30:05 +00008444 LDSHARED='$(CC) -bundle'
8445 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00008446 if test "$enable_framework" ; then
8447 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008448 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8449 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008450 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008451 else
8452 # No framework, use the Python app as bundle-loader
8453 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8454 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008455 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008456 fi
Ned Deilyc40b9032014-06-25 13:48:46 -07008457 else
8458 # building for OS X 10.3 and later
8459 if test "${enable_universalsdk}"; then
8460 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
8461 fi
8462 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
8463 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
8464 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00008465 fi
8466 ;;
Ronald Oussoren75912852010-04-08 08:13:31 +00008467 Linux*|GNU*|QNX*)
8468 LDSHARED='$(CC) -shared'
8469 LDCXXSHARED='$(CXX) -shared';;
8470 BSD/OS*/4*)
8471 LDSHARED="gcc -shared"
8472 LDCXXSHARED="g++ -shared";;
Martin v. Löwis222c5152006-06-03 07:37:13 +00008473 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008474 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008475 then
Stefan Krah3a3e2032010-11-28 15:30:05 +00008476 LDSHARED='$(CC) -shared'
8477 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00008478 else
Stefan Krah3a3e2032010-11-28 15:30:05 +00008479 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00008480 fi;;
Martin v. Löwis222c5152006-06-03 07:37:13 +00008481 OpenBSD*)
8482 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8483 then
Stefan Krah3a3e2032010-11-28 15:30:05 +00008484 LDSHARED='$(CC) -shared $(CCSHARED)'
8485 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Martin v. Löwis222c5152006-06-03 07:37:13 +00008486 else
8487 case `uname -r` in
8488 [01].* | 2.[0-7] | 2.[0-7].*)
8489 LDSHARED="ld -Bshareable ${LDFLAGS}"
8490 ;;
8491 *)
Stefan Krah3a3e2032010-11-28 15:30:05 +00008492 LDSHARED='$(CC) -shared $(CCSHARED)'
8493 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Martin v. Löwis222c5152006-06-03 07:37:13 +00008494 ;;
8495 esac
8496 fi;;
Ronald Oussoren75912852010-04-08 08:13:31 +00008497 NetBSD*|DragonFly*)
Antoine Pitroucb402772011-01-02 20:51:34 +00008498 LDSHARED='$(CC) -shared'
8499 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008500 OpenUNIX*|UnixWare*)
Ronald Oussoren75912852010-04-08 08:13:31 +00008501 if test "$GCC" = "yes" ; then
8502 LDSHARED='$(CC) -shared'
8503 LDCXXSHARED='$(CXX) -shared'
8504 else
8505 LDSHARED='$(CC) -G'
8506 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00008507 fi;;
Ronald Oussoren75912852010-04-08 08:13:31 +00008508 SCO_SV*)
8509 LDSHARED='$(CC) -Wl,-G,-Bexport'
8510 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
8511 CYGWIN*)
8512 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
8513 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
8514 atheos*)
8515 LDSHARED="gcc -shared"
8516 LDCXXSHARED="g++ -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008517 *) LDSHARED="ld";;
8518 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008519fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008520{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
8521$as_echo "$LDSHARED" >&6; }
Ronald Oussoren75912852010-04-08 08:13:31 +00008522LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008523BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008524# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008525# library (module) -- this is only needed for a few systems
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
8527$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008528if test -z "$CCSHARED"
8529then
Guido van Rossum07397971997-04-29 21:49:50 +00008530 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008531 SunOS*) if test "$GCC" = yes;
Martin v. Löwiseb623572007-03-12 10:50:39 +00008532 then CCSHARED="-fPIC";
8533 elif test `uname -p` = sparc;
8534 then CCSHARED="-xcode=pic32";
8535 else CCSHARED="-Kpic";
8536 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00008537 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00008538 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00008539 else CCSHARED="+z";
8540 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008541 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008542 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008543 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008544 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008545 if test "$GCC" = "yes"
8546 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008547 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008548 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008549 SCO_SV*)
8550 if test "$GCC" = "yes"
8551 then CCSHARED="-fPIC"
8552 else CCSHARED="-Kpic -belf"
8553 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008554 IRIX*/6*) case $CC in
8555 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00008556 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008557 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008558 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008559 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008560fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008561{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
8562$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008563# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008564# the python executable -- this is only needed for a few systems
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
8566$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008567if test -z "$LINKFORSHARED"
8568then
Guido van Rossum07397971997-04-29 21:49:50 +00008569 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008570 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008571 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00008572 LINKFORSHARED="-Wl,-E -Wl,+s";;
8573# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008574 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008575 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008576 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00008577 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008578 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
8579 # which is
Jack Jansene578a632001-08-15 01:27:14 +00008580 # not used by the core itself but which needs to be in the core so
8581 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +00008582 # -prebind is no longer used, because it actually seems to give a
8583 # slowdown in stead of a speedup, maybe due to the large number of
8584 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008585
8586 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +00008587 if test "$enable_framework"
8588 then
Jack Jansenda49e192005-01-07 13:08:22 +00008589 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008590 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008591 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008592 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008593 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00008594 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008595 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00008596 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8597 then
8598 LINKFORSHARED="-Wl,--export-dynamic"
8599 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008600 SunOS/5*) case $CC in
8601 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00008602 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00008603 then
8604 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008605 fi;;
8606 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00008607 CYGWIN*)
8608 if test $enable_shared = "no"
8609 then
8610 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
8611 fi;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00008612 QNX*)
8613 # -Wl,-E causes the symbols to be added to the dynamic
8614 # symbol table so that they can be found when a module
8615 # is loaded. -N 2048K causes the stack size to be set
8616 # to 2048 kilobytes so that the stack doesn't overflow
8617 # when running test_compile.py.
8618 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008619 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008620fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008621{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
8622$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008623
Michael W. Hudson54241132001-12-07 15:38:26 +00008624
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00008625
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
8627$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008628if test ! "$LIBRARY" = "$LDLIBRARY"
8629then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00008630 case $ac_sys_system in
8631 CYGWIN*)
8632 # Cygwin needs CCSHARED when building extension DLLs
8633 # but not when building the interpreter DLL.
8634 CFLAGSFORSHARED='';;
8635 *)
8636 CFLAGSFORSHARED='$(CCSHARED)'
8637 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008638fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008639{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
8640$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008641
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008642# SHLIBS are libraries (except -lc and -lm) to link to the python shared
8643# library (with --enable-shared).
8644# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008645# symbols, this must be set to $(LIBS) (expanded by make). We do this even
8646# if it is not required, since it creates a dependency of the shared library
8647# to LIBS. This, in turn, means that applications linking the shared libpython
8648# don't need to link LIBS explicitly. The default should be only changed
8649# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008650
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
8652$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008653case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008654 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008655 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008656esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008657{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
8658$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008659
8660
Guido van Rossum627b2d71993-12-24 10:39:16 +00008661# checks for libraries
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
8663$as_echo_n "checking for dlopen in -ldl... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008664if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008665 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008666else
Martin v. Löwis11437992002-04-12 09:54:03 +00008667 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008668LIBS="-ldl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008669cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008670/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008671
Martin v. Löwiseba40652007-08-30 20:10:57 +00008672/* Override any GCC internal prototype to avoid an error.
8673 Use char because int might match the return type of a GCC
8674 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008675#ifdef __cplusplus
8676extern "C"
8677#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008678char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008679int
8680main ()
8681{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008682return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008683 ;
8684 return 0;
8685}
8686_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008687if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008688 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008689else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008690 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008691fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008692rm -f core conftest.err conftest.$ac_objext \
8693 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008694LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008695fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008696{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
8697$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008698if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008699 cat >>confdefs.h <<_ACEOF
8700#define HAVE_LIBDL 1
8701_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008702
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008703 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00008704
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008705fi
8706 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
8708$as_echo_n "checking for shl_load in -ldld... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008709if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008710 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008711else
Martin v. Löwis11437992002-04-12 09:54:03 +00008712 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008713LIBS="-ldld $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008714cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008715/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008716
Martin v. Löwiseba40652007-08-30 20:10:57 +00008717/* Override any GCC internal prototype to avoid an error.
8718 Use char because int might match the return type of a GCC
8719 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008720#ifdef __cplusplus
8721extern "C"
8722#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008723char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008724int
8725main ()
8726{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008727return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008728 ;
8729 return 0;
8730}
8731_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008732if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008733 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008734else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008735 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008736fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008737rm -f core conftest.err conftest.$ac_objext \
8738 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008739LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008740fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008741{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
8742$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008743if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008744 cat >>confdefs.h <<_ACEOF
8745#define HAVE_LIBDLD 1
8746_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008747
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008748 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008749
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008750fi
8751 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00008752
Ronald Oussoren79f90492009-01-02 10:44:46 +00008753# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00008754if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008755 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
8756$as_echo_n "checking for library containing sem_init... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008757if ${ac_cv_search_sem_init+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008758 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008759else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008760 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008761cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008762/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008763
Martin v. Löwiseba40652007-08-30 20:10:57 +00008764/* Override any GCC internal prototype to avoid an error.
8765 Use char because int might match the return type of a GCC
8766 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008767#ifdef __cplusplus
8768extern "C"
8769#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008770char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008771int
8772main ()
8773{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008774return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008775 ;
8776 return 0;
8777}
8778_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00008779for ac_lib in '' pthread rt posix4; do
8780 if test -z "$ac_lib"; then
8781 ac_res="none required"
8782 else
8783 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00008784 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00008785 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008786 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008787 ac_cv_search_sem_init=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00008788fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008789rm -f core conftest.err conftest.$ac_objext \
8790 conftest$ac_exeext
Matthias Klose3cef2a92012-03-14 23:39:33 +01008791 if ${ac_cv_search_sem_init+:} false; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008792 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00008793fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008794done
Matthias Klose3cef2a92012-03-14 23:39:33 +01008795if ${ac_cv_search_sem_init+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008796
Martin v. Löwiseba40652007-08-30 20:10:57 +00008797else
8798 ac_cv_search_sem_init=no
8799fi
8800rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008801LIBS=$ac_func_search_save_LIBS
8802fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008803{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
8804$as_echo "$ac_cv_search_sem_init" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008805ac_res=$ac_cv_search_sem_init
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008806if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008807 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008808
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008809fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00008810 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00008811 # posix4 on Solaris 2.6
8812 # pthread (first!) on Linux
8813fi
8814
Martin v. Löwis19d17342003-06-14 21:03:05 +00008815# check if we need libintl for locale functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
8817$as_echo_n "checking for textdomain in -lintl... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008818if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008819 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00008820else
8821 ac_check_lib_save_LIBS=$LIBS
8822LIBS="-lintl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008823cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008824/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008825
Martin v. Löwiseba40652007-08-30 20:10:57 +00008826/* Override any GCC internal prototype to avoid an error.
8827 Use char because int might match the return type of a GCC
8828 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008829#ifdef __cplusplus
8830extern "C"
8831#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00008832char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008833int
8834main ()
8835{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008836return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008837 ;
8838 return 0;
8839}
8840_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008841if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008842 ac_cv_lib_intl_textdomain=yes
8843else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008844 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00008845fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008846rm -f core conftest.err conftest.$ac_objext \
8847 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00008848LIBS=$ac_check_lib_save_LIBS
8849fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008850{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
8851$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008852if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008853
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008854$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00008855
8856fi
8857
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008858
8859# checks for system dependent C++ extensions support
8860case "$ac_sys_system" in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008861 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
8862$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
8863 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008864/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00008865
Georg Brandl94800df2011-02-25 11:09:02 +00008866 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008867int
8868main ()
8869{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008870loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00008871 ;
8872 return 0;
8873}
Matthias Klosec511b472010-05-08 11:01:39 +00008874
Martin v. Löwis11437992002-04-12 09:54:03 +00008875_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008876if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008877
Matthias Klosec511b472010-05-08 11:01:39 +00008878
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008879$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008880
Matthias Klosec511b472010-05-08 11:01:39 +00008881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008882$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00008883
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008884else
Matthias Klosec511b472010-05-08 11:01:39 +00008885
8886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008887$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00008888
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008889fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008890rm -f core conftest.err conftest.$ac_objext \
8891 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008892 *) ;;
8893esac
8894
Guido van Rossum70c7f481998-03-26 18:44:10 +00008895# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008896# BeOS' sockets are stashed in libnet.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
8898$as_echo_n "checking for t_open in -lnsl... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008899if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008900 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008901else
Martin v. Löwis11437992002-04-12 09:54:03 +00008902 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008903LIBS="-lnsl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008904cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008905/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008906
Martin v. Löwiseba40652007-08-30 20:10:57 +00008907/* Override any GCC internal prototype to avoid an error.
8908 Use char because int might match the return type of a GCC
8909 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008910#ifdef __cplusplus
8911extern "C"
8912#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008913char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008914int
8915main ()
8916{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008917return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008918 ;
8919 return 0;
8920}
8921_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008922if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008923 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008924else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008925 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008926fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008927rm -f core conftest.err conftest.$ac_objext \
8928 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008929LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008930fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008931{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
8932$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008933if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008934 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008935fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00008936 # SVR4
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8938$as_echo_n "checking for socket in -lsocket... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008939if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008940 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008941else
Martin v. Löwis11437992002-04-12 09:54:03 +00008942 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008943LIBS="-lsocket $LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008944cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008945/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008946
Martin v. Löwiseba40652007-08-30 20:10:57 +00008947/* Override any GCC internal prototype to avoid an error.
8948 Use char because int might match the return type of a GCC
8949 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008950#ifdef __cplusplus
8951extern "C"
8952#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008953char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008954int
8955main ()
8956{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008957return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008958 ;
8959 return 0;
8960}
8961_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008962if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008963 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008964else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008965 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008966fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008967rm -f core conftest.err conftest.$ac_objext \
8968 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008969LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008970fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008971{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8972$as_echo "$ac_cv_lib_socket_socket" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008973if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00008974 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00008975fi
8976 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008977
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00008978case "$ac_sys_system" in
8979BeOS*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lnet" >&5
8981$as_echo_n "checking for socket in -lnet... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008982if ${ac_cv_lib_net_socket+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008983 $as_echo_n "(cached) " >&6
Guido van Rossumad678af1998-10-02 14:42:15 +00008984else
Martin v. Löwis11437992002-04-12 09:54:03 +00008985 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00008986LIBS="-lnet $LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008987cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008988/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008989
Martin v. Löwiseba40652007-08-30 20:10:57 +00008990/* Override any GCC internal prototype to avoid an error.
8991 Use char because int might match the return type of a GCC
8992 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008993#ifdef __cplusplus
8994extern "C"
8995#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008996char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008997int
8998main ()
8999{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009000return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009001 ;
9002 return 0;
9003}
9004_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009005if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009006 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +00009007else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009008 ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +00009009fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009010rm -f core conftest.err conftest.$ac_objext \
9011 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009012LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00009013fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009014{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_net_socket" >&5
9015$as_echo "$ac_cv_lib_net_socket" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009016if test "x$ac_cv_lib_net_socket" = xyes; then :
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009017 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009018fi
9019 # BeOS
9020;;
9021esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00009022
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9024$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009025
Martin v. Löwiseba40652007-08-30 20:10:57 +00009026# Check whether --with-libs was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009027if test "${with_libs+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009028 withval=$with_libs;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009029{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9030$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009031LIBS="$withval $LIBS"
9032
9033else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9035$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009036fi
9037
Guido van Rossum7f43da71994-08-01 12:15:30 +00009038
Benjamin Peterson64e8f6e2014-12-15 00:00:23 -05009039
9040
9041
9042
9043
9044
9045
9046if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9047 if test -n "$ac_tool_prefix"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009048 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9049set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9051$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009052if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009053 $as_echo_n "(cached) " >&6
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009054else
9055 case $PKG_CONFIG in
9056 [\\/]* | ?:[\\/]*)
9057 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9058 ;;
9059 *)
9060 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9061for as_dir in $PATH
9062do
9063 IFS=$as_save_IFS
9064 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009065 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009066 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009067 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009068 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009069 break 2
9070 fi
9071done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009072 done
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009073IFS=$as_save_IFS
9074
9075 ;;
9076esac
9077fi
9078PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9079if test -n "$PKG_CONFIG"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9081$as_echo "$PKG_CONFIG" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009082else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9084$as_echo "no" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009085fi
9086
9087
9088fi
9089if test -z "$ac_cv_path_PKG_CONFIG"; then
9090 ac_pt_PKG_CONFIG=$PKG_CONFIG
9091 # Extract the first word of "pkg-config", so it can be a program name with args.
9092set dummy pkg-config; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9094$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009095if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009096 $as_echo_n "(cached) " >&6
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009097else
9098 case $ac_pt_PKG_CONFIG in
9099 [\\/]* | ?:[\\/]*)
9100 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9101 ;;
9102 *)
9103 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9104for as_dir in $PATH
9105do
9106 IFS=$as_save_IFS
9107 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009108 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009109 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009110 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009111 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009112 break 2
9113 fi
9114done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009115 done
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009116IFS=$as_save_IFS
9117
9118 ;;
9119esac
9120fi
9121ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9122if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9124$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009125else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9127$as_echo "no" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009128fi
9129
9130 if test "x$ac_pt_PKG_CONFIG" = x; then
9131 PKG_CONFIG=""
9132 else
9133 case $cross_compiling:$ac_tool_warned in
9134yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009135{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9136$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009137ac_tool_warned=yes ;;
9138esac
9139 PKG_CONFIG=$ac_pt_PKG_CONFIG
9140 fi
9141else
9142 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9143fi
9144
Benjamin Peterson64e8f6e2014-12-15 00:00:23 -05009145fi
9146if test -n "$PKG_CONFIG"; then
9147 _pkg_min_version=0.9.0
9148 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
9149$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
9150 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9151 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9152$as_echo "yes" >&6; }
9153 else
9154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9155$as_echo "no" >&6; }
9156 PKG_CONFIG=""
9157 fi
9158fi
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009159
9160# Check for use of the system expat library
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
9162$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009163
9164# Check whether --with-system_expat was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009165if test "${with_system_expat+set}" = set; then :
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009166 withval=$with_system_expat;
Benjamin Petersonf2d1b2a2010-10-31 16:53:53 +00009167else
9168 with_system_expat="no"
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009169fi
9170
9171
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009172{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
9173$as_echo "$with_system_expat" >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009174
9175# Check for use of the system libffi library
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
9177$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009178
9179# Check whether --with-system_ffi was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009180if test "${with_system_ffi+set}" = set; then :
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009181 withval=$with_system_ffi;
Benjamin Petersonf2d1b2a2010-10-31 16:53:53 +00009182else
9183 with_system_ffi="no"
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009184fi
9185
9186
9187if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009188 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
9189else
9190 LIBFFI_INCLUDEDIR=""
9191fi
9192
9193
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009194{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
9195$as_echo "$with_system_ffi" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +00009196
Ned Deilya2a9f572013-10-25 00:30:10 -07009197# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
9198
9199
9200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
9201$as_echo_n "checking for --with-tcltk-includes... " >&6; }
9202
9203# Check whether --with-tcltk-includes was given.
9204if test "${with_tcltk_includes+set}" = set; then :
9205 withval=$with_tcltk_includes;
9206else
9207 with_tcltk_includes="default"
9208fi
9209
9210{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
9211$as_echo "$with_tcltk_includes" >&6; }
9212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
9213$as_echo_n "checking for --with-tcltk-libs... " >&6; }
9214
9215# Check whether --with-tcltk-libs was given.
9216if test "${with_tcltk_libs+set}" = set; then :
9217 withval=$with_tcltk_libs;
9218else
9219 with_tcltk_libs="default"
9220fi
9221
9222{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
9223$as_echo "$with_tcltk_libs" >&6; }
9224if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
9225then
9226 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
9227 then
9228 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
9229 fi
9230 TCLTK_INCLUDES=""
9231 TCLTK_LIBS=""
9232else
9233 TCLTK_INCLUDES="$with_tcltk_includes"
9234 TCLTK_LIBS="$with_tcltk_libs"
9235fi
9236
Benjamin Peterson867475c2009-04-29 20:36:25 +00009237# Check for --with-dbmliborder
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009238{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
9239$as_echo_n "checking for --with-dbmliborder... " >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +00009240
9241# Check whether --with-dbmliborder was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009242if test "${with_dbmliborder+set}" = set; then :
Benjamin Peterson867475c2009-04-29 20:36:25 +00009243 withval=$with_dbmliborder;
9244if test x$with_dbmliborder = xyes
9245then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009246as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Benjamin Peterson867475c2009-04-29 20:36:25 +00009247else
9248 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
9249 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
9250 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009251 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Benjamin Peterson867475c2009-04-29 20:36:25 +00009252 fi
9253 done
9254fi
9255fi
9256
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009257{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
9258$as_echo "$with_dbmliborder" >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +00009259
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009260# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009261
9262
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
9264$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009265
Martin v. Löwiseba40652007-08-30 20:10:57 +00009266# Check whether --with-signal-module was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009267if test "${with_signal_module+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009268 withval=$with_signal_module;
9269fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009270
9271
9272if test -z "$with_signal_module"
9273then with_signal_module="yes"
9274fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009275{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
9276$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009277
9278if test "${with_signal_module}" = "yes"; then
9279 USE_SIGNAL_MODULE=""
9280 SIGNAL_OBJS=""
9281else
9282 USE_SIGNAL_MODULE="#"
9283 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9284fi
9285
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009286# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009287
Barry Warsawc0d24d82000-06-29 16:12:00 +00009288USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009289
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dec-threads" >&5
9291$as_echo_n "checking for --with-dec-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009292
Guido van Rossumec2f0731997-01-22 20:54:01 +00009293
Martin v. Löwiseba40652007-08-30 20:10:57 +00009294# Check whether --with-dec-threads was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009295if test "${with_dec_threads+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009296 withval=$with_dec_threads;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009297{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9298$as_echo "$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +00009299LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00009300if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00009301 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00009302fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009303else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009304 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9305$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009306fi
9307
Martin v. Löwis11437992002-04-12 09:54:03 +00009308
9309# Templates for things AC_DEFINEd more than once.
9310# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009311
9312
Martin v. Löwis11437992002-04-12 09:54:03 +00009313
9314
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
9316$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009317
Martin v. Löwiseba40652007-08-30 20:10:57 +00009318# Check whether --with-threads was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009319if test "${with_threads+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009320 withval=$with_threads;
9321fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009322
9323
Barry Warsawc0d24d82000-06-29 16:12:00 +00009324# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009325
Martin v. Löwiseba40652007-08-30 20:10:57 +00009326# Check whether --with-thread was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009327if test "${with_thread+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009328 withval=$with_thread; with_threads=$with_thread
9329fi
9330
Barry Warsawc0d24d82000-06-29 16:12:00 +00009331
9332if test -z "$with_threads"
9333then with_threads="yes"
9334fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009335{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
9336$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d82000-06-29 16:12:00 +00009337
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009338
Barry Warsawc0d24d82000-06-29 16:12:00 +00009339if test "$with_threads" = "no"
9340then
9341 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009342elif test "$ac_cv_pthread_is_default" = yes
9343then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009344 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009345
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009346 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009347 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009348
9349 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009350 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009351elif test "$ac_cv_kpthread" = "yes"
9352then
9353 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009354 if test "$ac_cv_cxx_thread" = "yes"; then
9355 CXX="$CXX -Kpthread"
9356 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009357 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009358
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009359 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009360 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009361elif test "$ac_cv_kthread" = "yes"
9362then
9363 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009364 if test "$ac_cv_cxx_thread" = "yes"; then
9365 CXX="$CXX -Kthread"
9366 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009367 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009368
9369 posix_threads=yes
9370 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009371elif test "$ac_cv_pthread" = "yes"
9372then
9373 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009374 if test "$ac_cv_cxx_thread" = "yes"; then
9375 CXX="$CXX -pthread"
9376 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009377 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009378
9379 posix_threads=yes
9380 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009381else
9382 if test ! -z "$with_threads" -a -d "$with_threads"
9383 then LDFLAGS="$LDFLAGS -L$with_threads"
9384 fi
9385 if test ! -z "$withval" -a -d "$withval"
9386 then LDFLAGS="$LDFLAGS -L$withval"
9387 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009388
9389 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00009390 # define _POSIX_THREADS in unistd.h. Some apparently don't
9391 # (e.g. gnu pth with pthread emulation)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009392 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
9393$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
9394 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009395/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009396
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009397#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009398#ifdef _POSIX_THREADS
9399yes
9400#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009401
9402_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009403if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009404 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009405 unistd_defines_pthreads=yes
9406else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009407 unistd_defines_pthreads=no
9408fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009409rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009410
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
9412$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009413
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009414 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009415
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009416 ac_fn_c_check_header_mongrel "$LINENO" "cthreads.h" "ac_cv_header_cthreads_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01009417if test "x$ac_cv_header_cthreads_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009418 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00009419
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009420 $as_echo "#define C_THREADS 1" >>confdefs.h
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009421
Martin v. Löwis11437992002-04-12 09:54:03 +00009422
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009423$as_echo "#define HURD_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009424
9425 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009426 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009427else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009428
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009429 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 +01009430if test "x$ac_cv_header_mach_cthreads_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009431 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00009432
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009433 $as_echo "#define C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009434
Martin v. Löwis11437992002-04-12 09:54:03 +00009435
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009436$as_echo "#define MACH_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009437
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009438 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009439else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009440
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009441 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pth" >&5
9442$as_echo_n "checking for --with-pth... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009443
Martin v. Löwiseba40652007-08-30 20:10:57 +00009444# Check whether --with-pth was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009445if test "${with_pth+set}" = set; then :
9446 withval=$with_pth; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9447$as_echo "$withval" >&6; }
9448 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009449
9450
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009451$as_echo "#define HAVE_PTH 1" >>confdefs.h
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009452
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009453 LIBS="-lpth $LIBS"
9454 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009455else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9457$as_echo "no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009458
9459 # Just looking for pthread_create in libpthread is not enough:
9460 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
9461 # So we really have to include pthread.h, and then link.
9462 _libs=$LIBS
9463 LIBS="$LIBS -lpthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009464 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
9465$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
9466 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009467/* end confdefs.h. */
Stefan Krahae66ca62012-11-22 22:36:57 +01009468
9469#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009470#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00009471
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009472void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00009473int
9474main ()
9475{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009476
9477pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00009478 ;
9479 return 0;
9480}
9481_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009482if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009483
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9485$as_echo "yes" >&6; }
9486 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00009487
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009488 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009489 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009490else
Martin v. Löwis11437992002-04-12 09:54:03 +00009491
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009492 LIBS=$_libs
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009493 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Matthias Klose3cef2a92012-03-14 23:39:33 +01009494if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009495 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00009496
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009497 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009498 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00009499else
Guido van Rossumad678af1998-10-02 14:42:15 +00009500
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009501 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 +01009502if test "x$ac_cv_header_atheos_threads_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009503 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009504
9505
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009506$as_echo "#define ATHEOS_THREADS 1" >>confdefs.h
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009507
9508 THREADOBJ="Python/thread.o"
9509else
9510
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009511 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 +01009512if test "x$ac_cv_header_kernel_OS_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009513 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009514
9515
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009516$as_echo "#define BEOS_THREADS 1" >>confdefs.h
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009517
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009518 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009519else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009520
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009521 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
9522$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009523if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009524 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009525else
Martin v. Löwis11437992002-04-12 09:54:03 +00009526 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009527LIBS="-lpthreads $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009528cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009529/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009530
Martin v. Löwiseba40652007-08-30 20:10:57 +00009531/* Override any GCC internal prototype to avoid an error.
9532 Use char because int might match the return type of a GCC
9533 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009534#ifdef __cplusplus
9535extern "C"
9536#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009537char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009538int
9539main ()
9540{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009541return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009542 ;
9543 return 0;
9544}
9545_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009546if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009547 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00009548else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009549 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00009550fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009551rm -f core conftest.err conftest.$ac_objext \
9552 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009553LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009554fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009555{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
9556$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009557if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009558 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00009559
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009560 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009561 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009562 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00009563else
Greg Steinadf63d62000-07-05 10:38:09 +00009564
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009565 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
9566$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009567if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009568 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00009569else
Martin v. Löwis11437992002-04-12 09:54:03 +00009570 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009571LIBS="-lc_r $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009572cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009573/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009574
Martin v. Löwiseba40652007-08-30 20:10:57 +00009575/* Override any GCC internal prototype to avoid an error.
9576 Use char because int might match the return type of a GCC
9577 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009578#ifdef __cplusplus
9579extern "C"
9580#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009581char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009582int
9583main ()
9584{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009585return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009586 ;
9587 return 0;
9588}
9589_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009590if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009591 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00009592else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009593 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00009594fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009595rm -f core conftest.err conftest.$ac_objext \
9596 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009597LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00009598fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009599{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
9600$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009601if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009602 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00009603
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009604 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009605 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009606 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009607else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009608
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009609 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
9610$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009611if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009612 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009613else
Martin v. Löwis11437992002-04-12 09:54:03 +00009614 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009615LIBS="-lpthread $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009616cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009617/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009618
Martin v. Löwiseba40652007-08-30 20:10:57 +00009619/* Override any GCC internal prototype to avoid an error.
9620 Use char because int might match the return type of a GCC
9621 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009622#ifdef __cplusplus
9623extern "C"
9624#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009625char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009626int
9627main ()
9628{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009629return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009630 ;
9631 return 0;
9632}
9633_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009634if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009635 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009636else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009637 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009638fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009639rm -f core conftest.err conftest.$ac_objext \
9640 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009641LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009642fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009643{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
9644$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009645if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009646 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009647
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009648 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009649 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009650 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009651else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009652
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009653 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
9654$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009655if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009656 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00009657else
Martin v. Löwis11437992002-04-12 09:54:03 +00009658 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009659LIBS="-lcma $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009660cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009661/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009662
Martin v. Löwiseba40652007-08-30 20:10:57 +00009663/* Override any GCC internal prototype to avoid an error.
9664 Use char because int might match the return type of a GCC
9665 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009666#ifdef __cplusplus
9667extern "C"
9668#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009669char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009670int
9671main ()
9672{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009673return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009674 ;
9675 return 0;
9676}
9677_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009678if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009679 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00009680else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009681 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00009682fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009683rm -f core conftest.err conftest.$ac_objext \
9684 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009685LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009686fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009687{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
9688$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009689if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009690 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00009691
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009692 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009693 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009694 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00009695else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00009696
Martin v. Löwis130fb172001-07-19 11:00:41 +00009697 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00009698fi
9699
Guido van Rossum627b2d71993-12-24 10:39:16 +00009700
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009701fi
9702
Guido van Rossum0be3e491997-05-22 20:33:33 +00009703fi
9704
Guido van Rossum49545951997-12-02 19:28:29 +00009705fi
9706
Guido van Rossumb93a8621998-05-07 13:27:32 +00009707fi
9708
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009709
Michael W. Hudson54241132001-12-07 15:38:26 +00009710fi
9711
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009712
9713fi
9714
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009715fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009716rm -f core conftest.err conftest.$ac_objext \
9717 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009718fi
9719
Martin v. Löwis11437992002-04-12 09:54:03 +00009720fi
9721
9722
9723fi
9724
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009725
Michael W. Hudson54241132001-12-07 15:38:26 +00009726
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009727 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
9728$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009729if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009730 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009731else
Martin v. Löwis11437992002-04-12 09:54:03 +00009732 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009733LIBS="-lmpc $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009734cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009735/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009736
Martin v. Löwiseba40652007-08-30 20:10:57 +00009737/* Override any GCC internal prototype to avoid an error.
9738 Use char because int might match the return type of a GCC
9739 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009740#ifdef __cplusplus
9741extern "C"
9742#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009743char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009744int
9745main ()
9746{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009747return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009748 ;
9749 return 0;
9750}
9751_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009752if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009753 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009754else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009755 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009756fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009757rm -f core conftest.err conftest.$ac_objext \
9758 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009759LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009760fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009761{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
9762$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009763if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009764 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009765
Martin v. Löwis130fb172001-07-19 11:00:41 +00009766 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009767 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009768 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009769fi
9770
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009771
Neal Norwitza978ab02002-11-02 16:58:05 +00009772 if test "$posix_threads" != "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009773 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
9774$as_echo_n "checking for thr_create in -lthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009775if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009776 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009777else
Martin v. Löwis11437992002-04-12 09:54:03 +00009778 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009779LIBS="-lthread $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009780cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009781/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009782
Martin v. Löwiseba40652007-08-30 20:10:57 +00009783/* Override any GCC internal prototype to avoid an error.
9784 Use char because int might match the return type of a GCC
9785 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009786#ifdef __cplusplus
9787extern "C"
9788#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009789char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009790int
9791main ()
9792{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009793return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009794 ;
9795 return 0;
9796}
9797_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009798if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009799 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009800else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009801 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009802fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009803rm -f core conftest.err conftest.$ac_objext \
9804 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009805LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009806fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009807{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
9808$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009809if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009810 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009811
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009812 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009813 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009814 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009815fi
9816
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009817 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009818
Martin v. Löwis130fb172001-07-19 11:00:41 +00009819 if test "$USE_THREAD_MODULE" != "#"
9820 then
9821 # If the above checks didn't disable threads, (at least) OSF1
9822 # needs this '-threads' argument during linking.
9823 case $ac_sys_system in
9824 OSF1) LDLAST=-threads;;
9825 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00009826 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009827fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009828
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009829if test "$posix_threads" = "yes"; then
9830 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009831
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009832$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009833
9834 fi
9835
9836 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
9837 case $ac_sys_system/$ac_sys_release in
Charles-François Natali4929eb92011-07-21 19:41:04 +02009838 SunOS/5.6)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009839$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009840
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009841 ;;
9842 SunOS/5.8)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009843$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009844
9845 ;;
Charles-François Natali4929eb92011-07-21 19:41:04 +02009846 AIX/*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009847$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimescba36bb2008-01-30 22:54:18 +00009848
9849 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009850 esac
9851
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009852 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
9853$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009854 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009855 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009856else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009857 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009858 ac_cv_pthread_system_supported=no
9859else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009860 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009861/* end confdefs.h. */
Stefan Krahae66ca62012-11-22 22:36:57 +01009862
9863 #include <stdio.h>
9864 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009865 void *foo(void *parm) {
9866 return NULL;
9867 }
9868 main() {
9869 pthread_attr_t attr;
9870 pthread_t id;
9871 if (pthread_attr_init(&attr)) exit(-1);
9872 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
9873 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
9874 exit(0);
9875 }
9876_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009877if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009878 ac_cv_pthread_system_supported=yes
9879else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009880 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009881fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009882rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9883 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009884fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009885
Martin v. Löwiseba40652007-08-30 20:10:57 +00009886
Guido van Rossum627b2d71993-12-24 10:39:16 +00009887fi
9888
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
9890$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009891 if test "$ac_cv_pthread_system_supported" = "yes"; then
9892
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009893$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009894
9895 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009896 for ac_func in pthread_sigmask
9897do :
9898 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Matthias Klose3cef2a92012-03-14 23:39:33 +01009899if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009900 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009901#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009902_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00009903 case $ac_sys_system in
9904 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009905
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009906$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00009907
9908 ;;
9909 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009910fi
9911done
9912
Christian Heimes0d604cf2013-08-21 13:26:05 +02009913 for ac_func in pthread_atfork
9914do :
9915 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
9916if test "x$ac_cv_func_pthread_atfork" = xyes; then :
9917 cat >>confdefs.h <<_ACEOF
9918#define HAVE_PTHREAD_ATFORK 1
9919_ACEOF
9920
9921fi
9922done
9923
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009924fi
9925
9926
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009927# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00009928
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009929{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
9930$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009931# Check whether --enable-ipv6 was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009932if test "${enable_ipv6+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009933 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009934 no)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9936$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009937 ipv6=no
9938 ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009939 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9940$as_echo "yes" >&6; }
9941 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009942
9943 ipv6=yes
9944 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009945 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009946else
Martin v. Löwis11437992002-04-12 09:54:03 +00009947
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009948 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009949/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009950 /* AF_INET6 available check */
9951#include <sys/types.h>
9952#include <sys/socket.h>
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009953int
9954main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009955{
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009956int domain = AF_INET6;
9957 ;
9958 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009959}
Martin v. Löwis11437992002-04-12 09:54:03 +00009960_ACEOF
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009961if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +00009962
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9964$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009965 ipv6=yes
Matthias Klosec511b472010-05-08 11:01:39 +00009966
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009967else
Matthias Klosec511b472010-05-08 11:01:39 +00009968
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9970$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009971 ipv6=no
Matthias Klosec511b472010-05-08 11:01:39 +00009972
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009973fi
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009974rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009975
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009976if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009977 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
9978$as_echo_n "checking if RFC2553 API is available... " >&6; }
9979 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009980/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00009981
9982 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009983#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009984int
9985main ()
9986{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009987struct sockaddr_in6 x;
Matthias Klosec511b472010-05-08 11:01:39 +00009988 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00009989 ;
9990 return 0;
9991}
Matthias Klosec511b472010-05-08 11:01:39 +00009992
Martin v. Löwis11437992002-04-12 09:54:03 +00009993_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009994if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +00009995
9996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009997$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00009998 ipv6=yes
9999
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010000else
Matthias Klosec511b472010-05-08 11:01:39 +000010001
10002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010003$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000010004 ipv6=no
10005
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010006fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010007rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010008fi
10009
10010if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010011 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010012
10013fi
10014
Martin v. Löwiseba40652007-08-30 20:10:57 +000010015fi
10016
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010017
10018ipv6type=unknown
10019ipv6lib=none
10020ipv6trylibc=no
10021
10022if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010023 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10024$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010025 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10026 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010027 case $i in
10028 inria)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010029 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010030/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010031
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010032#include <netinet/in.h>
10033#ifdef IPV6_INRIA_VERSION
10034yes
10035#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010036_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010037if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010038 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010039 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010040fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000010041rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010042
10043 ;;
10044 kame)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010045 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010046/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010047
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010048#include <netinet/in.h>
10049#ifdef __KAME__
10050yes
10051#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010052_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010053if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010054 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010055 ipv6type=$i;
10056 ipv6lib=inet6
10057 ipv6libdir=/usr/local/v6/lib
10058 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010059fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000010060rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010061
10062 ;;
10063 linux-glibc)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010064 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010065/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010066
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010067#include <features.h>
10068#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10069yes
10070#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010071_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010072if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010073 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010074 ipv6type=$i;
10075 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010076fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000010077rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010078
10079 ;;
10080 linux-inet6)
10081 if test -d /usr/inet6; then
10082 ipv6type=$i
10083 ipv6lib=inet6
10084 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010085 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010086 fi
10087 ;;
10088 solaris)
10089 if test -f /etc/netconfig; then
Antoine Pitrou31e85952011-01-03 18:57:14 +000010090 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010091 ipv6type=$i
10092 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010093 fi
10094 fi
10095 ;;
10096 toshiba)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010097 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010098/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010099
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010100#include <sys/param.h>
10101#ifdef _TOSHIBA_INET6
10102yes
10103#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010104_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010105if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010106 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010107 ipv6type=$i;
10108 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010109 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010110fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000010111rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010112
10113 ;;
10114 v6d)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010115 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010116/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010117
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010118#include </usr/local/v6/include/sys/v6config.h>
10119#ifdef __V6D__
10120yes
10121#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010122_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010123if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010124 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010125 ipv6type=$i;
10126 ipv6lib=v6;
10127 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010128 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010129fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000010130rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010131
10132 ;;
10133 zeta)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010134 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010135/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010136
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010137#include <sys/param.h>
10138#ifdef _ZETA_MINAMI_INET6
10139yes
10140#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010141_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010142if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010143 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010144 ipv6type=$i;
10145 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010146 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010147fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000010148rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010149
10150 ;;
10151 esac
10152 if test "$ipv6type" != "unknown"; then
10153 break
10154 fi
10155 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10157$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010158fi
10159
10160if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10161 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10162 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10163 echo "using lib$ipv6lib"
10164 else
10165 if test $ipv6trylibc = "yes"; then
10166 echo "using libc"
10167 else
10168 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10169 echo "You need to fetch lib$ipv6lib.a from appropriate"
10170 echo 'ipv6 kit and compile beforehand.'
10171 exit 1
10172 fi
10173 fi
10174fi
10175
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
10177$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
10178cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010179/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +000010180
10181 #include <Carbon/Carbon.h>
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010182int
10183main ()
10184{
10185FSIORefNum fRef = 0
10186 ;
10187 return 0;
10188}
Mark Dickinson0712b562010-05-08 19:13:21 +000010189
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010190_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010191if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +000010192
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010193
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010194$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010195
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010196 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10197$as_echo "yes" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010198
Mark Dickinson0712b562010-05-08 19:13:21 +000010199else
10200
10201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10202$as_echo "no" >&6; }
10203
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010204fi
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010205rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10206
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010207# Check for --with-doc-strings
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10209$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010210
Martin v. Löwiseba40652007-08-30 20:10:57 +000010211# Check whether --with-doc-strings was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010212if test "${with_doc_strings+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010213 withval=$with_doc_strings;
10214fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010215
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010216
10217if test -z "$with_doc_strings"
10218then with_doc_strings="yes"
10219fi
10220if test "$with_doc_strings" != "no"
10221then
10222
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010223$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010224
10225fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010226{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10227$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010228
Neil Schemenauera35c6882001-02-27 04:45:05 +000010229# Check for Python-specific malloc support
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
10231$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010232
Martin v. Löwiseba40652007-08-30 20:10:57 +000010233# Check whether --with-tsc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010234if test "${with_tsc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010235 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010236if test "$withval" != no
10237then
10238
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010239$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010240
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10242$as_echo "yes" >&6; }
10243else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10244$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010245fi
10246else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10248$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010249fi
10250
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010251
10252# Check for Python-specific malloc support
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10254$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010255
Martin v. Löwiseba40652007-08-30 20:10:57 +000010256# Check whether --with-pymalloc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010257if test "${with_pymalloc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010258 withval=$with_pymalloc;
10259fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010260
Neil Schemenauera35c6882001-02-27 04:45:05 +000010261
Neil Schemenauer16c22972002-03-22 15:34:49 +000010262if test -z "$with_pymalloc"
10263then with_pymalloc="yes"
10264fi
10265if test "$with_pymalloc" != "no"
10266then
Martin v. Löwis11437992002-04-12 09:54:03 +000010267
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010268$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010269
10270fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010271{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10272$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010273
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010274# Check for Valgrind support
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
10276$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010277
10278# Check whether --with-valgrind was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010279if test "${with_valgrind+set}" = set; then :
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010280 withval=$with_valgrind;
10281else
10282 with_valgrind=no
10283fi
10284
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010285{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
10286$as_echo "$with_valgrind" >&6; }
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010287if test "$with_valgrind" != no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010288 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 +010010289if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010290
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010291$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010292
10293else
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010294 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010295
10296fi
10297
10298
10299fi
10300
Barry Warsawef82cd72000-06-30 16:21:01 +000010301# Check for --with-wctype-functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-wctype-functions" >&5
10303$as_echo_n "checking for --with-wctype-functions... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010304
Martin v. Löwiseba40652007-08-30 20:10:57 +000010305# Check whether --with-wctype-functions was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010306if test "${with_wctype_functions+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010307 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000010308if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000010309then
10310
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010311$as_echo "#define WANT_WCTYPE_FUNCTIONS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010312
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10314$as_echo "yes" >&6; }
10315else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10316$as_echo "no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000010317fi
10318else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10320$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010321fi
10322
Barry Warsawef82cd72000-06-30 16:21:01 +000010323
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010324# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000010325
Guido van Rossum98935bf2001-09-05 19:13:16 +000010326DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000010327
Guido van Rossume97ee181999-12-20 21:27:22 +000010328# the dlopen() function means we might want to use dynload_shlib.o. some
10329# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000010330for ac_func in dlopen
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010331do :
10332 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010333if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010334 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010335#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010336_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000010337
Guido van Rossume97ee181999-12-20 21:27:22 +000010338fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010339done
Guido van Rossume97ee181999-12-20 21:27:22 +000010340
Michael W. Hudson54241132001-12-07 15:38:26 +000010341
Guido van Rossume97ee181999-12-20 21:27:22 +000010342# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
10343# loading of modules.
10344
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
10346$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010347if test -z "$DYNLOADFILE"
10348then
10349 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000010350 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
10351 if test "$ac_cv_func_dlopen" = yes
10352 then DYNLOADFILE="dynload_shlib.o"
10353 else DYNLOADFILE="dynload_aix.o"
10354 fi
10355 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000010356 BeOS*) DYNLOADFILE="dynload_beos.o";;
10357 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Anthony Baxter82201742006-04-09 15:07:40 +000010358 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
10359 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010360 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000010361 *)
10362 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
10363 # out any dynamic loading
10364 if test "$ac_cv_func_dlopen" = yes
10365 then DYNLOADFILE="dynload_shlib.o"
10366 else DYNLOADFILE="dynload_stub.o"
10367 fi
10368 ;;
10369 esac
10370fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010371{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
10372$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010373if test "$DYNLOADFILE" != "dynload_stub.o"
10374then
Martin v. Löwis11437992002-04-12 09:54:03 +000010375
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010376$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000010377
10378fi
10379
Neil Schemenauer4e425612001-06-19 15:44:15 +000010380# MACHDEP_OBJS can be set to platform-specific object files needed by Python
10381
Michael W. Hudson54241132001-12-07 15:38:26 +000010382
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
10384$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010385if test -z "$MACHDEP_OBJS"
10386then
Jack Jansene578a632001-08-15 01:27:14 +000010387 MACHDEP_OBJS=$extra_machdep_objs
10388else
10389 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000010390fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010391{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
10392$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010393
Guido van Rossum627b2d71993-12-24 10:39:16 +000010394# checks for library functions
Martin v. Löwisaef18b12008-03-24 13:31:16 +000010395for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
10396 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
doko@ubuntu.coma50b0de2015-04-13 21:55:59 +020010397 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
10398 getentropy \
Martin v. Löwis50ea4562009-11-27 13:56:01 +000010399 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Benjamin Petersond16e01c2014-02-04 10:20:26 -050010400 initgroups kill killpg lchmod lchown lstat mkfifo mknod mktime mmap \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000010401 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000010402 putenv readlink realpath \
Jesse Noller355b1262009-04-02 00:03:28 +000010403 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
10404 setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000010405 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Martin v. Löwis50ea4562009-11-27 13:56:01 +000010406 setlocale setregid setreuid setresuid setresgid \
10407 setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +000010408 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000010409 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Neal Norwitz05a45592006-03-20 06:30:08 +000010410 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010411do :
10412 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10413ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010414if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010415 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010416#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010417_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010418
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010419fi
10420done
10421
Michael W. Hudson54241132001-12-07 15:38:26 +000010422
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010423# For some functions, having a definition is not sufficient, since
10424# we want to take their address.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
10426$as_echo_n "checking for chroot... " >&6; }
10427cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010428/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010429#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010430int
10431main ()
10432{
10433void *x=chroot
10434 ;
10435 return 0;
10436}
10437_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010438if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010439
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010440$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010441
Matthias Klosec511b472010-05-08 11:01:39 +000010442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010443$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010444else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010445 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10446$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010447
10448fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010449rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
10451$as_echo_n "checking for link... " >&6; }
10452cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010453/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010454#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010455int
10456main ()
10457{
10458void *x=link
10459 ;
10460 return 0;
10461}
10462_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010463if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010464
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010465$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010466
Matthias Klosec511b472010-05-08 11:01:39 +000010467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010468$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010469else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010470 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10471$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010472
10473fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010474rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
10476$as_echo_n "checking for symlink... " >&6; }
10477cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010478/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010479#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010480int
10481main ()
10482{
10483void *x=symlink
10484 ;
10485 return 0;
10486}
10487_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010488if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010489
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010490$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010491
Matthias Klosec511b472010-05-08 11:01:39 +000010492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010493$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010494else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010495 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10496$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010497
10498fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010499rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
10501$as_echo_n "checking for fchdir... " >&6; }
10502cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010503/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010504#include <unistd.h>
10505int
10506main ()
10507{
10508void *x=fchdir
10509 ;
10510 return 0;
10511}
10512_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010513if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010514
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010515$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010516
Matthias Klosec511b472010-05-08 11:01:39 +000010517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010518$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010519else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10521$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010522
10523fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010524rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010525{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
10526$as_echo_n "checking for fsync... " >&6; }
10527cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010528/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010529#include <unistd.h>
10530int
10531main ()
10532{
10533void *x=fsync
10534 ;
10535 return 0;
10536}
10537_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010538if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010539
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010540$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010541
Matthias Klosec511b472010-05-08 11:01:39 +000010542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010543$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010544else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10546$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010547
10548fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010549rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
10551$as_echo_n "checking for fdatasync... " >&6; }
10552cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010553/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010554#include <unistd.h>
10555int
10556main ()
10557{
10558void *x=fdatasync
10559 ;
10560 return 0;
10561}
10562_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010563if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010564
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010565$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010566
Matthias Klosec511b472010-05-08 11:01:39 +000010567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010568$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010569else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10571$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010572
10573fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010574rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
10576$as_echo_n "checking for epoll... " >&6; }
10577cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010578/* end confdefs.h. */
10579#include <sys/epoll.h>
10580int
10581main ()
10582{
10583void *x=epoll_create
10584 ;
10585 return 0;
10586}
10587_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010588if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010589
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010590$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010591
Matthias Klosec511b472010-05-08 11:01:39 +000010592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010593$as_echo "yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010594else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10596$as_echo "no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010597
10598fi
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010599rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
10601$as_echo_n "checking for kqueue... " >&6; }
10602cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010603/* end confdefs.h. */
10604
10605#include <sys/types.h>
10606#include <sys/event.h>
10607
10608int
10609main ()
10610{
10611int x=kqueue()
10612 ;
10613 return 0;
10614}
10615_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010616if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010617
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010618$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010619
Matthias Klosec511b472010-05-08 11:01:39 +000010620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010621$as_echo "yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010622else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010623 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10624$as_echo "no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010625
10626fi
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010627rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010628# On some systems (eg. FreeBSD 5), we would find a definition of the
10629# functions ctermid_r, setgroups in the library, but no prototype
10630# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
10631# address to avoid compiler warnings and potential miscompilations
10632# because of the missing prototypes.
10633
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
10635$as_echo_n "checking for ctermid_r... " >&6; }
10636cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010637/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010638
Martin v. Löwisd5843682002-11-21 20:41:28 +000010639#include <stdio.h>
10640
Martin v. Löwisd5843682002-11-21 20:41:28 +000010641int
10642main ()
10643{
10644void* p = ctermid_r
10645 ;
10646 return 0;
10647}
10648_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010649if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010650
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010651$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010652
Matthias Klosec511b472010-05-08 11:01:39 +000010653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010654$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010655else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10657$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010658
10659fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010660rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10661
Antoine Pitroub170f172010-09-10 18:47:36 +000010662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
10663$as_echo_n "checking for flock declaration... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010664if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010665 $as_echo_n "(cached) " >&6
10666else
10667 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010668/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010669#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010670int
10671main ()
10672{
10673void* p = flock
Antoine Pitroub170f172010-09-10 18:47:36 +000010674
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010675 ;
10676 return 0;
10677}
10678_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010679if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010680 ac_cv_flock_decl=yes
10681else
10682 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010683
10684fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010685rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitrou85729812010-09-07 14:55:24 +000010686
Antoine Pitroub170f172010-09-10 18:47:36 +000010687fi
10688{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
10689$as_echo "$ac_cv_flock_decl" >&6; }
10690if test "x${ac_cv_flock_decl}" = xyes; then
10691 for ac_func in flock
10692do :
10693 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010694if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010695 cat >>confdefs.h <<_ACEOF
10696#define HAVE_FLOCK 1
Antoine Pitrou85729812010-09-07 14:55:24 +000010697_ACEOF
Antoine Pitroub170f172010-09-10 18:47:36 +000010698
Antoine Pitrou85729812010-09-07 14:55:24 +000010699else
Antoine Pitroub170f172010-09-10 18:47:36 +000010700 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitrou85729812010-09-07 14:55:24 +000010701$as_echo_n "checking for flock in -lbsd... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010702if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitrou85729812010-09-07 14:55:24 +000010703 $as_echo_n "(cached) " >&6
10704else
10705 ac_check_lib_save_LIBS=$LIBS
10706LIBS="-lbsd $LIBS"
10707cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10708/* end confdefs.h. */
10709
10710/* Override any GCC internal prototype to avoid an error.
10711 Use char because int might match the return type of a GCC
10712 builtin and then its argument prototype would still apply. */
10713#ifdef __cplusplus
10714extern "C"
10715#endif
10716char flock ();
10717int
10718main ()
10719{
10720return flock ();
10721 ;
10722 return 0;
10723}
10724_ACEOF
10725if ac_fn_c_try_link "$LINENO"; then :
10726 ac_cv_lib_bsd_flock=yes
10727else
10728 ac_cv_lib_bsd_flock=no
10729fi
10730rm -f core conftest.err conftest.$ac_objext \
10731 conftest$ac_exeext conftest.$ac_ext
10732LIBS=$ac_check_lib_save_LIBS
10733fi
10734{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
10735$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010736if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010737 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitrou85729812010-09-07 14:55:24 +000010738
10739
10740$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
10741
10742
10743fi
10744
10745
10746fi
Antoine Pitroub170f172010-09-10 18:47:36 +000010747done
10748
Antoine Pitrou85729812010-09-07 14:55:24 +000010749fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010750
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
10752$as_echo_n "checking for getpagesize... " >&6; }
10753cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010754/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010755
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010756#include <unistd.h>
10757
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010758int
10759main ()
10760{
10761void* p = getpagesize
10762 ;
10763 return 0;
10764}
10765_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010766if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010767
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010768$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010769
Matthias Klosec511b472010-05-08 11:01:39 +000010770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010771$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010772else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10774$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010775
10776fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010777rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010778
Charles-François Natali93a11752011-11-27 13:01:35 +010010779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
10780$as_echo_n "checking for broken unsetenv... " >&6; }
10781cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10782/* end confdefs.h. */
10783
10784#include <stdlib.h>
10785
10786int
10787main ()
10788{
10789int res = unsetenv("DUMMY")
10790 ;
10791 return 0;
10792}
10793_ACEOF
10794if ac_fn_c_try_compile "$LINENO"; then :
10795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10796$as_echo "no" >&6; }
10797else
10798
10799$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
10800
10801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10802$as_echo "yes" >&6; }
10803
10804fi
10805rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10806
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010807for ac_prog in true
10808do
10809 # Extract the first word of "$ac_prog", so it can be a program name with args.
10810set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10812$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010813if ${ac_cv_prog_TRUE+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010814 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010815else
10816 if test -n "$TRUE"; then
10817 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
10818else
10819as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10820for as_dir in $PATH
10821do
10822 IFS=$as_save_IFS
10823 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010824 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +010010825 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010826 ac_cv_prog_TRUE="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010827 $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 +000010828 break 2
10829 fi
10830done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010831 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000010832IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010833
10834fi
10835fi
10836TRUE=$ac_cv_prog_TRUE
10837if test -n "$TRUE"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010838 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
10839$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010840else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010841 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10842$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010843fi
10844
Martin v. Löwiseba40652007-08-30 20:10:57 +000010845
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010846 test -n "$TRUE" && break
10847done
10848test -n "$TRUE" || TRUE="/bin/true"
10849
10850
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
10852$as_echo_n "checking for inet_aton in -lc... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010853if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010854 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010855else
10856 ac_check_lib_save_LIBS=$LIBS
10857LIBS="-lc $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010858cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010859/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010860
Martin v. Löwiseba40652007-08-30 20:10:57 +000010861/* Override any GCC internal prototype to avoid an error.
10862 Use char because int might match the return type of a GCC
10863 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010864#ifdef __cplusplus
10865extern "C"
10866#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010867char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010868int
10869main ()
10870{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010871return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010872 ;
10873 return 0;
10874}
10875_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010876if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010877 ac_cv_lib_c_inet_aton=yes
10878else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010879 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010880fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010881rm -f core conftest.err conftest.$ac_objext \
10882 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010883LIBS=$ac_check_lib_save_LIBS
10884fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010885{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
10886$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010887if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010888 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010889else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010890 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
10891$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010892if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010893 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010894else
10895 ac_check_lib_save_LIBS=$LIBS
10896LIBS="-lresolv $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010897cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010898/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010899
Martin v. Löwiseba40652007-08-30 20:10:57 +000010900/* Override any GCC internal prototype to avoid an error.
10901 Use char because int might match the return type of a GCC
10902 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010903#ifdef __cplusplus
10904extern "C"
10905#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010906char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010907int
10908main ()
10909{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010910return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010911 ;
10912 return 0;
10913}
10914_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010915if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010916 ac_cv_lib_resolv_inet_aton=yes
10917else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010918 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010919fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010920rm -f core conftest.err conftest.$ac_objext \
10921 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010922LIBS=$ac_check_lib_save_LIBS
10923fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010924{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
10925$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010926if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010927 cat >>confdefs.h <<_ACEOF
10928#define HAVE_LIBRESOLV 1
10929_ACEOF
10930
10931 LIBS="-lresolv $LIBS"
10932
10933fi
10934
10935
10936fi
10937
10938
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010939# On Tru64, chflags seems to be present, but calling it will
10940# exit Python
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
10942$as_echo_n "checking for chflags... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010943if ${ac_cv_have_chflags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010944 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010945else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010946 if test "$cross_compiling" = yes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010947 ac_cv_have_chflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010948else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010949 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010950/* end confdefs.h. */
Ned Deily43e10542011-06-27 23:41:53 -070010951
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010952#include <sys/stat.h>
10953#include <unistd.h>
10954int main(int argc, char*argv[])
10955{
10956 if(chflags(argv[0], 0) != 0)
10957 return 1;
10958 return 0;
10959}
Ned Deily43e10542011-06-27 23:41:53 -070010960
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010961_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010962if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010963 ac_cv_have_chflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010964else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010965 ac_cv_have_chflags=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010966fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010967rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10968 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000010969fi
10970
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010971
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010972fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010973{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
10974$as_echo "$ac_cv_have_chflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000010975if test "$ac_cv_have_chflags" = cross ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010976 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010977if test "x$ac_cv_func_chflags" = xyes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010978 ac_cv_have_chflags="yes"
10979else
10980 ac_cv_have_chflags="no"
10981fi
10982
10983fi
10984if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010985
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010986$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010987
10988fi
10989
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
10991$as_echo_n "checking for lchflags... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010992if ${ac_cv_have_lchflags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010993 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010994else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010995 if test "$cross_compiling" = yes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010996 ac_cv_have_lchflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010997else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010998 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010999/* end confdefs.h. */
Ned Deily43e10542011-06-27 23:41:53 -070011000
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011001#include <sys/stat.h>
11002#include <unistd.h>
11003int main(int argc, char*argv[])
11004{
11005 if(lchflags(argv[0], 0) != 0)
11006 return 1;
11007 return 0;
11008}
Ned Deily43e10542011-06-27 23:41:53 -070011009
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011010_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011011if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011012 ac_cv_have_lchflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011013else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011014 ac_cv_have_lchflags=no
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011015fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011016rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11017 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011018fi
11019
11020
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011021fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011022{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11023$as_echo "$ac_cv_have_lchflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000011024if test "$ac_cv_have_lchflags" = cross ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011025 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011026if test "x$ac_cv_func_lchflags" = xyes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000011027 ac_cv_have_lchflags="yes"
11028else
11029 ac_cv_have_lchflags="no"
11030fi
11031
11032fi
11033if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011034
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011035$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011036
11037fi
11038
Ronald Oussorenf8752642006-07-06 10:13:35 +000011039case $ac_sys_system/$ac_sys_release in
11040Darwin/*)
11041 _CUR_CFLAGS="${CFLAGS}"
11042 _CUR_LDFLAGS="${LDFLAGS}"
11043 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11044 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11045 ;;
11046esac
11047
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11049$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011050if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011051 $as_echo_n "(cached) " >&6
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011052else
11053 ac_check_lib_save_LIBS=$LIBS
11054LIBS="-lz $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011055cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011056/* end confdefs.h. */
11057
Martin v. Löwiseba40652007-08-30 20:10:57 +000011058/* Override any GCC internal prototype to avoid an error.
11059 Use char because int might match the return type of a GCC
11060 builtin and then its argument prototype would still apply. */
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011061#ifdef __cplusplus
11062extern "C"
11063#endif
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011064char inflateCopy ();
11065int
11066main ()
11067{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011068return inflateCopy ();
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011069 ;
11070 return 0;
11071}
11072_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011073if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011074 ac_cv_lib_z_inflateCopy=yes
11075else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011076 ac_cv_lib_z_inflateCopy=no
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011077fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011078rm -f core conftest.err conftest.$ac_objext \
11079 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011080LIBS=$ac_check_lib_save_LIBS
11081fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011082{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
11083$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011084if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011085
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011086$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011087
11088fi
11089
11090
Ronald Oussorenf8752642006-07-06 10:13:35 +000011091case $ac_sys_system/$ac_sys_release in
11092Darwin/*)
11093 CFLAGS="${_CUR_CFLAGS}"
11094 LDFLAGS="${_CUR_LDFLAGS}"
11095 ;;
11096esac
11097
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
11099$as_echo_n "checking for hstrerror... " >&6; }
11100cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011101/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011102
Martin v. Löwise9416172003-05-03 10:12:45 +000011103#include <netdb.h>
11104
Martin v. Löwise9416172003-05-03 10:12:45 +000011105int
11106main ()
11107{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011108void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011109 ;
11110 return 0;
11111}
11112_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011113if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011114
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011115$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011116
Matthias Klosec511b472010-05-08 11:01:39 +000011117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011118$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011119else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11121$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011122
11123fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011124rm -f core conftest.err conftest.$ac_objext \
11125 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011126
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
11128$as_echo_n "checking for inet_aton... " >&6; }
11129cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011130/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011131
Martin v. Löwis86d66262006-02-17 08:40:11 +000011132#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011133#include <sys/socket.h>
11134#include <netinet/in.h>
11135#include <arpa/inet.h>
11136
Martin v. Löwise9416172003-05-03 10:12:45 +000011137int
11138main ()
11139{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011140void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011141 ;
11142 return 0;
11143}
11144_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011145if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011146
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011147$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011148
Matthias Klosec511b472010-05-08 11:01:39 +000011149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011150$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011151else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11153$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011154
11155fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011156rm -f core conftest.err conftest.$ac_objext \
11157 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011158
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
11160$as_echo_n "checking for inet_pton... " >&6; }
11161cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011162/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011163
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011164#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011165#include <sys/socket.h>
11166#include <netinet/in.h>
11167#include <arpa/inet.h>
11168
Martin v. Löwise9416172003-05-03 10:12:45 +000011169int
11170main ()
11171{
11172void* p = inet_pton
11173 ;
11174 return 0;
11175}
11176_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011177if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011178
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011179$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011180
Matthias Klosec511b472010-05-08 11:01:39 +000011181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011182$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011183else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11185$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011186
11187fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011188rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000011189
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011190# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
11192$as_echo_n "checking for setgroups... " >&6; }
11193cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011194/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011195
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011196#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011197#ifdef HAVE_GRP_H
11198#include <grp.h>
11199#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000011200
Martin v. Löwisd5843682002-11-21 20:41:28 +000011201int
11202main ()
11203{
11204void* p = setgroups
11205 ;
11206 return 0;
11207}
11208_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011209if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011210
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011211$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011212
Matthias Klosec511b472010-05-08 11:01:39 +000011213 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011214$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011215else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011216 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11217$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011218
11219fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011220rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000011221
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011222# check for openpty and forkpty
11223
11224for ac_func in openpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011225do :
11226 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011227if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011228 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011229#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011230_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011231
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011232else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011233 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
11234$as_echo_n "checking for openpty in -lutil... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011235if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011236 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011237else
Martin v. Löwis11437992002-04-12 09:54:03 +000011238 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011239LIBS="-lutil $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011240cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011241/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011242
Martin v. Löwiseba40652007-08-30 20:10:57 +000011243/* Override any GCC internal prototype to avoid an error.
11244 Use char because int might match the return type of a GCC
11245 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011246#ifdef __cplusplus
11247extern "C"
11248#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011249char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011250int
11251main ()
11252{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011253return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011254 ;
11255 return 0;
11256}
11257_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011258if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011259 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011260else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011261 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011262fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011263rm -f core conftest.err conftest.$ac_objext \
11264 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011265LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011266fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011267{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
11268$as_echo "$ac_cv_lib_util_openpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011269if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011270 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011271 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011272else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011273 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
11274$as_echo_n "checking for openpty in -lbsd... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011275if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011276 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011277else
11278 ac_check_lib_save_LIBS=$LIBS
11279LIBS="-lbsd $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011280cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011281/* end confdefs.h. */
11282
Martin v. Löwiseba40652007-08-30 20:10:57 +000011283/* Override any GCC internal prototype to avoid an error.
11284 Use char because int might match the return type of a GCC
11285 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011286#ifdef __cplusplus
11287extern "C"
11288#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011289char openpty ();
11290int
11291main ()
11292{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011293return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011294 ;
11295 return 0;
11296}
11297_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011298if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011299 ac_cv_lib_bsd_openpty=yes
11300else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011301 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011302fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011303rm -f core conftest.err conftest.$ac_objext \
11304 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011305LIBS=$ac_check_lib_save_LIBS
11306fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011307{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
11308$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011309if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011310 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011311 LIBS="$LIBS -lbsd"
11312fi
11313
11314
11315fi
11316
Fred Drake8cef4cf2000-06-28 16:40:38 +000011317
11318fi
11319done
11320
11321for ac_func in forkpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011322do :
11323 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011324if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011325 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011326#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011327_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011328
Fred Drake8cef4cf2000-06-28 16:40:38 +000011329else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011330 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
11331$as_echo_n "checking for forkpty in -lutil... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011332if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011333 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011334else
Martin v. Löwis11437992002-04-12 09:54:03 +000011335 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011336LIBS="-lutil $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011337cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011338/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011339
Martin v. Löwiseba40652007-08-30 20:10:57 +000011340/* Override any GCC internal prototype to avoid an error.
11341 Use char because int might match the return type of a GCC
11342 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011343#ifdef __cplusplus
11344extern "C"
11345#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011346char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011347int
11348main ()
11349{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011350return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011351 ;
11352 return 0;
11353}
11354_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011355if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011356 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011357else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011358 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011359fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011360rm -f core conftest.err conftest.$ac_objext \
11361 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011362LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011363fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011364{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
11365$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011366if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011367 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011368 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011369else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011370 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
11371$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011372if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011373 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011374else
11375 ac_check_lib_save_LIBS=$LIBS
11376LIBS="-lbsd $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011377cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011378/* end confdefs.h. */
11379
Martin v. Löwiseba40652007-08-30 20:10:57 +000011380/* Override any GCC internal prototype to avoid an error.
11381 Use char because int might match the return type of a GCC
11382 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011383#ifdef __cplusplus
11384extern "C"
11385#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011386char forkpty ();
11387int
11388main ()
11389{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011390return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011391 ;
11392 return 0;
11393}
11394_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011395if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011396 ac_cv_lib_bsd_forkpty=yes
11397else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011398 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011399fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011400rm -f core conftest.err conftest.$ac_objext \
11401 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011402LIBS=$ac_check_lib_save_LIBS
11403fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011404{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
11405$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011406if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011407 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011408 LIBS="$LIBS -lbsd"
11409fi
11410
11411
11412fi
11413
Fred Drake8cef4cf2000-06-28 16:40:38 +000011414
11415fi
11416done
11417
Jack Jansendd19cf82001-12-06 22:36:17 +000011418
Brett Cannonaa5778d2008-03-18 04:09:00 +000011419# Stuff for expat.
Brett Cannonaa5778d2008-03-18 04:09:00 +000011420for ac_func in memmove
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011421do :
11422 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011423if test "x$ac_cv_func_memmove" = xyes; then :
Brett Cannonaa5778d2008-03-18 04:09:00 +000011424 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011425#define HAVE_MEMMOVE 1
Brett Cannonaa5778d2008-03-18 04:09:00 +000011426_ACEOF
11427
11428fi
11429done
11430
11431
Michael W. Hudson54241132001-12-07 15:38:26 +000011432# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000011433for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011434do :
11435 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11436ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011437if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011438 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011439#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011440_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000011441
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011442fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000011443done
11444
Michael W. Hudson54241132001-12-07 15:38:26 +000011445
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011446ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011447if test "x$ac_cv_func_dup2" = xyes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011448 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000011449
Martin v. Löwis1142de32002-03-29 16:28:31 +000011450else
Martin v. Löwiseba40652007-08-30 20:10:57 +000011451 case " $LIBOBJS " in
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011452 *" dup2.$ac_objext "* ) ;;
11453 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Martin v. Löwiseba40652007-08-30 20:10:57 +000011454 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011455esac
11456
Martin v. Löwis1142de32002-03-29 16:28:31 +000011457fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011458
11459ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011460if test "x$ac_cv_func_getcwd" = xyes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011461 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
11462
11463else
11464 case " $LIBOBJS " in
11465 *" getcwd.$ac_objext "* ) ;;
11466 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
11467 ;;
11468esac
11469
11470fi
11471
11472ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011473if test "x$ac_cv_func_strdup" = xyes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011474 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
11475
11476else
11477 case " $LIBOBJS " in
11478 *" strdup.$ac_objext "* ) ;;
11479 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
11480 ;;
11481esac
11482
11483fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000011484
11485
11486for ac_func in getpgrp
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011487do :
11488 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011489if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011490 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011491#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011492_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011493 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011494/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011495#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011496int
11497main ()
11498{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011499getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011500 ;
11501 return 0;
11502}
11503_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011504if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011505
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011506$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011507
Guido van Rossum627b2d71993-12-24 10:39:16 +000011508fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011509rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011510
Guido van Rossum627b2d71993-12-24 10:39:16 +000011511fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011512done
Guido van Rossum627b2d71993-12-24 10:39:16 +000011513
Jack Jansen150753c2003-03-29 22:07:47 +000011514for ac_func in setpgrp
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011515do :
11516 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011517if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000011518 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011519#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000011520_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011521 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011522/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000011523#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000011524int
11525main ()
11526{
11527setpgrp(0,0);
11528 ;
11529 return 0;
11530}
11531_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011532if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011533
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011534$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011535
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011536fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011537rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000011538
11539fi
11540done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011541
Thomas Wouters3a584202000-08-05 23:28:51 +000011542for ac_func in gettimeofday
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011543do :
11544 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011545if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011546 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011547#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011548_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011549 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011550/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011551#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011552int
11553main ()
11554{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011555gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011556 ;
11557 return 0;
11558}
11559_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011560if ac_fn_c_try_compile "$LINENO"; then :
11561
Guido van Rossum627b2d71993-12-24 10:39:16 +000011562else
Skip Montanaro6dead952003-09-25 14:50:04 +000011563
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011564$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011565
Martin v. Löwis11437992002-04-12 09:54:03 +000011566
Guido van Rossum627b2d71993-12-24 10:39:16 +000011567fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011568rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011569
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011570fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011571done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011572
Michael W. Hudson54241132001-12-07 15:38:26 +000011573
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
11575$as_echo_n "checking for major... " >&6; }
11576cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011577/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011578
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011579#if defined(MAJOR_IN_MKDEV)
11580#include <sys/mkdev.h>
11581#elif defined(MAJOR_IN_SYSMACROS)
11582#include <sys/sysmacros.h>
11583#else
11584#include <sys/types.h>
11585#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011586
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011587int
11588main ()
11589{
11590
11591 makedev(major(0),minor(0));
11592
11593 ;
11594 return 0;
11595}
11596_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011597if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011598
11599
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011600$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011601
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11603$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011604
11605else
Skip Montanaro6dead952003-09-25 14:50:04 +000011606
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11608$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011609
11610fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011611rm -f core conftest.err conftest.$ac_objext \
11612 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011613
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011614# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000011615# for [no]getaddrinfo in netdb.h.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
11617$as_echo_n "checking for getaddrinfo... " >&6; }
11618cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011619/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011620
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011621#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011622#include <sys/socket.h>
11623#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011624#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011625
Martin v. Löwis11437992002-04-12 09:54:03 +000011626int
11627main ()
11628{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011629getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000011630 ;
11631 return 0;
11632}
11633_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011634if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011635 have_getaddrinfo=yes
11636else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011637 have_getaddrinfo=no
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011638fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011639rm -f core conftest.err conftest.$ac_objext \
11640 conftest$ac_exeext conftest.$ac_ext
11641{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
11642$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011643if test $have_getaddrinfo = yes
11644then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011645 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
11646$as_echo_n "checking getaddrinfo bug... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011647 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011648 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011649else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011650 if test "$cross_compiling" = yes; then :
doko@python.orgd65e2ba2013-01-31 23:52:03 +010011651
11652if test "${enable_ipv6+set}" = set; then
11653 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
11654else
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011655 ac_cv_buggy_getaddrinfo=yes
doko@python.orgd65e2ba2013-01-31 23:52:03 +010011656fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011657else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011658 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011659/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011660
Stefan Krah0afe4e42012-11-22 23:56:51 +010011661#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011662#include <sys/types.h>
11663#include <netdb.h>
11664#include <string.h>
11665#include <sys/socket.h>
11666#include <netinet/in.h>
11667
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011668int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011669{
11670 int passive, gaierr, inet4 = 0, inet6 = 0;
11671 struct addrinfo hints, *ai, *aitop;
11672 char straddr[INET6_ADDRSTRLEN], strport[16];
11673
11674 for (passive = 0; passive <= 1; passive++) {
11675 memset(&hints, 0, sizeof(hints));
11676 hints.ai_family = AF_UNSPEC;
11677 hints.ai_flags = passive ? AI_PASSIVE : 0;
11678 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000011679 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011680 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
11681 (void)gai_strerror(gaierr);
11682 goto bad;
11683 }
11684 for (ai = aitop; ai; ai = ai->ai_next) {
11685 if (ai->ai_addr == NULL ||
11686 ai->ai_addrlen == 0 ||
11687 getnameinfo(ai->ai_addr, ai->ai_addrlen,
11688 straddr, sizeof(straddr), strport, sizeof(strport),
11689 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
11690 goto bad;
11691 }
11692 switch (ai->ai_family) {
11693 case AF_INET:
11694 if (strcmp(strport, "54321") != 0) {
11695 goto bad;
11696 }
11697 if (passive) {
11698 if (strcmp(straddr, "0.0.0.0") != 0) {
11699 goto bad;
11700 }
11701 } else {
11702 if (strcmp(straddr, "127.0.0.1") != 0) {
11703 goto bad;
11704 }
11705 }
11706 inet4++;
11707 break;
11708 case AF_INET6:
11709 if (strcmp(strport, "54321") != 0) {
11710 goto bad;
11711 }
11712 if (passive) {
11713 if (strcmp(straddr, "::") != 0) {
11714 goto bad;
11715 }
11716 } else {
11717 if (strcmp(straddr, "::1") != 0) {
11718 goto bad;
11719 }
11720 }
11721 inet6++;
11722 break;
11723 case AF_UNSPEC:
11724 goto bad;
11725 break;
11726 default:
11727 /* another family support? */
11728 break;
11729 }
11730 }
Benjamin Petersond34677c2016-09-06 15:54:24 -070011731 freeaddrinfo(aitop);
11732 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011733 }
11734
11735 if (!(inet4 == 0 || inet4 == 2))
11736 goto bad;
11737 if (!(inet6 == 0 || inet6 == 2))
11738 goto bad;
11739
11740 if (aitop)
11741 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011742 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011743
11744 bad:
11745 if (aitop)
11746 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011747 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011748}
11749
Martin v. Löwis11437992002-04-12 09:54:03 +000011750_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011751if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011752 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011753else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011754 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011755fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011756rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11757 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011758fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011759
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011760fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011761
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011762fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011763
Benjamin Peterson75fed812010-11-01 01:47:19 +000011764{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
11765$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
11766
Mark Dickinson0ef0b912009-12-31 21:11:48 +000011767if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011768then
11769 if test $ipv6 = yes
11770 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011771 echo 'Fatal: You must get working getaddrinfo() function.'
11772 echo ' or you can specify "--disable-ipv6"'.
11773 exit 1
11774 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011775else
Martin v. Löwis11437992002-04-12 09:54:03 +000011776
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011777$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011778
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011779fi
Benjamin Peterson75fed812010-11-01 01:47:19 +000011780
Jack Jansen9a66b6d2001-08-08 13:56:14 +000011781for ac_func in getnameinfo
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011782do :
11783 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011784if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011785 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011786#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011787_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011788
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011789fi
11790done
11791
Michael W. Hudson54241132001-12-07 15:38:26 +000011792
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011793# checks for structures
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
11795$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011796if ${ac_cv_header_time+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011797 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011798else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011799 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011800/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011801#include <sys/types.h>
11802#include <sys/time.h>
11803#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011804
Martin v. Löwis11437992002-04-12 09:54:03 +000011805int
11806main ()
11807{
11808if ((struct tm *) 0)
11809return 0;
11810 ;
11811 return 0;
11812}
11813_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011814if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011815 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011816else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011817 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011818fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011819rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011820fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011821{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
11822$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011823if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011824
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011825$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011826
11827fi
11828
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
11830$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011831if ${ac_cv_struct_tm+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011832 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011833else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011835/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011836#include <sys/types.h>
11837#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011838
Martin v. Löwis11437992002-04-12 09:54:03 +000011839int
11840main ()
11841{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011842struct tm tm;
11843 int *p = &tm.tm_sec;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011844 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000011845 ;
11846 return 0;
11847}
11848_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011849if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011850 ac_cv_struct_tm=time.h
11851else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011852 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011853fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011854rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011855fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011856{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
11857$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011858if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011859
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011860$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011861
11862fi
11863
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011864ac_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 +000011865#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000011866
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011867"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011868if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011869
11870cat >>confdefs.h <<_ACEOF
11871#define HAVE_STRUCT_TM_TM_ZONE 1
11872_ACEOF
11873
11874
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011875fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011876
Martin v. Löwis11437992002-04-12 09:54:03 +000011877if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
11878
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011879$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011880
11881else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011882 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
11883"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011884if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011885 ac_have_decl=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000011886else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011887 ac_have_decl=0
Martin v. Löwiseba40652007-08-30 20:10:57 +000011888fi
11889
Martin v. Löwiseba40652007-08-30 20:10:57 +000011890cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011891#define HAVE_DECL_TZNAME $ac_have_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +000011892_ACEOF
11893
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011894 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
11895$as_echo_n "checking for tzname... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011896if ${ac_cv_var_tzname+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011897 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000011898else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011899 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011900/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011901#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000011902#if !HAVE_DECL_TZNAME
11903extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000011904#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011905
Martin v. Löwis11437992002-04-12 09:54:03 +000011906int
11907main ()
11908{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011909return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000011910 ;
11911 return 0;
11912}
11913_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011914if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011915 ac_cv_var_tzname=yes
11916else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011917 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011918fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011919rm -f core conftest.err conftest.$ac_objext \
11920 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000011921fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011922{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
11923$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011924 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011925
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011926$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011927
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011928 fi
11929fi
11930
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011931ac_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 +010011932if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011933
11934cat >>confdefs.h <<_ACEOF
11935#define HAVE_STRUCT_STAT_ST_RDEV 1
11936_ACEOF
11937
11938
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011939fi
11940
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011941ac_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 +010011942if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011943
Martin v. Löwis11437992002-04-12 09:54:03 +000011944cat >>confdefs.h <<_ACEOF
11945#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
11946_ACEOF
11947
11948
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011949fi
11950
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011951ac_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 +010011952if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000011953
11954cat >>confdefs.h <<_ACEOF
11955#define HAVE_STRUCT_STAT_ST_FLAGS 1
11956_ACEOF
11957
11958
11959fi
11960
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011961ac_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 +010011962if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011963
11964cat >>confdefs.h <<_ACEOF
11965#define HAVE_STRUCT_STAT_ST_GEN 1
11966_ACEOF
11967
11968
11969fi
11970
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011971ac_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 +010011972if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011973
11974cat >>confdefs.h <<_ACEOF
11975#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
11976_ACEOF
11977
11978
11979fi
11980
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011981ac_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 +010011982if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011983
Martin v. Löwis11437992002-04-12 09:54:03 +000011984cat >>confdefs.h <<_ACEOF
11985#define HAVE_STRUCT_STAT_ST_BLOCKS 1
11986_ACEOF
11987
11988
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011989fi
11990
Michael W. Hudson54241132001-12-07 15:38:26 +000011991
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
11993$as_echo_n "checking for time.h that defines altzone... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011994if ${ac_cv_header_time_altzone+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011995 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011996else
Matthias Klosec511b472010-05-08 11:01:39 +000011997
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011998 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011999/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012000#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012001int
12002main ()
12003{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012004return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000012005 ;
12006 return 0;
12007}
12008_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012009if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012010 ac_cv_header_time_altzone=yes
12011else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012012 ac_cv_header_time_altzone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012013fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012014rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosec511b472010-05-08 11:01:39 +000012015
Martin v. Löwiseba40652007-08-30 20:10:57 +000012016fi
12017
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012018{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
12019$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012020if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012021
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012022$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012023
12024fi
12025
Guido van Rossumda88dad1995-01-26 00:46:29 +000012026was_it_defined=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
12028$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
12029cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012030/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012031
12032#include <sys/types.h>
12033#include <sys/select.h>
12034#include <sys/time.h>
12035
Martin v. Löwis11437992002-04-12 09:54:03 +000012036int
12037main ()
12038{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012039;
Martin v. Löwis11437992002-04-12 09:54:03 +000012040 ;
12041 return 0;
12042}
12043_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012044if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012045
12046
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012047$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012048
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012049 was_it_defined=yes
12050
Martin v. Löwiseba40652007-08-30 20:10:57 +000012051fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012052rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012053{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
12054$as_echo "$was_it_defined" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012055
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
12057$as_echo_n "checking for addrinfo... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012058if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012059 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012060else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012061 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012062/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +000012063#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012064int
12065main ()
12066{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012067struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000012068 ;
12069 return 0;
12070}
12071_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012072if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012073 ac_cv_struct_addrinfo=yes
12074else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012075 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012076fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012077rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12078fi
12079
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012080{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
12081$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012082if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012083
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012084$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012085
12086fi
12087
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
12089$as_echo_n "checking for sockaddr_storage... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012090if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012091 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012092else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012093 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012094/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012095
12096# include <sys/types.h>
12097# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012098int
12099main ()
12100{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012101struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000012102 ;
12103 return 0;
12104}
12105_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012106if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012107 ac_cv_struct_sockaddr_storage=yes
12108else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012109 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012110fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012111rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12112fi
12113
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012114{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
12115$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012116if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012117
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012118$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012119
12120fi
12121
Guido van Rossum627b2d71993-12-24 10:39:16 +000012122# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000012123
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
12125$as_echo_n "checking whether char is unsigned... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012126if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012127 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000012128else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012129 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012130/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012131$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012132int
12133main ()
12134{
12135static int test_array [1 - 2 * !(((char) -1) < 0)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012136test_array [0] = 0;
12137return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012138
12139 ;
12140 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000012141}
Martin v. Löwis11437992002-04-12 09:54:03 +000012142_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012143if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012144 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012145else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012146 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012147fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012148rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012149fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012150{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
12151$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012152if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012153 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012154
12155fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000012156
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12158$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012159if ${ac_cv_c_const+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012160 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012161else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012162 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012163/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012164
Martin v. Löwis11437992002-04-12 09:54:03 +000012165int
12166main ()
12167{
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012168
Martin v. Löwis11437992002-04-12 09:54:03 +000012169#ifndef __cplusplus
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012170 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012171 typedef int charset[2];
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012172 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000012173 /* SunOS 4.1.1 cc rejects this. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000012174 char const *const *pcpcc;
12175 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000012176 /* NEC SVR4.0.2 mips cc rejects this. */
12177 struct point {int x, y;};
12178 static struct point const zero = {0,0};
12179 /* AIX XL C 1.02.0.0 rejects this.
12180 It does not let you subtract one const X* pointer from another in
12181 an arm of an if-expression whose if-part is not a constant
12182 expression */
12183 const char *g = "string";
Martin v. Löwiseba40652007-08-30 20:10:57 +000012184 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012185 /* HPUX 7.0 cc rejects these. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000012186 ++pcpcc;
12187 ppc = (char**) pcpcc;
12188 pcpcc = (char const *const *) ppc;
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012189 { /* SCO 3.2v4 cc rejects this sort of thing. */
12190 char tx;
12191 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000012192 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012193
Martin v. Löwis11437992002-04-12 09:54:03 +000012194 *t++ = 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012195 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012196 }
12197 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12198 int x[] = {25, 17};
12199 const int *foo = &x[0];
12200 ++foo;
12201 }
12202 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12203 typedef const int *iptr;
12204 iptr p = 0;
12205 ++p;
12206 }
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012207 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000012208 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012209 struct s { int j; const int *ap[3]; } bx;
12210 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000012211 }
12212 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12213 const int foo = 10;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012214 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012215 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012216 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000012217#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000012218
Martin v. Löwis11437992002-04-12 09:54:03 +000012219 ;
12220 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012221}
Martin v. Löwis11437992002-04-12 09:54:03 +000012222_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012223if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012224 ac_cv_c_const=yes
12225else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012226 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012227fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012228rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012229fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012230{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12231$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012232if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012233
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012234$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012235
12236fi
12237
Michael W. Hudson54241132001-12-07 15:38:26 +000012238
Guido van Rossumda88dad1995-01-26 00:46:29 +000012239works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
12241$as_echo_n "checking for working volatile... " >&6; }
12242cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012243/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012244
Martin v. Löwis11437992002-04-12 09:54:03 +000012245int
12246main ()
12247{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012248volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012249 ;
12250 return 0;
12251}
12252_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012253if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012254 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012255else
Skip Montanaro6dead952003-09-25 14:50:04 +000012256
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012257$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012258
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012259
Guido van Rossum627b2d71993-12-24 10:39:16 +000012260fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012261rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012262{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12263$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012264
Guido van Rossumda88dad1995-01-26 00:46:29 +000012265works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
12267$as_echo_n "checking for working signed char... " >&6; }
12268cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012269/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012270
Martin v. Löwis11437992002-04-12 09:54:03 +000012271int
12272main ()
12273{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012274signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000012275 ;
12276 return 0;
12277}
12278_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012279if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012280 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012281else
Skip Montanaro6dead952003-09-25 14:50:04 +000012282
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012283$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000012284
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012285
Guido van Rossum7f43da71994-08-01 12:15:30 +000012286fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012287rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012288{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12289$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012290
Guido van Rossumda88dad1995-01-26 00:46:29 +000012291have_prototypes=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
12293$as_echo_n "checking for prototypes... " >&6; }
12294cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012295/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012296int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012297int
12298main ()
12299{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012300return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000012301 ;
12302 return 0;
12303}
12304_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012305if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012306
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012307$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012308
Matthias Klosec511b472010-05-08 11:01:39 +000012309 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012310fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012311rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012312{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
12313$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012314
Guido van Rossumda88dad1995-01-26 00:46:29 +000012315works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
12317$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
12318cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012319/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012320
12321#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000012322int foo(int x, ...) {
12323 va_list va;
12324 va_start(va, x);
12325 va_arg(va, int);
12326 va_arg(va, char *);
12327 va_arg(va, double);
12328 return 0;
12329}
Guido van Rossum7f43da71994-08-01 12:15:30 +000012330
Martin v. Löwis11437992002-04-12 09:54:03 +000012331int
12332main ()
12333{
Guido van Rossum90eea071996-08-30 20:58:57 +000012334return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000012335 ;
12336 return 0;
12337}
12338_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012339if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012340
12341
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012342$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012343
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012344 works=yes
12345
Guido van Rossum627b2d71993-12-24 10:39:16 +000012346fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012347rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012348{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12349$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012350
Martin v. Löwisd6320502004-08-12 13:45:08 +000012351# check for socketpair
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
12353$as_echo_n "checking for socketpair... " >&6; }
12354cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012355/* end confdefs.h. */
12356
12357#include <sys/types.h>
12358#include <sys/socket.h>
12359
12360int
12361main ()
12362{
12363void *x=socketpair
12364 ;
12365 return 0;
12366}
12367_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012368if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000012369
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012370$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000012371
Matthias Klosec511b472010-05-08 11:01:39 +000012372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012373$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012374else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12376$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012377
12378fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012379rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012380
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012381# check if sockaddr has sa_len member
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
12383$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
12384cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012385/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012386#include <sys/types.h>
12387#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012388int
12389main ()
12390{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012391struct sockaddr x;
12392x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012393 ;
12394 return 0;
12395}
12396_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012397if ac_fn_c_try_compile "$LINENO"; then :
12398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12399$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012400
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012401$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012402
12403else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12405$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000012406
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012407fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012408rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012409
Guido van Rossumda88dad1995-01-26 00:46:29 +000012410va_list_is_array=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
12412$as_echo_n "checking whether va_list is an array... " >&6; }
12413cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012414/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012415
12416#ifdef HAVE_STDARG_PROTOTYPES
12417#include <stdarg.h>
12418#else
12419#include <varargs.h>
12420#endif
12421
Martin v. Löwis11437992002-04-12 09:54:03 +000012422int
12423main ()
12424{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012425va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000012426 ;
12427 return 0;
12428}
12429_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012430if ac_fn_c_try_compile "$LINENO"; then :
12431
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012432else
Skip Montanaro6dead952003-09-25 14:50:04 +000012433
Martin v. Löwis11437992002-04-12 09:54:03 +000012434
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012435$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012436
Guido van Rossumda88dad1995-01-26 00:46:29 +000012437 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012438
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012439fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012440rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012441{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
12442$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012443
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012444# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000012445
12446
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012447ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012448if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012449
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012450 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000012451
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012452 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
12453$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012454 OLD_CFLAGS=$CFLAGS
12455 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012456 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012457/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012458
12459# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012460
Martin v. Löwis11437992002-04-12 09:54:03 +000012461int
12462main ()
12463{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012464
12465 char *name;
12466 struct hostent *he, *res;
12467 char buffer[2048];
12468 int buflen = 2048;
12469 int h_errnop;
12470
12471 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012472
12473 ;
12474 return 0;
12475}
12476_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012477if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012478
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012479 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012480
Martin v. Löwis11437992002-04-12 09:54:03 +000012481
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012482$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012483
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12485$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012486
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012487else
Skip Montanaro6dead952003-09-25 14:50:04 +000012488
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12490$as_echo "no" >&6; }
12491 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
12492$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
12493 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012494/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012495
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012496# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012497
Martin v. Löwis11437992002-04-12 09:54:03 +000012498int
12499main ()
12500{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012501
12502 char *name;
12503 struct hostent *he;
Matthias Klosec511b472010-05-08 11:01:39 +000012504 char buffer[2048];
12505 int buflen = 2048;
12506 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012507
Matthias Klosec511b472010-05-08 11:01:39 +000012508 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012509
12510 ;
12511 return 0;
12512}
12513_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012514if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012515
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012516 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012517
Martin v. Löwis11437992002-04-12 09:54:03 +000012518
Matthias Klosec511b472010-05-08 11:01:39 +000012519$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012520
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12522$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012523
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012524else
Skip Montanaro6dead952003-09-25 14:50:04 +000012525
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12527$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000012528 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
12529$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
12530 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12531/* end confdefs.h. */
12532
12533# include <netdb.h>
12534
12535int
12536main ()
12537{
12538
12539 char *name;
12540 struct hostent *he;
12541 struct hostent_data data;
12542
12543 (void) gethostbyname_r(name, he, &data);
12544
12545 ;
12546 return 0;
12547}
12548_ACEOF
12549if ac_fn_c_try_compile "$LINENO"; then :
12550
12551 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
12552
12553
12554$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
12555
12556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12557$as_echo "yes" >&6; }
12558
12559else
12560
12561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12562$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012563
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012564fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012565rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012566
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012567fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012568rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012569
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012570fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012571rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012572 CFLAGS=$OLD_CFLAGS
12573
12574else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012575
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012576 for ac_func in gethostbyname
12577do :
12578 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012579if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012580 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012581#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012582_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012583
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012584fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012585done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012586
Michael W. Hudson54241132001-12-07 15:38:26 +000012587
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012588fi
12589
Michael W. Hudson54241132001-12-07 15:38:26 +000012590
12591
12592
12593
12594
12595
Guido van Rossum627b2d71993-12-24 10:39:16 +000012596# checks for system services
12597# (none yet)
12598
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012599# Linux requires this for correct f.p. operations
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012600ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012601if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012602
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012603else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012604 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
12605$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012606if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012607 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012608else
Martin v. Löwis11437992002-04-12 09:54:03 +000012609 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012610LIBS="-lieee $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012611cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012612/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012613
Martin v. Löwiseba40652007-08-30 20:10:57 +000012614/* Override any GCC internal prototype to avoid an error.
12615 Use char because int might match the return type of a GCC
12616 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012617#ifdef __cplusplus
12618extern "C"
12619#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012620char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012621int
12622main ()
12623{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012624return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012625 ;
12626 return 0;
12627}
12628_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012629if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012630 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012631else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012632 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012633fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012634rm -f core conftest.err conftest.$ac_objext \
12635 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012636LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012637fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012638{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
12639$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012640if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012641 cat >>confdefs.h <<_ACEOF
12642#define HAVE_LIBIEEE 1
12643_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012644
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012645 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012646
Guido van Rossum627b2d71993-12-24 10:39:16 +000012647fi
12648
Michael W. Hudson54241132001-12-07 15:38:26 +000012649
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012650fi
12651
Michael W. Hudson54241132001-12-07 15:38:26 +000012652
Guido van Rossum7f253911997-05-09 02:42:48 +000012653# Check for --with-fpectl
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
12655$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012656
Martin v. Löwiseba40652007-08-30 20:10:57 +000012657# Check whether --with-fpectl was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012658if test "${with_fpectl+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000012659 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000012660if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000012661then
12662
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012663$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012664
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12666$as_echo "yes" >&6; }
12667else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12668$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012669fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000012670else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12672$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012673fi
12674
Guido van Rossum7f253911997-05-09 02:42:48 +000012675
Guido van Rossum7f43da71994-08-01 12:15:30 +000012676# check for --with-libm=...
12677
Guido van Rossum563e7081996-09-10 18:20:48 +000012678case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000012679Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012680BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000012681*) LIBM=-lm
12682esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
12684$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012685
Martin v. Löwiseba40652007-08-30 20:10:57 +000012686# Check whether --with-libm was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012687if test "${with_libm+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000012688 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000012689if test "$withval" = no
12690then LIBM=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
12692$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012693elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012694then LIBM=$withval
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
12696$as_echo "set LIBM=\"$withval\"" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012697else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012698fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012699else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
12701$as_echo "default LIBM=\"$LIBM\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012702fi
12703
Guido van Rossum7f43da71994-08-01 12:15:30 +000012704
12705# check for --with-libc=...
12706
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
12708$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012709
Martin v. Löwiseba40652007-08-30 20:10:57 +000012710# Check whether --with-libc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012711if test "${with_libc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000012712 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000012713if test "$withval" = no
12714then LIBC=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
12716$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012717elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012718then LIBC=$withval
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
12720$as_echo "set LIBC=\"$withval\"" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012721else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012722fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012723else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
12725$as_echo "default LIBC=\"$LIBC\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012726fi
12727
Guido van Rossum7f43da71994-08-01 12:15:30 +000012728
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012729# **************************************************
12730# * Check for various properties of floating point *
12731# **************************************************
Mark Dickinson265d7382008-04-21 22:32:24 +000012732
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
12734$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012735if ${ac_cv_little_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012736 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012737else
12738
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012739if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012740 ac_cv_little_endian_double=no
12741else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012742 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012743/* end confdefs.h. */
12744
12745#include <string.h>
12746int main() {
12747 double x = 9006104071832581.0;
12748 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
12749 return 0;
12750 else
12751 return 1;
12752}
12753
12754_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012755if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012756 ac_cv_little_endian_double=yes
12757else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012758 ac_cv_little_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012759fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012760rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12761 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012762fi
12763
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012764fi
12765
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012766{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
12767$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012768if test "$ac_cv_little_endian_double" = yes
12769then
12770
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012771$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012772
12773fi
12774
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
12776$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012777if ${ac_cv_big_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012778 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012779else
12780
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012781if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012782 ac_cv_big_endian_double=no
12783else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012784 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012785/* end confdefs.h. */
12786
12787#include <string.h>
12788int main() {
12789 double x = 9006104071832581.0;
12790 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
12791 return 0;
12792 else
12793 return 1;
12794}
12795
12796_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012797if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012798 ac_cv_big_endian_double=yes
12799else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012800 ac_cv_big_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012801fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012802rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12803 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012804fi
12805
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012806fi
12807
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012808{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
12809$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012810if test "$ac_cv_big_endian_double" = yes
12811then
12812
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012813$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012814
12815fi
12816
12817# Some ARM platforms use a mixed-endian representation for doubles.
12818# While Python doesn't currently have full support for these platforms
12819# (see e.g., issue 1762561), we can at least make sure that float <-> string
12820# conversions work.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
12822$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012823if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012824 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012825else
12826
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012827if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012828 ac_cv_mixed_endian_double=no
12829else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012830 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012831/* end confdefs.h. */
12832
12833#include <string.h>
12834int main() {
12835 double x = 9006104071832581.0;
12836 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
12837 return 0;
12838 else
12839 return 1;
12840}
12841
12842_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012843if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012844 ac_cv_mixed_endian_double=yes
12845else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012846 ac_cv_mixed_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012847fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012848rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12849 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012850fi
12851
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012852fi
12853
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012854{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
12855$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012856if test "$ac_cv_mixed_endian_double" = yes
12857then
12858
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012859$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012860
12861fi
12862
12863# The short float repr introduced in Python 3.1 requires the
12864# correctly-rounded string <-> double conversion functions from
12865# Python/dtoa.c, which in turn require that the FPU uses 53-bit
12866# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsona548dee2009-11-15 13:12:43 +000012867# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012868# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsona548dee2009-11-15 13:12:43 +000012869
12870# This inline assembler syntax may also work for suncc and icc,
12871# so we try it on all platforms.
12872
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
12874$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
12875cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012876/* end confdefs.h. */
12877
12878int
12879main ()
12880{
12881
Mark Dickinsona548dee2009-11-15 13:12:43 +000012882 unsigned short cw;
12883 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
12884 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012885
12886 ;
12887 return 0;
12888}
12889_ACEOF
Stefan Krah99e36b92015-07-03 15:30:54 +020012890if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012891 have_gcc_asm_for_x87=yes
12892else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012893 have_gcc_asm_for_x87=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012894fi
Stefan Krah99e36b92015-07-03 15:30:54 +020012895rm -f core conftest.err conftest.$ac_objext \
12896 conftest$ac_exeext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012897{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
12898$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsona548dee2009-11-15 13:12:43 +000012899if test "$have_gcc_asm_for_x87" = yes
12900then
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012901
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012902$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012903
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012904fi
Mark Dickinson7a3d8642008-04-22 00:54:27 +000012905
Mark Dickinson04b27232009-01-04 12:29:36 +000012906# Detect whether system arithmetic is subject to x87-style double
12907# rounding issues. The result of this test has little meaning on non
12908# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
12909# mode is round-to-nearest and double rounding issues are present, and
12910# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012911{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
12912$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinson99abd142009-10-24 13:44:16 +000012913# $BASECFLAGS may affect the result
12914ac_save_cc="$CC"
12915CC="$CC $BASECFLAGS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012916if test "$cross_compiling" = yes; then :
Mark Dickinson04b27232009-01-04 12:29:36 +000012917 ac_cv_x87_double_rounding=no
12918else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012919 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson04b27232009-01-04 12:29:36 +000012920/* end confdefs.h. */
12921
12922#include <stdlib.h>
12923#include <math.h>
12924int main() {
12925 volatile double x, y, z;
12926 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
12927 x = 0.99999999999999989; /* 1-2**-53 */
12928 y = 1./x;
12929 if (y != 1.)
12930 exit(0);
12931 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
12932 x = 1e16;
12933 y = 2.99999;
12934 z = x + y;
12935 if (z != 1e16+4.)
12936 exit(0);
12937 /* both tests show evidence of double rounding */
12938 exit(1);
12939}
12940
12941_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012942if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson04b27232009-01-04 12:29:36 +000012943 ac_cv_x87_double_rounding=no
12944else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012945 ac_cv_x87_double_rounding=yes
Mark Dickinson04b27232009-01-04 12:29:36 +000012946fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012947rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12948 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson04b27232009-01-04 12:29:36 +000012949fi
12950
Mark Dickinson99abd142009-10-24 13:44:16 +000012951CC="$ac_save_cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012952{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
12953$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson04b27232009-01-04 12:29:36 +000012954if test "$ac_cv_x87_double_rounding" = yes
12955then
12956
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012957$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson04b27232009-01-04 12:29:36 +000012958
12959fi
12960
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012961# ************************************
12962# * Check for mathematical functions *
12963# ************************************
12964
12965LIBS_SAVE=$LIBS
12966LIBS="$LIBS $LIBM"
12967
Mark Dickinson265d7382008-04-21 22:32:24 +000012968# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
12969# -0. on some architectures.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012970{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
12971$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012972if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012973 $as_echo_n "(cached) " >&6
Mark Dickinson265d7382008-04-21 22:32:24 +000012974else
12975
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012976if test "$cross_compiling" = yes; then :
Mark Dickinson265d7382008-04-21 22:32:24 +000012977 ac_cv_tanh_preserves_zero_sign=no
12978else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012979 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson265d7382008-04-21 22:32:24 +000012980/* end confdefs.h. */
12981
12982#include <math.h>
Mark Dickinson7a3d8642008-04-22 00:54:27 +000012983#include <stdlib.h>
Mark Dickinson265d7382008-04-21 22:32:24 +000012984int main() {
12985 /* return 0 if either negative zeros don't exist
12986 on this platform or if negative zeros exist
12987 and tanh(-0.) == -0. */
12988 if (atan2(0., -1.) == atan2(-0., -1.) ||
12989 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
12990 else exit(1);
12991}
12992
12993_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012994if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson265d7382008-04-21 22:32:24 +000012995 ac_cv_tanh_preserves_zero_sign=yes
12996else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012997 ac_cv_tanh_preserves_zero_sign=no
Mark Dickinson265d7382008-04-21 22:32:24 +000012998fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012999rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13000 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson265d7382008-04-21 22:32:24 +000013001fi
13002
Mark Dickinson265d7382008-04-21 22:32:24 +000013003fi
13004
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013005{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
13006$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Mark Dickinson265d7382008-04-21 22:32:24 +000013007if test "$ac_cv_tanh_preserves_zero_sign" = yes
13008then
13009
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013010$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Mark Dickinson265d7382008-04-21 22:32:24 +000013011
13012fi
13013
Mark Dickinson65898e02009-09-05 10:27:00 +000013014for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013015do :
13016 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13017ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013018if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinson65898e02009-09-05 10:27:00 +000013019 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013020#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Mark Dickinson65898e02009-09-05 10:27:00 +000013021_ACEOF
13022
13023fi
13024done
13025
Mark Dickinson65898e02009-09-05 10:27:00 +000013026for ac_func in hypot lgamma log1p round tgamma
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013027do :
13028 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13029ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013030if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Christian Heimes0a8143f2007-12-18 23:22:54 +000013031 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013032#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes0a8143f2007-12-18 23:22:54 +000013033_ACEOF
13034
13035fi
13036done
13037
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013038ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
13039"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013040if test "x$ac_cv_have_decl_isinf" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013041 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013042else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013043 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013044fi
13045
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013046cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013047#define HAVE_DECL_ISINF $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013048_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013049ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
13050"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013051if test "x$ac_cv_have_decl_isnan" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013052 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013053else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013054 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013055fi
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013056
13057cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013058#define HAVE_DECL_ISNAN $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013059_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013060ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
13061"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013062if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013063 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013064else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013065 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013066fi
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013067
13068cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013069#define HAVE_DECL_ISFINITE $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013070_ACEOF
13071
13072
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000013073LIBS=$LIBS_SAVE
13074
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013075# For multiprocessing module, check that sem_open
13076# actually works. For FreeBSD versions <= 7.2,
13077# the kernel module that provides POSIX semaphores
13078# isn't loaded by default, so an attempt to call
13079# sem_open results in a 'Signal 12' error.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
13081$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013082if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013083 $as_echo_n "(cached) " >&6
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013084else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013085 if test "$cross_compiling" = yes; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013086 ac_cv_posix_semaphores_enabled=yes
13087else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013088 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013089/* end confdefs.h. */
13090
13091#include <unistd.h>
13092#include <fcntl.h>
13093#include <stdio.h>
13094#include <semaphore.h>
13095#include <sys/stat.h>
13096
13097int main(void) {
13098 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
13099 if (a == SEM_FAILED) {
13100 perror("sem_open");
13101 return 1;
13102 }
13103 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000013104 sem_unlink("/autoconf");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013105 return 0;
13106}
13107
13108_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013109if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013110 ac_cv_posix_semaphores_enabled=yes
13111else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013112 ac_cv_posix_semaphores_enabled=no
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013113fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013114rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13115 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013116fi
13117
13118
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013119fi
13120
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013121{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
13122$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013123if test $ac_cv_posix_semaphores_enabled = no
13124then
13125
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013126$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013127
13128fi
13129
13130# Multiprocessing check for broken sem_getvalue
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
13132$as_echo_n "checking for broken sem_getvalue... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013133if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013134 $as_echo_n "(cached) " >&6
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013135else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013136 if test "$cross_compiling" = yes; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013137 ac_cv_broken_sem_getvalue=yes
13138else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013139 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013140/* end confdefs.h. */
13141
13142#include <unistd.h>
13143#include <fcntl.h>
13144#include <stdio.h>
13145#include <semaphore.h>
13146#include <sys/stat.h>
13147
13148int main(void){
Mark Dickinson59dc89e2009-12-13 21:06:06 +000013149 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013150 int count;
13151 int res;
13152 if(a==SEM_FAILED){
13153 perror("sem_open");
13154 return 1;
13155
13156 }
13157 res = sem_getvalue(a, &count);
13158 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000013159 sem_unlink("/autocftw");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013160 return res==-1 ? 1 : 0;
13161}
13162
13163_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013164if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013165 ac_cv_broken_sem_getvalue=no
13166else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013167 ac_cv_broken_sem_getvalue=yes
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013168fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013169rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13170 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013171fi
13172
13173
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013174fi
13175
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013176{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
13177$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013178if test $ac_cv_broken_sem_getvalue = yes
13179then
13180
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013181$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013182
13183fi
13184
Mark Dickinsonefc82f72009-03-20 15:51:55 +000013185# determine what size digit to use for Python's longs
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
13187$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000013188# Check whether --enable-big-digits was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013189if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonefc82f72009-03-20 15:51:55 +000013190 enableval=$enable_big_digits; case $enable_big_digits in
13191yes)
13192 enable_big_digits=30 ;;
13193no)
13194 enable_big_digits=15 ;;
1319515|30)
13196 ;;
13197*)
Matthias Klose3cef2a92012-03-14 23:39:33 +010013198 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 +000013199esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013200{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
13201$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000013202
13203cat >>confdefs.h <<_ACEOF
13204#define PYLONG_BITS_IN_DIGIT $enable_big_digits
13205_ACEOF
13206
13207
13208else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013209 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13210$as_echo "no value specified" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000013211fi
13212
13213
Guido van Rossumef2255b2000-03-10 22:30:29 +000013214# check for wchar.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013215ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013216if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013217
13218
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013219$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013220
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013221 wchar_h="yes"
13222
Guido van Rossumef2255b2000-03-10 22:30:29 +000013223else
Martin v. Löwis11437992002-04-12 09:54:03 +000013224 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000013225
13226fi
13227
Michael W. Hudson54241132001-12-07 15:38:26 +000013228
Martin v. Löwis11437992002-04-12 09:54:03 +000013229
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013230# determine wchar_t size
13231if test "$wchar_h" = yes
13232then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013233 # The cast to long int works around a bug in the HP C Compiler
Martin v. Löwiseba40652007-08-30 20:10:57 +000013234# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13235# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13236# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
13238$as_echo_n "checking size of wchar_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013239if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013240 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013241else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013242 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
13243"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013244
Martin v. Löwis11437992002-04-12 09:54:03 +000013245else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013246 if test "$ac_cv_type_wchar_t" = yes; then
13247 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13248$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013249as_fn_error 77 "cannot compute sizeof (wchar_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +010013250See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013251 else
13252 ac_cv_sizeof_wchar_t=0
13253 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013254fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013255
Martin v. Löwis11437992002-04-12 09:54:03 +000013256fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013257{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
13258$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013259
13260
13261
Martin v. Löwis11437992002-04-12 09:54:03 +000013262cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013263#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013264_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013265
Michael W. Hudson54241132001-12-07 15:38:26 +000013266
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013267fi
13268
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
13270$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013271have_ucs4_tcl=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013272cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013273/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013274
13275#include <tcl.h>
13276#if TCL_UTF_MAX != 6
13277# error "NOT UCS4_TCL"
13278#endif
13279int
13280main ()
13281{
13282
13283 ;
13284 return 0;
13285}
13286_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013287if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013288
13289
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013290$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013291
13292 have_ucs4_tcl=yes
13293
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013294fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013295rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013296{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
13297$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013298
Skip Montanaro6dead952003-09-25 14:50:04 +000013299# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013300if test "$wchar_h" = yes
13301then
13302 # check whether wchar_t is signed or not
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013303 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
13304$as_echo_n "checking whether wchar_t is signed... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013305 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013306 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013307else
13308
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013309 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013310 ac_cv_wchar_t_signed=yes
13311else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013312 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013313/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013314
13315 #include <wchar.h>
13316 int main()
13317 {
Martin v. Löwis44fe0e42006-04-11 07:15:30 +000013318 /* Success: exit code 0 */
13319 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013320 }
13321
13322_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013323if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013324 ac_cv_wchar_t_signed=yes
13325else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013326 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013327fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013328rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13329 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013330fi
13331
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013332fi
13333
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
13335$as_echo "$ac_cv_wchar_t_signed" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013336fi
13337
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for unicode" >&5
13339$as_echo_n "checking what type to use for unicode... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013340# Check whether --enable-unicode was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013341if test "${enable_unicode+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000013342 enableval=$enable_unicode;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013343else
13344 enable_unicode=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +000013345fi
13346
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013347
13348if test $enable_unicode = yes
13349then
Martin v. Löwisfd917792001-06-27 20:22:04 +000013350 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013351 case "$have_ucs4_tcl" in
13352 yes) enable_unicode="ucs4"
13353 ;;
13354 *) enable_unicode="ucs2"
13355 ;;
13356 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013357fi
13358
Martin v. Löwis0036cba2002-04-12 09:58:45 +000013359
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013360case "$enable_unicode" in
13361ucs2) unicode_size="2"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013362 $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013363
13364 ;;
13365ucs4) unicode_size="4"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013366 $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013367
13368 ;;
Martin v. Löwised11a5d2012-05-20 10:42:17 +020013369no) ;; # To allow --disable-unicode
Matthias Klose3cef2a92012-03-14 23:39:33 +010013370*) 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 +000013371esac
13372
Michael W. Hudson54241132001-12-07 15:38:26 +000013373
Martin v. Löwis11437992002-04-12 09:54:03 +000013374
13375
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013376if test "$enable_unicode" = "no"
13377then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000013378 UNICODE_OBJS=""
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not used" >&5
13380$as_echo "not used" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013381else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000013382 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000013383
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013384$as_echo "#define Py_USING_UNICODE 1" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013385
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013386
13387 # wchar_t is only usable if it maps to an unsigned type
13388 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000013389 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013390 then
13391 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013392
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013393$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013394
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013395 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013396
13397 elif test "$ac_cv_sizeof_short" = "$unicode_size"
13398 then
13399 PY_UNICODE_TYPE="unsigned short"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013400 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013401
13402 elif test "$ac_cv_sizeof_long" = "$unicode_size"
13403 then
13404 PY_UNICODE_TYPE="unsigned long"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013405 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013406
13407 else
13408 PY_UNICODE_TYPE="no type found"
13409 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
13411$as_echo "$PY_UNICODE_TYPE" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013412fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000013413
13414# check for endianness
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013415 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13416$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013417if ${ac_cv_c_bigendian+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013418 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000013419else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013420 ac_cv_c_bigendian=unknown
13421 # See if we're dealing with a universal compiler.
13422 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13423/* end confdefs.h. */
13424#ifndef __APPLE_CC__
13425 not a universal capable compiler
13426 #endif
13427 typedef int dummy;
13428
Skip Montanaro6dead952003-09-25 14:50:04 +000013429_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013430if ac_fn_c_try_compile "$LINENO"; then :
13431
13432 # Check for potential -arch flags. It is not universal unless
13433 # there are at least two -arch flags with different values.
13434 ac_arch=
13435 ac_prev=
13436 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13437 if test -n "$ac_prev"; then
13438 case $ac_word in
13439 i?86 | x86_64 | ppc | ppc64)
13440 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13441 ac_arch=$ac_word
13442 else
13443 ac_cv_c_bigendian=universal
13444 break
13445 fi
13446 ;;
13447 esac
13448 ac_prev=
13449 elif test "x$ac_word" = "x-arch"; then
13450 ac_prev=arch
13451 fi
13452 done
13453fi
13454rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13455 if test $ac_cv_c_bigendian = unknown; then
13456 # See if sys/param.h defines the BYTE_ORDER macro.
13457 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013458/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013459#include <sys/types.h>
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013460 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013461
Martin v. Löwis11437992002-04-12 09:54:03 +000013462int
13463main ()
13464{
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013465#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13466 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13467 && LITTLE_ENDIAN)
13468 bogus endian macros
13469 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013470
13471 ;
13472 return 0;
13473}
13474_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013475if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013476 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013477 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013478/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013479#include <sys/types.h>
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013480 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013481
Martin v. Löwis11437992002-04-12 09:54:03 +000013482int
13483main ()
13484{
Guido van Rossumef2255b2000-03-10 22:30:29 +000013485#if BYTE_ORDER != BIG_ENDIAN
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013486 not big endian
13487 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013488
13489 ;
13490 return 0;
13491}
13492_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013493if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013494 ac_cv_c_bigendian=yes
13495else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013496 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000013497fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013498rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013499fi
13500rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13501 fi
13502 if test $ac_cv_c_bigendian = unknown; then
13503 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13504 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013505/* end confdefs.h. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013506#include <limits.h>
13507
Martin v. Löwis11437992002-04-12 09:54:03 +000013508int
13509main ()
13510{
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013511#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13512 bogus endian macros
13513 #endif
13514
Martin v. Löwis11437992002-04-12 09:54:03 +000013515 ;
13516 return 0;
13517}
13518_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013519if ac_fn_c_try_compile "$LINENO"; then :
13520 # It does; now see whether it defined to _BIG_ENDIAN or not.
13521 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13522/* end confdefs.h. */
13523#include <limits.h>
13524
13525int
13526main ()
13527{
13528#ifndef _BIG_ENDIAN
13529 not big endian
13530 #endif
13531
13532 ;
13533 return 0;
13534}
13535_ACEOF
13536if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013537 ac_cv_c_bigendian=yes
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000013538else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013539 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013540fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013541rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13542fi
13543rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13544 fi
13545 if test $ac_cv_c_bigendian = unknown; then
13546 # Compile a test program.
13547 if test "$cross_compiling" = yes; then :
13548 # Try to guess by grepping values from an object file.
13549 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13550/* end confdefs.h. */
13551short int ascii_mm[] =
13552 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13553 short int ascii_ii[] =
13554 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13555 int use_ascii (int i) {
13556 return ascii_mm[i] + ascii_ii[i];
13557 }
13558 short int ebcdic_ii[] =
13559 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13560 short int ebcdic_mm[] =
13561 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13562 int use_ebcdic (int i) {
13563 return ebcdic_mm[i] + ebcdic_ii[i];
13564 }
13565 extern int foo;
Martin v. Löwiseba40652007-08-30 20:10:57 +000013566
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013567int
13568main ()
13569{
13570return use_ascii (foo) == use_ebcdic (foo);
13571 ;
13572 return 0;
13573}
13574_ACEOF
13575if ac_fn_c_try_compile "$LINENO"; then :
13576 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13577 ac_cv_c_bigendian=yes
13578 fi
13579 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13580 if test "$ac_cv_c_bigendian" = unknown; then
13581 ac_cv_c_bigendian=no
13582 else
13583 # finding both strings is unlikely to happen, but who knows?
13584 ac_cv_c_bigendian=unknown
13585 fi
13586 fi
13587fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013588rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013589else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013590 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013591/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000013592$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013593int
13594main ()
13595{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013596
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013597 /* Are we little or big endian? From Harbison&Steele. */
13598 union
13599 {
13600 long int l;
13601 char c[sizeof (long int)];
13602 } u;
13603 u.l = 1;
13604 return u.c[sizeof (long int) - 1] == 1;
Martin v. Löwiseba40652007-08-30 20:10:57 +000013605
13606 ;
13607 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000013608}
Martin v. Löwis11437992002-04-12 09:54:03 +000013609_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013610if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013611 ac_cv_c_bigendian=no
13612else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013613 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000013614fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013615rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13616 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000013617fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013618
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013619 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013620fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013621{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
13622$as_echo "$ac_cv_c_bigendian" >&6; }
13623 case $ac_cv_c_bigendian in #(
13624 yes)
13625 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
13626;; #(
13627 no)
13628 ;; #(
13629 universal)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013630
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013631$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000013632
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013633 ;; #(
13634 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013635 as_fn_error $? "unknown endianness
Matthias Klose3cef2a92012-03-14 23:39:33 +010013636 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013637 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000013638
Michael W. Hudson54241132001-12-07 15:38:26 +000013639
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013640# Check whether right shifting a negative integer extends the sign bit
13641# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
13643$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013644if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013645 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000013646else
Martin v. Löwis11437992002-04-12 09:54:03 +000013647
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013648if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013649 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013650else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013651 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013652/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013653
13654int main()
13655{
Vladimir Marangozova6180282000-07-12 05:05:06 +000013656 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013657}
13658
Martin v. Löwis11437992002-04-12 09:54:03 +000013659_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013660if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000013661 ac_cv_rshift_extends_sign=yes
13662else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013663 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000013664fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013665rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13666 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000013667fi
13668
Martin v. Löwiseba40652007-08-30 20:10:57 +000013669fi
13670
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013671{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
13672$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000013673if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013674then
Martin v. Löwis11437992002-04-12 09:54:03 +000013675
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013676$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013677
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013678fi
13679
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013680# check for getc_unlocked and related locking functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
13682$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013683if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013684 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013685else
Martin v. Löwis11437992002-04-12 09:54:03 +000013686
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013687cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013688/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013689#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013690int
13691main ()
13692{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013693
13694 FILE *f = fopen("/dev/null", "r");
13695 flockfile(f);
13696 getc_unlocked(f);
13697 funlockfile(f);
13698
Martin v. Löwis11437992002-04-12 09:54:03 +000013699 ;
13700 return 0;
13701}
13702_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013703if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013704 ac_cv_have_getc_unlocked=yes
13705else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013706 ac_cv_have_getc_unlocked=no
13707fi
13708rm -f core conftest.err conftest.$ac_objext \
13709 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013710fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013711
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013712{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
13713$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013714if test "$ac_cv_have_getc_unlocked" = yes
13715then
Martin v. Löwis11437992002-04-12 09:54:03 +000013716
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013717$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013718
13719fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013720
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013721# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000013722# save the value of LIBS so we don't actually link Python with readline
13723LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013724
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013725# On some systems we need to link readline to a termcap compatible
13726# library. NOTE: Keep the precedence of listed libraries synchronised
13727# with setup.py.
13728py_cv_lib_readline=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
13730$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013731for py_libtermcap in "" ncursesw ncurses curses termcap; do
13732 if test -z "$py_libtermcap"; then
13733 READLINE_LIBS="-lreadline"
13734 else
13735 READLINE_LIBS="-lreadline -l$py_libtermcap"
13736 fi
13737 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013738 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013739/* end confdefs.h. */
13740
Martin v. Löwiseba40652007-08-30 20:10:57 +000013741/* Override any GCC internal prototype to avoid an error.
13742 Use char because int might match the return type of a GCC
13743 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013744#ifdef __cplusplus
13745extern "C"
13746#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013747char readline ();
13748int
13749main ()
13750{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013751return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013752 ;
13753 return 0;
13754}
13755_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013756if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013757 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013758fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013759rm -f core conftest.err conftest.$ac_objext \
13760 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013761 if test $py_cv_lib_readline = yes; then
13762 break
13763 fi
13764done
13765# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
13766#AC_SUBST([READLINE_LIBS])
Gregory P. Smithe080cdf2008-09-07 19:19:04 +000013767if test $py_cv_lib_readline = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
13769$as_echo "none" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013770else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
13772$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013773
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013774$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013775
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013776fi
13777
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013778# check for readline 2.1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
13780$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013781if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013782 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013783else
13784 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013785LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013786cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013787/* end confdefs.h. */
13788
Martin v. Löwiseba40652007-08-30 20:10:57 +000013789/* Override any GCC internal prototype to avoid an error.
13790 Use char because int might match the return type of a GCC
13791 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013792#ifdef __cplusplus
13793extern "C"
13794#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013795char rl_callback_handler_install ();
13796int
13797main ()
13798{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013799return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013800 ;
13801 return 0;
13802}
13803_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013804if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013805 ac_cv_lib_readline_rl_callback_handler_install=yes
13806else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013807 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013808fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013809rm -f core conftest.err conftest.$ac_objext \
13810 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013811LIBS=$ac_check_lib_save_LIBS
13812fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013813{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
13814$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013815if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013816
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013817$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013818
13819fi
13820
13821
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013822# check for readline 2.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013823cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013824/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013825#include <readline/readline.h>
13826_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013827if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013828 have_readline=yes
13829else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013830 have_readline=no
Matthias Klosec511b472010-05-08 11:01:39 +000013831
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013832fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013833rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013834if test $have_readline = yes
13835then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013836 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013837/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013838#include <readline/readline.h>
13839
13840_ACEOF
13841if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013842 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013843
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013844$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013845
13846fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000013847rm -f conftest*
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000013848
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013849 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000013850/* end confdefs.h. */
13851#include <readline/readline.h>
13852
13853_ACEOF
13854if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013855 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000013856
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013857$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000013858
13859fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000013860rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013861
13862fi
13863
Martin v. Löwis0daad592001-09-30 21:09:59 +000013864# check for readline 4.0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
13866$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013867if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013868 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000013869else
Martin v. Löwis11437992002-04-12 09:54:03 +000013870 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013871LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013872cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013873/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013874
Martin v. Löwiseba40652007-08-30 20:10:57 +000013875/* Override any GCC internal prototype to avoid an error.
13876 Use char because int might match the return type of a GCC
13877 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013878#ifdef __cplusplus
13879extern "C"
13880#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013881char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013882int
13883main ()
13884{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013885return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013886 ;
13887 return 0;
13888}
13889_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013890if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013891 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000013892else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013893 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000013894fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013895rm -f core conftest.err conftest.$ac_objext \
13896 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013897LIBS=$ac_check_lib_save_LIBS
13898fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013899{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
13900$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013901if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013902
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013903$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000013904
Martin v. Löwis0daad592001-09-30 21:09:59 +000013905fi
13906
Michael W. Hudson54241132001-12-07 15:38:26 +000013907
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013908# also in 4.0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
13910$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013911if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013912 $as_echo_n "(cached) " >&6
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013913else
13914 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013915LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013916cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013917/* end confdefs.h. */
13918
13919/* Override any GCC internal prototype to avoid an error.
13920 Use char because int might match the return type of a GCC
13921 builtin and then its argument prototype would still apply. */
13922#ifdef __cplusplus
13923extern "C"
13924#endif
13925char rl_completion_display_matches_hook ();
13926int
13927main ()
13928{
13929return rl_completion_display_matches_hook ();
13930 ;
13931 return 0;
13932}
13933_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013934if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013935 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
13936else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013937 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013938fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013939rm -f core conftest.err conftest.$ac_objext \
13940 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013941LIBS=$ac_check_lib_save_LIBS
13942fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013943{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
13944$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013945if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013946
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013947$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013948
13949fi
13950
13951
Martin Pantera70c3232016-04-03 02:54:58 +000013952# also in 4.0, but not in editline
13953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
13954$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
13955if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
13956 $as_echo_n "(cached) " >&6
13957else
13958 ac_check_lib_save_LIBS=$LIBS
13959LIBS="-lreadline $READLINE_LIBS $LIBS"
13960cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13961/* end confdefs.h. */
13962
13963/* Override any GCC internal prototype to avoid an error.
13964 Use char because int might match the return type of a GCC
13965 builtin and then its argument prototype would still apply. */
13966#ifdef __cplusplus
13967extern "C"
13968#endif
13969char rl_resize_terminal ();
13970int
13971main ()
13972{
13973return rl_resize_terminal ();
13974 ;
13975 return 0;
13976}
13977_ACEOF
13978if ac_fn_c_try_link "$LINENO"; then :
13979 ac_cv_lib_readline_rl_resize_terminal=yes
13980else
13981 ac_cv_lib_readline_rl_resize_terminal=no
13982fi
13983rm -f core conftest.err conftest.$ac_objext \
13984 conftest$ac_exeext conftest.$ac_ext
13985LIBS=$ac_check_lib_save_LIBS
13986fi
13987{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
13988$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
13989if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
13990
13991$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
13992
13993fi
13994
13995
Martin v. Löwis0daad592001-09-30 21:09:59 +000013996# check for readline 4.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
13998$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013999if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014000 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000014001else
Martin v. Löwis11437992002-04-12 09:54:03 +000014002 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000014003LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014004cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014005/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014006
Martin v. Löwiseba40652007-08-30 20:10:57 +000014007/* Override any GCC internal prototype to avoid an error.
14008 Use char because int might match the return type of a GCC
14009 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014010#ifdef __cplusplus
14011extern "C"
14012#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014013char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014014int
14015main ()
14016{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014017return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014018 ;
14019 return 0;
14020}
14021_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014022if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014023 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000014024else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014025 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000014026fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014027rm -f core conftest.err conftest.$ac_objext \
14028 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014029LIBS=$ac_check_lib_save_LIBS
14030fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014031{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
14032$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014033if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014034
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014035$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000014036
Guido van Rossum353ae582001-07-10 16:45:32 +000014037fi
14038
Jack Jansendd19cf82001-12-06 22:36:17 +000014039
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014040# also in readline 4.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014041cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014042/* end confdefs.h. */
14043#include <readline/readline.h>
14044_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014045if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014046 have_readline=yes
14047else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014048 have_readline=no
Matthias Klosec511b472010-05-08 11:01:39 +000014049
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014050fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014051rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014052if test $have_readline = yes
14053then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014054 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014055/* end confdefs.h. */
14056#include <readline/readline.h>
14057
14058_ACEOF
14059if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014060 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014061
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014062$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014063
14064fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000014065rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014066
14067fi
14068
Martin v. Löwis82bca632006-02-10 20:49:30 +000014069# End of readline checks: restore LIBS
14070LIBS=$LIBS_no_readline
14071
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
14073$as_echo_n "checking for broken nice()... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014074if ${ac_cv_broken_nice+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014075 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014076else
Martin v. Löwis11437992002-04-12 09:54:03 +000014077
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014078if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014079 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014080else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014081 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014082/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014083
14084int main()
14085{
14086 int val1 = nice(1);
14087 if (val1 != -1 && val1 == nice(2))
14088 exit(0);
14089 exit(1);
14090}
14091
Martin v. Löwis11437992002-04-12 09:54:03 +000014092_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014093if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014094 ac_cv_broken_nice=yes
14095else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014096 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014097fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014098rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14099 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014100fi
14101
Martin v. Löwiseba40652007-08-30 20:10:57 +000014102fi
14103
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014104{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
14105$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014106if test "$ac_cv_broken_nice" = yes
14107then
Martin v. Löwis11437992002-04-12 09:54:03 +000014108
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014109$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014110
14111fi
14112
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
14114$as_echo_n "checking for broken poll()... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014115if ${ac_cv_broken_poll+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014116 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014117else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014118 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014119 ac_cv_broken_poll=no
14120else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014122/* end confdefs.h. */
14123
14124#include <poll.h>
14125
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014126int main()
14127{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014128 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014129 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014130
14131 close (42);
14132
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014133 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014134 if (poll_test < 0)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014135 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014136 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014137 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014138 else
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014139 return 1;
14140}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014141
14142_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014143if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014144 ac_cv_broken_poll=yes
14145else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014146 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014147fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014148rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14149 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014150fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014151
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014152fi
14153
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014154{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
14155$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014156if test "$ac_cv_broken_poll" = yes
14157then
14158
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014159$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014160
14161fi
14162
Brett Cannon43802422005-02-10 20:48:03 +000014163# 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 +000014164# (which is not required by ISO C or UNIX spec) and/or if we support
14165# tzname[]
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014166ac_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 +000014167#include <$ac_cv_struct_tm>
14168
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014169"
Matthias Klose3cef2a92012-03-14 23:39:33 +010014170if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000014171
14172cat >>confdefs.h <<_ACEOF
14173#define HAVE_STRUCT_TM_TM_ZONE 1
14174_ACEOF
14175
14176
14177fi
14178
14179if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14180
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014181$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014182
14183else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014184 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
14185"
Matthias Klose3cef2a92012-03-14 23:39:33 +010014186if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014187 ac_have_decl=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000014188else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014189 ac_have_decl=0
Martin v. Löwiseba40652007-08-30 20:10:57 +000014190fi
14191
Martin v. Löwiseba40652007-08-30 20:10:57 +000014192cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014193#define HAVE_DECL_TZNAME $ac_have_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +000014194_ACEOF
14195
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014196 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
14197$as_echo_n "checking for tzname... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014198if ${ac_cv_var_tzname+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014199 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000014200else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014201 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014202/* end confdefs.h. */
14203#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000014204#if !HAVE_DECL_TZNAME
14205extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000014206#endif
14207
14208int
14209main ()
14210{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014211return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000014212 ;
14213 return 0;
14214}
14215_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014216if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000014217 ac_cv_var_tzname=yes
14218else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014219 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000014220fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014221rm -f core conftest.err conftest.$ac_objext \
14222 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014223fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014224{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
14225$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000014226 if test $ac_cv_var_tzname = yes; then
14227
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014228$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014229
14230 fi
14231fi
14232
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014233
Martin v. Löwis1d459062005-03-14 21:23:33 +000014234# check tzset(3) exists and works like we expect it to
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014235{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
14236$as_echo_n "checking for working tzset()... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014237if ${ac_cv_working_tzset+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014238 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014239else
14240
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014241if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014242 ac_cv_working_tzset=no
14243else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014244 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014245/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014246
14247#include <stdlib.h>
14248#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000014249#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000014250
14251#if HAVE_TZNAME
14252extern char *tzname[];
14253#endif
14254
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014255int main()
14256{
Brett Cannon18367812003-09-19 00:59:16 +000014257 /* Note that we need to ensure that not only does tzset(3)
14258 do 'something' with localtime, but it works as documented
14259 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000014260 This includes making sure that tzname is set properly if
14261 tm->tm_zone does not exist since it is the alternative way
14262 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000014263
14264 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000014265 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000014266 */
14267
Martin v. Löwis1d459062005-03-14 21:23:33 +000014268 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000014269 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
14270
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014271 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014272 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014273 if (localtime(&groundhogday)->tm_hour != 0)
14274 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014275#if HAVE_TZNAME
14276 /* For UTC, tzname[1] is sometimes "", sometimes " " */
14277 if (strcmp(tzname[0], "UTC") ||
14278 (tzname[1][0] != 0 && tzname[1][0] != ' '))
14279 exit(1);
14280#endif
Brett Cannon18367812003-09-19 00:59:16 +000014281
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014282 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014283 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014284 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014285 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014286#if HAVE_TZNAME
14287 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
14288 exit(1);
14289#endif
Brett Cannon18367812003-09-19 00:59:16 +000014290
14291 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
14292 tzset();
14293 if (localtime(&groundhogday)->tm_hour != 11)
14294 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014295#if HAVE_TZNAME
14296 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
14297 exit(1);
14298#endif
14299
14300#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000014301 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
14302 exit(1);
14303 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
14304 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014305#endif
Brett Cannon18367812003-09-19 00:59:16 +000014306
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014307 exit(0);
14308}
14309
14310_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014311if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014312 ac_cv_working_tzset=yes
14313else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014314 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014315fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014316rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14317 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014318fi
14319
Martin v. Löwiseba40652007-08-30 20:10:57 +000014320fi
14321
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014322{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
14323$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014324if test "$ac_cv_working_tzset" = yes
14325then
14326
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014327$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014328
14329fi
14330
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014331# Look for subsecond timestamps in struct stat
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
14333$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014334if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014335 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014336else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014337 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014338/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014339#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014340int
14341main ()
14342{
14343
14344struct stat st;
14345st.st_mtim.tv_nsec = 1;
14346
14347 ;
14348 return 0;
14349}
14350_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014351if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000014352 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014353else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014354 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014355fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014356rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14357fi
14358
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014359{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
14360$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014361if test "$ac_cv_stat_tv_nsec" = yes
14362then
14363
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014364$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014365
14366fi
14367
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014368# Look for BSD style subsecond timestamps in struct stat
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
14370$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014371if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014372 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014373else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014374 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014375/* end confdefs.h. */
14376#include <sys/stat.h>
14377int
14378main ()
14379{
14380
14381struct stat st;
14382st.st_mtimespec.tv_nsec = 1;
14383
14384 ;
14385 return 0;
14386}
14387_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014388if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014389 ac_cv_stat_tv_nsec2=yes
14390else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014391 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014392fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014393rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14394fi
14395
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014396{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
14397$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014398if test "$ac_cv_stat_tv_nsec2" = yes
14399then
14400
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014401$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014402
14403fi
14404
doko@ubuntu.comf27ec3e2014-04-17 20:11:19 +020014405# first curses configure check
14406ac_save_cppflags="$CPPFLAGS"
14407CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
14408
14409for ac_header in curses.h ncurses.h
14410do :
14411 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14412ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14413if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14414 cat >>confdefs.h <<_ACEOF
14415#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14416_ACEOF
14417
14418fi
14419
14420done
14421
14422
14423# On Solaris, term.h requires curses.h
14424for ac_header in term.h
14425do :
14426 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
14427#ifdef HAVE_CURSES_H
14428#include <curses.h>
14429#endif
14430
14431"
14432if test "x$ac_cv_header_term_h" = xyes; then :
14433 cat >>confdefs.h <<_ACEOF
14434#define HAVE_TERM_H 1
14435_ACEOF
14436
14437fi
14438
14439done
14440
14441
Jack Jansen666b1e72001-10-31 12:11:48 +000014442# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
14444$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014445if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014446 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014447else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014448 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014449/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014450#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014451int
14452main ()
14453{
Jack Jansen666b1e72001-10-31 12:11:48 +000014454
14455 int rtn;
14456 rtn = mvwdelch(0,0,0);
14457
Martin v. Löwis11437992002-04-12 09:54:03 +000014458 ;
14459 return 0;
14460}
14461_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014462if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014463 ac_cv_mvwdelch_is_expression=yes
14464else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014465 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014466fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014467rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14468fi
14469
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014470{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
14471$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000014472
14473if test "$ac_cv_mvwdelch_is_expression" = yes
14474then
Martin v. Löwis11437992002-04-12 09:54:03 +000014475
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014476$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014477
14478fi
14479
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
14481$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014482if ${ac_cv_window_has_flags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014483 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014484else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014485 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014486/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014487#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014488int
14489main ()
14490{
Jack Jansen666b1e72001-10-31 12:11:48 +000014491
14492 WINDOW *w;
14493 w->_flags = 0;
14494
Martin v. Löwis11437992002-04-12 09:54:03 +000014495 ;
14496 return 0;
14497}
14498_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014499if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014500 ac_cv_window_has_flags=yes
14501else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014502 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014503fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014504rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14505fi
14506
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014507{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
14508$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000014509
Jack Jansen666b1e72001-10-31 12:11:48 +000014510
14511if test "$ac_cv_window_has_flags" = yes
14512then
Martin v. Löwis11437992002-04-12 09:54:03 +000014513
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014514$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014515
14516fi
14517
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
14519$as_echo_n "checking for is_term_resized... " >&6; }
14520cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000014521/* end confdefs.h. */
14522#include <curses.h>
14523int
14524main ()
14525{
14526void *x=is_term_resized
14527 ;
14528 return 0;
14529}
14530_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014531if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000014532
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014533$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000014534
Matthias Klosec511b472010-05-08 11:01:39 +000014535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014536$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014537else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014538 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14539$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014540
14541fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014542rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14543
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
14545$as_echo_n "checking for resize_term... " >&6; }
14546cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000014547/* end confdefs.h. */
14548#include <curses.h>
14549int
14550main ()
14551{
14552void *x=resize_term
14553 ;
14554 return 0;
14555}
14556_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014557if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000014558
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014559$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000014560
Matthias Klosec511b472010-05-08 11:01:39 +000014561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014562$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014563else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14565$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014566
14567fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014568rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14569
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
14571$as_echo_n "checking for resizeterm... " >&6; }
14572cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000014573/* end confdefs.h. */
14574#include <curses.h>
14575int
14576main ()
14577{
14578void *x=resizeterm
14579 ;
14580 return 0;
14581}
14582_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014583if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000014584
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014585$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000014586
Matthias Klosec511b472010-05-08 11:01:39 +000014587 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014588$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014589else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14591$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014592
14593fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014594rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.comf27ec3e2014-04-17 20:11:19 +020014595# last curses configure check
14596CPPFLAGS=$ac_save_cppflags
Martin v. Löwiseba40652007-08-30 20:10:57 +000014597
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
14599$as_echo "$as_me: checking for device files" >&6;}
14600
14601if test "x$cross_compiling" = xyes; then
14602 if test "${ac_cv_file__dev_ptmx+set}" != set; then
14603 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14604$as_echo_n "checking for /dev/ptmx... " >&6; }
14605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14606$as_echo "not set" >&6; }
14607 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14608 fi
14609 if test "${ac_cv_file__dev_ptc+set}" != set; then
14610 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14611$as_echo_n "checking for /dev/ptc... " >&6; }
14612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14613$as_echo "not set" >&6; }
14614 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14615 fi
14616fi
14617
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14619$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014620if ${ac_cv_file__dev_ptmx+:} false; then :
14621 $as_echo_n "(cached) " >&6
14622else
14623 test "$cross_compiling" = yes &&
14624 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14625if test -r "/dev/ptmx"; then
14626 ac_cv_file__dev_ptmx=yes
14627else
14628 ac_cv_file__dev_ptmx=no
14629fi
14630fi
14631{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
14632$as_echo "$ac_cv_file__dev_ptmx" >&6; }
14633if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Martin v. Löwisfefbc202006-10-17 18:59:23 +000014634
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014635fi
14636
14637if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014638
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014639$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014640
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014641fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014642{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14643$as_echo_n "checking for /dev/ptc... " >&6; }
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014644if ${ac_cv_file__dev_ptc+:} false; then :
14645 $as_echo_n "(cached) " >&6
14646else
14647 test "$cross_compiling" = yes &&
14648 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14649if test -r "/dev/ptc"; then
14650 ac_cv_file__dev_ptc=yes
14651else
14652 ac_cv_file__dev_ptc=no
14653fi
14654fi
14655{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
14656$as_echo "$ac_cv_file__dev_ptc" >&6; }
14657if test "x$ac_cv_file__dev_ptc" = xyes; then :
Martin v. Löwisfefbc202006-10-17 18:59:23 +000014658
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014659fi
14660
14661if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000014662
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014663$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000014664
Neal Norwitz865400f2003-03-21 01:42:58 +000014665fi
14666
Mark Dickinson82864d12009-11-15 16:18:58 +000014667if test "$have_long_long" = yes
14668then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014669 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
14670$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014671 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014672 $as_echo_n "(cached) " >&6
Mark Dickinson82864d12009-11-15 16:18:58 +000014673else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014674 if test "$cross_compiling" = yes; then :
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014675 ac_cv_have_long_long_format="cross -- assuming no"
14676 if test x$GCC = xyes; then
14677 save_CFLAGS=$CFLAGS
14678 CFLAGS="$CFLAGS -Werror -Wformat"
14679 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14680/* end confdefs.h. */
14681
14682 #include <stdio.h>
14683 #include <stddef.h>
14684
14685int
14686main ()
14687{
14688
14689 char *buffer;
14690 sprintf(buffer, "%lld", (long long)123);
14691 sprintf(buffer, "%lld", (long long)-123);
14692 sprintf(buffer, "%llu", (unsigned long long)123);
14693
14694 ;
14695 return 0;
14696}
14697_ACEOF
14698if ac_fn_c_try_compile "$LINENO"; then :
14699 ac_cv_have_long_long_format=yes
14700
14701fi
14702rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14703 CFLAGS=$save_CFLAGS
14704 fi
Mark Dickinson82864d12009-11-15 16:18:58 +000014705else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014706 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson82864d12009-11-15 16:18:58 +000014707/* end confdefs.h. */
14708
14709 #include <stdio.h>
14710 #include <stddef.h>
14711 #include <string.h>
14712
14713 #ifdef HAVE_SYS_TYPES_H
14714 #include <sys/types.h>
14715 #endif
14716
14717 int main()
14718 {
14719 char buffer[256];
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, "%lld", (long long)-123) < 0)
14727 return 1;
14728 if (strcmp(buffer, "-123"))
14729 return 1;
14730
14731 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
14732 return 1;
14733 if (strcmp(buffer, "123"))
14734 return 1;
14735
14736 return 0;
14737 }
14738
14739_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014740if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson82864d12009-11-15 16:18:58 +000014741 ac_cv_have_long_long_format=yes
14742else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014743 ac_cv_have_long_long_format=no
Mark Dickinson82864d12009-11-15 16:18:58 +000014744fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014745rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14746 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson82864d12009-11-15 16:18:58 +000014747fi
14748
14749
Mark Dickinson82864d12009-11-15 16:18:58 +000014750fi
14751
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
14753$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson82864d12009-11-15 16:18:58 +000014754fi
14755
Mark Dickinson5ce84742009-12-31 20:48:04 +000014756if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson82864d12009-11-15 16:18:58 +000014757then
14758
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014759$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson82864d12009-11-15 16:18:58 +000014760
14761fi
14762
Ronald Oussoren315cd0c2009-11-19 16:25:21 +000014763if test $ac_sys_system = Darwin
14764then
14765 LIBS="$LIBS -framework CoreFoundation"
14766fi
14767
Mark Dickinson82864d12009-11-15 16:18:58 +000014768
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
14770$as_echo_n "checking for %zd printf() format support... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014771if ${ac_cv_have_size_t_format+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014772 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014773else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014774 if test "$cross_compiling" = yes; then :
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000014775 ac_cv_have_size_t_format="cross -- assuming yes"
14776
Brett Cannon09d12362006-05-11 05:11:33 +000014777else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014778 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon09d12362006-05-11 05:11:33 +000014779/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014780
Brett Cannon09d12362006-05-11 05:11:33 +000014781#include <stdio.h>
14782#include <stddef.h>
14783#include <string.h>
14784
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000014785#ifdef HAVE_SYS_TYPES_H
14786#include <sys/types.h>
14787#endif
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000014788
14789#ifdef HAVE_SSIZE_T
14790typedef ssize_t Py_ssize_t;
14791#elif SIZEOF_VOID_P == SIZEOF_LONG
14792typedef long Py_ssize_t;
14793#else
14794typedef int Py_ssize_t;
14795#endif
Brett Cannon09d12362006-05-11 05:11:33 +000014796
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000014797int main()
14798{
14799 char buffer[256];
14800
Brett Cannon09d12362006-05-11 05:11:33 +000014801 if(sprintf(buffer, "%zd", (size_t)123) < 0)
14802 return 1;
14803
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000014804 if (strcmp(buffer, "123"))
14805 return 1;
14806
14807 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
14808 return 1;
14809
14810 if (strcmp(buffer, "-123"))
Brett Cannon09d12362006-05-11 05:11:33 +000014811 return 1;
14812
14813 return 0;
14814}
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014815
Brett Cannon09d12362006-05-11 05:11:33 +000014816_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014817if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014818 ac_cv_have_size_t_format=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014819else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014820 ac_cv_have_size_t_format=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014821fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014822rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14823 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000014824fi
14825
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014826fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014827{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
14828$as_echo "$ac_cv_have_size_t_format" >&6; }
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000014829if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014830
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014831$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014832
14833fi
14834
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014835ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000014836#ifdef HAVE_SYS_TYPES_H
14837#include <sys/types.h>
14838#endif
14839#ifdef HAVE_SYS_SOCKET_H
14840#include <sys/socket.h>
14841#endif
14842
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014843"
Matthias Klose3cef2a92012-03-14 23:39:33 +010014844if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000014845
Martin v. Löwis11437992002-04-12 09:54:03 +000014846else
Guido van Rossum95713eb2000-05-18 20:53:31 +000014847
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014848$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000014849
14850fi
14851
Michael W. Hudson54241132001-12-07 15:38:26 +000014852
Benjamin Peterson7497e912010-10-16 00:53:39 +000014853case $ac_sys_system in
14854AIX*)
14855
14856$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
14857 ;;
14858esac
14859
14860
Michael W. Hudson54241132001-12-07 15:38:26 +000014861
14862
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000014863for h in `(cd $srcdir;echo Python/thread_*.h)`
14864do
14865 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
14866done
14867
Michael W. Hudson54241132001-12-07 15:38:26 +000014868
Neal Norwitzd24499d2005-12-18 21:36:39 +000014869SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
14871$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014872for dir in $SRCDIRS; do
14873 if test ! -d $dir; then
14874 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000014875 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014876done
Benjamin Peterson2c992a02015-05-28 12:45:31 -050014877
14878# BEGIN_COMPUTED_GOTO
14879# Check for --with-computed-gotos
14880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
14881$as_echo_n "checking for --with-computed-gotos... " >&6; }
14882
14883# Check whether --with-computed-gotos was given.
14884if test "${with_computed_gotos+set}" = set; then :
14885 withval=$with_computed_gotos;
14886if test "$withval" = yes
14887then
14888
14889$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
14890
14891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14892$as_echo "yes" >&6; }
14893fi
14894if test "$withval" = no
14895then
14896
14897$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
14898
14899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14900$as_echo "no" >&6; }
14901fi
14902
14903else
14904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14905$as_echo "no value specified" >&6; }
14906fi
14907
14908
14909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
14910$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
14911if ${ac_cv_computed_gotos+:} false; then :
14912 $as_echo_n "(cached) " >&6
14913else
14914 if test "$cross_compiling" = yes; then :
14915 if test "${with_computed_gotos+set}" = set; then
14916 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
14917 else
14918 ac_cv_computed_gotos=no
14919 fi
14920else
14921 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14922/* end confdefs.h. */
14923
14924int main(int argc, char **argv)
14925{
14926 static void *targets[1] = { &&LABEL1 };
14927 goto LABEL2;
14928LABEL1:
14929 return 0;
14930LABEL2:
14931 goto *targets[0];
14932 return 1;
14933}
14934
14935_ACEOF
14936if ac_fn_c_try_run "$LINENO"; then :
14937 ac_cv_computed_gotos=yes
14938else
14939 ac_cv_computed_gotos=no
14940fi
14941rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14942 conftest.$ac_objext conftest.beam conftest.$ac_ext
14943fi
14944
14945fi
14946
14947{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
14948$as_echo "$ac_cv_computed_gotos" >&6; }
14949case "$ac_cv_computed_gotos" in yes*)
14950
14951$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
14952
14953esac
14954# END_COMPUTED_GOTO
14955
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014956{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
14957$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000014958
Ned Deily3f1d0b32014-11-20 02:11:03 -080014959# ensurepip option
14960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
14961$as_echo_n "checking for ensurepip... " >&6; }
14962
14963# Check whether --with-ensurepip was given.
14964if test "${with_ensurepip+set}" = set; then :
14965 withval=$with_ensurepip;
14966else
14967 with_ensurepip=no
14968fi
14969
14970case $with_ensurepip in #(
14971 yes|upgrade) :
14972 ENSUREPIP=upgrade ;; #(
14973 install) :
14974 ENSUREPIP=install ;; #(
14975 no) :
14976 ENSUREPIP=no ;; #(
14977 *) :
14978 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
14979esac
14980{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
14981$as_echo "$ENSUREPIP" >&6; }
14982
14983
Guido van Rossum627b2d71993-12-24 10:39:16 +000014984# generate output files
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000014985ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000014986
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000014987ac_config_files="$ac_config_files Modules/ld_so_aix"
14988
Martin v. Löwis11437992002-04-12 09:54:03 +000014989cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014990# This file is a shell script that caches the results of configure
14991# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000014992# scripts and configure runs, see configure's option --config-cache.
14993# It is not useful on other systems. If it contains results you don't
14994# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014995#
Martin v. Löwis11437992002-04-12 09:54:03 +000014996# config.status only pays attention to the cache file if you give it
14997# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014998#
Skip Montanaro6dead952003-09-25 14:50:04 +000014999# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000015000# loading this file, other *unset* `ac_cv_foo' will be assigned the
15001# following values.
15002
15003_ACEOF
15004
Guido van Rossumf78abae1997-01-21 22:02:36 +000015005# The following way of writing the cache mishandles newlines in values,
15006# but we know of no workaround that is simple, portable, and efficient.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015007# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015008# Ultrix sh set writes to stderr and can't be redirected directly,
15009# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015010(
15011 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
15012 eval ac_val=\$$ac_var
15013 case $ac_val in #(
15014 *${as_nl}*)
15015 case $ac_var in #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015016 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
15017$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015018 esac
15019 case $ac_var in #(
15020 _ | IFS | as_nl) ;; #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015021 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
15022 *) { eval $ac_var=; unset $ac_var;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015023 esac ;;
15024 esac
15025 done
15026
Martin v. Löwis11437992002-04-12 09:54:03 +000015027 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +000015028 case $as_nl`(ac_space=' '; set) 2>&1` in #(
15029 *${as_nl}ac_space=\ *)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015030 # `set' does not quote correctly, so add quotes: double-quote
15031 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000015032 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015033 "s/'/'\\\\''/g;
15034 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwiseba40652007-08-30 20:10:57 +000015035 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000015036 *)
15037 # `set' quotes correctly as required by POSIX, so do not add quotes.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015038 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000015039 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015040 esac |
15041 sort
15042) |
Martin v. Löwis11437992002-04-12 09:54:03 +000015043 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000015044 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000015045 t clear
Martin v. Löwiseba40652007-08-30 20:10:57 +000015046 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000015047 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15048 t end
Martin v. Löwiseba40652007-08-30 20:10:57 +000015049 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15050 :end' >>confcache
15051if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
15052 if test -w "$cache_file"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +010015053 if test "x$cache_file" != "x/dev/null"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015054 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
15055$as_echo "$as_me: updating cache $cache_file" >&6;}
Matthias Klose3cef2a92012-03-14 23:39:33 +010015056 if test ! -f "$cache_file" || test -h "$cache_file"; then
15057 cat confcache >"$cache_file"
15058 else
15059 case $cache_file in #(
15060 */* | ?:*)
15061 mv -f confcache "$cache_file"$$ &&
15062 mv -f "$cache_file"$$ "$cache_file" ;; #(
15063 *)
15064 mv -f confcache "$cache_file" ;;
15065 esac
15066 fi
15067 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015068 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015069 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
15070$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015071 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015072fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015073rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000015074
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015075test "x$prefix" = xNONE && prefix=$ac_default_prefix
15076# Let make expand exec_prefix.
15077test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000015078
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015079DEFS=-DHAVE_CONFIG_H
15080
Skip Montanaro6dead952003-09-25 14:50:04 +000015081ac_libobjs=
15082ac_ltlibobjs=
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015083U=
Skip Montanaro6dead952003-09-25 14:50:04 +000015084for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
15085 # 1. Remove the extension, and $U if already installed.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015086 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015087 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015088 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
15089 # will be set to the directory where LIBOBJS objects are built.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015090 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
15091 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000015092done
15093LIBOBJS=$ac_libobjs
15094
15095LTLIBOBJS=$ac_ltlibobjs
15096
15097
Martin v. Löwis11437992002-04-12 09:54:03 +000015098
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015099
Matthias Klose3cef2a92012-03-14 23:39:33 +010015100: "${CONFIG_STATUS=./config.status}"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015101ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000015102ac_clean_files_save=$ac_clean_files
15103ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015104{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
15105$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
15106as_write_fail=0
15107cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015108#! $SHELL
15109# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015110# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015111# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000015112# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015113
Martin v. Löwis11437992002-04-12 09:54:03 +000015114debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000015115ac_cs_recheck=false
15116ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000015117
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015118SHELL=\${CONFIG_SHELL-$SHELL}
15119export SHELL
15120_ASEOF
15121cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
15122## -------------------- ##
15123## M4sh Initialization. ##
15124## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000015125
Martin v. Löwiseba40652007-08-30 20:10:57 +000015126# Be more Bourne compatible
15127DUALCASE=1; export DUALCASE # for MKS sh
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015128if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015129 emulate sh
15130 NULLCMD=:
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015131 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000015132 # is contrary to our usage. Disable this feature.
15133 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000015134 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000015135else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015136 case `(set -o) 2>/dev/null` in #(
15137 *posix*) :
15138 set -o posix ;; #(
15139 *) :
15140 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015141esac
Martin v. Löwis11437992002-04-12 09:54:03 +000015142fi
Michael W. Hudson54241132001-12-07 15:38:26 +000015143
Skip Montanaro6dead952003-09-25 14:50:04 +000015144
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015145as_nl='
15146'
15147export as_nl
15148# Printing a long string crashes Solaris 7 /usr/bin/printf.
15149as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
15150as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
15151as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
15152# Prefer a ksh shell builtin over an external printf program on Solaris,
15153# but without wasting forks for bash or zsh.
15154if test -z "$BASH_VERSION$ZSH_VERSION" \
15155 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
15156 as_echo='print -r --'
15157 as_echo_n='print -rn --'
15158elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
15159 as_echo='printf %s\n'
15160 as_echo_n='printf %s'
15161else
15162 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
15163 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
15164 as_echo_n='/usr/ucb/echo -n'
15165 else
15166 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
15167 as_echo_n_body='eval
15168 arg=$1;
15169 case $arg in #(
15170 *"$as_nl"*)
15171 expr "X$arg" : "X\\(.*\\)$as_nl";
15172 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
15173 esac;
15174 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
15175 '
15176 export as_echo_n_body
15177 as_echo_n='sh -c $as_echo_n_body as_echo'
15178 fi
15179 export as_echo_body
15180 as_echo='sh -c $as_echo_body as_echo'
15181fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015182
15183# The user is always right.
15184if test "${PATH_SEPARATOR+set}" != set; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015185 PATH_SEPARATOR=:
15186 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
15187 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
15188 PATH_SEPARATOR=';'
15189 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000015190fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015191
Martin v. Löwiseba40652007-08-30 20:10:57 +000015192
15193# IFS
15194# We need space, tab and new line, in precisely that order. Quoting is
15195# there to prevent editors from complaining about space-tab.
15196# (If _AS_PATH_WALK were called with IFS unset, it would disable word
15197# splitting by setting IFS to empty value.)
Martin v. Löwiseba40652007-08-30 20:10:57 +000015198IFS=" "" $as_nl"
15199
15200# Find who we are. Look in the path if we contain no directory separator.
Matthias Klose3cef2a92012-03-14 23:39:33 +010015201as_myself=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015202case $0 in #((
Martin v. Löwiseba40652007-08-30 20:10:57 +000015203 *[\\/]* ) as_myself=$0 ;;
15204 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000015205for as_dir in $PATH
15206do
15207 IFS=$as_save_IFS
15208 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015209 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15210 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000015211IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000015212
Martin v. Löwiseba40652007-08-30 20:10:57 +000015213 ;;
15214esac
15215# We did not find ourselves, most probably we were run as `sh COMMAND'
15216# in which case we are not to be found in the path.
15217if test "x$as_myself" = x; then
15218 as_myself=$0
15219fi
15220if test ! -f "$as_myself"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015221 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
15222 exit 1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015223fi
15224
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015225# Unset variables that we do not need and which cause bugs (e.g. in
15226# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
15227# suppresses any "Segmentation fault" message there. '((' could
15228# trigger a bug in pdksh 5.2.14.
15229for as_var in BASH_ENV ENV MAIL MAILPATH
15230do eval test x\${$as_var+set} = xset \
15231 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Martin v. Löwiseba40652007-08-30 20:10:57 +000015232done
15233PS1='$ '
15234PS2='> '
15235PS4='+ '
15236
15237# NLS nuisances.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015238LC_ALL=C
15239export LC_ALL
15240LANGUAGE=C
15241export LANGUAGE
Martin v. Löwiseba40652007-08-30 20:10:57 +000015242
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015243# CDPATH.
15244(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
15245
15246
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015247# as_fn_error STATUS ERROR [LINENO LOG_FD]
15248# ----------------------------------------
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015249# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
15250# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015251# script with STATUS, using 1 if that was 0.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015252as_fn_error ()
15253{
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015254 as_status=$1; test $as_status -eq 0 && as_status=1
15255 if test "$4"; then
15256 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
15257 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015258 fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015259 $as_echo "$as_me: error: $2" >&2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015260 as_fn_exit $as_status
15261} # as_fn_error
15262
15263
15264# as_fn_set_status STATUS
15265# -----------------------
15266# Set $? to STATUS, without forking.
15267as_fn_set_status ()
15268{
15269 return $1
15270} # as_fn_set_status
15271
15272# as_fn_exit STATUS
15273# -----------------
15274# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
15275as_fn_exit ()
15276{
15277 set +e
15278 as_fn_set_status $1
15279 exit $1
15280} # as_fn_exit
15281
15282# as_fn_unset VAR
15283# ---------------
15284# Portably unset VAR.
15285as_fn_unset ()
15286{
15287 { eval $1=; unset $1;}
15288}
15289as_unset=as_fn_unset
15290# as_fn_append VAR VALUE
15291# ----------------------
15292# Append the text in VALUE to the end of the definition contained in VAR. Take
15293# advantage of any shell optimizations that allow amortized linear growth over
15294# repeated appends, instead of the typical quadratic growth present in naive
15295# implementations.
15296if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
15297 eval 'as_fn_append ()
15298 {
15299 eval $1+=\$2
15300 }'
15301else
15302 as_fn_append ()
15303 {
15304 eval $1=\$$1\$2
15305 }
15306fi # as_fn_append
15307
15308# as_fn_arith ARG...
15309# ------------------
15310# Perform arithmetic evaluation on the ARGs, and store the result in the
15311# global $as_val. Take advantage of shells that can avoid forks. The arguments
15312# must be portable across $(()) and expr.
15313if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
15314 eval 'as_fn_arith ()
15315 {
15316 as_val=$(( $* ))
15317 }'
15318else
15319 as_fn_arith ()
15320 {
15321 as_val=`expr "$@" || test $? -eq 1`
15322 }
15323fi # as_fn_arith
15324
15325
Martin v. Löwiseba40652007-08-30 20:10:57 +000015326if expr a : '\(a\)' >/dev/null 2>&1 &&
15327 test "X`expr 00001 : '.*\(...\)'`" = X001; then
15328 as_expr=expr
15329else
15330 as_expr=false
15331fi
15332
15333if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
15334 as_basename=basename
15335else
15336 as_basename=false
15337fi
15338
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015339if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
15340 as_dirname=dirname
15341else
15342 as_dirname=false
15343fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015344
Martin v. Löwiseba40652007-08-30 20:10:57 +000015345as_me=`$as_basename -- "$0" ||
15346$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15347 X"$0" : 'X\(//\)$' \| \
15348 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015349$as_echo X/"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000015350 sed '/^.*\/\([^/][^/]*\)\/*$/{
15351 s//\1/
15352 q
15353 }
15354 /^X\/\(\/\/\)$/{
15355 s//\1/
15356 q
15357 }
15358 /^X\/\(\/\).*/{
15359 s//\1/
15360 q
15361 }
15362 s/.*/./; q'`
15363
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015364# Avoid depending upon Character Ranges.
15365as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15366as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15367as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15368as_cr_digits='0123456789'
15369as_cr_alnum=$as_cr_Letters$as_cr_digits
Martin v. Löwiseba40652007-08-30 20:10:57 +000015370
15371ECHO_C= ECHO_N= ECHO_T=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015372case `echo -n x` in #(((((
Martin v. Löwiseba40652007-08-30 20:10:57 +000015373-n*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015374 case `echo 'xy\c'` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000015375 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015376 xy) ECHO_C='\c';;
15377 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
15378 ECHO_T=' ';;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015379 esac;;
15380*)
15381 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000015382esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015383
Martin v. Löwis11437992002-04-12 09:54:03 +000015384rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +000015385if test -d conf$$.dir; then
15386 rm -f conf$$.dir/conf$$.file
15387else
15388 rm -f conf$$.dir
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015389 mkdir conf$$.dir 2>/dev/null
Martin v. Löwiseba40652007-08-30 20:10:57 +000015390fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015391if (echo >conf$$.file) 2>/dev/null; then
15392 if ln -s conf$$.file conf$$ 2>/dev/null; then
15393 as_ln_s='ln -s'
15394 # ... but there are two gotchas:
15395 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
15396 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015397 # In both cases, we have to default to `cp -pR'.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015398 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015399 as_ln_s='cp -pR'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015400 elif ln conf$$.file conf$$ 2>/dev/null; then
15401 as_ln_s=ln
15402 else
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015403 as_ln_s='cp -pR'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015404 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015405else
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015406 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000015407fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015408rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
15409rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000015410
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015411
15412# as_fn_mkdir_p
15413# -------------
15414# Create "$as_dir" as a directory, including parents if necessary.
15415as_fn_mkdir_p ()
15416{
15417
15418 case $as_dir in #(
15419 -*) as_dir=./$as_dir;;
15420 esac
15421 test -d "$as_dir" || eval $as_mkdir_p || {
15422 as_dirs=
15423 while :; do
15424 case $as_dir in #(
15425 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
15426 *) as_qdir=$as_dir;;
15427 esac
15428 as_dirs="'$as_qdir' $as_dirs"
15429 as_dir=`$as_dirname -- "$as_dir" ||
15430$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15431 X"$as_dir" : 'X\(//\)[^/]' \| \
15432 X"$as_dir" : 'X\(//\)$' \| \
15433 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
15434$as_echo X"$as_dir" |
15435 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15436 s//\1/
15437 q
15438 }
15439 /^X\(\/\/\)[^/].*/{
15440 s//\1/
15441 q
15442 }
15443 /^X\(\/\/\)$/{
15444 s//\1/
15445 q
15446 }
15447 /^X\(\/\).*/{
15448 s//\1/
15449 q
15450 }
15451 s/.*/./; q'`
15452 test -d "$as_dir" && break
15453 done
15454 test -z "$as_dirs" || eval "mkdir $as_dirs"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015455 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015456
15457
15458} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000015459if mkdir -p . 2>/dev/null; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015460 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000015461else
Skip Montanarof0d5f792004-08-15 14:08:23 +000015462 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000015463 as_mkdir_p=false
15464fi
15465
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015466
15467# as_fn_executable_p FILE
15468# -----------------------
15469# Test if FILE is an executable regular file.
15470as_fn_executable_p ()
15471{
15472 test -f "$1" && test -x "$1"
15473} # as_fn_executable_p
15474as_test_x='test -x'
15475as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015476
15477# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015478as_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 +000015479
15480# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015481as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015482
15483
Martin v. Löwis11437992002-04-12 09:54:03 +000015484exec 6>&1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015485## ----------------------------------- ##
15486## Main body of $CONFIG_STATUS script. ##
15487## ----------------------------------- ##
15488_ASEOF
15489test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015490
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015491cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15492# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000015493# report actual input values of CONFIG_FILES etc. instead of their
Martin v. Löwiseba40652007-08-30 20:10:57 +000015494# values after options handling.
15495ac_log="
Martin v. Löwis174440b2008-10-03 08:59:41 +000015496This file was extended by python $as_me 2.7, which was
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015497generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000015498
15499 CONFIG_FILES = $CONFIG_FILES
15500 CONFIG_HEADERS = $CONFIG_HEADERS
15501 CONFIG_LINKS = $CONFIG_LINKS
15502 CONFIG_COMMANDS = $CONFIG_COMMANDS
15503 $ $0 $@
15504
Martin v. Löwiseba40652007-08-30 20:10:57 +000015505on `(hostname || uname -n) 2>/dev/null | sed 1q`
15506"
15507
Martin v. Löwis11437992002-04-12 09:54:03 +000015508_ACEOF
15509
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015510case $ac_config_files in *"
15511"*) set x $ac_config_files; shift; ac_config_files=$*;;
15512esac
15513
15514case $ac_config_headers in *"
15515"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
15516esac
15517
15518
15519cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015520# Files that config.status was made for.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015521config_files="$ac_config_files"
15522config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000015523
Martin v. Löwiseba40652007-08-30 20:10:57 +000015524_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015525
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015526cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015527ac_cs_usage="\
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015528\`$as_me' instantiates files and other configuration actions
15529from templates according to the current configuration. Unless the files
15530and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000015531
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015532Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000015533
15534 -h, --help print this help, then exit
Martin v. Löwiseba40652007-08-30 20:10:57 +000015535 -V, --version print version number and configuration settings, then exit
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015536 --config print configuration, then exit
15537 -q, --quiet, --silent
15538 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000015539 -d, --debug don't remove temporary files
15540 --recheck update $as_me by reconfiguring in the same conditions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015541 --file=FILE[:TEMPLATE]
15542 instantiate the configuration file FILE
15543 --header=FILE[:TEMPLATE]
15544 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000015545
15546Configuration files:
15547$config_files
15548
15549Configuration headers:
15550$config_headers
15551
Benjamin Petersoncc8929b2016-08-03 22:01:32 -070015552Report bugs to <https://bugs.python.org/>."
Skip Montanaro89e975f2007-08-22 19:05:21 +000015553
Martin v. Löwiseba40652007-08-30 20:10:57 +000015554_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015555cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15556ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000015557ac_cs_version="\\
Martin v. Löwis174440b2008-10-03 08:59:41 +000015558python config.status 2.7
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015559configured by $0, generated by GNU Autoconf 2.69,
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015560 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000015561
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015562Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000015563This config.status script is free software; the Free Software Foundation
15564gives unlimited permission to copy, distribute and modify it."
Martin v. Löwiseba40652007-08-30 20:10:57 +000015565
15566ac_pwd='$ac_pwd'
15567srcdir='$srcdir'
15568INSTALL='$INSTALL'
Trent Nelsonf6407a12012-08-30 14:56:13 +000015569MKDIR_P='$MKDIR_P'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015570test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000015571_ACEOF
15572
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015573cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15574# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000015575ac_need_defaults=:
15576while test $# != 0
15577do
15578 case $1 in
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015579 --*=?*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000015580 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15581 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000015582 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000015583 ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015584 --*=)
15585 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15586 ac_optarg=
15587 ac_shift=:
15588 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015589 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000015590 ac_option=$1
15591 ac_optarg=$2
15592 ac_shift=shift
15593 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015594 esac
15595
Skip Montanaro6dead952003-09-25 14:50:04 +000015596 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000015597 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000015598 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15599 ac_cs_recheck=: ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015600 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015601 $as_echo "$ac_cs_version"; exit ;;
15602 --config | --confi | --conf | --con | --co | --c )
15603 $as_echo "$ac_cs_config"; exit ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015604 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000015605 debug=: ;;
15606 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000015607 $ac_shift
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015608 case $ac_optarg in
15609 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015610 '') as_fn_error $? "missing file argument" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015611 esac
15612 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015613 ac_need_defaults=false;;
15614 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000015615 $ac_shift
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015616 case $ac_optarg in
15617 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15618 esac
15619 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015620 ac_need_defaults=false;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015621 --he | --h)
15622 # Conflict between --help and --header
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015623 as_fn_error $? "ambiguous option: \`$1'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015624Try \`$0 --help' for more information.";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015625 --help | --hel | -h )
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015626 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000015627 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
15628 | -silent | --silent | --silen | --sile | --sil | --si | --s)
15629 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015630
15631 # This is an error.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015632 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015633Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015634
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015635 *) as_fn_append ac_config_targets " $1"
Martin v. Löwiseba40652007-08-30 20:10:57 +000015636 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015637
15638 esac
15639 shift
15640done
15641
Skip Montanaro6dead952003-09-25 14:50:04 +000015642ac_configure_extra_args=
15643
15644if $ac_cs_silent; then
15645 exec 6>/dev/null
15646 ac_configure_extra_args="$ac_configure_extra_args --silent"
15647fi
15648
15649_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015650cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000015651if \$ac_cs_recheck; then
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015652 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015653 shift
15654 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
15655 CONFIG_SHELL='$SHELL'
Martin v. Löwiseba40652007-08-30 20:10:57 +000015656 export CONFIG_SHELL
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015657 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000015658fi
15659
Martin v. Löwis11437992002-04-12 09:54:03 +000015660_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015661cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015662exec 5>>config.log
15663{
15664 echo
15665 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
15666## Running $as_me. ##
15667_ASBOX
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015668 $as_echo "$ac_log"
Martin v. Löwiseba40652007-08-30 20:10:57 +000015669} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015670
Martin v. Löwiseba40652007-08-30 20:10:57 +000015671_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015672cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015673_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015674
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015675cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015676
15677# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000015678for ac_config_target in $ac_config_targets
15679do
Martin v. Löwiseba40652007-08-30 20:10:57 +000015680 case $ac_config_target in
15681 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
15682 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
15683 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
15684 "Mac/IDLE/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/IDLE/Makefile" ;;
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000015685 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
15686 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015687 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
15688 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000015689 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000015690 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015691
Matthias Klose3cef2a92012-03-14 23:39:33 +010015692 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015693 esac
15694done
15695
Martin v. Löwiseba40652007-08-30 20:10:57 +000015696
Martin v. Löwis11437992002-04-12 09:54:03 +000015697# If the user did not use the arguments to specify the items to instantiate,
15698# then the envvar interface is used. Set only those that are not.
15699# We use the long form for the default assignment because of an extremely
15700# bizarre bug on SunOS 4.1.3.
15701if $ac_need_defaults; then
15702 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15703 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15704fi
15705
Skip Montanaro6dead952003-09-25 14:50:04 +000015706# Have a temporary directory for convenience. Make it in the build tree
Martin v. Löwiseba40652007-08-30 20:10:57 +000015707# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000015708# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015709# Hook for its removal unless debugging.
15710# Note that there is a small window in which the directory will not be cleaned:
15711# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000015712$debug ||
15713{
Matthias Klose3cef2a92012-03-14 23:39:33 +010015714 tmp= ac_tmp=
Martin v. Löwiseba40652007-08-30 20:10:57 +000015715 trap 'exit_status=$?
Matthias Klose3cef2a92012-03-14 23:39:33 +010015716 : "${ac_tmp:=$tmp}"
15717 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +000015718' 0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015719 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000015720}
Martin v. Löwis11437992002-04-12 09:54:03 +000015721# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000015722
Martin v. Löwis11437992002-04-12 09:54:03 +000015723{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015724 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Matthias Klose3cef2a92012-03-14 23:39:33 +010015725 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000015726} ||
15727{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015728 tmp=./conf$$-$RANDOM
15729 (umask 077 && mkdir "$tmp")
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015730} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Matthias Klose3cef2a92012-03-14 23:39:33 +010015731ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000015732
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015733# Set up the scripts for CONFIG_FILES section.
15734# No need to generate them if there are no CONFIG_FILES.
15735# This happens for instance with `./config.status config.h'.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015736if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015737
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015738
15739ac_cr=`echo X | tr X '\015'`
15740# On cygwin, bash can eat \r inside `` if the user requested igncr.
15741# But we know of no other shell where ac_cr would be empty at this
15742# point, so we can use a bashism as a fallback.
15743if test "x$ac_cr" = x; then
15744 eval ac_cr=\$\'\\r\'
15745fi
15746ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
15747if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015748 ac_cs_awk_cr='\\r'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015749else
15750 ac_cs_awk_cr=$ac_cr
15751fi
15752
Matthias Klose3cef2a92012-03-14 23:39:33 +010015753echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000015754_ACEOF
15755
Martin v. Löwiseba40652007-08-30 20:10:57 +000015756
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015757{
15758 echo "cat >conf$$subs.awk <<_ACEOF" &&
15759 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
15760 echo "_ACEOF"
15761} >conf$$subs.sh ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015762 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15763ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015764ac_delim='%!_!# '
15765for ac_last_try in false false false false false :; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015766 . ./conf$$subs.sh ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015767 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015768
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015769 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
15770 if test $ac_delim_n = $ac_delim_num; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015771 break
15772 elif $ac_last_try; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015773 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015774 else
15775 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000015776 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015777done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015778rm -f conf$$subs.sh
Martin v. Löwiseba40652007-08-30 20:10:57 +000015779
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015780cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Matthias Klose3cef2a92012-03-14 23:39:33 +010015781cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000015782_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015783sed -n '
15784h
15785s/^/S["/; s/!.*/"]=/
15786p
15787g
15788s/^[^!]*!//
15789:repl
15790t repl
15791s/'"$ac_delim"'$//
15792t delim
15793:nl
15794h
15795s/\(.\{148\}\)..*/\1/
15796t more1
15797s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
15798p
15799n
15800b repl
15801:more1
15802s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15803p
15804g
15805s/.\{148\}//
15806t nl
15807:delim
15808h
15809s/\(.\{148\}\)..*/\1/
15810t more2
15811s/["\\]/\\&/g; s/^/"/; s/$/"/
15812p
15813b
15814:more2
15815s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15816p
15817g
15818s/.\{148\}//
15819t delim
15820' <conf$$subs.awk | sed '
15821/^[^""]/{
15822 N
15823 s/\n//
15824}
15825' >>$CONFIG_STATUS || ac_write_fail=1
15826rm -f conf$$subs.awk
15827cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15828_ACAWK
Matthias Klose3cef2a92012-03-14 23:39:33 +010015829cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015830 for (key in S) S_is_set[key] = 1
15831 FS = ""
15832
15833}
15834{
15835 line = $ 0
15836 nfields = split(line, field, "@")
15837 substed = 0
15838 len = length(field[1])
15839 for (i = 2; i < nfields; i++) {
15840 key = field[i]
15841 keylen = length(key)
15842 if (S_is_set[key]) {
15843 value = S[key]
15844 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
15845 len += length(value) + length(field[++i])
15846 substed = 1
15847 } else
15848 len += 1 + keylen
15849 }
15850
15851 print line
15852}
15853
15854_ACAWK
Martin v. Löwiseba40652007-08-30 20:10:57 +000015855_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015856cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15857if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
15858 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
15859else
15860 cat
Matthias Klose3cef2a92012-03-14 23:39:33 +010015861fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015862 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015863_ACEOF
15864
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015865# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
15866# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Martin v. Löwiseba40652007-08-30 20:10:57 +000015867# trailing colons and then remove the whole line if VPATH becomes empty
15868# (actually we leave an empty line to preserve line numbers).
15869if test "x$srcdir" = x.; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015870 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
15871h
15872s///
15873s/^/:/
15874s/[ ]*$/:/
15875s/:\$(srcdir):/:/g
15876s/:\${srcdir}:/:/g
15877s/:@srcdir@:/:/g
15878s/^:*//
Martin v. Löwiseba40652007-08-30 20:10:57 +000015879s/:*$//
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015880x
15881s/\(=[ ]*\).*/\1/
15882G
15883s/\n//
Martin v. Löwiseba40652007-08-30 20:10:57 +000015884s/^[^=]*=[ ]*$//
15885}'
15886fi
15887
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015888cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015889fi # test -n "$CONFIG_FILES"
15890
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015891# Set up the scripts for CONFIG_HEADERS section.
15892# No need to generate them if there are no CONFIG_HEADERS.
15893# This happens for instance with `./config.status Makefile'.
15894if test -n "$CONFIG_HEADERS"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +010015895cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015896BEGIN {
15897_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000015898
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015899# Transform confdefs.h into an awk script `defines.awk', embedded as
15900# here-document in config.status, that substitutes the proper values into
15901# config.h.in to produce config.h.
15902
15903# Create a delimiter string that does not exist in confdefs.h, to ease
15904# handling of long lines.
15905ac_delim='%!_!# '
15906for ac_last_try in false false :; do
Matthias Klose3cef2a92012-03-14 23:39:33 +010015907 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
15908 if test -z "$ac_tt"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015909 break
15910 elif $ac_last_try; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015911 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015912 else
15913 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
15914 fi
15915done
15916
15917# For the awk script, D is an array of macro values keyed by name,
15918# likewise P contains macro parameters if any. Preserve backslash
15919# newline sequences.
15920
15921ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
15922sed -n '
15923s/.\{148\}/&'"$ac_delim"'/g
15924t rset
15925:rset
15926s/^[ ]*#[ ]*define[ ][ ]*/ /
15927t def
15928d
15929:def
15930s/\\$//
15931t bsnl
15932s/["\\]/\\&/g
15933s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15934D["\1"]=" \3"/p
15935s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
15936d
15937:bsnl
15938s/["\\]/\\&/g
15939s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15940D["\1"]=" \3\\\\\\n"\\/p
15941t cont
15942s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
15943t cont
15944d
15945:cont
15946n
15947s/.\{148\}/&'"$ac_delim"'/g
15948t clear
15949:clear
15950s/\\$//
15951t bsnlc
15952s/["\\]/\\&/g; s/^/"/; s/$/"/p
15953d
15954:bsnlc
15955s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
15956b cont
15957' <confdefs.h | sed '
15958s/'"$ac_delim"'/"\\\
15959"/g' >>$CONFIG_STATUS || ac_write_fail=1
15960
15961cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15962 for (key in D) D_is_set[key] = 1
15963 FS = ""
15964}
15965/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
15966 line = \$ 0
15967 split(line, arg, " ")
15968 if (arg[1] == "#") {
15969 defundef = arg[2]
15970 mac1 = arg[3]
15971 } else {
15972 defundef = substr(arg[1], 2)
15973 mac1 = arg[2]
15974 }
15975 split(mac1, mac2, "(") #)
15976 macro = mac2[1]
15977 prefix = substr(line, 1, index(line, defundef) - 1)
15978 if (D_is_set[macro]) {
15979 # Preserve the white space surrounding the "#".
15980 print prefix "define", macro P[macro] D[macro]
15981 next
15982 } else {
15983 # Replace #undef with comments. This is necessary, for example,
15984 # in the case of _POSIX_SOURCE, which is predefined and required
15985 # on some systems where configure will not decide to define it.
15986 if (defundef == "undef") {
15987 print "/*", prefix defundef, macro, "*/"
15988 next
15989 }
15990 }
15991}
15992{ print }
15993_ACAWK
15994_ACEOF
15995cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015996 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015997fi # test -n "$CONFIG_HEADERS"
15998
15999
16000eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
16001shift
16002for ac_tag
Martin v. Löwiseba40652007-08-30 20:10:57 +000016003do
16004 case $ac_tag in
16005 :[FHLC]) ac_mode=$ac_tag; continue;;
16006 esac
16007 case $ac_mode$ac_tag in
16008 :[FHL]*:*);;
Matthias Klose3cef2a92012-03-14 23:39:33 +010016009 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016010 :[FH]-) ac_tag=-:-;;
16011 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
16012 esac
16013 ac_save_IFS=$IFS
16014 IFS=:
16015 set x $ac_tag
16016 IFS=$ac_save_IFS
16017 shift
16018 ac_file=$1
16019 shift
16020
16021 case $ac_mode in
16022 :L) ac_source=$1;;
16023 :[FH])
16024 ac_file_inputs=
16025 for ac_f
16026 do
16027 case $ac_f in
Matthias Klose3cef2a92012-03-14 23:39:33 +010016028 -) ac_f="$ac_tmp/stdin";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016029 *) # Look for the file first in the build tree, then in the source tree
16030 # (if the path is not absolute). The absolute path cannot be DOS-style,
16031 # because $ac_f cannot contain `:'.
16032 test -f "$ac_f" ||
16033 case $ac_f in
16034 [\\/$]*) false;;
16035 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
16036 esac ||
Matthias Klose3cef2a92012-03-14 23:39:33 +010016037 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016038 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016039 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
16040 as_fn_append ac_file_inputs " '$ac_f'"
Martin v. Löwiseba40652007-08-30 20:10:57 +000016041 done
16042
16043 # Let's still pretend it is `configure' which instantiates (i.e., don't
16044 # use $as_me), people would be surprised to read:
16045 # /* config.h. Generated by config.status. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016046 configure_input='Generated from '`
16047 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
16048 `' by configure.'
Martin v. Löwiseba40652007-08-30 20:10:57 +000016049 if test x"$ac_file" != x-; then
16050 configure_input="$ac_file. $configure_input"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016051 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
16052$as_echo "$as_me: creating $ac_file" >&6;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000016053 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016054 # Neutralize special characters interpreted by sed in replacement strings.
16055 case $configure_input in #(
16056 *\&* | *\|* | *\\* )
16057 ac_sed_conf_input=`$as_echo "$configure_input" |
16058 sed 's/[\\\\&|]/\\\\&/g'`;; #(
16059 *) ac_sed_conf_input=$configure_input;;
16060 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000016061
16062 case $ac_tag in
Matthias Klose3cef2a92012-03-14 23:39:33 +010016063 *:-:* | *:-) cat >"$ac_tmp/stdin" \
16064 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016065 esac
16066 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016067 esac
16068
Martin v. Löwiseba40652007-08-30 20:10:57 +000016069 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000016070$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016071 X"$ac_file" : 'X\(//\)[^/]' \| \
16072 X"$ac_file" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000016073 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016074$as_echo X"$ac_file" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000016075 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16076 s//\1/
16077 q
16078 }
16079 /^X\(\/\/\)[^/].*/{
16080 s//\1/
16081 q
16082 }
16083 /^X\(\/\/\)$/{
16084 s//\1/
16085 q
16086 }
16087 /^X\(\/\).*/{
16088 s//\1/
16089 q
16090 }
16091 s/.*/./; q'`
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016092 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000016093 ac_builddir=.
16094
Martin v. Löwiseba40652007-08-30 20:10:57 +000016095case "$ac_dir" in
16096.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
16097*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016098 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000016099 # A ".." for each directory in $ac_dir_suffix.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016100 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000016101 case $ac_top_builddir_sub in
16102 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
16103 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
16104 esac ;;
16105esac
16106ac_abs_top_builddir=$ac_pwd
16107ac_abs_builddir=$ac_pwd$ac_dir_suffix
16108# for backward compatibility:
16109ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000016110
16111case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +000016112 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000016113 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +000016114 ac_top_srcdir=$ac_top_builddir_sub
16115 ac_abs_top_srcdir=$ac_pwd ;;
16116 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000016117 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016118 ac_top_srcdir=$srcdir
16119 ac_abs_top_srcdir=$srcdir ;;
16120 *) # Relative name.
16121 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
16122 ac_top_srcdir=$ac_top_build_prefix$srcdir
16123 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016124esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000016125ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000016126
Martin v. Löwis11437992002-04-12 09:54:03 +000016127
Martin v. Löwiseba40652007-08-30 20:10:57 +000016128 case $ac_mode in
16129 :F)
16130 #
16131 # CONFIG_FILE
16132 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016133
16134 case $INSTALL in
16135 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016136 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016137 esac
Trent Nelsonf6407a12012-08-30 14:56:13 +000016138 ac_MKDIR_P=$MKDIR_P
16139 case $MKDIR_P in
16140 [\\/$]* | ?:[\\/]* ) ;;
16141 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
16142 esac
Brett Cannon19fab762007-06-02 03:02:29 +000016143_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000016144
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016145cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000016146# If the template does not know about datarootdir, expand it.
16147# FIXME: This hack should be removed a few years after 2.60.
16148ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016149ac_sed_dataroot='
16150/datarootdir/ {
Martin v. Löwiseba40652007-08-30 20:10:57 +000016151 p
16152 q
16153}
16154/@datadir@/p
16155/@docdir@/p
16156/@infodir@/p
16157/@localedir@/p
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016158/@mandir@/p'
16159case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000016160*datarootdir*) ac_datarootdir_seen=yes;;
16161*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016162 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
16163$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000016164_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016165cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000016166 ac_datarootdir_hack='
16167 s&@datadir@&$datadir&g
16168 s&@docdir@&$docdir&g
16169 s&@infodir@&$infodir&g
16170 s&@localedir@&$localedir&g
16171 s&@mandir@&$mandir&g
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016172 s&\\\${datarootdir}&$datarootdir&g' ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016173esac
16174_ACEOF
16175
16176# Neutralize VPATH when `$srcdir' = `.'.
16177# Shell code in configure.ac might set extrasub.
16178# FIXME: do we really want to maintain this feature?
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016179cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16180ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000016181$extrasub
16182_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016183cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016184:t
16185/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016186s|@configure_input@|$ac_sed_conf_input|;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000016187s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016188s&@top_build_prefix@&$ac_top_build_prefix&;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000016189s&@srcdir@&$ac_srcdir&;t t
16190s&@abs_srcdir@&$ac_abs_srcdir&;t t
16191s&@top_srcdir@&$ac_top_srcdir&;t t
16192s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
16193s&@builddir@&$ac_builddir&;t t
16194s&@abs_builddir@&$ac_abs_builddir&;t t
16195s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
16196s&@INSTALL@&$ac_INSTALL&;t t
Trent Nelsonf6407a12012-08-30 14:56:13 +000016197s&@MKDIR_P@&$ac_MKDIR_P&;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000016198$ac_datarootdir_hack
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016199"
Matthias Klose3cef2a92012-03-14 23:39:33 +010016200eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
16201 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016202
Martin v. Löwiseba40652007-08-30 20:10:57 +000016203test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Matthias Klose3cef2a92012-03-14 23:39:33 +010016204 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
16205 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
16206 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016207 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016208which seems to be undefined. Please make sure it is defined" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016209$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016210which seems to be undefined. Please make sure it is defined" >&2;}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016211
Matthias Klose3cef2a92012-03-14 23:39:33 +010016212 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000016213 case $ac_file in
Matthias Klose3cef2a92012-03-14 23:39:33 +010016214 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
16215 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016216 esac \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016217 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016218 ;;
16219 :H)
16220 #
16221 # CONFIG_HEADER
16222 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016223 if test x"$ac_file" != x-; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016224 {
16225 $as_echo "/* $configure_input */" \
Matthias Klose3cef2a92012-03-14 23:39:33 +010016226 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
16227 } >"$ac_tmp/config.h" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016228 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Matthias Klose3cef2a92012-03-14 23:39:33 +010016229 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016230 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
16231$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016232 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016233 rm -f "$ac_file"
Matthias Klose3cef2a92012-03-14 23:39:33 +010016234 mv "$ac_tmp/config.h" "$ac_file" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016235 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016236 fi
16237 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016238 $as_echo "/* $configure_input */" \
Matthias Klose3cef2a92012-03-14 23:39:33 +010016239 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016240 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016241 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016242 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000016243
Martin v. Löwiseba40652007-08-30 20:10:57 +000016244
16245 esac
16246
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000016247
16248 case $ac_file$ac_mode in
16249 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
16250
16251 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000016252done # for ac_tag
16253
Guido van Rossum627b2d71993-12-24 10:39:16 +000016254
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016255as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000016256_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016257ac_clean_files=$ac_clean_files_save
16258
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016259test $ac_write_fail = 0 ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016260 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016261
Martin v. Löwis11437992002-04-12 09:54:03 +000016262
16263# configure is writing to config.log, and then calls config.status.
16264# config.status does its own redirection, appending to config.log.
16265# Unfortunately, on DOS this fails, as config.log is still kept open
16266# by configure, so config.status won't be able to write to it; its
16267# output is simply discarded. So we exec the FD to /dev/null,
16268# effectively closing config.log, so it can be properly (re)opened and
16269# appended to by config.status. When coming back to configure, we
16270# need to make the FD available again.
16271if test "$no_create" != yes; then
16272 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000016273 ac_config_status_args=
16274 test "$silent" = yes &&
16275 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000016276 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000016277 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000016278 exec 5>>config.log
16279 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16280 # would make configure fail if this is the last instruction.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016281 $ac_cs_success || as_fn_exit 1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016282fi
16283if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
16284 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
16285$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016286fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000016287
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016288
Martin v. Löwisf7afe952006-04-14 15:16:15 +000016289echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016290if test ! -f Modules/Setup
16291then
16292 cp $srcdir/Modules/Setup.dist Modules/Setup
16293fi
16294
Martin v. Löwisf7afe952006-04-14 15:16:15 +000016295echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016296if test ! -f Modules/Setup.local
16297then
16298 echo "# Edit this file for local setup changes" >Modules/Setup.local
16299fi
16300
16301echo "creating Makefile"
16302$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
16303 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000016304 Modules/Setup.local Modules/Setup
Skip Montanaro89e975f2007-08-22 19:05:21 +000016305
16306case $ac_sys_system in
16307BeOS)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016308 { $as_echo "$as_me:${as_lineno-$LINENO}: 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 " >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016313$as_echo "$as_me: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000016314
16315 Support for BeOS is deprecated as of Python 2.6.
16316 See PEP 11 for the gory details.
16317 " >&2;}
16318 ;;
16319*) ;;
16320esac
16321
Neil Schemenauerc761fc82001-02-19 04:50:49 +000016322mv config.c Modules