blob: 960ee0a3fd3261264dbf65b3a71fdcc985342335 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Matthias Klose3cef2a92012-03-14 23:39:33 +01002# From configure.ac Revision.
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004# Generated by GNU Autoconf 2.69 for python 2.7.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Georg Brandl464432d2009-05-20 18:24:08 +00006# Report bugs to <http://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00007#
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008#
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010#
11#
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012# This configure script is free software; the Free Software Foundation
13# gives unlimited permission to copy, distribute and modify it.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014## -------------------- ##
15## M4sh Initialization. ##
16## -------------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +000017
Martin v. Löwiseba40652007-08-30 20:10:57 +000018# Be more Bourne compatible
19DUALCASE=1; export DUALCASE # for MKS sh
Matthias Klosea0bea5d2010-05-08 10:00:28 +000020if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000021 emulate sh
22 NULLCMD=:
Matthias Klosea0bea5d2010-05-08 10:00:28 +000023 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000024 # is contrary to our usage. Disable this feature.
25 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000026 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000027else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000028 case `(set -o) 2>/dev/null` in #(
29 *posix*) :
30 set -o posix ;; #(
31 *) :
32 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000033esac
Martin v. Löwis11437992002-04-12 09:54:03 +000034fi
35
Skip Montanaro6dead952003-09-25 14:50:04 +000036
Matthias Klosea0bea5d2010-05-08 10:00:28 +000037as_nl='
38'
39export as_nl
40# Printing a long string crashes Solaris 7 /usr/bin/printf.
41as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
42as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
43as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
44# Prefer a ksh shell builtin over an external printf program on Solaris,
45# but without wasting forks for bash or zsh.
46if test -z "$BASH_VERSION$ZSH_VERSION" \
47 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
48 as_echo='print -r --'
49 as_echo_n='print -rn --'
50elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
51 as_echo='printf %s\n'
52 as_echo_n='printf %s'
53else
54 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
55 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
56 as_echo_n='/usr/ucb/echo -n'
57 else
58 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
59 as_echo_n_body='eval
60 arg=$1;
61 case $arg in #(
62 *"$as_nl"*)
63 expr "X$arg" : "X\\(.*\\)$as_nl";
64 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
65 esac;
66 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
67 '
68 export as_echo_n_body
69 as_echo_n='sh -c $as_echo_n_body as_echo'
70 fi
71 export as_echo_body
72 as_echo='sh -c $as_echo_body as_echo'
73fi
Martin v. Löwis11437992002-04-12 09:54:03 +000074
75# The user is always right.
76if test "${PATH_SEPARATOR+set}" != set; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000077 PATH_SEPARATOR=:
78 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
79 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
80 PATH_SEPARATOR=';'
81 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000082fi
Martin v. Löwis11437992002-04-12 09:54:03 +000083
Martin v. Löwiseba40652007-08-30 20:10:57 +000084
85# IFS
86# We need space, tab and new line, in precisely that order. Quoting is
87# there to prevent editors from complaining about space-tab.
88# (If _AS_PATH_WALK were called with IFS unset, it would disable word
89# splitting by setting IFS to empty value.)
Martin v. Löwiseba40652007-08-30 20:10:57 +000090IFS=" "" $as_nl"
91
92# Find who we are. Look in the path if we contain no directory separator.
Matthias Klose3cef2a92012-03-14 23:39:33 +010093as_myself=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000094case $0 in #((
Martin v. Löwiseba40652007-08-30 20:10:57 +000095 *[\\/]* ) as_myself=$0 ;;
96 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000097for as_dir in $PATH
98do
99 IFS=$as_save_IFS
100 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000101 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
102 done
Martin v. Löwiseba40652007-08-30 20:10:57 +0000103IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +0000104
Martin v. Löwiseba40652007-08-30 20:10:57 +0000105 ;;
106esac
107# We did not find ourselves, most probably we were run as `sh COMMAND'
108# in which case we are not to be found in the path.
109if test "x$as_myself" = x; then
110 as_myself=$0
111fi
112if test ! -f "$as_myself"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000113 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
114 exit 1
Martin v. Löwiseba40652007-08-30 20:10:57 +0000115fi
116
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000117# Unset variables that we do not need and which cause bugs (e.g. in
118# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
119# suppresses any "Segmentation fault" message there. '((' could
120# trigger a bug in pdksh 5.2.14.
121for as_var in BASH_ENV ENV MAIL MAILPATH
122do eval test x\${$as_var+set} = xset \
123 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Martin v. Löwiseba40652007-08-30 20:10:57 +0000124done
125PS1='$ '
126PS2='> '
127PS4='+ '
128
129# NLS nuisances.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000130LC_ALL=C
131export LC_ALL
132LANGUAGE=C
133export LANGUAGE
Martin v. Löwiseba40652007-08-30 20:10:57 +0000134
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000135# CDPATH.
136(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
137
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100138# Use a proper internal environment variable to ensure we don't fall
139 # into an infinite loop, continuously re-executing ourselves.
140 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
141 _as_can_reexec=no; export _as_can_reexec;
142 # We cannot yet assume a decent shell, so we have to provide a
143# neutralization value for shells without unset; and this also
144# works around shells that cannot unset nonexistent variables.
145# Preserve -v and -x to the replacement shell.
146BASH_ENV=/dev/null
147ENV=/dev/null
148(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
149case $- in # ((((
150 *v*x* | *x*v* ) as_opts=-vx ;;
151 *v* ) as_opts=-v ;;
152 *x* ) as_opts=-x ;;
153 * ) as_opts= ;;
154esac
155exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
156# Admittedly, this is quite paranoid, since all the known shells bail
157# out after a failed `exec'.
158$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
159as_fn_exit 255
160 fi
161 # We don't want this to propagate to other subprocesses.
162 { _as_can_reexec=; unset _as_can_reexec;}
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000163if test "x$CONFIG_SHELL" = x; then
164 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
165 emulate sh
166 NULLCMD=:
167 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
168 # is contrary to our usage. Disable this feature.
169 alias -g '\${1+\"\$@\"}'='\"\$@\"'
170 setopt NO_GLOB_SUBST
171else
172 case \`(set -o) 2>/dev/null\` in #(
173 *posix*) :
174 set -o posix ;; #(
175 *) :
176 ;;
177esac
178fi
179"
180 as_required="as_fn_return () { (exit \$1); }
181as_fn_success () { as_fn_return 0; }
182as_fn_failure () { as_fn_return 1; }
183as_fn_ret_success () { return 0; }
184as_fn_ret_failure () { return 1; }
185
186exitcode=0
187as_fn_success || { exitcode=1; echo as_fn_success failed.; }
188as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
189as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
190as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
191if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
192
193else
194 exitcode=1; echo positional parameters were not saved.
195fi
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100196test x\$exitcode = x0 || exit 1
197test -x / || exit 1"
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000198 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
199 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
200 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
201 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
202test \$(( 1 + 1 )) = 2 || exit 1"
203 if (eval "$as_required") 2>/dev/null; then :
204 as_have_required=yes
205else
206 as_have_required=no
207fi
208 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
209
210else
211 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
212as_found=false
213for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
214do
215 IFS=$as_save_IFS
216 test -z "$as_dir" && as_dir=.
217 as_found=:
218 case $as_dir in #(
219 /*)
220 for as_base in sh bash ksh sh5; do
221 # Try only shells that exist, to save several forks.
222 as_shell=$as_dir/$as_base
223 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
224 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
225 CONFIG_SHELL=$as_shell as_have_required=yes
226 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
227 break 2
228fi
229fi
230 done;;
231 esac
232 as_found=false
233done
234$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
235 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
236 CONFIG_SHELL=$SHELL as_have_required=yes
237fi; }
238IFS=$as_save_IFS
239
240
241 if test "x$CONFIG_SHELL" != x; then :
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100242 export CONFIG_SHELL
243 # We cannot yet assume a decent shell, so we have to provide a
244# neutralization value for shells without unset; and this also
245# works around shells that cannot unset nonexistent variables.
246# Preserve -v and -x to the replacement shell.
247BASH_ENV=/dev/null
248ENV=/dev/null
249(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
250case $- in # ((((
251 *v*x* | *x*v* ) as_opts=-vx ;;
252 *v* ) as_opts=-v ;;
253 *x* ) as_opts=-x ;;
254 * ) as_opts= ;;
255esac
256exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
257# Admittedly, this is quite paranoid, since all the known shells bail
258# out after a failed `exec'.
259$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
260exit 255
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000261fi
262
263 if test x$as_have_required = xno; then :
264 $as_echo "$0: This script requires a shell more modern than all"
265 $as_echo "$0: the shells that I found on your system."
266 if test x${ZSH_VERSION+set} = xset ; then
267 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
268 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
269 else
270 $as_echo "$0: Please tell bug-autoconf@gnu.org and
271$0: http://bugs.python.org/ about your system, including
272$0: any error possibly output before this message. Then
273$0: install a modern shell, or manually run the script
274$0: under such a shell if you do have one."
275 fi
276 exit 1
277fi
278fi
279fi
280SHELL=${CONFIG_SHELL-/bin/sh}
281export SHELL
282# Unset more variables known to interfere with behavior of common tools.
283CLICOLOR_FORCE= GREP_OPTIONS=
284unset CLICOLOR_FORCE GREP_OPTIONS
285
286## --------------------- ##
287## M4sh Shell Functions. ##
288## --------------------- ##
289# as_fn_unset VAR
290# ---------------
291# Portably unset VAR.
292as_fn_unset ()
293{
294 { eval $1=; unset $1;}
295}
296as_unset=as_fn_unset
297
298# as_fn_set_status STATUS
299# -----------------------
300# Set $? to STATUS, without forking.
301as_fn_set_status ()
302{
303 return $1
304} # as_fn_set_status
305
306# as_fn_exit STATUS
307# -----------------
308# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
309as_fn_exit ()
310{
311 set +e
312 as_fn_set_status $1
313 exit $1
314} # as_fn_exit
315
316# as_fn_mkdir_p
317# -------------
318# Create "$as_dir" as a directory, including parents if necessary.
319as_fn_mkdir_p ()
320{
321
322 case $as_dir in #(
323 -*) as_dir=./$as_dir;;
324 esac
325 test -d "$as_dir" || eval $as_mkdir_p || {
326 as_dirs=
327 while :; do
328 case $as_dir in #(
329 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
330 *) as_qdir=$as_dir;;
331 esac
332 as_dirs="'$as_qdir' $as_dirs"
333 as_dir=`$as_dirname -- "$as_dir" ||
334$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
335 X"$as_dir" : 'X\(//\)[^/]' \| \
336 X"$as_dir" : 'X\(//\)$' \| \
337 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
338$as_echo X"$as_dir" |
339 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
340 s//\1/
341 q
342 }
343 /^X\(\/\/\)[^/].*/{
344 s//\1/
345 q
346 }
347 /^X\(\/\/\)$/{
348 s//\1/
349 q
350 }
351 /^X\(\/\).*/{
352 s//\1/
353 q
354 }
355 s/.*/./; q'`
356 test -d "$as_dir" && break
357 done
358 test -z "$as_dirs" || eval "mkdir $as_dirs"
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000359 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000360
361
362} # as_fn_mkdir_p
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100363
364# as_fn_executable_p FILE
365# -----------------------
366# Test if FILE is an executable regular file.
367as_fn_executable_p ()
368{
369 test -f "$1" && test -x "$1"
370} # as_fn_executable_p
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000371# as_fn_append VAR VALUE
372# ----------------------
373# Append the text in VALUE to the end of the definition contained in VAR. Take
374# advantage of any shell optimizations that allow amortized linear growth over
375# repeated appends, instead of the typical quadratic growth present in naive
376# implementations.
377if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
378 eval 'as_fn_append ()
379 {
380 eval $1+=\$2
381 }'
382else
383 as_fn_append ()
384 {
385 eval $1=\$$1\$2
386 }
387fi # as_fn_append
388
389# as_fn_arith ARG...
390# ------------------
391# Perform arithmetic evaluation on the ARGs, and store the result in the
392# global $as_val. Take advantage of shells that can avoid forks. The arguments
393# must be portable across $(()) and expr.
394if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
395 eval 'as_fn_arith ()
396 {
397 as_val=$(( $* ))
398 }'
399else
400 as_fn_arith ()
401 {
402 as_val=`expr "$@" || test $? -eq 1`
403 }
404fi # as_fn_arith
405
406
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000407# as_fn_error STATUS ERROR [LINENO LOG_FD]
408# ----------------------------------------
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000409# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
410# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000411# script with STATUS, using 1 if that was 0.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000412as_fn_error ()
413{
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000414 as_status=$1; test $as_status -eq 0 && as_status=1
415 if test "$4"; then
416 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
417 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000418 fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000419 $as_echo "$as_me: error: $2" >&2
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000420 as_fn_exit $as_status
421} # as_fn_error
422
Martin v. Löwiseba40652007-08-30 20:10:57 +0000423if expr a : '\(a\)' >/dev/null 2>&1 &&
424 test "X`expr 00001 : '.*\(...\)'`" = X001; then
425 as_expr=expr
426else
427 as_expr=false
428fi
429
430if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
431 as_basename=basename
432else
433 as_basename=false
434fi
435
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000436if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
437 as_dirname=dirname
438else
439 as_dirname=false
440fi
Martin v. Löwiseba40652007-08-30 20:10:57 +0000441
Martin v. Löwiseba40652007-08-30 20:10:57 +0000442as_me=`$as_basename -- "$0" ||
443$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
444 X"$0" : 'X\(//\)$' \| \
445 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000446$as_echo X/"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +0000447 sed '/^.*\/\([^/][^/]*\)\/*$/{
448 s//\1/
449 q
450 }
451 /^X\/\(\/\/\)$/{
452 s//\1/
453 q
454 }
455 /^X\/\(\/\).*/{
456 s//\1/
457 q
458 }
459 s/.*/./; q'`
460
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000461# Avoid depending upon Character Ranges.
462as_cr_letters='abcdefghijklmnopqrstuvwxyz'
463as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
464as_cr_Letters=$as_cr_letters$as_cr_LETTERS
465as_cr_digits='0123456789'
466as_cr_alnum=$as_cr_Letters$as_cr_digits
Martin v. Löwiseba40652007-08-30 20:10:57 +0000467
468
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000469 as_lineno_1=$LINENO as_lineno_1a=$LINENO
470 as_lineno_2=$LINENO as_lineno_2a=$LINENO
471 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
472 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
473 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
Martin v. Löwiseba40652007-08-30 20:10:57 +0000474 sed -n '
475 p
476 /[$]LINENO/=
477 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000478 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +0000479 s/[$]LINENO.*/&-/
480 t lineno
481 b
482 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000483 N
Martin v. Löwiseba40652007-08-30 20:10:57 +0000484 :loop
485 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000486 t loop
Martin v. Löwiseba40652007-08-30 20:10:57 +0000487 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000488 ' >$as_me.lineno &&
Martin v. Löwiseba40652007-08-30 20:10:57 +0000489 chmod +x "$as_me.lineno" ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000490 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
Martin v. Löwis11437992002-04-12 09:54:03 +0000491
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100492 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
493 # already done that, so ensure we don't try to do so again and fall
494 # in an infinite loop. This has already happened in practice.
495 _as_can_reexec=no; export _as_can_reexec
Martin v. Löwis11437992002-04-12 09:54:03 +0000496 # Don't try to exec as it changes $[0], causing all sort of problems
497 # (the dirname of $[0] is not the place where we might find the
Martin v. Löwiseba40652007-08-30 20:10:57 +0000498 # original and so on. Autoconf is especially sensitive to this).
499 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000500 # Exit status is that of the last command.
501 exit
502}
503
Martin v. Löwiseba40652007-08-30 20:10:57 +0000504ECHO_C= ECHO_N= ECHO_T=
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000505case `echo -n x` in #(((((
Martin v. Löwiseba40652007-08-30 20:10:57 +0000506-n*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000507 case `echo 'xy\c'` in
Martin v. Löwiseba40652007-08-30 20:10:57 +0000508 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000509 xy) ECHO_C='\c';;
510 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
511 ECHO_T=' ';;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000512 esac;;
513*)
514 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000515esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000516
Martin v. Löwis11437992002-04-12 09:54:03 +0000517rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +0000518if test -d conf$$.dir; then
519 rm -f conf$$.dir/conf$$.file
520else
521 rm -f conf$$.dir
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000522 mkdir conf$$.dir 2>/dev/null
Martin v. Löwiseba40652007-08-30 20:10:57 +0000523fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000524if (echo >conf$$.file) 2>/dev/null; then
525 if ln -s conf$$.file conf$$ 2>/dev/null; then
526 as_ln_s='ln -s'
527 # ... but there are two gotchas:
528 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
529 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100530 # In both cases, we have to default to `cp -pR'.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000531 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100532 as_ln_s='cp -pR'
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000533 elif ln conf$$.file conf$$ 2>/dev/null; then
534 as_ln_s=ln
535 else
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100536 as_ln_s='cp -pR'
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000537 fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000538else
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100539 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +0000540fi
Martin v. Löwiseba40652007-08-30 20:10:57 +0000541rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
542rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000543
Skip Montanaro6dead952003-09-25 14:50:04 +0000544if mkdir -p . 2>/dev/null; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000545 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +0000546else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000547 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000548 as_mkdir_p=false
549fi
550
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100551as_test_x='test -x'
552as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +0000553
554# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000555as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000556
557# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000558as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000559
560
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000561test -n "$DJDIR" || exec 7<&0 </dev/null
562exec 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000563
564# Name of the host.
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000565# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
Martin v. Löwis11437992002-04-12 09:54:03 +0000566# so uname gets run too.
567ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
568
Martin v. Löwis11437992002-04-12 09:54:03 +0000569#
570# Initializations.
571#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000572ac_default_prefix=/usr/local
Martin v. Löwiseba40652007-08-30 20:10:57 +0000573ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000574ac_config_libobj_dir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000575LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000576cross_compiling=no
577subdirs=
578MFLAGS=
579MAKEFLAGS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000580
Martin v. Löwis11437992002-04-12 09:54:03 +0000581# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000582PACKAGE_NAME='python'
583PACKAGE_TARNAME='python'
Martin v. Löwis174440b2008-10-03 08:59:41 +0000584PACKAGE_VERSION='2.7'
585PACKAGE_STRING='python 2.7'
Georg Brandl464432d2009-05-20 18:24:08 +0000586PACKAGE_BUGREPORT='http://bugs.python.org/'
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000587PACKAGE_URL=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000588
589ac_unique_file="Include/object.h"
590# Factoring default headers for most tests.
591ac_includes_default="\
592#include <stdio.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +0000593#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000594# include <sys/types.h>
595#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000596#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000597# include <sys/stat.h>
598#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000599#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000600# include <stdlib.h>
601# include <stddef.h>
602#else
Martin v. Löwiseba40652007-08-30 20:10:57 +0000603# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000604# include <stdlib.h>
605# endif
606#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000607#ifdef HAVE_STRING_H
608# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000609# include <memory.h>
610# endif
611# include <string.h>
612#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000613#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000614# include <strings.h>
615#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000616#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000617# include <inttypes.h>
Martin v. Löwis11437992002-04-12 09:54:03 +0000618#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000619#ifdef HAVE_STDINT_H
620# include <stdint.h>
621#endif
622#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000623# include <unistd.h>
624#endif"
625
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000626ac_subst_vars='LTLIBOBJS
Ned Deily3f1d0b32014-11-20 02:11:03 -0800627ENSUREPIP
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000628SRCDIRS
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000629THREADHEADERS
630UNICODE_OBJS
631LIBC
632LIBM
633HAVE_GETHOSTBYNAME
634HAVE_GETHOSTBYNAME_R
635HAVE_GETHOSTBYNAME_R_3_ARG
636HAVE_GETHOSTBYNAME_R_5_ARG
637HAVE_GETHOSTBYNAME_R_6_ARG
638LIBOBJS
639TRUE
640MACHDEP_OBJS
641DYNLOADFILE
642DLINCLDIR
643THREADOBJ
644LDLAST
645USE_THREAD_MODULE
646SIGNAL_OBJS
647USE_SIGNAL_MODULE
Ned Deilya2a9f572013-10-25 00:30:10 -0700648TCLTK_LIBS
649TCLTK_INCLUDES
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000650LIBFFI_INCLUDEDIR
Benjamin Peterson64e8f6e2014-12-15 00:00:23 -0500651PKG_CONFIG_LIBDIR
652PKG_CONFIG_PATH
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000653PKG_CONFIG
654SHLIBS
655CFLAGSFORSHARED
656LINKFORSHARED
657CCSHARED
658BLDSHARED
659LDCXXSHARED
660LDSHARED
661SO
662LIBTOOL_CRUFT
663OTHER_LIBTOOL_OPT
Brett Cannon4ff151a2015-09-18 15:09:42 -0700664LLVM_PROF_FOUND
665LLVM_PROF_ERR
666LLVM_PROF_FILE
667LLVM_PROF_MERGER
668PGO_PROF_USE_FLAG
669PGO_PROF_GEN_FLAG
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000670UNIVERSAL_ARCH_FLAGS
671BASECFLAGS
672OPT
673LN
Trent Nelsonf6407a12012-08-30 14:56:13 +0000674MKDIR_P
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000675INSTALL_DATA
676INSTALL_SCRIPT
677INSTALL_PROGRAM
Georg Brandl3a5508e2011-03-06 10:42:21 +0100678HAS_HG
679HGBRANCH
680HGTAG
681HGVERSION
Trent Nelsond86ceec2012-10-16 09:42:45 -0400682BASECPPFLAGS
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000683SVNVERSION
684ARFLAGS
doko@python.orgd65e2ba2013-01-31 23:52:03 +0100685ac_ct_AR
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000686AR
687RANLIB
688GNULD
689LINKCC
690RUNSHARED
691INSTSONAME
692LDLIBRARYDIR
693BLDLIBRARY
694DLLLIBRARY
695LDLIBRARY
696LIBRARY
697BUILDEXEEXT
698EGREP
699GREP
700CPP
doko@python.org4e63fbe2013-01-25 13:08:27 +0100701MULTIARCH
doko@python.orgd65e2ba2013-01-31 23:52:03 +0100702ac_ct_CXX
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000703MAINCC
704CXX
705OBJEXT
706EXEEXT
707ac_ct_CC
708CPPFLAGS
709LDFLAGS
710CFLAGS
711CC
712EXPORT_MACOSX_DEPLOYMENT_TARGET
713CONFIGURE_MACOSX_DEPLOYMENT_TARGET
714EXTRAMACHDEPPATH
715EXTRAPLATDIR
doko@ubuntu.coma50b0de2015-04-13 21:55:59 +0200716PLATDIR
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000717SGI_ABI
doko@python.orgd65e2ba2013-01-31 23:52:03 +0100718_PYTHON_HOST_PLATFORM
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000719MACHDEP
720FRAMEWORKINSTALLAPPSPREFIX
721FRAMEWORKUNIXTOOLSPREFIX
722FRAMEWORKALTINSTALLLAST
723FRAMEWORKALTINSTALLFIRST
724FRAMEWORKINSTALLLAST
725FRAMEWORKINSTALLFIRST
726PYTHONFRAMEWORKINSTALLDIR
727PYTHONFRAMEWORKPREFIX
728PYTHONFRAMEWORKDIR
729PYTHONFRAMEWORKIDENTIFIER
730PYTHONFRAMEWORK
731LIPO_32BIT_FLAGS
732ARCH_RUN_32BIT
733UNIVERSALSDK
734CONFIG_ARGS
735SOVERSION
736VERSION
doko@python.orgd65e2ba2013-01-31 23:52:03 +0100737PYTHON_FOR_BUILD
738host_os
739host_vendor
740host_cpu
741host
742build_os
743build_vendor
744build_cpu
745build
Martin Pantere9ee3172016-04-23 00:58:44 +0000746cross_compiling
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000747target_alias
748host_alias
749build_alias
750LIBS
751ECHO_T
752ECHO_N
753ECHO_C
754DEFS
755mandir
756localedir
757libdir
758psdir
759pdfdir
760dvidir
761htmldir
762infodir
763docdir
764oldincludedir
765includedir
766localstatedir
767sharedstatedir
768sysconfdir
769datadir
770datarootdir
771libexecdir
772sbindir
773bindir
774program_transform_name
775prefix
776exec_prefix
777PACKAGE_URL
778PACKAGE_BUGREPORT
779PACKAGE_STRING
780PACKAGE_VERSION
781PACKAGE_TARNAME
782PACKAGE_NAME
783PATH_SEPARATOR
784SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000785ac_subst_files=''
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000786ac_user_opts='
787enable_option_checking
788enable_universalsdk
789with_universal_archs
790with_framework_name
791enable_framework
792with_gcc
Zachary Ware6ed42ea2015-12-21 11:43:03 -0600793with_icc
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000794with_cxx_main
795with_suffix
796enable_shared
797enable_profiling
798with_pydebug
799enable_toolbox_glue
800with_libs
801with_system_expat
802with_system_ffi
Ned Deilya2a9f572013-10-25 00:30:10 -0700803with_tcltk_includes
804with_tcltk_libs
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000805with_dbmliborder
806with_signal_module
807with_dec_threads
808with_threads
809with_thread
810with_pth
811enable_ipv6
812with_doc_strings
813with_tsc
814with_pymalloc
815with_valgrind
816with_wctype_functions
817with_fpectl
818with_libm
819with_libc
820enable_big_digits
821enable_unicode
Benjamin Peterson2c992a02015-05-28 12:45:31 -0500822with_computed_gotos
Ned Deily3f1d0b32014-11-20 02:11:03 -0800823with_ensurepip
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000824'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000825 ac_precious_vars='build_alias
826host_alias
827target_alias
828CC
829CFLAGS
830LDFLAGS
831LIBS
832CPPFLAGS
Benjamin Peterson64e8f6e2014-12-15 00:00:23 -0500833CPP
834PKG_CONFIG
835PKG_CONFIG_PATH
836PKG_CONFIG_LIBDIR'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000837
Guido van Rossum627b2d71993-12-24 10:39:16 +0000838
Guido van Rossum7f43da71994-08-01 12:15:30 +0000839# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000840ac_init_help=
841ac_init_version=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000842ac_unrecognized_opts=
843ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000844# The variables have the same names as the options, with
845# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000846cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000847exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000848no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000849no_recursion=
850prefix=NONE
851program_prefix=NONE
852program_suffix=NONE
853program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000854silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000855site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000856srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000857verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000858x_includes=NONE
859x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000860
861# Installation directory options.
862# These are left unexpanded so users can "make install exec_prefix=/foo"
863# and all the variables that are supposed to be based on exec_prefix
864# by default will actually change.
865# Use braces instead of parens because sh, perl, etc. also accept them.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000866# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000867bindir='${exec_prefix}/bin'
868sbindir='${exec_prefix}/sbin'
869libexecdir='${exec_prefix}/libexec'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000870datarootdir='${prefix}/share'
871datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000872sysconfdir='${prefix}/etc'
873sharedstatedir='${prefix}/com'
874localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000875includedir='${prefix}/include'
876oldincludedir='/usr/include'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000877docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
878infodir='${datarootdir}/info'
879htmldir='${docdir}'
880dvidir='${docdir}'
881pdfdir='${docdir}'
882psdir='${docdir}'
883libdir='${exec_prefix}/lib'
884localedir='${datarootdir}/locale'
885mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000886
Guido van Rossum7f43da71994-08-01 12:15:30 +0000887ac_prev=
Martin v. Löwiseba40652007-08-30 20:10:57 +0000888ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000889for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000890do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000891 # If the previous option needs an argument, assign it.
892 if test -n "$ac_prev"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +0000893 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000894 ac_prev=
895 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000896 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000897
Martin v. Löwiseba40652007-08-30 20:10:57 +0000898 case $ac_option in
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000899 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
900 *=) ac_optarg= ;;
901 *) ac_optarg=yes ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000902 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000903
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000904 # Accept the important Cygnus configure options, so we can diagnose typos.
905
Martin v. Löwiseba40652007-08-30 20:10:57 +0000906 case $ac_dashdash$ac_option in
907 --)
908 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000909
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000910 -bindir | --bindir | --bindi | --bind | --bin | --bi)
911 ac_prev=bindir ;;
912 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000913 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000914
915 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000916 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000917 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000918 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000919
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000920 -cache-file | --cache-file | --cache-fil | --cache-fi \
921 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
922 ac_prev=cache_file ;;
923 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
924 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000925 cache_file=$ac_optarg ;;
926
927 --config-cache | -C)
928 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000929
Martin v. Löwiseba40652007-08-30 20:10:57 +0000930 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000931 ac_prev=datadir ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000932 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000933 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000934
Martin v. Löwiseba40652007-08-30 20:10:57 +0000935 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
936 | --dataroo | --dataro | --datar)
937 ac_prev=datarootdir ;;
938 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
939 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
940 datarootdir=$ac_optarg ;;
941
Guido van Rossum7f43da71994-08-01 12:15:30 +0000942 -disable-* | --disable-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000943 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000944 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000945 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000946 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000947 ac_useropt_orig=$ac_useropt
948 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
949 case $ac_user_opts in
950 *"
951"enable_$ac_useropt"
952"*) ;;
953 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
954 ac_unrecognized_sep=', ';;
955 esac
956 eval enable_$ac_useropt=no ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000957
958 -docdir | --docdir | --docdi | --doc | --do)
959 ac_prev=docdir ;;
960 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
961 docdir=$ac_optarg ;;
962
963 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
964 ac_prev=dvidir ;;
965 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
966 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000967
968 -enable-* | --enable-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000969 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000970 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000971 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000972 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000973 ac_useropt_orig=$ac_useropt
974 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
975 case $ac_user_opts in
976 *"
977"enable_$ac_useropt"
978"*) ;;
979 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
980 ac_unrecognized_sep=', ';;
981 esac
982 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000983
Guido van Rossum7f43da71994-08-01 12:15:30 +0000984 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
985 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
986 | --exec | --exe | --ex)
987 ac_prev=exec_prefix ;;
988 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
989 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
990 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000991 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000992
993 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000994 # Obsolete; use --with-gas.
995 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000996
Martin v. Löwis11437992002-04-12 09:54:03 +0000997 -help | --help | --hel | --he | -h)
998 ac_init_help=long ;;
999 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1000 ac_init_help=recursive ;;
1001 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1002 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001003
1004 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001005 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001006 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001007 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001008
Martin v. Löwiseba40652007-08-30 20:10:57 +00001009 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1010 ac_prev=htmldir ;;
1011 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1012 | --ht=*)
1013 htmldir=$ac_optarg ;;
1014
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001015 -includedir | --includedir | --includedi | --included | --include \
1016 | --includ | --inclu | --incl | --inc)
1017 ac_prev=includedir ;;
1018 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1019 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001020 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001021
1022 -infodir | --infodir | --infodi | --infod | --info | --inf)
1023 ac_prev=infodir ;;
1024 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001025 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001026
1027 -libdir | --libdir | --libdi | --libd)
1028 ac_prev=libdir ;;
1029 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001030 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001031
1032 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1033 | --libexe | --libex | --libe)
1034 ac_prev=libexecdir ;;
1035 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1036 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001037 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001038
Martin v. Löwiseba40652007-08-30 20:10:57 +00001039 -localedir | --localedir | --localedi | --localed | --locale)
1040 ac_prev=localedir ;;
1041 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1042 localedir=$ac_optarg ;;
1043
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001044 -localstatedir | --localstatedir | --localstatedi | --localstated \
Martin v. Löwiseba40652007-08-30 20:10:57 +00001045 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001046 ac_prev=localstatedir ;;
1047 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Martin v. Löwiseba40652007-08-30 20:10:57 +00001048 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001049 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001050
1051 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1052 ac_prev=mandir ;;
1053 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001054 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001055
Guido van Rossum7f43da71994-08-01 12:15:30 +00001056 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001057 # Obsolete; use --without-fp.
1058 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001059
1060 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001061 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001062 no_create=yes ;;
1063
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001064 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1065 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1066 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001067
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001068 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1069 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1070 | --oldin | --oldi | --old | --ol | --o)
1071 ac_prev=oldincludedir ;;
1072 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1073 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1074 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001075 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001076
Guido van Rossum7f43da71994-08-01 12:15:30 +00001077 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1078 ac_prev=prefix ;;
1079 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001080 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001081
1082 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1083 | --program-pre | --program-pr | --program-p)
1084 ac_prev=program_prefix ;;
1085 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1086 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001087 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001088
1089 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1090 | --program-suf | --program-su | --program-s)
1091 ac_prev=program_suffix ;;
1092 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1093 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001094 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001095
1096 -program-transform-name | --program-transform-name \
1097 | --program-transform-nam | --program-transform-na \
1098 | --program-transform-n | --program-transform- \
1099 | --program-transform | --program-transfor \
1100 | --program-transfo | --program-transf \
1101 | --program-trans | --program-tran \
1102 | --progr-tra | --program-tr | --program-t)
1103 ac_prev=program_transform_name ;;
1104 -program-transform-name=* | --program-transform-name=* \
1105 | --program-transform-nam=* | --program-transform-na=* \
1106 | --program-transform-n=* | --program-transform-=* \
1107 | --program-transform=* | --program-transfor=* \
1108 | --program-transfo=* | --program-transf=* \
1109 | --program-trans=* | --program-tran=* \
1110 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001111 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001112
Martin v. Löwiseba40652007-08-30 20:10:57 +00001113 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1114 ac_prev=pdfdir ;;
1115 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1116 pdfdir=$ac_optarg ;;
1117
1118 -psdir | --psdir | --psdi | --psd | --ps)
1119 ac_prev=psdir ;;
1120 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1121 psdir=$ac_optarg ;;
1122
Guido van Rossum7f43da71994-08-01 12:15:30 +00001123 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1124 | -silent | --silent | --silen | --sile | --sil)
1125 silent=yes ;;
1126
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001127 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1128 ac_prev=sbindir ;;
1129 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1130 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001131 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001132
1133 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1134 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1135 | --sharedst | --shareds | --shared | --share | --shar \
1136 | --sha | --sh)
1137 ac_prev=sharedstatedir ;;
1138 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1139 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1140 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1141 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001142 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001143
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001144 -site | --site | --sit)
1145 ac_prev=site ;;
1146 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001147 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001148
Guido van Rossum7f43da71994-08-01 12:15:30 +00001149 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1150 ac_prev=srcdir ;;
1151 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001152 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001153
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001154 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1155 | --syscon | --sysco | --sysc | --sys | --sy)
1156 ac_prev=sysconfdir ;;
1157 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1158 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001159 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001160
Guido van Rossum7f43da71994-08-01 12:15:30 +00001161 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001162 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001163 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001164 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001165
1166 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1167 verbose=yes ;;
1168
Martin v. Löwis11437992002-04-12 09:54:03 +00001169 -version | --version | --versio | --versi | --vers | -V)
1170 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001171
1172 -with-* | --with-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001173 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001174 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001175 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001176 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001177 ac_useropt_orig=$ac_useropt
1178 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1179 case $ac_user_opts in
1180 *"
1181"with_$ac_useropt"
1182"*) ;;
1183 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1184 ac_unrecognized_sep=', ';;
1185 esac
1186 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001187
1188 -without-* | --without-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001189 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001190 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001191 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001192 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001193 ac_useropt_orig=$ac_useropt
1194 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1195 case $ac_user_opts in
1196 *"
1197"with_$ac_useropt"
1198"*) ;;
1199 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1200 ac_unrecognized_sep=', ';;
1201 esac
1202 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001203
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001204 --x)
1205 # Obsolete; use --with-x.
1206 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001207
1208 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1209 | --x-incl | --x-inc | --x-in | --x-i)
1210 ac_prev=x_includes ;;
1211 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1212 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001213 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001214
1215 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1216 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1217 ac_prev=x_libraries ;;
1218 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1219 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001220 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001221
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001222 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1223Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001224 ;;
1225
Martin v. Löwis11437992002-04-12 09:54:03 +00001226 *=*)
1227 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1228 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001229 case $ac_envvar in #(
1230 '' | [0-9]* | *[!_$as_cr_alnum]* )
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001231 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001232 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001233 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001234 export $ac_envvar ;;
1235
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001236 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001237 # FIXME: should be removed in autoconf 3.0.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001238 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001239 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001240 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Matthias Klose3cef2a92012-03-14 23:39:33 +01001241 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001242 ;;
1243
1244 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001245done
1246
Guido van Rossum7f43da71994-08-01 12:15:30 +00001247if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001248 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001249 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001250fi
1251
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001252if test -n "$ac_unrecognized_opts"; then
1253 case $enable_option_checking in
1254 no) ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001255 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001256 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1257 esac
1258fi
1259
1260# Check all directory arguments for consistency.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001261for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1262 datadir sysconfdir sharedstatedir localstatedir includedir \
1263 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1264 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001265do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001266 eval ac_val=\$$ac_var
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001267 # Remove trailing slashes.
1268 case $ac_val in
1269 */ )
1270 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1271 eval $ac_var=\$ac_val;;
1272 esac
1273 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001274 case $ac_val in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001275 [\\/$]* | ?:[\\/]* ) continue;;
1276 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001277 esac
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001278 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001279done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001280
Martin v. Löwis11437992002-04-12 09:54:03 +00001281# There might be people who depend on the old broken behavior: `$host'
1282# used to hold the argument of --host etc.
1283# FIXME: To remove some day.
1284build=$build_alias
1285host=$host_alias
1286target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001287
Martin v. Löwis11437992002-04-12 09:54:03 +00001288# FIXME: To remove some day.
1289if test "x$host_alias" != x; then
1290 if test "x$build_alias" = x; then
1291 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001292 elif test "x$build_alias" != "x$host_alias"; then
1293 cross_compiling=yes
1294 fi
1295fi
1296
1297ac_tool_prefix=
1298test -n "$host_alias" && ac_tool_prefix=$host_alias-
1299
1300test "$silent" = yes && exec 6>/dev/null
1301
Guido van Rossum627b2d71993-12-24 10:39:16 +00001302
Martin v. Löwiseba40652007-08-30 20:10:57 +00001303ac_pwd=`pwd` && test -n "$ac_pwd" &&
1304ac_ls_di=`ls -di .` &&
1305ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001306 as_fn_error $? "working directory cannot be determined"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001307test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001308 as_fn_error $? "pwd does not report name of working directory"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001309
1310
Guido van Rossum627b2d71993-12-24 10:39:16 +00001311# Find the source files, if location was not specified.
1312if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001313 ac_srcdir_defaulted=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +00001314 # Try the directory containing this script, then the parent directory.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001315 ac_confdir=`$as_dirname -- "$as_myself" ||
1316$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1317 X"$as_myself" : 'X\(//\)[^/]' \| \
1318 X"$as_myself" : 'X\(//\)$' \| \
1319 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1320$as_echo X"$as_myself" |
Martin v. Löwiseba40652007-08-30 20:10:57 +00001321 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1322 s//\1/
1323 q
1324 }
1325 /^X\(\/\/\)[^/].*/{
1326 s//\1/
1327 q
1328 }
1329 /^X\(\/\/\)$/{
1330 s//\1/
1331 q
1332 }
1333 /^X\(\/\).*/{
1334 s//\1/
1335 q
1336 }
1337 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001338 srcdir=$ac_confdir
Martin v. Löwiseba40652007-08-30 20:10:57 +00001339 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001340 srcdir=..
1341 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001342else
1343 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001344fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001345if test ! -r "$srcdir/$ac_unique_file"; then
1346 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001347 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Brett Cannon19fab762007-06-02 03:02:29 +00001348fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001349ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1350ac_abs_confdir=`(
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001351 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001352 pwd)`
1353# When building in place, set srcdir=.
1354if test "$ac_abs_confdir" = "$ac_pwd"; then
1355 srcdir=.
1356fi
1357# Remove unnecessary trailing slashes from srcdir.
1358# Double slashes in file names in object file debugging info
1359# mess up M-x gdb in Emacs.
1360case $srcdir in
1361*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1362esac
1363for ac_var in $ac_precious_vars; do
1364 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1365 eval ac_env_${ac_var}_value=\$${ac_var}
1366 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1367 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1368done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001369
Martin v. Löwis11437992002-04-12 09:54:03 +00001370#
1371# Report the --help message.
1372#
1373if test "$ac_init_help" = "long"; then
1374 # Omit some internal or obsolete options to make the list less imposing.
1375 # This message is too long to be a string in the A/UX 3.1 sh.
1376 cat <<_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001377\`configure' configures python 2.7 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001378
1379Usage: $0 [OPTION]... [VAR=VALUE]...
1380
1381To assign environment variables (e.g., CC, CFLAGS...), specify them as
1382VAR=VALUE. See below for descriptions of some of the useful variables.
1383
1384Defaults for the options are specified in brackets.
1385
1386Configuration:
1387 -h, --help display this help and exit
1388 --help=short display options specific to this package
1389 --help=recursive display the short help of all the included packages
1390 -V, --version display version information and exit
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001391 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001392 --cache-file=FILE cache test results in FILE [disabled]
1393 -C, --config-cache alias for \`--cache-file=config.cache'
1394 -n, --no-create do not create output files
1395 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1396
Martin v. Löwis11437992002-04-12 09:54:03 +00001397Installation directories:
1398 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001399 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001400 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001401 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001402
1403By default, \`make install' will install all the files in
1404\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1405an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1406for instance \`--prefix=\$HOME'.
1407
1408For better control, use the options below.
1409
1410Fine tuning of the installation directories:
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001411 --bindir=DIR user executables [EPREFIX/bin]
1412 --sbindir=DIR system admin executables [EPREFIX/sbin]
1413 --libexecdir=DIR program executables [EPREFIX/libexec]
1414 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1415 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1416 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1417 --libdir=DIR object code libraries [EPREFIX/lib]
1418 --includedir=DIR C header files [PREFIX/include]
1419 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1420 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1421 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1422 --infodir=DIR info documentation [DATAROOTDIR/info]
1423 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1424 --mandir=DIR man documentation [DATAROOTDIR/man]
1425 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1426 --htmldir=DIR html documentation [DOCDIR]
1427 --dvidir=DIR dvi documentation [DOCDIR]
1428 --pdfdir=DIR pdf documentation [DOCDIR]
1429 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001430_ACEOF
1431
1432 cat <<\_ACEOF
doko@python.orgd65e2ba2013-01-31 23:52:03 +01001433
1434System types:
1435 --build=BUILD configure for building on BUILD [guessed]
1436 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001437_ACEOF
1438fi
1439
1440if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001441 case $ac_init_help in
Martin v. Löwis174440b2008-10-03 08:59:41 +00001442 short | recursive ) echo "Configuration of python 2.7:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001443 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001444 cat <<\_ACEOF
1445
1446Optional Features:
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001447 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001448 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1449 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Brett Cannon91a1dec2008-02-13 19:15:44 +00001450 --enable-universalsdk[=SDKDIR]
Brett Cannon9a8bb0e2008-02-03 02:07:55 +00001451 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001452 --enable-framework[=INSTALLDIR]
1453 Build (MacOSX|Darwin) framework
1454 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001455 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001456 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
1457 --enable-ipv6 Enable ipv6 (with ipv4) support
1458 --disable-ipv6 Disable ipv6 support
Mark Dickinsonefc82f72009-03-20 15:51:55 +00001459 --enable-big-digits[=BITS]
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001460 use big digits for Python longs [[BITS=30]]
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001461 --enable-unicode[=ucs[24]]
Benjamin Peterson66556b02010-05-25 02:23:32 +00001462 Enable Unicode strings (default is ucs2)
Martin v. Löwis11437992002-04-12 09:54:03 +00001463
1464Optional Packages:
1465 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1466 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001467 --with-universal-archs=ARCH
1468 select architectures for universal build ("32-bit",
Ronald Oussoren23d92532009-09-07 06:12:00 +00001469 "64-bit", "3-way", "intel" or "all")
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001470 --with-framework-name=FRAMEWORK
1471 specify an alternate name of the framework built
1472 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001473 --without-gcc never use gcc
Zachary Ware6ed42ea2015-12-21 11:43:03 -06001474 --with-icc build with icc
Martin v. Löwis0f48d982006-04-14 14:34:26 +00001475 --with-cxx-main=<compiler>
1476 compile main() and link python executable with C++
1477 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001478 --with-suffix=.exe set executable suffix
1479 --with-pydebug build with Py_DEBUG defined
1480 --with-libs='lib1 ...' link against additional libs
Benjamin Peterson2c196742009-12-31 03:17:18 +00001481 --with-system-expat build pyexpat module using an installed expat
1482 library
Martin v. Löwis9176fc12006-04-11 11:12:43 +00001483 --with-system-ffi build _ctypes module using an installed ffi library
Ned Deilya2a9f572013-10-25 00:30:10 -07001484 --with-tcltk-includes='-I...'
1485 override search for Tcl and Tk include files
1486 --with-tcltk-libs='-L...'
1487 override search for Tcl and Tk libs
Benjamin Peterson867475c2009-04-29 20:36:25 +00001488 --with-dbmliborder=db1:db2:...
1489 order to check db backends for dbm. Valid value is a
1490 colon separated string with the backend names
1491 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001492 --with-signal-module disable/enable signal module
1493 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1494 --with(out)-threads[=DIRECTORY]
1495 disable/enable thread support
1496 --with(out)-thread[=DIRECTORY]
1497 deprecated; use --with(out)-threads
1498 --with-pth use GNU pth threading libraries
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001499 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001500 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001501 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00001502 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001503 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001504 --with-fpectl enable SIGFPE catching
1505 --with-libm=STRING math library
1506 --with-libc=STRING C library
Benjamin Peterson2c992a02015-05-28 12:45:31 -05001507 --with(out)-computed-gotos
1508 Use computed gotos in evaluation loop (enabled by
1509 default on supported compilers)
Ned Deily3f1d0b32014-11-20 02:11:03 -08001510 --with(out)-ensurepip=[=OPTION]
1511 "install" or "upgrade" using bundled pip, default is
1512 "no"
Martin v. Löwis11437992002-04-12 09:54:03 +00001513
1514Some influential environment variables:
1515 CC C compiler command
1516 CFLAGS C compiler flags
1517 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1518 nonstandard directory <lib dir>
Martin v. Löwiseba40652007-08-30 20:10:57 +00001519 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001520 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Martin v. Löwiseba40652007-08-30 20:10:57 +00001521 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001522 CPP C preprocessor
Benjamin Peterson64e8f6e2014-12-15 00:00:23 -05001523 PKG_CONFIG path to pkg-config utility
1524 PKG_CONFIG_PATH
1525 directories to add to pkg-config's search path
1526 PKG_CONFIG_LIBDIR
1527 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001528
1529Use these variables to override the choices made by `configure' or to help
1530it to find libraries and programs with nonstandard names/locations.
1531
Georg Brandl464432d2009-05-20 18:24:08 +00001532Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001533_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001534ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001535fi
1536
1537if test "$ac_init_help" = "recursive"; then
1538 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001539 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001540 test -d "$ac_dir" ||
1541 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1542 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001543 ac_builddir=.
1544
Martin v. Löwiseba40652007-08-30 20:10:57 +00001545case "$ac_dir" in
1546.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1547*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001548 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001549 # A ".." for each directory in $ac_dir_suffix.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001550 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001551 case $ac_top_builddir_sub in
1552 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1553 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1554 esac ;;
1555esac
1556ac_abs_top_builddir=$ac_pwd
1557ac_abs_builddir=$ac_pwd$ac_dir_suffix
1558# for backward compatibility:
1559ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001560
1561case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001562 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001563 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001564 ac_top_srcdir=$ac_top_builddir_sub
1565 ac_abs_top_srcdir=$ac_pwd ;;
1566 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001567 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001568 ac_top_srcdir=$srcdir
1569 ac_abs_top_srcdir=$srcdir ;;
1570 *) # Relative name.
1571 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1572 ac_top_srcdir=$ac_top_build_prefix$srcdir
1573 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001574esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001575ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001576
Martin v. Löwiseba40652007-08-30 20:10:57 +00001577 cd "$ac_dir" || { ac_status=$?; continue; }
1578 # Check for guested configure.
1579 if test -f "$ac_srcdir/configure.gnu"; then
1580 echo &&
1581 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1582 elif test -f "$ac_srcdir/configure"; then
1583 echo &&
1584 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001585 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001586 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001587 fi || ac_status=$?
1588 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001589 done
1590fi
1591
Martin v. Löwiseba40652007-08-30 20:10:57 +00001592test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001593if $ac_init_version; then
1594 cat <<\_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001595python configure 2.7
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001596generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001597
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001598Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001599This configure script is free software; the Free Software Foundation
1600gives unlimited permission to copy, distribute and modify it.
1601_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001602 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001603fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001604
1605## ------------------------ ##
1606## Autoconf initialization. ##
1607## ------------------------ ##
1608
1609# ac_fn_c_try_compile LINENO
1610# --------------------------
1611# Try to compile conftest.$ac_ext, and return whether this succeeded.
1612ac_fn_c_try_compile ()
1613{
1614 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1615 rm -f conftest.$ac_objext
1616 if { { ac_try="$ac_compile"
1617case "(($ac_try" in
1618 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1619 *) ac_try_echo=$ac_try;;
1620esac
1621eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1622$as_echo "$ac_try_echo"; } >&5
1623 (eval "$ac_compile") 2>conftest.err
1624 ac_status=$?
1625 if test -s conftest.err; then
1626 grep -v '^ *+' conftest.err >conftest.er1
1627 cat conftest.er1 >&5
1628 mv -f conftest.er1 conftest.err
1629 fi
1630 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1631 test $ac_status = 0; } && {
1632 test -z "$ac_c_werror_flag" ||
1633 test ! -s conftest.err
1634 } && test -s conftest.$ac_objext; then :
1635 ac_retval=0
1636else
1637 $as_echo "$as_me: failed program was:" >&5
1638sed 's/^/| /' conftest.$ac_ext >&5
1639
1640 ac_retval=1
1641fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01001642 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001643 as_fn_set_status $ac_retval
1644
1645} # ac_fn_c_try_compile
1646
1647# ac_fn_c_try_cpp LINENO
1648# ----------------------
1649# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1650ac_fn_c_try_cpp ()
1651{
1652 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1653 if { { ac_try="$ac_cpp conftest.$ac_ext"
1654case "(($ac_try" in
1655 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1656 *) ac_try_echo=$ac_try;;
1657esac
1658eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1659$as_echo "$ac_try_echo"; } >&5
1660 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1661 ac_status=$?
1662 if test -s conftest.err; then
1663 grep -v '^ *+' conftest.err >conftest.er1
1664 cat conftest.er1 >&5
1665 mv -f conftest.er1 conftest.err
1666 fi
1667 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001668 test $ac_status = 0; } > conftest.i && {
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001669 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1670 test ! -s conftest.err
1671 }; then :
1672 ac_retval=0
1673else
1674 $as_echo "$as_me: failed program was:" >&5
1675sed 's/^/| /' conftest.$ac_ext >&5
1676
1677 ac_retval=1
1678fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01001679 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001680 as_fn_set_status $ac_retval
1681
1682} # ac_fn_c_try_cpp
1683
1684# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1685# -------------------------------------------------------
1686# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1687# the include files in INCLUDES and setting the cache variable VAR
1688# accordingly.
1689ac_fn_c_check_header_mongrel ()
1690{
1691 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Matthias Klose3cef2a92012-03-14 23:39:33 +01001692 if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001693 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1694$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001695if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001696 $as_echo_n "(cached) " >&6
1697fi
1698eval ac_res=\$$3
1699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1700$as_echo "$ac_res" >&6; }
1701else
1702 # Is the header compilable?
1703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1704$as_echo_n "checking $2 usability... " >&6; }
1705cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1706/* end confdefs.h. */
1707$4
1708#include <$2>
1709_ACEOF
1710if ac_fn_c_try_compile "$LINENO"; then :
1711 ac_header_compiler=yes
1712else
1713 ac_header_compiler=no
1714fi
1715rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1716{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1717$as_echo "$ac_header_compiler" >&6; }
1718
1719# Is the header present?
1720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1721$as_echo_n "checking $2 presence... " >&6; }
1722cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1723/* end confdefs.h. */
1724#include <$2>
1725_ACEOF
1726if ac_fn_c_try_cpp "$LINENO"; then :
1727 ac_header_preproc=yes
1728else
1729 ac_header_preproc=no
1730fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001731rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001732{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1733$as_echo "$ac_header_preproc" >&6; }
1734
1735# So? What about this header?
1736case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1737 yes:no: )
1738 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1739$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1740 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1741$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1742 ;;
1743 no:yes:* )
1744 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1745$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1746 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1747$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1748 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1749$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1750 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1751$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1752 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1753$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001754( $as_echo "## -------------------------------------- ##
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001755## Report this to http://bugs.python.org/ ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001756## -------------------------------------- ##"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001757 ) | sed "s/^/$as_me: WARNING: /" >&2
1758 ;;
1759esac
1760 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1761$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001762if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001763 $as_echo_n "(cached) " >&6
1764else
1765 eval "$3=\$ac_header_compiler"
1766fi
1767eval ac_res=\$$3
1768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1769$as_echo "$ac_res" >&6; }
1770fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01001771 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001772
1773} # ac_fn_c_check_header_mongrel
1774
1775# ac_fn_c_try_run LINENO
1776# ----------------------
1777# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1778# that executables *can* be run.
1779ac_fn_c_try_run ()
1780{
1781 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1782 if { { ac_try="$ac_link"
1783case "(($ac_try" in
1784 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1785 *) ac_try_echo=$ac_try;;
1786esac
1787eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1788$as_echo "$ac_try_echo"; } >&5
1789 (eval "$ac_link") 2>&5
1790 ac_status=$?
1791 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1792 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1793 { { case "(($ac_try" in
1794 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1795 *) ac_try_echo=$ac_try;;
1796esac
1797eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1798$as_echo "$ac_try_echo"; } >&5
1799 (eval "$ac_try") 2>&5
1800 ac_status=$?
1801 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1802 test $ac_status = 0; }; }; then :
1803 ac_retval=0
1804else
1805 $as_echo "$as_me: program exited with status $ac_status" >&5
1806 $as_echo "$as_me: failed program was:" >&5
1807sed 's/^/| /' conftest.$ac_ext >&5
1808
1809 ac_retval=$ac_status
1810fi
1811 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Matthias Klose3cef2a92012-03-14 23:39:33 +01001812 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001813 as_fn_set_status $ac_retval
1814
1815} # ac_fn_c_try_run
1816
1817# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1818# -------------------------------------------------------
1819# Tests whether HEADER exists and can be compiled using the include files in
1820# INCLUDES, setting the cache variable VAR accordingly.
1821ac_fn_c_check_header_compile ()
1822{
1823 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1824 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1825$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001826if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001827 $as_echo_n "(cached) " >&6
1828else
1829 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1830/* end confdefs.h. */
1831$4
1832#include <$2>
1833_ACEOF
1834if ac_fn_c_try_compile "$LINENO"; then :
1835 eval "$3=yes"
1836else
1837 eval "$3=no"
1838fi
1839rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1840fi
1841eval ac_res=\$$3
1842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1843$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001844 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001845
1846} # ac_fn_c_check_header_compile
1847
1848# ac_fn_c_try_link LINENO
1849# -----------------------
1850# Try to link conftest.$ac_ext, and return whether this succeeded.
1851ac_fn_c_try_link ()
1852{
1853 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1854 rm -f conftest.$ac_objext conftest$ac_exeext
1855 if { { ac_try="$ac_link"
1856case "(($ac_try" in
1857 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1858 *) ac_try_echo=$ac_try;;
1859esac
1860eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1861$as_echo "$ac_try_echo"; } >&5
1862 (eval "$ac_link") 2>conftest.err
1863 ac_status=$?
1864 if test -s conftest.err; then
1865 grep -v '^ *+' conftest.err >conftest.er1
1866 cat conftest.er1 >&5
1867 mv -f conftest.er1 conftest.err
1868 fi
1869 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1870 test $ac_status = 0; } && {
1871 test -z "$ac_c_werror_flag" ||
1872 test ! -s conftest.err
1873 } && test -s conftest$ac_exeext && {
1874 test "$cross_compiling" = yes ||
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001875 test -x conftest$ac_exeext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001876 }; then :
1877 ac_retval=0
1878else
1879 $as_echo "$as_me: failed program was:" >&5
1880sed 's/^/| /' conftest.$ac_ext >&5
1881
1882 ac_retval=1
1883fi
1884 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1885 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1886 # interfere with the next link command; also delete a directory that is
1887 # left behind by Apple's compiler. We do this before executing the actions.
1888 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Matthias Klose3cef2a92012-03-14 23:39:33 +01001889 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001890 as_fn_set_status $ac_retval
1891
1892} # ac_fn_c_try_link
1893
1894# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1895# -------------------------------------------
1896# Tests whether TYPE exists after having included INCLUDES, setting cache
1897# variable VAR accordingly.
1898ac_fn_c_check_type ()
1899{
1900 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1901 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1902$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001903if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001904 $as_echo_n "(cached) " >&6
1905else
1906 eval "$3=no"
1907 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1908/* end confdefs.h. */
1909$4
1910int
1911main ()
1912{
1913if (sizeof ($2))
1914 return 0;
1915 ;
1916 return 0;
1917}
1918_ACEOF
1919if ac_fn_c_try_compile "$LINENO"; then :
1920 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1921/* end confdefs.h. */
1922$4
1923int
1924main ()
1925{
1926if (sizeof (($2)))
1927 return 0;
1928 ;
1929 return 0;
1930}
1931_ACEOF
1932if ac_fn_c_try_compile "$LINENO"; then :
1933
1934else
1935 eval "$3=yes"
1936fi
1937rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1938fi
1939rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1940fi
1941eval ac_res=\$$3
1942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1943$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001944 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001945
1946} # ac_fn_c_check_type
1947
1948# ac_fn_c_find_uintX_t LINENO BITS VAR
1949# ------------------------------------
1950# Finds an unsigned integer type with width BITS, setting cache variable VAR
1951# accordingly.
1952ac_fn_c_find_uintX_t ()
1953{
1954 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1955 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1956$as_echo_n "checking for uint$2_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001957if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001958 $as_echo_n "(cached) " >&6
1959else
1960 eval "$3=no"
1961 # Order is important - never check a type that is potentially smaller
1962 # than half of the expected target width.
1963 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1964 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1965 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1966/* end confdefs.h. */
1967$ac_includes_default
1968int
1969main ()
1970{
1971static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001972test_array [0] = 0;
1973return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001974
1975 ;
1976 return 0;
1977}
1978_ACEOF
1979if ac_fn_c_try_compile "$LINENO"; then :
1980 case $ac_type in #(
1981 uint$2_t) :
1982 eval "$3=yes" ;; #(
1983 *) :
1984 eval "$3=\$ac_type" ;;
1985esac
1986fi
1987rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001988 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001989
1990else
1991 break
1992fi
1993 done
1994fi
1995eval ac_res=\$$3
1996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1997$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001998 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001999
2000} # ac_fn_c_find_uintX_t
2001
2002# ac_fn_c_find_intX_t LINENO BITS VAR
2003# -----------------------------------
2004# Finds a signed integer type with width BITS, setting cache variable VAR
2005# accordingly.
2006ac_fn_c_find_intX_t ()
2007{
2008 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2009 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
2010$as_echo_n "checking for int$2_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002011if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002012 $as_echo_n "(cached) " >&6
2013else
2014 eval "$3=no"
2015 # Order is important - never check a type that is potentially smaller
2016 # than half of the expected target width.
2017 for ac_type in int$2_t 'int' 'long int' \
2018 'long long int' 'short int' 'signed char'; do
2019 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2020/* end confdefs.h. */
2021$ac_includes_default
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002022 enum { N = $2 / 2 - 1 };
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002023int
2024main ()
2025{
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002026static 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 +01002027test_array [0] = 0;
2028return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002029
2030 ;
2031 return 0;
2032}
2033_ACEOF
2034if ac_fn_c_try_compile "$LINENO"; then :
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 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002043 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002044test_array [0] = 0;
2045return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002046
2047 ;
2048 return 0;
2049}
2050_ACEOF
2051if ac_fn_c_try_compile "$LINENO"; then :
2052
2053else
2054 case $ac_type in #(
2055 int$2_t) :
2056 eval "$3=yes" ;; #(
2057 *) :
2058 eval "$3=\$ac_type" ;;
2059esac
2060fi
2061rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2062fi
2063rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002064 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002065
2066else
2067 break
2068fi
2069 done
2070fi
2071eval ac_res=\$$3
2072 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2073$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002074 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002075
2076} # ac_fn_c_find_intX_t
2077
2078# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2079# --------------------------------------------
2080# Tries to find the compile-time value of EXPR in a program that includes
2081# INCLUDES, setting VAR accordingly. Returns whether the value could be
2082# computed
2083ac_fn_c_compute_int ()
2084{
2085 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2086 if test "$cross_compiling" = yes; then
2087 # Depending upon the size, compute the lo and hi bounds.
2088cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2089/* end confdefs.h. */
2090$4
2091int
2092main ()
2093{
2094static int test_array [1 - 2 * !(($2) >= 0)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002095test_array [0] = 0;
2096return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002097
2098 ;
2099 return 0;
2100}
2101_ACEOF
2102if ac_fn_c_try_compile "$LINENO"; then :
2103 ac_lo=0 ac_mid=0
2104 while :; do
2105 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2106/* end confdefs.h. */
2107$4
2108int
2109main ()
2110{
2111static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002112test_array [0] = 0;
2113return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002114
2115 ;
2116 return 0;
2117}
2118_ACEOF
2119if ac_fn_c_try_compile "$LINENO"; then :
2120 ac_hi=$ac_mid; break
2121else
2122 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2123 if test $ac_lo -le $ac_mid; then
2124 ac_lo= ac_hi=
2125 break
2126 fi
2127 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2128fi
2129rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2130 done
2131else
2132 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2133/* end confdefs.h. */
2134$4
2135int
2136main ()
2137{
2138static int test_array [1 - 2 * !(($2) < 0)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002139test_array [0] = 0;
2140return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002141
2142 ;
2143 return 0;
2144}
2145_ACEOF
2146if ac_fn_c_try_compile "$LINENO"; then :
2147 ac_hi=-1 ac_mid=-1
2148 while :; do
2149 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2150/* end confdefs.h. */
2151$4
2152int
2153main ()
2154{
2155static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002156test_array [0] = 0;
2157return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002158
2159 ;
2160 return 0;
2161}
2162_ACEOF
2163if ac_fn_c_try_compile "$LINENO"; then :
2164 ac_lo=$ac_mid; break
2165else
2166 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2167 if test $ac_mid -le $ac_hi; then
2168 ac_lo= ac_hi=
2169 break
2170 fi
2171 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2172fi
2173rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2174 done
2175else
2176 ac_lo= ac_hi=
2177fi
2178rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2179fi
2180rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2181# Binary search between lo and hi bounds.
2182while test "x$ac_lo" != "x$ac_hi"; do
2183 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2184 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2185/* end confdefs.h. */
2186$4
2187int
2188main ()
2189{
2190static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002191test_array [0] = 0;
2192return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002193
2194 ;
2195 return 0;
2196}
2197_ACEOF
2198if ac_fn_c_try_compile "$LINENO"; then :
2199 ac_hi=$ac_mid
2200else
2201 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2202fi
2203rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2204done
2205case $ac_lo in #((
2206?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2207'') ac_retval=1 ;;
2208esac
2209 else
2210 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2211/* end confdefs.h. */
2212$4
2213static long int longval () { return $2; }
2214static unsigned long int ulongval () { return $2; }
2215#include <stdio.h>
2216#include <stdlib.h>
2217int
2218main ()
2219{
2220
2221 FILE *f = fopen ("conftest.val", "w");
2222 if (! f)
2223 return 1;
2224 if (($2) < 0)
2225 {
2226 long int i = longval ();
2227 if (i != ($2))
2228 return 1;
2229 fprintf (f, "%ld", i);
2230 }
2231 else
2232 {
2233 unsigned long int i = ulongval ();
2234 if (i != ($2))
2235 return 1;
2236 fprintf (f, "%lu", i);
2237 }
2238 /* Do not output a trailing newline, as this causes \r\n confusion
2239 on some platforms. */
2240 return ferror (f) || fclose (f) != 0;
2241
2242 ;
2243 return 0;
2244}
2245_ACEOF
2246if ac_fn_c_try_run "$LINENO"; then :
2247 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2248else
2249 ac_retval=1
2250fi
2251rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2252 conftest.$ac_objext conftest.beam conftest.$ac_ext
2253rm -f conftest.val
2254
2255 fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01002256 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002257 as_fn_set_status $ac_retval
2258
2259} # ac_fn_c_compute_int
2260
2261# ac_fn_c_check_func LINENO FUNC VAR
2262# ----------------------------------
2263# Tests whether FUNC exists, setting the cache variable VAR accordingly
2264ac_fn_c_check_func ()
2265{
2266 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2267 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2268$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002269if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002270 $as_echo_n "(cached) " >&6
2271else
2272 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2273/* end confdefs.h. */
2274/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2275 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2276#define $2 innocuous_$2
2277
2278/* System header to define __stub macros and hopefully few prototypes,
2279 which can conflict with char $2 (); below.
2280 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2281 <limits.h> exists even on freestanding compilers. */
2282
2283#ifdef __STDC__
2284# include <limits.h>
2285#else
2286# include <assert.h>
2287#endif
2288
2289#undef $2
2290
2291/* Override any GCC internal prototype to avoid an error.
2292 Use char because int might match the return type of a GCC
2293 builtin and then its argument prototype would still apply. */
2294#ifdef __cplusplus
2295extern "C"
2296#endif
2297char $2 ();
2298/* The GNU C library defines this for functions which it implements
2299 to always fail with ENOSYS. Some functions are actually named
2300 something starting with __ and the normal name is an alias. */
2301#if defined __stub_$2 || defined __stub___$2
2302choke me
2303#endif
2304
2305int
2306main ()
2307{
2308return $2 ();
2309 ;
2310 return 0;
2311}
2312_ACEOF
2313if ac_fn_c_try_link "$LINENO"; then :
2314 eval "$3=yes"
2315else
2316 eval "$3=no"
2317fi
2318rm -f core conftest.err conftest.$ac_objext \
2319 conftest$ac_exeext conftest.$ac_ext
2320fi
2321eval ac_res=\$$3
2322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2323$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002324 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002325
2326} # ac_fn_c_check_func
2327
2328# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2329# ----------------------------------------------------
2330# Tries to find if the field MEMBER exists in type AGGR, after including
2331# INCLUDES, setting cache variable VAR accordingly.
2332ac_fn_c_check_member ()
2333{
2334 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2335 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2336$as_echo_n "checking for $2.$3... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002337if eval \${$4+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002338 $as_echo_n "(cached) " >&6
2339else
2340 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2341/* end confdefs.h. */
2342$5
2343int
2344main ()
2345{
2346static $2 ac_aggr;
2347if (ac_aggr.$3)
2348return 0;
2349 ;
2350 return 0;
2351}
2352_ACEOF
2353if ac_fn_c_try_compile "$LINENO"; then :
2354 eval "$4=yes"
2355else
2356 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2357/* end confdefs.h. */
2358$5
2359int
2360main ()
2361{
2362static $2 ac_aggr;
2363if (sizeof 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 eval "$4=no"
2373fi
2374rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2375fi
2376rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2377fi
2378eval ac_res=\$$4
2379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2380$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002381 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002382
2383} # ac_fn_c_check_member
2384
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002385# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2386# ---------------------------------------------
2387# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2388# accordingly.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002389ac_fn_c_check_decl ()
2390{
2391 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002392 as_decl_name=`echo $2|sed 's/ *(.*//'`
2393 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2394 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2395$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002396if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002397 $as_echo_n "(cached) " >&6
2398else
2399 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2400/* end confdefs.h. */
2401$4
2402int
2403main ()
2404{
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002405#ifndef $as_decl_name
2406#ifdef __cplusplus
2407 (void) $as_decl_use;
2408#else
2409 (void) $as_decl_name;
2410#endif
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002411#endif
2412
2413 ;
2414 return 0;
2415}
2416_ACEOF
2417if ac_fn_c_try_compile "$LINENO"; then :
2418 eval "$3=yes"
2419else
2420 eval "$3=no"
2421fi
2422rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2423fi
2424eval ac_res=\$$3
2425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2426$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002427 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002428
2429} # ac_fn_c_check_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +00002430cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002431This file contains any messages produced by compilers while
2432running configure, to aid debugging if configure makes a mistake.
2433
Martin v. Löwis174440b2008-10-03 08:59:41 +00002434It was created by python $as_me 2.7, which was
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002435generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002436
2437 $ $0 $@
2438
2439_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00002440exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002441{
2442cat <<_ASUNAME
2443## --------- ##
2444## Platform. ##
2445## --------- ##
2446
2447hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2448uname -m = `(uname -m) 2>/dev/null || echo unknown`
2449uname -r = `(uname -r) 2>/dev/null || echo unknown`
2450uname -s = `(uname -s) 2>/dev/null || echo unknown`
2451uname -v = `(uname -v) 2>/dev/null || echo unknown`
2452
2453/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2454/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2455
2456/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2457/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2458/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Martin v. Löwiseba40652007-08-30 20:10:57 +00002459/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002460/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2461/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2462/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2463
2464_ASUNAME
2465
2466as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2467for as_dir in $PATH
2468do
2469 IFS=$as_save_IFS
2470 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002471 $as_echo "PATH: $as_dir"
2472 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002473IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002474
2475} >&5
2476
2477cat >&5 <<_ACEOF
2478
2479
2480## ----------- ##
2481## Core tests. ##
2482## ----------- ##
2483
2484_ACEOF
2485
2486
2487# Keep a trace of the command line.
2488# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002489# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002490# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002491# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002492ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002493ac_configure_args0=
2494ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002495ac_must_keep_next=false
2496for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002497do
Skip Montanaro6dead952003-09-25 14:50:04 +00002498 for ac_arg
2499 do
2500 case $ac_arg in
2501 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2502 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2503 | -silent | --silent | --silen | --sile | --sil)
2504 continue ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002505 *\'*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002506 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002507 esac
2508 case $ac_pass in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002509 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002510 2)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002511 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002512 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002513 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002514 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002515 case $ac_arg in
2516 *=* | --config-cache | -C | -disable-* | --disable-* \
2517 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2518 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2519 | -with-* | --with-* | -without-* | --without-* | --x)
2520 case "$ac_configure_args0 " in
2521 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2522 esac
2523 ;;
2524 -* ) ac_must_keep_next=true ;;
2525 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002526 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002527 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002528 ;;
2529 esac
2530 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002531done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002532{ ac_configure_args0=; unset ac_configure_args0;}
2533{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002534
2535# When interrupted or exit'd, cleanup temporary files, and complete
2536# config.log. We remove comments because anyway the quotes in there
2537# would cause problems or look ugly.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002538# WARNING: Use '\'' to represent an apostrophe within the trap.
2539# 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 +00002540trap 'exit_status=$?
2541 # Save into config.log some information that might help in debugging.
2542 {
2543 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002544
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002545 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002546## Cache variables. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002547## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002548 echo
2549 # The following way of writing the cache mishandles newlines in values,
Martin v. Löwiseba40652007-08-30 20:10:57 +00002550(
2551 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2552 eval ac_val=\$$ac_var
2553 case $ac_val in #(
2554 *${as_nl}*)
2555 case $ac_var in #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002556 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2557$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002558 esac
2559 case $ac_var in #(
2560 _ | IFS | as_nl) ;; #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002561 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2562 *) { eval $ac_var=; unset $ac_var;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002563 esac ;;
2564 esac
2565 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002566 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +00002567 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2568 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002569 sed -n \
Martin v. Löwiseba40652007-08-30 20:10:57 +00002570 "s/'\''/'\''\\\\'\'''\''/g;
2571 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2572 ;; #(
Skip Montanaro89e975f2007-08-22 19:05:21 +00002573 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00002574 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaro89e975f2007-08-22 19:05:21 +00002575 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002576 esac |
2577 sort
2578)
Martin v. Löwis11437992002-04-12 09:54:03 +00002579 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002580
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002581 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002582## Output variables. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002583## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002584 echo
2585 for ac_var in $ac_subst_vars
2586 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002587 eval ac_val=\$$ac_var
2588 case $ac_val in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002589 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002590 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002591 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002592 done | sort
2593 echo
2594
2595 if test -n "$ac_subst_files"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002596 $as_echo "## ------------------- ##
Martin v. Löwiseba40652007-08-30 20:10:57 +00002597## File substitutions. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002598## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002599 echo
2600 for ac_var in $ac_subst_files
2601 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002602 eval ac_val=\$$ac_var
2603 case $ac_val in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002604 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002605 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002606 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002607 done | sort
2608 echo
2609 fi
2610
Martin v. Löwis11437992002-04-12 09:54:03 +00002611 if test -s confdefs.h; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002612 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002613## confdefs.h. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002614## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002615 echo
Martin v. Löwiseba40652007-08-30 20:10:57 +00002616 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002617 echo
2618 fi
2619 test "$ac_signal" != 0 &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002620 $as_echo "$as_me: caught signal $ac_signal"
2621 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002622 } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002623 rm -f core *.core core.conftest.* &&
2624 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002625 exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +00002626' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002627for ac_signal in 1 2 13 15; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002628 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002629done
2630ac_signal=0
2631
2632# confdefs.h avoids OS command line length limits that DEFS can exceed.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002633rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002634
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002635$as_echo "/* confdefs.h */" > confdefs.h
2636
Martin v. Löwis11437992002-04-12 09:54:03 +00002637# Predefined preprocessor variables.
2638
2639cat >>confdefs.h <<_ACEOF
2640#define PACKAGE_NAME "$PACKAGE_NAME"
2641_ACEOF
2642
Martin v. Löwis11437992002-04-12 09:54:03 +00002643cat >>confdefs.h <<_ACEOF
2644#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2645_ACEOF
2646
Martin v. Löwis11437992002-04-12 09:54:03 +00002647cat >>confdefs.h <<_ACEOF
2648#define PACKAGE_VERSION "$PACKAGE_VERSION"
2649_ACEOF
2650
Martin v. Löwis11437992002-04-12 09:54:03 +00002651cat >>confdefs.h <<_ACEOF
2652#define PACKAGE_STRING "$PACKAGE_STRING"
2653_ACEOF
2654
Martin v. Löwis11437992002-04-12 09:54:03 +00002655cat >>confdefs.h <<_ACEOF
2656#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2657_ACEOF
2658
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002659cat >>confdefs.h <<_ACEOF
2660#define PACKAGE_URL "$PACKAGE_URL"
2661_ACEOF
2662
Martin v. Löwis11437992002-04-12 09:54:03 +00002663
2664# Let the site file select an alternate cache file if it wants to.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002665# Prefer an explicitly selected file to automatically selected ones.
2666ac_site_file1=NONE
2667ac_site_file2=NONE
Martin v. Löwiseba40652007-08-30 20:10:57 +00002668if test -n "$CONFIG_SITE"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002669 # We do not want a PATH search for config.site.
2670 case $CONFIG_SITE in #((
2671 -*) ac_site_file1=./$CONFIG_SITE;;
2672 */*) ac_site_file1=$CONFIG_SITE;;
2673 *) ac_site_file1=./$CONFIG_SITE;;
2674 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00002675elif test "x$prefix" != xNONE; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002676 ac_site_file1=$prefix/share/config.site
2677 ac_site_file2=$prefix/etc/config.site
Martin v. Löwiseba40652007-08-30 20:10:57 +00002678else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002679 ac_site_file1=$ac_default_prefix/share/config.site
2680 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002681fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002682for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Martin v. Löwiseba40652007-08-30 20:10:57 +00002683do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002684 test "x$ac_site_file" = xNONE && continue
2685 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2686 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2687$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002688 sed 's/^/| /' "$ac_site_file" >&5
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002689 . "$ac_site_file" \
2690 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2691$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2692as_fn_error $? "failed to load site script $ac_site_file
Matthias Klose3cef2a92012-03-14 23:39:33 +01002693See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002694 fi
2695done
2696
2697if test -r "$cache_file"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002698 # Some versions of bash will fail to source /dev/null (special files
2699 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2700 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2701 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2702$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002703 case $cache_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00002704 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2705 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002706 esac
2707 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002708else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002709 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2710$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002711 >$cache_file
2712fi
2713
2714# Check that the precious variables saved in the cache have kept the same
2715# value.
2716ac_cache_corrupted=false
Martin v. Löwiseba40652007-08-30 20:10:57 +00002717for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002718 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2719 eval ac_new_set=\$ac_env_${ac_var}_set
Martin v. Löwiseba40652007-08-30 20:10:57 +00002720 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2721 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002722 case $ac_old_set,$ac_new_set in
2723 set,)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002724 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2725$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 +00002726 ac_cache_corrupted=: ;;
2727 ,set)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002728 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2729$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002730 ac_cache_corrupted=: ;;
2731 ,);;
2732 *)
2733 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002734 # differences in whitespace do not lead to failure.
2735 ac_old_val_w=`echo x $ac_old_val`
2736 ac_new_val_w=`echo x $ac_new_val`
2737 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2738 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2739$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2740 ac_cache_corrupted=:
2741 else
2742 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2743$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2744 eval $ac_var=\$ac_old_val
2745 fi
2746 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2747$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2748 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2749$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002750 fi;;
2751 esac
2752 # Pass precious variables to config.status.
2753 if test "$ac_new_set" = set; then
2754 case $ac_new_val in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002755 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002756 *) ac_arg=$ac_var=$ac_new_val ;;
2757 esac
2758 case " $ac_configure_args " in
2759 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002760 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002761 esac
2762 fi
2763done
2764if $ac_cache_corrupted; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002765 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2766$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2767 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2768$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002769 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002770fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002771## -------------------- ##
2772## Main body of script. ##
2773## -------------------- ##
Martin v. Löwiseba40652007-08-30 20:10:57 +00002774
Guido van Rossum7f43da71994-08-01 12:15:30 +00002775ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002776ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002777ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2778ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2779ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002780
Guido van Rossum627b2d71993-12-24 10:39:16 +00002781
Michael W. Hudson54241132001-12-07 15:38:26 +00002782
Martin v. Löwiseba40652007-08-30 20:10:57 +00002783ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002784
2785
doko@python.orgd65e2ba2013-01-31 23:52:03 +01002786ac_aux_dir=
2787for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2788 if test -f "$ac_dir/install-sh"; then
2789 ac_aux_dir=$ac_dir
2790 ac_install_sh="$ac_aux_dir/install-sh -c"
2791 break
2792 elif test -f "$ac_dir/install.sh"; then
2793 ac_aux_dir=$ac_dir
2794 ac_install_sh="$ac_aux_dir/install.sh -c"
2795 break
2796 elif test -f "$ac_dir/shtool"; then
2797 ac_aux_dir=$ac_dir
2798 ac_install_sh="$ac_aux_dir/shtool install -c"
2799 break
2800 fi
2801done
2802if test -z "$ac_aux_dir"; then
2803 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2804fi
2805
2806# These three variables are undocumented and unsupported,
2807# and are intended to be withdrawn in a future Autoconf release.
2808# They can cause serious problems if a builder's source tree is in a directory
2809# whose full name contains unusual characters.
2810ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2811ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2812ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2813
2814
2815# Make sure we can run config.sub.
2816$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2817 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2818
2819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2820$as_echo_n "checking build system type... " >&6; }
2821if ${ac_cv_build+:} false; then :
2822 $as_echo_n "(cached) " >&6
2823else
2824 ac_build_alias=$build_alias
2825test "x$ac_build_alias" = x &&
2826 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2827test "x$ac_build_alias" = x &&
2828 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2829ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2830 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2831
2832fi
2833{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2834$as_echo "$ac_cv_build" >&6; }
2835case $ac_cv_build in
2836*-*-*) ;;
2837*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2838esac
2839build=$ac_cv_build
2840ac_save_IFS=$IFS; IFS='-'
2841set x $ac_cv_build
2842shift
2843build_cpu=$1
2844build_vendor=$2
2845shift; shift
2846# Remember, the first character of IFS is used to create $*,
2847# except with old shells:
2848build_os=$*
2849IFS=$ac_save_IFS
2850case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2851
2852
2853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2854$as_echo_n "checking host system type... " >&6; }
2855if ${ac_cv_host+:} false; then :
2856 $as_echo_n "(cached) " >&6
2857else
2858 if test "x$host_alias" = x; then
2859 ac_cv_host=$ac_cv_build
2860else
2861 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2862 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2863fi
2864
2865fi
2866{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2867$as_echo "$ac_cv_host" >&6; }
2868case $ac_cv_host in
2869*-*-*) ;;
2870*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2871esac
2872host=$ac_cv_host
2873ac_save_IFS=$IFS; IFS='-'
2874set x $ac_cv_host
2875shift
2876host_cpu=$1
2877host_vendor=$2
2878shift; shift
2879# Remember, the first character of IFS is used to create $*,
2880# except with old shells:
2881host_os=$*
2882IFS=$ac_save_IFS
2883case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2884
2885
2886
2887
2888
Ned Deily983df862014-08-22 13:30:59 -07002889# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2890rm -f pybuilddir.txt
2891
doko@python.orgd65e2ba2013-01-31 23:52:03 +01002892if test "$cross_compiling" = yes; then
2893 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2894$as_echo_n "checking for python interpreter for cross build... " >&6; }
2895 if test -z "$PYTHON_FOR_BUILD"; then
2896 for interp in python$PACKAGE_VERSION python2 python; do
2897 which $interp >/dev/null 2>&1 || continue
2898 if $interp -c 'import sys;sys.exit(not (sys.version_info[:2] >= (2,7) and sys.version_info[0] < 3))'; then
2899 break
2900 fi
2901 interp=
2902 done
2903 if test x$interp = x; then
2904 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2905 fi
2906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2907$as_echo "$interp" >&6; }
doko@ubuntu.coma50b0de2015-04-13 21:55:59 +02002908 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 +01002909 fi
2910elif test "$cross_compiling" = maybe; then
2911 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
2912else
2913 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2914fi
2915
2916
Martin v. Löwis11437992002-04-12 09:54:03 +00002917
Georg Brandlbcd64a32009-03-31 21:45:18 +00002918if test "$prefix" != "/"; then
2919 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2920fi
2921
2922
Martin v. Löwis11437992002-04-12 09:54:03 +00002923
2924
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002925# We don't use PACKAGE_ variables, and they cause conflicts
2926# with other autoconf-based packages that include Python.h
2927grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2928rm confdefs.h
2929mv confdefs.h.new confdefs.h
2930
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002931
Martin v. Löwis174440b2008-10-03 08:59:41 +00002932VERSION=2.7
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002933
Martin v. Löwis1142de32002-03-29 16:28:31 +00002934
2935SOVERSION=1.0
2936
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002937# The later defininition of _XOPEN_SOURCE disables certain features
2938# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2939
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002940$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002941
2942
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002943# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2944# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2945# them.
2946
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002947$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002948
2949
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002950# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2951# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2952# them.
2953
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002954$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002955
2956
Martin v. Löwisd6320502004-08-12 13:45:08 +00002957# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2958# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2959
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002960$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002961
2962
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002963# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2964# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2965# them.
2966
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002967$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002968
2969
2970
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002971define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002972
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002973# Arguments passed to configure.
2974
2975CONFIG_ARGS="$ac_configure_args"
2976
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2978$as_echo_n "checking for --enable-universalsdk... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002979# Check whether --enable-universalsdk was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002980if test "${enable_universalsdk+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00002981 enableval=$enable_universalsdk;
Ronald Oussoren988117f2006-04-29 11:31:35 +00002982 case $enableval in
2983 yes)
2984 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002985 if test ! -d "${enableval}"
2986 then
2987 enableval=/
2988 fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00002989 ;;
2990 esac
2991 case $enableval in
2992 no)
2993 UNIVERSALSDK=
2994 enable_universalsdk=
2995 ;;
2996 *)
2997 UNIVERSALSDK=$enableval
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00002998 if test ! -d "${UNIVERSALSDK}"
2999 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003000 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003001 fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00003002 ;;
3003 esac
3004
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003005
Ronald Oussoren988117f2006-04-29 11:31:35 +00003006else
3007
3008 UNIVERSALSDK=
3009 enable_universalsdk=
3010
Martin v. Löwiseba40652007-08-30 20:10:57 +00003011fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00003012
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003013if test -n "${UNIVERSALSDK}"
3014then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3016$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003017else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3019$as_echo "no" >&6; }
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003020fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00003021
Martin v. Löwiseba40652007-08-30 20:10:57 +00003022
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +00003023
Ned Deily8e60f6e2013-05-30 00:14:29 -07003024ARCH_RUN_32BIT=""
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +00003025
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003026UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren92919a62009-12-24 13:30:58 +00003027
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3029$as_echo_n "checking for --with-universal-archs... " >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003030
3031# Check whether --with-universal-archs was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003032if test "${with_universal_archs+set}" = set; then :
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003033 withval=$with_universal_archs;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
3035$as_echo "$withval" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003036 UNIVERSAL_ARCHS="$withval"
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00003037 if test "${enable_universalsdk}" ; then
3038 :
3039 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003040 as_fn_error $? "--with-universal-archs without --enable-universalsdk. See Mac/README" "$LINENO" 5
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00003041 fi
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003042
3043else
3044
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 32-bit" >&5
3046$as_echo "32-bit" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003047
3048fi
3049
3050
3051
3052
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003053
3054# Check whether --with-framework-name was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003055if test "${with_framework_name+set}" = set; then :
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003056 withval=$with_framework_name;
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00003057 if test "${enable_framework}"; then
3058 :
3059 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003060 as_fn_error $? "--with-framework-name without --enable-framework. See Mac/README" "$LINENO" 5
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00003061 fi
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003062 PYTHONFRAMEWORK=${withval}
3063 PYTHONFRAMEWORKDIR=${withval}.framework
3064 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3065
3066else
3067
3068 PYTHONFRAMEWORK=Python
3069 PYTHONFRAMEWORKDIR=Python.framework
3070 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3071
3072fi
3073
Martin v. Löwiseba40652007-08-30 20:10:57 +00003074# Check whether --enable-framework was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003075if test "${enable_framework+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003076 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003077 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003078 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003079 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003080 esac
3081 case $enableval in
3082 no)
3083 PYTHONFRAMEWORK=
3084 PYTHONFRAMEWORKDIR=no-framework
3085 PYTHONFRAMEWORKPREFIX=
3086 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003087 FRAMEWORKINSTALLFIRST=
3088 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00003089 FRAMEWORKALTINSTALLFIRST=
3090 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00003091 if test "x${prefix}" = "xNONE"; then
3092 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3093 else
3094 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3095 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003096 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003097 ;;
3098 *)
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003099 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003100 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003101 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003102 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure bininstall maninstall"
Ronald Oussoren92919a62009-12-24 13:30:58 +00003103 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3104 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003105 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003106
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00003107 if test "x${prefix}" = "xNONE" ; then
3108 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003109
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00003110 else
3111 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3112 fi
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003113
3114 case "${enableval}" in
3115 /System*)
3116 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3117 if test "${prefix}" = "NONE" ; then
3118 # See below
3119 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3120 fi
3121 ;;
3122
3123 /Library*)
3124 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3125 ;;
3126
3127 */Library/Frameworks)
3128 MDIR="`dirname "${enableval}"`"
3129 MDIR="`dirname "${MDIR}"`"
3130 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3131
3132 if test "${prefix}" = "NONE"; then
3133 # User hasn't specified the
3134 # --prefix option, but wants to install
3135 # the framework in a non-default location,
3136 # ensure that the compatibility links get
3137 # installed relative to that prefix as well
3138 # instead of in /usr/local.
3139 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3140 fi
3141 ;;
3142
3143 *)
3144 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3145 ;;
3146 esac
3147
Jack Jansen127e56e2001-09-11 14:41:54 +00003148 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Ronald Oussoren836b0392006-05-14 19:56:34 +00003149
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003150 # Add files for Mac specific code to the list of output
Ronald Oussoren836b0392006-05-14 19:56:34 +00003151 # files:
Martin v. Löwiseba40652007-08-30 20:10:57 +00003152 ac_config_files="$ac_config_files Mac/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00003153
Martin v. Löwiseba40652007-08-30 20:10:57 +00003154 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00003155
Martin v. Löwiseba40652007-08-30 20:10:57 +00003156 ac_config_files="$ac_config_files Mac/IDLE/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00003157
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003158 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3159
3160 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3161
Jack Jansene578a632001-08-15 01:27:14 +00003162 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003163
Guido van Rossum563e7081996-09-10 18:20:48 +00003164else
Martin v. Löwis11437992002-04-12 09:54:03 +00003165
Jack Jansene578a632001-08-15 01:27:14 +00003166 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003167 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003168 PYTHONFRAMEWORKPREFIX=
3169 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003170 FRAMEWORKINSTALLFIRST=
3171 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00003172 FRAMEWORKALTINSTALLFIRST=
3173 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00003174 if test "x${prefix}" = "xNONE" ; then
3175 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3176 else
3177 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3178 fi
Jack Jansene578a632001-08-15 01:27:14 +00003179 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003180
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003181
Martin v. Löwiseba40652007-08-30 20:10:57 +00003182fi
3183
Michael W. Hudson54241132001-12-07 15:38:26 +00003184
3185
3186
3187
Jack Jansene578a632001-08-15 01:27:14 +00003188
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003189
3190
Ronald Oussoren5b787322006-06-06 19:50:24 +00003191
3192
3193
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003194
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003195
Jack Jansene578a632001-08-15 01:27:14 +00003196##AC_ARG_WITH(dyld,
Matthias Klose22520ea2010-05-08 10:14:46 +00003197## AS_HELP_STRING([--with-dyld],
3198## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003199##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003200# Set name for machine-dependent library files
3201
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3203$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003204if test -z "$MACHDEP"
3205then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003206 # avoid using uname for cross builds
3207 if test "$cross_compiling" = yes; then
3208 # ac_sys_system and ac_sys_release are only used for setting
3209 # `define_xopen_source' in the case statement below. For the
3210 # current supported cross builds, this macro is not adjusted.
3211 case "$host" in
3212 *-*-linux*)
3213 ac_sys_system=Linux
3214 ;;
3215 *-*-cygwin*)
3216 ac_sys_system=Cygwin
3217 ;;
3218 *)
3219 # for now, limit cross builds to known configurations
3220 MACHDEP="unknown"
3221 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3222 esac
3223 ac_sys_release=
3224 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003225 ac_sys_system=`uname -s`
Georg Brandlfe18a112009-09-04 07:55:14 +00003226 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003227 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003228 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003229 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003230 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003231 fi
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003232 fi
3233 ac_md_system=`echo $ac_sys_system |
3234 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3235 ac_md_release=`echo $ac_sys_release |
3236 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3237 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003238
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003239 case $MACHDEP in
Victor Stinneracacbaa2011-08-20 14:02:38 +02003240 linux*) MACHDEP="linux2";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003241 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003242 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003243 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00003244 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003245 '') MACHDEP="unknown";;
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003246 esac
3247fi
3248
3249
3250if test "$cross_compiling" = yes; then
3251 case "$host" in
3252 *-*-linux*)
3253 case "$host_cpu" in
3254 arm*)
3255 _host_cpu=arm
3256 ;;
3257 *)
3258 _host_cpu=$host_cpu
3259 esac
3260 ;;
3261 *-*-cygwin*)
3262 _host_cpu=
3263 ;;
3264 *)
3265 # for now, limit cross builds to known configurations
3266 MACHDEP="unknown"
3267 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003268 esac
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003269 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003270fi
Guido van Rossum91922671997-10-09 20:24:13 +00003271
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003272# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3273# disable features if it is defined, without any means to access these
3274# features as extensions. For these systems, we skip the definition of
3275# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3276# some feature, make sure there is no alternative way to access this
3277# feature. Also, when using wildcards, make sure you have verified the
3278# need for not defining _XOPEN_SOURCE on all systems matching the
3279# wildcard, and that the wildcard does not include future systems
3280# (which may remove their limitations).
3281case $ac_sys_system/$ac_sys_release in
3282 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3283 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003284 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis7875ef62010-02-15 21:41:12 +00003285 # In addition, Stefan Krah confirms that issue #1244610 exists through
3286 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali97781b02011-07-22 23:43:42 +02003287 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Martin v. Löwiscb78de62007-12-29 18:49:21 +00003288 define_xopen_source=no
3289 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3290 # also defined. This can be overridden by defining _BSD_SOURCE
3291 # As this has a different meaning on Linux, only define it on OpenBSD
3292
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003293$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwiscb78de62007-12-29 18:49:21 +00003294
3295 ;;
Charles-François Natali97781b02011-07-22 23:43:42 +02003296 OpenBSD/*)
Martin v. Löwis5e2dd862010-02-15 08:32:00 +00003297 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3298 # also defined. This can be overridden by defining _BSD_SOURCE
3299 # As this has a different meaning on Linux, only define it on OpenBSD
3300
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003301$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis5e2dd862010-02-15 08:32:00 +00003302
3303 ;;
Martin v. Löwis4d542ec2006-11-25 15:39:19 +00003304 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3305 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3306 # Marc Recht
Benjamin Petersoneac68f42008-11-16 17:54:55 +00003307 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 +00003308 define_xopen_source=no;;
Martin v. Löwisb41afb52010-05-28 15:28:47 +00003309 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3310 # request to enable features supported by the standard as a request
3311 # to disable features not supported by the standard. The best way
3312 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3313 # entirely and define __EXTENSIONS__ instead.
3314 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003315 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003316 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3317 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003318 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003319 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003320 define_xopen_source=no;;
3321 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003322 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003323 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003324 define_xopen_source=no;;
Martin v. Löwisbb86d832008-11-04 20:40:09 +00003325 # On FreeBSD 4, the math functions C89 does not cover are never defined
3326 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3327 FreeBSD/4.*)
3328 define_xopen_source=no;;
3329 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3330 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3331 # identifies itself as Darwin/7.*
3332 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3333 # disables platform specific features beyond repair.
3334 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3335 # has no effect, don't bother defining them
3336 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003337 define_xopen_source=no;;
Ronald Oussorena55af9a2010-01-17 16:25:57 +00003338 Darwin/1[0-9].*)
3339 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003340 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3341 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3342 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003343 AIX/4)
3344 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003345 AIX/5)
3346 if test `uname -r` -eq 1; then
3347 define_xopen_source=no
3348 fi
3349 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00003350 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3351 # defining NI_NUMERICHOST.
3352 QNX/6.3.2)
3353 define_xopen_source=no
3354 ;;
Martin v. Löwisa0588362006-04-04 06:03:50 +00003355
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003356esac
3357
3358if test $define_xopen_source = yes
3359then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003360
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003361$as_echo "#define _XOPEN_SOURCE 600" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003362
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003363
3364 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3365 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3366 # several APIs are not declared. Since this is also needed in some
3367 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003368
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003369$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003370
3371
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003372
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003373$as_echo "#define _POSIX_C_SOURCE 200112L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003374
3375
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003376fi
3377
Guido van Rossum91922671997-10-09 20:24:13 +00003378#
3379# SGI compilers allow the specification of the both the ABI and the
3380# ISA on the command line. Depending on the values of these switches,
3381# different and often incompatable code will be generated.
3382#
3383# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3384# thus supply support for various ABI/ISA combinations. The MACHDEP
3385# variable is also adjusted.
3386#
3387
3388if test ! -z "$SGI_ABI"
3389then
3390 CC="cc $SGI_ABI"
3391 LDFLAGS="$SGI_ABI $LDFLAGS"
3392 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3393fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003394{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3395$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003396
doko@ubuntu.coma50b0de2015-04-13 21:55:59 +02003397
3398PLATDIR=plat-$MACHDEP
3399
Jack Jansen83f898c2002-12-30 22:23:40 +00003400# And add extra plat-mac for darwin
3401
Jack Jansen7b59b422003-03-17 15:44:10 +00003402
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking EXTRAPLATDIR" >&5
3404$as_echo_n "checking EXTRAPLATDIR... " >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00003405if test -z "$EXTRAPLATDIR"
3406then
3407 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00003408 darwin)
3409 EXTRAPLATDIR="\$(PLATMACDIRS)"
3410 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
3411 ;;
3412 *)
3413 EXTRAPLATDIR=""
3414 EXTRAMACHDEPPATH=""
3415 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00003416 esac
3417fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003418{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRAPLATDIR" >&5
3419$as_echo "$EXTRAPLATDIR" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00003420
Jack Jansen6b08a402004-06-03 12:41:45 +00003421# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3422# it may influence the way we can build extensions, so distutils
3423# needs to check it
3424
Ronald Oussoren988117f2006-04-29 11:31:35 +00003425
Jack Jansen6b08a402004-06-03 12:41:45 +00003426CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Ronald Oussoren988117f2006-04-29 11:31:35 +00003427EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003428
Guido van Rossum627b2d71993-12-24 10:39:16 +00003429# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003430
3431# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3432# for debug/optimization stuff. BASECFLAGS is for flags that are required
3433# just to get things to compile and link. Users are free to override OPT
3434# when running configure or make. The build should not break if they do.
3435# BASECFLAGS should generally not be messed with, however.
3436
3437# XXX shouldn't some/most/all of this code be merged with the stuff later
3438# on that fiddles with OPT and BASECFLAGS?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3440$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003441
Martin v. Löwiseba40652007-08-30 20:10:57 +00003442# Check whether --with-gcc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003443if test "${with_gcc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003444 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003445 case $withval in
Mark Dickinson04b27232009-01-04 12:29:36 +00003446 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003447 without_gcc=yes;;
3448 yes) CC=gcc
3449 without_gcc=no;;
3450 *) CC=$withval
3451 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003452 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003453else
Martin v. Löwis11437992002-04-12 09:54:03 +00003454
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003455 case $ac_sys_system in
Antoine Pitrou285cd162010-09-21 15:23:17 +00003456 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003457 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003458 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003459 case $BE_HOST_CPU in
3460 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00003461 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003462 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00003463 BASECFLAGS="$BASECFLAGS -export pragma"
3464 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003465 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003466 ;;
3467 x86)
Fred Drake5790be12000-10-09 17:06:13 +00003468 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003469 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00003470 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003471 ;;
3472 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003473 as_fn_error $? "Unknown BeOS platform \"$BE_HOST_CPU\"" "$LINENO" 5
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003474 ;;
3475 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003476 AR="\$(srcdir)/Modules/ar_beos"
3477 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003478 ;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003479 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003480 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00003481fi
3482
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003483{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3484$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003485
Zachary Ware6ed42ea2015-12-21 11:43:03 -06003486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-icc" >&5
3487$as_echo_n "checking for --with-icc... " >&6; }
3488
3489# Check whether --with-icc was given.
3490if test "${with_icc+set}" = set; then :
3491 withval=$with_icc;
3492 case $withval in
3493 no) CC=${CC:-cc}
3494 with_icc=no;;
3495 yes) CC=icc
3496 CXX=icpc
3497 with_icc=yes;;
3498 *) CC=$withval
3499 with_icc=$withval;;
3500 esac
3501else
3502
3503 with_icc=no
3504fi
3505
3506{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icc" >&5
3507$as_echo "$with_icc" >&6; }
3508
Guido van Rossum8b131c51995-03-09 14:10:13 +00003509# If the user switches compilers, we can't believe the cache
3510if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3511then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003512 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003513(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003514fi
3515
Trent Nelson15daa352012-12-13 06:46:39 +00003516if test "$MACHDEP" = "irix6" && test "$CC" != "gcc"; then
3517 # Normally, MIPSpro CC treats #error directives as warnings, which means
3518 # a successful exit code is returned (0). This is a problem because IRIX
3519 # has a bunch of system headers with this guard at the top:
3520 #
3521 # #ifndef __c99
3522 # #error This header file is to be used only for c99 mode compilations
3523 # #else
3524 #
3525 # When autoconf tests for such a header, like stdint.h, this happens:
3526 #
3527 # configure:4619: cc -c conftest.c >&5
3528 # cc-1035 cc: WARNING File = /usr/include/stdint.h, Line = 5
3529 # #error directive: This header file is to be used only for c99 mode
3530 # compilations
3531 #
3532 # #error This header file is to be used only for c99 mode compilations
3533 # ^
3534 #
3535 # configure:4619: $? = 0
3536 # configure:4619: result: yes
3537 #
3538 # Therefore, we use `-diag_error 1035` to have the compiler treat the
3539 # warning as an error, which causes cc to return a non-zero result,
3540 # which autoconf can interpret correctly.
3541 CFLAGS="$CFLAGS -diag_error 1035"
3542 # Whilst we're here, we might as well make sure CXX defaults to something
3543 # sensible if we're not using gcc.
3544 if test -z "$CXX"; then
3545 CXX="CC"
3546 fi
3547fi
3548
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00003549# If the user set CFLAGS, use this instead of the automatically
3550# determined setting
3551preset_cflags="$CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +00003552ac_ext=c
3553ac_cpp='$CPP $CPPFLAGS'
3554ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3555ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3556ac_compiler_gnu=$ac_cv_c_compiler_gnu
3557if test -n "$ac_tool_prefix"; then
3558 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3559set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3561$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003562if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003563 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003564else
3565 if test -n "$CC"; then
3566 ac_cv_prog_CC="$CC" # Let the user override the test.
3567else
Martin v. Löwis11437992002-04-12 09:54:03 +00003568as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3569for as_dir in $PATH
3570do
3571 IFS=$as_save_IFS
3572 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003573 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003574 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003575 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003576 $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 +00003577 break 2
3578 fi
3579done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003580 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003581IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003582
Jack Jansendd19cf82001-12-06 22:36:17 +00003583fi
3584fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003585CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003586if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003587 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3588$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003589else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3591$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003592fi
3593
Martin v. Löwiseba40652007-08-30 20:10:57 +00003594
Martin v. Löwis11437992002-04-12 09:54:03 +00003595fi
3596if test -z "$ac_cv_prog_CC"; then
3597 ac_ct_CC=$CC
3598 # Extract the first word of "gcc", so it can be a program name with args.
3599set dummy gcc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3601$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003602if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003603 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003604else
3605 if test -n "$ac_ct_CC"; then
3606 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3607else
3608as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3609for as_dir in $PATH
3610do
3611 IFS=$as_save_IFS
3612 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003613 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003614 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003615 ac_cv_prog_ac_ct_CC="gcc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003616 $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 +00003617 break 2
3618 fi
3619done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003620 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003621IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003622
3623fi
3624fi
3625ac_ct_CC=$ac_cv_prog_ac_ct_CC
3626if test -n "$ac_ct_CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3628$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003629else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003630 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3631$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003632fi
3633
Martin v. Löwiseba40652007-08-30 20:10:57 +00003634 if test "x$ac_ct_CC" = x; then
3635 CC=""
3636 else
3637 case $cross_compiling:$ac_tool_warned in
3638yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003639{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3640$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00003641ac_tool_warned=yes ;;
3642esac
3643 CC=$ac_ct_CC
3644 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003645else
3646 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003647fi
3648
Jack Jansendd19cf82001-12-06 22:36:17 +00003649if test -z "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003650 if test -n "$ac_tool_prefix"; then
3651 # 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 +00003652set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3654$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003655if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003656 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003657else
3658 if test -n "$CC"; then
3659 ac_cv_prog_CC="$CC" # Let the user override the test.
3660else
Martin v. Löwis11437992002-04-12 09:54:03 +00003661as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3662for as_dir in $PATH
3663do
3664 IFS=$as_save_IFS
3665 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003666 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003667 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003668 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003669 $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 +00003670 break 2
3671 fi
3672done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003673 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003674IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003675
3676fi
3677fi
3678CC=$ac_cv_prog_CC
3679if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3681$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003682else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3684$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003685fi
3686
Martin v. Löwiseba40652007-08-30 20:10:57 +00003687
Martin v. Löwis11437992002-04-12 09:54:03 +00003688 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003689fi
3690if test -z "$CC"; then
3691 # Extract the first word of "cc", so it can be a program name with args.
3692set dummy cc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3694$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003695if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003696 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003697else
3698 if test -n "$CC"; then
3699 ac_cv_prog_CC="$CC" # Let the user override the test.
3700else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003701 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003702as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3703for as_dir in $PATH
3704do
3705 IFS=$as_save_IFS
3706 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003707 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003708 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003709 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3710 ac_prog_rejected=yes
3711 continue
3712 fi
3713 ac_cv_prog_CC="cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003714 $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 +00003715 break 2
3716 fi
3717done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003718 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003719IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003720
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003721if test $ac_prog_rejected = yes; then
3722 # We found a bogon in the path, so make sure we never use it.
3723 set dummy $ac_cv_prog_CC
3724 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003725 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003726 # We chose a different compiler from the bogus one.
3727 # However, it has the same basename, so the bogon will be chosen
3728 # first if we set CC to just the basename; use the full file name.
3729 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003730 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003731 fi
3732fi
3733fi
3734fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003735CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003736if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3738$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003739else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3741$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003742fi
3743
Martin v. Löwiseba40652007-08-30 20:10:57 +00003744
Martin v. Löwis11437992002-04-12 09:54:03 +00003745fi
3746if test -z "$CC"; then
3747 if test -n "$ac_tool_prefix"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003748 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003749 do
3750 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3751set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3753$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003754if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003755 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003756else
3757 if test -n "$CC"; then
3758 ac_cv_prog_CC="$CC" # Let the user override the test.
3759else
Martin v. Löwis11437992002-04-12 09:54:03 +00003760as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3761for as_dir in $PATH
3762do
3763 IFS=$as_save_IFS
3764 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003765 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003766 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003767 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003768 $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 +00003769 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003770 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003771done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003772 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003773IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003774
3775fi
3776fi
3777CC=$ac_cv_prog_CC
3778if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3780$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003781else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3783$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003784fi
3785
Martin v. Löwiseba40652007-08-30 20:10:57 +00003786
Martin v. Löwis11437992002-04-12 09:54:03 +00003787 test -n "$CC" && break
3788 done
3789fi
3790if test -z "$CC"; then
3791 ac_ct_CC=$CC
Martin v. Löwiseba40652007-08-30 20:10:57 +00003792 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003793do
3794 # Extract the first word of "$ac_prog", so it can be a program name with args.
3795set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3797$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003798if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003799 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003800else
3801 if test -n "$ac_ct_CC"; then
3802 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3803else
3804as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3805for as_dir in $PATH
3806do
3807 IFS=$as_save_IFS
3808 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003809 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003810 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003811 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003812 $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 +00003813 break 2
3814 fi
3815done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003816 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003817IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003818
Martin v. Löwis11437992002-04-12 09:54:03 +00003819fi
3820fi
3821ac_ct_CC=$ac_cv_prog_ac_ct_CC
3822if test -n "$ac_ct_CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003823 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3824$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003825else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003826 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3827$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003828fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003829
Martin v. Löwiseba40652007-08-30 20:10:57 +00003830
Martin v. Löwis11437992002-04-12 09:54:03 +00003831 test -n "$ac_ct_CC" && break
3832done
Michael W. Hudson54241132001-12-07 15:38:26 +00003833
Martin v. Löwiseba40652007-08-30 20:10:57 +00003834 if test "x$ac_ct_CC" = x; then
3835 CC=""
3836 else
3837 case $cross_compiling:$ac_tool_warned in
3838yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003839{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3840$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00003841ac_tool_warned=yes ;;
3842esac
3843 CC=$ac_ct_CC
3844 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003845fi
3846
3847fi
3848
3849
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003850test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3851$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003852as_fn_error $? "no acceptable C compiler found in \$PATH
Matthias Klose3cef2a92012-03-14 23:39:33 +01003853See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003854
3855# Provide some information about the compiler.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003856$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3857set X $ac_compile
3858ac_compiler=$2
3859for ac_option in --version -v -V -qversion; do
3860 { { ac_try="$ac_compiler $ac_option >&5"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003861case "(($ac_try" in
3862 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3863 *) ac_try_echo=$ac_try;;
3864esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003865eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3866$as_echo "$ac_try_echo"; } >&5
3867 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003868 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003869 if test -s conftest.err; then
3870 sed '10a\
3871... rest of stderr output deleted ...
3872 10q' conftest.err >conftest.er1
3873 cat conftest.er1 >&5
3874 fi
3875 rm -f conftest.er1 conftest.err
3876 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3877 test $ac_status = 0; }
3878done
Martin v. Löwis11437992002-04-12 09:54:03 +00003879
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003880cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003881/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003882
Martin v. Löwis11437992002-04-12 09:54:03 +00003883int
3884main ()
3885{
3886
3887 ;
3888 return 0;
3889}
3890_ACEOF
3891ac_clean_files_save=$ac_clean_files
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003892ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003893# Try to create an executable without -o first, disregard a.out.
3894# It will help us diagnose broken compilers, and finding out an intuition
3895# of exeext.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3897$as_echo_n "checking whether the C compiler works... " >&6; }
3898ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3899
3900# The possible output files:
3901ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3902
Martin v. Löwiseba40652007-08-30 20:10:57 +00003903ac_rmfiles=
3904for ac_file in $ac_files
3905do
3906 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003907 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00003908 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3909 esac
3910done
3911rm -f $ac_rmfiles
3912
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003913if { { ac_try="$ac_link_default"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003914case "(($ac_try" in
3915 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3916 *) ac_try_echo=$ac_try;;
3917esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003918eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3919$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003920 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003921 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003922 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3923 test $ac_status = 0; }; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003924 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3925# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3926# in a Makefile. We should not override ac_cv_exeext if it was cached,
3927# so that the user can short-circuit this test for compilers unknown to
3928# Autoconf.
3929for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003930do
3931 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003932 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003933 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003934 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003935 [ab].out )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003936 # We found the default executable, but exeext='' is most
3937 # certainly right.
3938 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003939 *.* )
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003940 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Martin v. Löwiseba40652007-08-30 20:10:57 +00003941 then :; else
3942 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3943 fi
3944 # We set ac_cv_exeext here because the later test for it is not
3945 # safe: cross compilers may not add the suffix if given an `-o'
3946 # argument, so we may need to know it at that point already.
3947 # Even if this section looks crufty: it has the advantage of
3948 # actually working.
Skip Montanarof0d5f792004-08-15 14:08:23 +00003949 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003950 * )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003951 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003952 esac
3953done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003954test "$ac_cv_exeext" = no && ac_cv_exeext=
3955
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003956else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003957 ac_file=''
3958fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003959if test -z "$ac_file"; then :
3960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3961$as_echo "no" >&6; }
3962$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003963sed 's/^/| /' conftest.$ac_ext >&5
3964
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003965{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3966$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003967as_fn_error 77 "C compiler cannot create executables
Matthias Klose3cef2a92012-03-14 23:39:33 +01003968See \`config.log' for more details" "$LINENO" 5; }
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003969else
3970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3971$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003972fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3974$as_echo_n "checking for C compiler default output file name... " >&6; }
3975{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3976$as_echo "$ac_file" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003977ac_exeext=$ac_cv_exeext
Michael W. Hudson54241132001-12-07 15:38:26 +00003978
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003979rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00003980ac_clean_files=$ac_clean_files_save
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3982$as_echo_n "checking for suffix of executables... " >&6; }
3983if { { ac_try="$ac_link"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003984case "(($ac_try" in
3985 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3986 *) ac_try_echo=$ac_try;;
3987esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003988eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3989$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003990 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003991 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003992 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3993 test $ac_status = 0; }; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00003994 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3995# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3996# work properly (i.e., refer to `conftest.exe'), while it won't with
3997# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00003998for ac_file in conftest.exe conftest conftest.*; do
3999 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00004000 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004001 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004002 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
Skip Montanarof0d5f792004-08-15 14:08:23 +00004003 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004004 * ) break;;
4005 esac
4006done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004007else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004008 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4009$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004010as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Matthias Klose3cef2a92012-03-14 23:39:33 +01004011See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004012fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004013rm -f conftest conftest$ac_cv_exeext
4014{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4015$as_echo "$ac_cv_exeext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004016
4017rm -f conftest.$ac_ext
4018EXEEXT=$ac_cv_exeext
4019ac_exeext=$EXEEXT
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004020cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4021/* end confdefs.h. */
4022#include <stdio.h>
4023int
4024main ()
4025{
4026FILE *f = fopen ("conftest.out", "w");
4027 return ferror (f) || fclose (f) != 0;
4028
4029 ;
4030 return 0;
4031}
Skip Montanaro6dead952003-09-25 14:50:04 +00004032_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004033ac_clean_files="$ac_clean_files conftest.out"
4034# Check that the compiler produces executables we can run. If not, either
4035# the compiler is broken, or we cross compile.
4036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4037$as_echo_n "checking whether we are cross compiling... " >&6; }
4038if test "$cross_compiling" != yes; then
4039 { { ac_try="$ac_link"
4040case "(($ac_try" in
4041 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4042 *) ac_try_echo=$ac_try;;
4043esac
4044eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4045$as_echo "$ac_try_echo"; } >&5
4046 (eval "$ac_link") 2>&5
4047 ac_status=$?
4048 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4049 test $ac_status = 0; }
4050 if { ac_try='./conftest$ac_cv_exeext'
4051 { { case "(($ac_try" in
4052 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4053 *) ac_try_echo=$ac_try;;
4054esac
4055eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4056$as_echo "$ac_try_echo"; } >&5
4057 (eval "$ac_try") 2>&5
4058 ac_status=$?
4059 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4060 test $ac_status = 0; }; }; then
4061 cross_compiling=no
4062 else
4063 if test "$cross_compiling" = maybe; then
4064 cross_compiling=yes
4065 else
4066 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4067$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004068as_fn_error $? "cannot run C compiled programs.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004069If you meant to cross compile, use \`--host'.
Matthias Klose3cef2a92012-03-14 23:39:33 +01004070See \`config.log' for more details" "$LINENO" 5; }
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004071 fi
4072 fi
4073fi
4074{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4075$as_echo "$cross_compiling" >&6; }
4076
4077rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4078ac_clean_files=$ac_clean_files_save
4079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4080$as_echo_n "checking for suffix of object files... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004081if ${ac_cv_objext+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004082 $as_echo_n "(cached) " >&6
4083else
4084 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004085/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004086
Martin v. Löwis11437992002-04-12 09:54:03 +00004087int
4088main ()
4089{
4090
4091 ;
4092 return 0;
4093}
4094_ACEOF
4095rm -f conftest.o conftest.obj
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004096if { { ac_try="$ac_compile"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004097case "(($ac_try" in
4098 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4099 *) ac_try_echo=$ac_try;;
4100esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004101eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4102$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00004103 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004104 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004105 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4106 test $ac_status = 0; }; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004107 for ac_file in conftest.o conftest.obj conftest.*; do
4108 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004109 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004110 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004111 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4112 break;;
4113 esac
4114done
4115else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004116 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004117sed 's/^/| /' conftest.$ac_ext >&5
4118
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004119{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4120$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004121as_fn_error $? "cannot compute suffix of object files: cannot compile
Matthias Klose3cef2a92012-03-14 23:39:33 +01004122See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004123fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004124rm -f conftest.$ac_cv_objext conftest.$ac_ext
4125fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004126{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4127$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004128OBJEXT=$ac_cv_objext
4129ac_objext=$OBJEXT
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4131$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004132if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004133 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004134else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004135 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004136/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004137
Martin v. Löwis11437992002-04-12 09:54:03 +00004138int
4139main ()
4140{
4141#ifndef __GNUC__
4142 choke me
4143#endif
4144
4145 ;
4146 return 0;
4147}
4148_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004149if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004150 ac_compiler_gnu=yes
4151else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004152 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004153fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004154rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004155ac_cv_c_compiler_gnu=$ac_compiler_gnu
4156
4157fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004158{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4159$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4160if test $ac_compiler_gnu = yes; then
4161 GCC=yes
4162else
4163 GCC=
4164fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004165ac_test_CFLAGS=${CFLAGS+set}
4166ac_save_CFLAGS=$CFLAGS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4168$as_echo_n "checking whether $CC accepts -g... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004169if ${ac_cv_prog_cc_g+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004170 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004171else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004172 ac_save_c_werror_flag=$ac_c_werror_flag
4173 ac_c_werror_flag=yes
4174 ac_cv_prog_cc_g=no
4175 CFLAGS="-g"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004176 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004177/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004178
Martin v. Löwis11437992002-04-12 09:54:03 +00004179int
4180main ()
4181{
4182
4183 ;
4184 return 0;
4185}
4186_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004187if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004188 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004189else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004190 CFLAGS=""
4191 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004192/* end confdefs.h. */
4193
4194int
4195main ()
4196{
4197
4198 ;
4199 return 0;
4200}
4201_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004202if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004203
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004204else
4205 ac_c_werror_flag=$ac_save_c_werror_flag
Martin v. Löwiseba40652007-08-30 20:10:57 +00004206 CFLAGS="-g"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004207 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004208/* end confdefs.h. */
4209
4210int
4211main ()
4212{
4213
4214 ;
4215 return 0;
4216}
4217_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004218if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004219 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004220fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004221rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004222fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004223rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4224fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004225rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4226 ac_c_werror_flag=$ac_save_c_werror_flag
4227fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004228{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4229$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004230if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004231 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004232elif test $ac_cv_prog_cc_g = yes; then
4233 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004234 CFLAGS="-g -O2"
4235 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004236 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004237 fi
4238else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004239 if test "$GCC" = yes; then
4240 CFLAGS="-O2"
4241 else
4242 CFLAGS=
4243 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004244fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4246$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004247if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004248 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004249else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004250 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004251ac_save_CC=$CC
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004252cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004253/* end confdefs.h. */
4254#include <stdarg.h>
4255#include <stdio.h>
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004256struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004257/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4258struct buf { int x; };
4259FILE * (*rcsopen) (struct buf *, struct stat *, int);
4260static char *e (p, i)
4261 char **p;
4262 int i;
4263{
4264 return p[i];
4265}
4266static char *f (char * (*g) (char **, int), char **p, ...)
4267{
4268 char *s;
4269 va_list v;
4270 va_start (v,p);
4271 s = g (p, va_arg (v,int));
4272 va_end (v);
4273 return s;
4274}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004275
4276/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4277 function prototypes and stuff, but not '\xHH' hex character constants.
4278 These don't provoke an error unfortunately, instead are silently treated
Martin v. Löwiseba40652007-08-30 20:10:57 +00004279 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004280 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4281 array size at least. It's necessary to write '\x00'==0 to get something
Martin v. Löwiseba40652007-08-30 20:10:57 +00004282 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004283int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4284
Martin v. Löwiseba40652007-08-30 20:10:57 +00004285/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4286 inside strings and character constants. */
4287#define FOO(x) 'x'
4288int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4289
Skip Montanaro6dead952003-09-25 14:50:04 +00004290int test (int i, double x);
4291struct s1 {int (*f) (int a);};
4292struct s2 {int (*f) (double a);};
4293int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4294int argc;
4295char **argv;
4296int
4297main ()
4298{
4299return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4300 ;
4301 return 0;
4302}
4303_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00004304for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4305 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004306do
4307 CC="$ac_save_CC $ac_arg"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004308 if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004309 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004310fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004311rm -f core conftest.err conftest.$ac_objext
4312 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004313done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004314rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004315CC=$ac_save_CC
4316
4317fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004318# AC_CACHE_VAL
4319case "x$ac_cv_prog_cc_c89" in
4320 x)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004321 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4322$as_echo "none needed" >&6; } ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00004323 xno)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4325$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004326 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00004327 CC="$CC $ac_cv_prog_cc_c89"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4329$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004330esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004331if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004332
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004333fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004334
Martin v. Löwis11437992002-04-12 09:54:03 +00004335ac_ext=c
4336ac_cpp='$CPP $CPPFLAGS'
4337ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4338ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4339ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004340
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00004341if test ! -z "$preset_cflags"
4342then
4343 CFLAGS=$preset_cflags
4344fi
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004345
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004346
4347
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4349$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004350
Martin v. Löwiseba40652007-08-30 20:10:57 +00004351# Check whether --with-cxx_main was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004352if test "${with_cxx_main+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004353 withval=$with_cxx_main;
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004354
4355 case $withval in
4356 no) with_cxx_main=no
4357 MAINCC='$(CC)';;
4358 yes) with_cxx_main=yes
4359 MAINCC='$(CXX)';;
4360 *) with_cxx_main=yes
4361 MAINCC=$withval
4362 if test -z "$CXX"
4363 then
4364 CXX=$withval
4365 fi;;
4366 esac
4367else
4368
4369 with_cxx_main=no
4370 MAINCC='$(CC)'
4371
Martin v. Löwiseba40652007-08-30 20:10:57 +00004372fi
4373
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004374{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4375$as_echo "$with_cxx_main" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004376
4377preset_cxx="$CXX"
4378if test -z "$CXX"
4379then
4380 case "$CC" in
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004381 gcc) if test -n "$ac_tool_prefix"; then
4382 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4383set dummy ${ac_tool_prefix}g++; ac_word=$2
4384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4385$as_echo_n "checking for $ac_word... " >&6; }
4386if ${ac_cv_path_CXX+:} false; then :
4387 $as_echo_n "(cached) " >&6
4388else
4389 case $CXX in
4390 [\\/]* | ?:[\\/]*)
4391 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4392 ;;
4393 *)
4394 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4395for as_dir in notfound
4396do
4397 IFS=$as_save_IFS
4398 test -z "$as_dir" && as_dir=.
4399 for ac_exec_ext in '' $ac_executable_extensions; do
4400 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4401 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4402 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4403 break 2
4404 fi
4405done
4406 done
4407IFS=$as_save_IFS
4408
4409 ;;
4410esac
4411fi
4412CXX=$ac_cv_path_CXX
4413if test -n "$CXX"; then
4414 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4415$as_echo "$CXX" >&6; }
4416else
4417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4418$as_echo "no" >&6; }
4419fi
4420
4421
4422fi
4423if test -z "$ac_cv_path_CXX"; then
4424 ac_pt_CXX=$CXX
4425 # Extract the first word of "g++", so it can be a program name with args.
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004426set dummy g++; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4428$as_echo_n "checking for $ac_word... " >&6; }
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004429if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004430 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004431else
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004432 case $ac_pt_CXX in
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004433 [\\/]* | ?:[\\/]*)
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004434 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 +00004435 ;;
4436 *)
4437 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4438for as_dir in notfound
4439do
4440 IFS=$as_save_IFS
4441 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004442 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004443 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004444 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004445 $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 +00004446 break 2
4447 fi
4448done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004449 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004450IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004451
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004452 ;;
4453esac
4454fi
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004455ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4456if test -n "$ac_pt_CXX"; then
4457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4458$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004459else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4461$as_echo "no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004462fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004463
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004464 if test "x$ac_pt_CXX" = x; then
4465 CXX="g++"
4466 else
4467 case $cross_compiling:$ac_tool_warned in
4468yes:)
4469{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4470$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4471ac_tool_warned=yes ;;
4472esac
4473 CXX=$ac_pt_CXX
4474 fi
4475else
4476 CXX="$ac_cv_path_CXX"
4477fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004478 ;;
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004479 cc) if test -n "$ac_tool_prefix"; then
4480 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4481set dummy ${ac_tool_prefix}c++; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4483$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004484if ${ac_cv_path_CXX+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004485 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004486else
4487 case $CXX in
4488 [\\/]* | ?:[\\/]*)
4489 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4490 ;;
4491 *)
4492 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4493for as_dir in notfound
4494do
4495 IFS=$as_save_IFS
4496 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004497 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004498 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004499 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004500 $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 +00004501 break 2
4502 fi
4503done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004504 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004505IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004506
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004507 ;;
4508esac
4509fi
4510CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00004511if test -n "$CXX"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4513$as_echo "$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004514else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4516$as_echo "no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004517fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004518
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004519
4520fi
4521if test -z "$ac_cv_path_CXX"; then
4522 ac_pt_CXX=$CXX
4523 # Extract the first word of "c++", so it can be a program name with args.
4524set dummy c++; ac_word=$2
4525{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4526$as_echo_n "checking for $ac_word... " >&6; }
4527if ${ac_cv_path_ac_pt_CXX+:} false; then :
4528 $as_echo_n "(cached) " >&6
4529else
4530 case $ac_pt_CXX in
4531 [\\/]* | ?:[\\/]*)
4532 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4533 ;;
4534 *)
4535 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4536for as_dir in notfound
4537do
4538 IFS=$as_save_IFS
4539 test -z "$as_dir" && as_dir=.
4540 for ac_exec_ext in '' $ac_executable_extensions; do
4541 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4542 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4543 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4544 break 2
4545 fi
4546done
4547 done
4548IFS=$as_save_IFS
4549
4550 ;;
4551esac
4552fi
4553ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4554if test -n "$ac_pt_CXX"; then
4555 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4556$as_echo "$ac_pt_CXX" >&6; }
4557else
4558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4559$as_echo "no" >&6; }
4560fi
4561
4562 if test "x$ac_pt_CXX" = x; then
4563 CXX="c++"
4564 else
4565 case $cross_compiling:$ac_tool_warned in
4566yes:)
4567{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4568$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4569ac_tool_warned=yes ;;
4570esac
4571 CXX=$ac_pt_CXX
4572 fi
4573else
4574 CXX="$ac_cv_path_CXX"
4575fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004576 ;;
4577 esac
4578 if test "$CXX" = "notfound"
4579 then
4580 CXX=""
4581 fi
4582fi
4583if test -z "$CXX"
4584then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004585 if test -n "$ac_tool_prefix"; then
4586 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4587 do
4588 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4589set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4591$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004592if ${ac_cv_prog_CXX+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004593 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004594else
4595 if test -n "$CXX"; then
4596 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4597else
4598as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4599for as_dir in $PATH
4600do
4601 IFS=$as_save_IFS
4602 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004603 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004604 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004605 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004606 $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 +00004607 break 2
4608 fi
4609done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004610 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004611IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004612
4613fi
4614fi
4615CXX=$ac_cv_prog_CXX
4616if test -n "$CXX"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4618$as_echo "$CXX" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004619else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4621$as_echo "no" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004622fi
4623
Martin v. Löwiseba40652007-08-30 20:10:57 +00004624
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004625 test -n "$CXX" && break
4626 done
4627fi
4628if test -z "$CXX"; then
4629 ac_ct_CXX=$CXX
4630 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4631do
4632 # Extract the first word of "$ac_prog", so it can be a program name with args.
4633set dummy $ac_prog; ac_word=$2
4634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4635$as_echo_n "checking for $ac_word... " >&6; }
4636if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4637 $as_echo_n "(cached) " >&6
4638else
4639 if test -n "$ac_ct_CXX"; then
4640 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4641else
4642as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4643for as_dir in $PATH
4644do
4645 IFS=$as_save_IFS
4646 test -z "$as_dir" && as_dir=.
4647 for ac_exec_ext in '' $ac_executable_extensions; do
4648 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4649 ac_cv_prog_ac_ct_CXX="$ac_prog"
4650 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4651 break 2
4652 fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004653done
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004654 done
4655IFS=$as_save_IFS
4656
4657fi
4658fi
4659ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4660if test -n "$ac_ct_CXX"; then
4661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4662$as_echo "$ac_ct_CXX" >&6; }
4663else
4664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4665$as_echo "no" >&6; }
4666fi
4667
4668
4669 test -n "$ac_ct_CXX" && break
4670done
4671
4672 if test "x$ac_ct_CXX" = x; then
4673 CXX="notfound"
4674 else
4675 case $cross_compiling:$ac_tool_warned in
4676yes:)
4677{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4678$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4679ac_tool_warned=yes ;;
4680esac
4681 CXX=$ac_ct_CXX
4682 fi
4683fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004684
4685 if test "$CXX" = "notfound"
4686 then
4687 CXX=""
4688 fi
4689fi
4690if test "$preset_cxx" != "$CXX"
4691then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004692 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004693
4694 By default, distutils will build C++ extension modules with \"$CXX\".
4695 If this is not intended, then set CXX on the configure command line.
4696 " >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004697$as_echo "$as_me: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004698
4699 By default, distutils will build C++ extension modules with \"$CXX\".
4700 If this is not intended, then set CXX on the configure command line.
4701 " >&2;}
4702fi
4703
doko@python.org4e63fbe2013-01-25 13:08:27 +01004704MULTIARCH=$($CC --print-multiarch 2>/dev/null)
4705
4706
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004707
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004708# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004709
4710ac_ext=c
4711ac_cpp='$CPP $CPPFLAGS'
4712ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4713ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4714ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4716$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004717# On Suns, sometimes $CPP names a directory.
4718if test -n "$CPP" && test -d "$CPP"; then
4719 CPP=
4720fi
4721if test -z "$CPP"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +01004722 if ${ac_cv_prog_CPP+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004723 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004724else
Martin v. Löwis11437992002-04-12 09:54:03 +00004725 # Double quotes because CPP needs to be expanded
4726 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4727 do
4728 ac_preproc_ok=false
4729for ac_c_preproc_warn_flag in '' yes
4730do
4731 # Use a header file that comes with gcc, so configuring glibc
4732 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004733 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4734 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004735 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004736 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004737 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004738/* end confdefs.h. */
4739#ifdef __STDC__
4740# include <limits.h>
4741#else
4742# include <assert.h>
4743#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004744 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004745_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004746if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004747
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004748else
Martin v. Löwis11437992002-04-12 09:54:03 +00004749 # Broken: fails on valid input.
4750continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004751fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004752rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004753
Martin v. Löwiseba40652007-08-30 20:10:57 +00004754 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004755 # can be detected and how.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004756 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004757/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004758#include <ac_nonexistent.h>
4759_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004760if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004761 # Broken: success on invalid input.
4762continue
4763else
Martin v. Löwis11437992002-04-12 09:54:03 +00004764 # Passes both tests.
4765ac_preproc_ok=:
4766break
4767fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004768rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004769
4770done
4771# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004772rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004773if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004774 break
4775fi
4776
4777 done
4778 ac_cv_prog_CPP=$CPP
4779
4780fi
4781 CPP=$ac_cv_prog_CPP
4782else
4783 ac_cv_prog_CPP=$CPP
4784fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004785{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4786$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004787ac_preproc_ok=false
4788for ac_c_preproc_warn_flag in '' yes
4789do
4790 # Use a header file that comes with gcc, so configuring glibc
4791 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004792 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4793 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004794 # On the NeXT, cc -E runs the code through the compiler's parser,
4795 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004796 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004797/* end confdefs.h. */
4798#ifdef __STDC__
4799# include <limits.h>
4800#else
4801# include <assert.h>
4802#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004803 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004804_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004805if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004806
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004807else
Martin v. Löwis11437992002-04-12 09:54:03 +00004808 # Broken: fails on valid input.
4809continue
4810fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004811rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004812
Martin v. Löwiseba40652007-08-30 20:10:57 +00004813 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004814 # can be detected and how.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004815 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004816/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004817#include <ac_nonexistent.h>
4818_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004819if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004820 # Broken: success on invalid input.
4821continue
4822else
Martin v. Löwis11437992002-04-12 09:54:03 +00004823 # Passes both tests.
4824ac_preproc_ok=:
4825break
4826fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004827rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004828
4829done
4830# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004831rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004832if $ac_preproc_ok; then :
4833
Martin v. Löwis11437992002-04-12 09:54:03 +00004834else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004835 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4836$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004837as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
Matthias Klose3cef2a92012-03-14 23:39:33 +01004838See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004839fi
4840
4841ac_ext=c
4842ac_cpp='$CPP $CPPFLAGS'
4843ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4844ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4845ac_compiler_gnu=$ac_cv_c_compiler_gnu
4846
4847
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4849$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004850if ${ac_cv_path_GREP+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004851 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004852else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004853 if test -z "$GREP"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004854 ac_path_GREP_found=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004855 # Loop through the user's path and test for each of PROGNAME-LIST
4856 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00004857for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4858do
4859 IFS=$as_save_IFS
4860 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004861 for ac_prog in grep ggrep; do
4862 for ac_exec_ext in '' $ac_executable_extensions; do
4863 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004864 as_fn_executable_p "$ac_path_GREP" || continue
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004865# Check for GNU ac_path_GREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004866 # Check for GNU $ac_path_GREP
4867case `"$ac_path_GREP" --version 2>&1` in
4868*GNU*)
4869 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4870*)
4871 ac_count=0
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004872 $as_echo_n 0123456789 >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004873 while :
4874 do
4875 cat "conftest.in" "conftest.in" >"conftest.tmp"
4876 mv "conftest.tmp" "conftest.in"
4877 cp "conftest.in" "conftest.nl"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004878 $as_echo 'GREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004879 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4880 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004881 as_fn_arith $ac_count + 1 && ac_count=$as_val
Martin v. Löwiseba40652007-08-30 20:10:57 +00004882 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4883 # Best one so far, save it but keep looking for a better one
4884 ac_cv_path_GREP="$ac_path_GREP"
4885 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004886 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004887 # 10*(2^10) chars as input seems more than enough
4888 test $ac_count -gt 10 && break
4889 done
4890 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4891esac
4892
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004893 $ac_path_GREP_found && break 3
4894 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004895 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004896 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004897IFS=$as_save_IFS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004898 if test -z "$ac_cv_path_GREP"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004899 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 +00004900 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004901else
4902 ac_cv_path_GREP=$GREP
4903fi
4904
Martin v. Löwiseba40652007-08-30 20:10:57 +00004905fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004906{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4907$as_echo "$ac_cv_path_GREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00004908 GREP="$ac_cv_path_GREP"
4909
4910
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004911{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4912$as_echo_n "checking for egrep... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004913if ${ac_cv_path_EGREP+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004914 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +00004915else
4916 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4917 then ac_cv_path_EGREP="$GREP -E"
4918 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004919 if test -z "$EGREP"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004920 ac_path_EGREP_found=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004921 # Loop through the user's path and test for each of PROGNAME-LIST
4922 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00004923for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4924do
4925 IFS=$as_save_IFS
4926 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004927 for ac_prog in egrep; do
4928 for ac_exec_ext in '' $ac_executable_extensions; do
4929 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004930 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004931# Check for GNU ac_path_EGREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004932 # Check for GNU $ac_path_EGREP
4933case `"$ac_path_EGREP" --version 2>&1` in
4934*GNU*)
4935 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4936*)
4937 ac_count=0
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004938 $as_echo_n 0123456789 >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004939 while :
4940 do
4941 cat "conftest.in" "conftest.in" >"conftest.tmp"
4942 mv "conftest.tmp" "conftest.in"
4943 cp "conftest.in" "conftest.nl"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004944 $as_echo 'EGREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004945 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4946 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004947 as_fn_arith $ac_count + 1 && ac_count=$as_val
Martin v. Löwiseba40652007-08-30 20:10:57 +00004948 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4949 # Best one so far, save it but keep looking for a better one
4950 ac_cv_path_EGREP="$ac_path_EGREP"
4951 ac_path_EGREP_max=$ac_count
4952 fi
4953 # 10*(2^10) chars as input seems more than enough
4954 test $ac_count -gt 10 && break
4955 done
4956 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4957esac
4958
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004959 $ac_path_EGREP_found && break 3
4960 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004961 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004962 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004963IFS=$as_save_IFS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004964 if test -z "$ac_cv_path_EGREP"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004965 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 +00004966 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004967else
4968 ac_cv_path_EGREP=$EGREP
4969fi
4970
Martin v. Löwiseba40652007-08-30 20:10:57 +00004971 fi
4972fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004973{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4974$as_echo "$ac_cv_path_EGREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00004975 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00004976
4977
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4979$as_echo_n "checking for ANSI C header files... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004980if ${ac_cv_header_stdc+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004981 $as_echo_n "(cached) " >&6
4982else
4983 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00004984/* end confdefs.h. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004985#include <stdlib.h>
4986#include <stdarg.h>
4987#include <string.h>
4988#include <float.h>
4989
4990int
4991main ()
4992{
4993
4994 ;
4995 return 0;
4996}
4997_ACEOF
4998if ac_fn_c_try_compile "$LINENO"; then :
4999 ac_cv_header_stdc=yes
5000else
5001 ac_cv_header_stdc=no
5002fi
5003rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5004
5005if test $ac_cv_header_stdc = yes; then
5006 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5007 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5008/* end confdefs.h. */
5009#include <string.h>
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00005010
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00005011_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005012if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005013 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005014
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005015else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005016 ac_cv_header_stdc=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005017fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00005018rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005019
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005020fi
5021
5022if test $ac_cv_header_stdc = yes; then
5023 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5024 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5025/* end confdefs.h. */
5026#include <stdlib.h>
5027
5028_ACEOF
5029if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5030 $EGREP "free" >/dev/null 2>&1; then :
5031
5032else
5033 ac_cv_header_stdc=no
5034fi
5035rm -f conftest*
5036
5037fi
5038
5039if test $ac_cv_header_stdc = yes; then
5040 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5041 if test "$cross_compiling" = yes; then :
5042 :
5043else
5044 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5045/* end confdefs.h. */
5046#include <ctype.h>
5047#include <stdlib.h>
5048#if ((' ' & 0x0FF) == 0x020)
5049# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5050# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5051#else
5052# define ISLOWER(c) \
5053 (('a' <= (c) && (c) <= 'i') \
5054 || ('j' <= (c) && (c) <= 'r') \
5055 || ('s' <= (c) && (c) <= 'z'))
5056# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5057#endif
5058
5059#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5060int
5061main ()
5062{
5063 int i;
5064 for (i = 0; i < 256; i++)
5065 if (XOR (islower (i), ISLOWER (i))
5066 || toupper (i) != TOUPPER (i))
5067 return 2;
5068 return 0;
5069}
5070_ACEOF
5071if ac_fn_c_try_run "$LINENO"; then :
5072
5073else
5074 ac_cv_header_stdc=no
5075fi
5076rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5077 conftest.$ac_objext conftest.beam conftest.$ac_ext
5078fi
5079
5080fi
5081fi
5082{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5083$as_echo "$ac_cv_header_stdc" >&6; }
5084if test $ac_cv_header_stdc = yes; then
5085
5086$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5087
5088fi
5089
5090# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5091for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5092 inttypes.h stdint.h unistd.h
5093do :
5094 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5095ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5096"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00005097if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005098 cat >>confdefs.h <<_ACEOF
5099#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5100_ACEOF
5101
5102fi
5103
5104done
5105
5106
5107
5108 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 +01005109if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005110 MINIX=yes
5111else
5112 MINIX=
5113fi
5114
5115
5116 if test "$MINIX" = yes; then
5117
5118$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5119
5120
5121$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5122
5123
5124$as_echo "#define _MINIX 1" >>confdefs.h
5125
5126 fi
5127
5128
5129 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5130$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005131if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005132 $as_echo_n "(cached) " >&6
5133else
5134 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5135/* end confdefs.h. */
5136
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005137# define __EXTENSIONS__ 1
5138 $ac_includes_default
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005139int
5140main ()
5141{
5142
5143 ;
5144 return 0;
5145}
5146_ACEOF
5147if ac_fn_c_try_compile "$LINENO"; then :
5148 ac_cv_safe_to_define___extensions__=yes
5149else
5150 ac_cv_safe_to_define___extensions__=no
5151fi
5152rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5153fi
5154{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5155$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5156 test $ac_cv_safe_to_define___extensions__ = yes &&
5157 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5158
5159 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5160
5161 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5162
5163 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5164
5165 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5166
5167
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005168
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005169# Check for unsupported systems
5170case $ac_sys_system/$ac_sys_release in
5171atheos*|Linux*/1*)
5172 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5173 echo See README for details.
5174 exit 1;;
5175esac
5176
5177
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5179$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005180
5181# Check whether --with-suffix was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005182if test "${with_suffix+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005183 withval=$with_suffix;
5184 case $withval in
5185 no) EXEEXT=;;
5186 yes) EXEEXT=.exe;;
5187 *) EXEEXT=$withval;;
5188 esac
5189fi
5190
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005191{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5192$as_echo "$EXEEXT" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005193
5194# Test whether we're running on a non-case-sensitive system, in which
5195# case we give a warning if no ext is given
5196
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5198$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005199if test ! -d CaseSensitiveTestDir; then
5200mkdir CaseSensitiveTestDir
5201fi
5202
5203if test -d casesensitivetestdir
5204then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005205 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5206$as_echo "yes" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005207 BUILDEXEEXT=.exe
5208else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005209 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5210$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005211 BUILDEXEEXT=$EXEEXT
5212fi
5213rmdir CaseSensitiveTestDir
5214
5215case $MACHDEP in
5216bsdos*)
5217 case $CC in
5218 gcc) CC="$CC -D_HAVE_BSDI";;
5219 esac;;
5220esac
5221
5222case $ac_sys_system in
5223hp*|HP*)
5224 case $CC in
5225 cc|*/cc) CC="$CC -Ae";;
5226 esac;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005227SunOS*)
5228 # Some functions have a prototype only with that define, e.g. confstr
5229
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005230$as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005231
5232 ;;
5233esac
5234
5235
5236
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5238$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005239if test -z "$LIBRARY"
5240then
5241 LIBRARY='libpython$(VERSION).a'
5242fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005243{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5244$as_echo "$LIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005245
5246# LDLIBRARY is the name of the library to link against (as opposed to the
5247# name of the library into which to insert object files). BLDLIBRARY is also
5248# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5249# is blank as the main program is not linked directly against LDLIBRARY.
5250# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5251# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5252# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5253# DLLLIBRARY is the shared (i.e., DLL) library.
5254#
5255# RUNSHARED is used to run shared python without installed libraries
5256#
5257# INSTSONAME is the name of the shared library that will be use to install
5258# on the system - some systems like version suffix, others don't
5259
5260
5261
5262
5263
5264
5265LDLIBRARY="$LIBRARY"
5266BLDLIBRARY='$(LDLIBRARY)'
5267INSTSONAME='$(LDLIBRARY)'
5268DLLLIBRARY=''
5269LDLIBRARYDIR=''
5270RUNSHARED=''
5271
5272# LINKCC is the command that links the python executable -- default is $(CC).
5273# If CXX is set, and if it is needed to link a main function that was
5274# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5275# python might then depend on the C++ runtime
5276# This is altered for AIX in order to build the export list before
5277# linking.
5278
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5280$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005281if test -z "$LINKCC"
5282then
5283 LINKCC='$(PURIFY) $(MAINCC)'
5284 case $ac_sys_system in
5285 AIX*)
5286 exp_extra="\"\""
5287 if test $ac_sys_release -ge 5 -o \
5288 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5289 exp_extra="."
5290 fi
5291 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005292 QNX*)
5293 # qcc must be used because the other compilers do not
5294 # support -N.
5295 LINKCC=qcc;;
5296 esac
5297fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005298{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5299$as_echo "$LINKCC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005300
5301# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5302# make sure we default having it set to "no": this is used by
5303# distutils.unixccompiler to know if it should add --enable-new-dtags
5304# to linker command lines, and failing to detect GNU ld simply results
5305# in the same bahaviour as before.
5306
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5308$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005309ac_prog=ld
5310if test "$GCC" = yes; then
5311 ac_prog=`$CC -print-prog-name=ld`
5312fi
5313case `"$ac_prog" -V 2>&1 < /dev/null` in
5314 *GNU*)
5315 GNULD=yes;;
5316 *)
5317 GNULD=no;;
5318esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005319{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5320$as_echo "$GNULD" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005321
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5323$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005324# Check whether --enable-shared was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005325if test "${enable_shared+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005326 enableval=$enable_shared;
5327fi
5328
5329
5330if test -z "$enable_shared"
5331then
5332 case $ac_sys_system in
5333 CYGWIN* | atheos*)
5334 enable_shared="yes";;
5335 *)
5336 enable_shared="no";;
5337 esac
5338fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005339{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5340$as_echo "$enable_shared" >&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-profiling" >&5
5343$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005344# Check whether --enable-profiling was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005345if test "${enable_profiling+set}" = set; then :
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005346 enableval=$enable_profiling;
5347fi
5348
5349if test "x$enable_profiling" = xyes; then
5350 ac_save_cc="$CC"
Benjamin Petersonb9be7bb2013-03-26 08:55:37 -04005351 CC="$CC -pg"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005352 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005353/* end confdefs.h. */
5354int main() { return 0; }
5355_ACEOF
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005356if ac_fn_c_try_link "$LINENO"; then :
5357
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005358else
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005359 enable_profiling=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005360fi
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005361rm -f core conftest.err conftest.$ac_objext \
5362 conftest$ac_exeext conftest.$ac_ext
5363 CC="$ac_save_cc"
5364else
5365 enable_profiling=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005366fi
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005367{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5368$as_echo "$enable_profiling" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005369
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005370if test "x$enable_profiling" = xyes; then
5371 BASECFLAGS="-pg $BASECFLAGS"
5372 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005373fi
5374
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5376$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005377
5378# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5379# library that we build, but we do not want to link against it (we
5380# will find it with a -framework option). For this reason there is an
5381# extra variable BLDLIBRARY against which Python and the extension
5382# modules are linked, BLDLIBRARY. This is normally the same as
5383# LDLIBRARY, but empty for MacOSX framework builds.
5384if test "$enable_framework"
5385then
5386 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005387 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005388 BLDLIBRARY=''
5389else
5390 BLDLIBRARY='$(LDLIBRARY)'
5391fi
5392
5393# Other platforms follow
5394if test $enable_shared = "yes"; then
5395
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005396$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005397
5398 case $ac_sys_system in
5399 BeOS*)
5400 LDLIBRARY='libpython$(VERSION).so'
5401 ;;
5402 CYGWIN*)
5403 LDLIBRARY='libpython$(VERSION).dll.a'
5404 DLLLIBRARY='libpython$(VERSION).dll'
5405 ;;
5406 SunOS*)
5407 LDLIBRARY='libpython$(VERSION).so'
5408 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005409 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005410 INSTSONAME="$LDLIBRARY".$SOVERSION
5411 ;;
Charles-François Natali3de8c732011-07-24 22:33:35 +02005412 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005413 LDLIBRARY='libpython$(VERSION).so'
5414 BLDLIBRARY='-L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005415 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005416 case $ac_sys_system in
5417 FreeBSD*)
5418 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
5419 ;;
5420 esac
5421 INSTSONAME="$LDLIBRARY".$SOVERSION
5422 ;;
5423 hp*|HP*)
5424 case `uname -m` in
5425 ia64)
5426 LDLIBRARY='libpython$(VERSION).so'
5427 ;;
5428 *)
5429 LDLIBRARY='libpython$(VERSION).sl'
5430 ;;
5431 esac
5432 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005433 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005434 ;;
5435 OSF*)
5436 LDLIBRARY='libpython$(VERSION).so'
5437 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005438 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005439 ;;
5440 atheos*)
5441 LDLIBRARY='libpython$(VERSION).so'
5442 BLDLIBRARY='-L. -lpython$(VERSION)'
5443 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
5444 ;;
5445 Darwin*)
5446 LDLIBRARY='libpython$(VERSION).dylib'
5447 BLDLIBRARY='-L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005448 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005449 ;;
Antoine Pitrouaabdceb2010-09-10 20:03:17 +00005450 AIX*)
5451 LDLIBRARY='libpython$(VERSION).so'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005452 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrouaabdceb2010-09-10 20:03:17 +00005453 ;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005454
5455 esac
5456else # shared is disabled
5457 case $ac_sys_system in
5458 CYGWIN*)
5459 BLDLIBRARY='$(LIBRARY)'
5460 LDLIBRARY='libpython$(VERSION).dll.a'
5461 ;;
5462 esac
5463fi
5464
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005465if test "$cross_compiling" = yes; then
5466 RUNSHARED=
5467fi
5468
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005469{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5470$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005471
5472if test -n "$ac_tool_prefix"; then
5473 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5474set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5476$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005477if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005478 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005479else
5480 if test -n "$RANLIB"; then
5481 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5482else
5483as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5484for as_dir in $PATH
5485do
5486 IFS=$as_save_IFS
5487 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005488 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005489 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005490 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005491 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005492 break 2
5493 fi
5494done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005495 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005496IFS=$as_save_IFS
5497
5498fi
5499fi
5500RANLIB=$ac_cv_prog_RANLIB
5501if test -n "$RANLIB"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005502 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5503$as_echo "$RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005504else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5506$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005507fi
5508
5509
5510fi
5511if test -z "$ac_cv_prog_RANLIB"; then
5512 ac_ct_RANLIB=$RANLIB
5513 # Extract the first word of "ranlib", so it can be a program name with args.
5514set dummy ranlib; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5516$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005517if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005518 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005519else
5520 if test -n "$ac_ct_RANLIB"; then
5521 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5522else
5523as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5524for as_dir in $PATH
5525do
5526 IFS=$as_save_IFS
5527 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005528 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005529 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005530 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005531 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005532 break 2
5533 fi
5534done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005535 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005536IFS=$as_save_IFS
5537
5538fi
5539fi
5540ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5541if test -n "$ac_ct_RANLIB"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5543$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005544else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5546$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005547fi
5548
5549 if test "x$ac_ct_RANLIB" = x; then
5550 RANLIB=":"
5551 else
5552 case $cross_compiling:$ac_tool_warned in
5553yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005554{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5555$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005556ac_tool_warned=yes ;;
5557esac
5558 RANLIB=$ac_ct_RANLIB
5559 fi
5560else
5561 RANLIB="$ac_cv_prog_RANLIB"
5562fi
5563
5564
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005565if test -n "$ac_tool_prefix"; then
5566 for ac_prog in ar aal
5567 do
5568 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5569set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5571$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005572if ${ac_cv_prog_AR+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005573 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005574else
5575 if test -n "$AR"; then
5576 ac_cv_prog_AR="$AR" # Let the user override the test.
5577else
5578as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5579for as_dir in $PATH
5580do
5581 IFS=$as_save_IFS
5582 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005583 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005584 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005585 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005586 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005587 break 2
5588 fi
5589done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005590 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005591IFS=$as_save_IFS
5592
5593fi
5594fi
5595AR=$ac_cv_prog_AR
5596if test -n "$AR"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5598$as_echo "$AR" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005599else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5601$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005602fi
5603
5604
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005605 test -n "$AR" && break
5606 done
5607fi
5608if test -z "$AR"; then
5609 ac_ct_AR=$AR
5610 for ac_prog in ar aal
5611do
5612 # Extract the first word of "$ac_prog", so it can be a program name with args.
5613set dummy $ac_prog; ac_word=$2
5614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5615$as_echo_n "checking for $ac_word... " >&6; }
5616if ${ac_cv_prog_ac_ct_AR+:} false; then :
5617 $as_echo_n "(cached) " >&6
5618else
5619 if test -n "$ac_ct_AR"; then
5620 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5621else
5622as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5623for as_dir in $PATH
5624do
5625 IFS=$as_save_IFS
5626 test -z "$as_dir" && as_dir=.
5627 for ac_exec_ext in '' $ac_executable_extensions; do
5628 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5629 ac_cv_prog_ac_ct_AR="$ac_prog"
5630 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5631 break 2
5632 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005633done
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005634 done
5635IFS=$as_save_IFS
5636
5637fi
5638fi
5639ac_ct_AR=$ac_cv_prog_ac_ct_AR
5640if test -n "$ac_ct_AR"; then
5641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5642$as_echo "$ac_ct_AR" >&6; }
5643else
5644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5645$as_echo "no" >&6; }
5646fi
5647
5648
5649 test -n "$ac_ct_AR" && break
5650done
5651
5652 if test "x$ac_ct_AR" = x; then
5653 AR="ar"
5654 else
5655 case $cross_compiling:$ac_tool_warned in
5656yes:)
5657{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5658$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5659ac_tool_warned=yes ;;
5660esac
5661 AR=$ac_ct_AR
5662 fi
5663fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005664
5665
5666# tweak ARFLAGS only if the user didn't set it on the command line
5667
5668if test -z "$ARFLAGS"
5669then
5670 ARFLAGS="rc"
5671fi
5672
5673
5674# Extract the first word of "svnversion", so it can be a program name with args.
5675set dummy svnversion; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5677$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005678if ${ac_cv_prog_SVNVERSION+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005679 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005680else
5681 if test -n "$SVNVERSION"; then
5682 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
5683else
5684as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5685for as_dir in $PATH
5686do
5687 IFS=$as_save_IFS
5688 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005689 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005690 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005691 ac_cv_prog_SVNVERSION="found"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005692 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005693 break 2
5694 fi
5695done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005696 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005697IFS=$as_save_IFS
5698
5699 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
5700fi
5701fi
5702SVNVERSION=$ac_cv_prog_SVNVERSION
5703if test -n "$SVNVERSION"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SVNVERSION" >&5
5705$as_echo "$SVNVERSION" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005706else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5708$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005709fi
5710
5711
5712if test $SVNVERSION = found
5713then
5714 SVNVERSION="svnversion \$(srcdir)"
5715else
5716 SVNVERSION="echo Unversioned directory"
5717fi
5718
Trent Nelsond86ceec2012-10-16 09:42:45 -04005719
Trent Nelsonabf20512012-10-17 04:32:49 -04005720if test "$abs_srcdir" != "$abs_builddir"; then
Trent Nelsond86ceec2012-10-16 09:42:45 -04005721 # If we're building out-of-tree make sure Include (in the current dir)
5722 # gets picked up before its $srcdir counterpart in order for Python-ast.h
5723 # and graminit.h to get picked up from the correct directory.
5724 # (A side effect of this is that these resources will automatically be
5725 # regenerated when building out-of-tree, regardless of whether or not
5726 # the $srcdir counterpart is up-to-date. This is an acceptable trade
5727 # off.)
5728 BASECPPFLAGS="-IInclude"
5729else
5730 BASECPPFLAGS=""
5731fi
5732
Georg Brandl3a5508e2011-03-06 10:42:21 +01005733
5734
5735
5736# Extract the first word of "hg", so it can be a program name with args.
5737set dummy hg; ac_word=$2
5738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5739$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005740if ${ac_cv_prog_HAS_HG+:} false; then :
Georg Brandl3a5508e2011-03-06 10:42:21 +01005741 $as_echo_n "(cached) " >&6
5742else
5743 if test -n "$HAS_HG"; then
5744 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
5745else
5746as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5747for as_dir in $PATH
5748do
5749 IFS=$as_save_IFS
5750 test -z "$as_dir" && as_dir=.
5751 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005752 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Georg Brandl3a5508e2011-03-06 10:42:21 +01005753 ac_cv_prog_HAS_HG="found"
5754 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5755 break 2
5756 fi
5757done
5758 done
5759IFS=$as_save_IFS
5760
5761 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
5762fi
5763fi
5764HAS_HG=$ac_cv_prog_HAS_HG
5765if test -n "$HAS_HG"; then
5766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
5767$as_echo "$HAS_HG" >&6; }
5768else
5769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5770$as_echo "no" >&6; }
5771fi
5772
5773
5774if test $HAS_HG = found
5775then
5776 HGVERSION="hg id -i \$(srcdir)"
5777 HGTAG="hg id -t \$(srcdir)"
5778 HGBRANCH="hg id -b \$(srcdir)"
5779else
5780 HGVERSION=""
5781 HGTAG=""
5782 HGBRANCH=""
5783fi
5784
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005785case $MACHDEP in
5786bsdos*|hp*|HP*)
5787 # install -d does not work on BSDI or HP-UX
5788 if test -z "$INSTALL"
5789 then
5790 INSTALL="${srcdir}/install-sh -c"
5791 fi
5792esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005793# Find a good install program. We prefer a C program (faster),
5794# so one script is as good as another. But avoid the broken or
5795# incompatible versions:
5796# SysV /etc/install, /usr/sbin/install
5797# SunOS /usr/etc/install
5798# IRIX /sbin/install
5799# AIX /bin/install
5800# AmigaOS /C/install, which installs bootblocks on floppy discs
5801# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5802# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5803# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5804# OS/2's system install, which has a completely different semantic
5805# ./install, which can be erroneously created by make from ./install.sh.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005806# Reject install programs that cannot install multiple files.
5807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5808$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005809if test -z "$INSTALL"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +01005810if ${ac_cv_path_install+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005811 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005812else
5813 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5814for as_dir in $PATH
5815do
5816 IFS=$as_save_IFS
5817 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005818 # Account for people who put trailing slashes in PATH elements.
5819case $as_dir/ in #((
5820 ./ | .// | /[cC]/* | \
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005821 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005822 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005823 /usr/ucb/* ) ;;
5824 *)
5825 # OSF1 and SCO ODT 3.0 have their own names for install.
5826 # Don't use installbsd from OSF since it installs stuff as root
5827 # by default.
5828 for ac_prog in ginstall scoinst install; do
5829 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005830 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005831 if test $ac_prog = install &&
5832 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5833 # AIX install. It has an incompatible calling convention.
5834 :
5835 elif test $ac_prog = install &&
5836 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5837 # program-specific install script used by HP pwplus--don't use.
5838 :
5839 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005840 rm -rf conftest.one conftest.two conftest.dir
5841 echo one > conftest.one
5842 echo two > conftest.two
5843 mkdir conftest.dir
5844 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5845 test -s conftest.one && test -s conftest.two &&
5846 test -s conftest.dir/conftest.one &&
5847 test -s conftest.dir/conftest.two
5848 then
5849 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5850 break 3
5851 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005852 fi
5853 fi
5854 done
5855 done
5856 ;;
5857esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005858
5859 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005860IFS=$as_save_IFS
5861
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005862rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005863
5864fi
5865 if test "${ac_cv_path_install+set}" = set; then
5866 INSTALL=$ac_cv_path_install
5867 else
5868 # As a last resort, use the slow shell script. Don't cache a
5869 # value for INSTALL within a source directory, because that will
5870 # break other packages using the cache if that directory is
5871 # removed, or if the value is a relative name.
5872 INSTALL=$ac_install_sh
5873 fi
5874fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005875{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5876$as_echo "$INSTALL" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005877
5878# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5879# It thinks the first close brace ends the variable substitution.
5880test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5881
5882test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5883
5884test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5885
Trent Nelsonf6407a12012-08-30 14:56:13 +00005886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
5887$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
5888if test -z "$MKDIR_P"; then
5889 if ${ac_cv_path_mkdir+:} false; then :
5890 $as_echo_n "(cached) " >&6
5891else
5892 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5893for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
5894do
5895 IFS=$as_save_IFS
5896 test -z "$as_dir" && as_dir=.
5897 for ac_prog in mkdir gmkdir; do
5898 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005899 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Trent Nelsonf6407a12012-08-30 14:56:13 +00005900 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
5901 'mkdir (GNU coreutils) '* | \
5902 'mkdir (coreutils) '* | \
5903 'mkdir (fileutils) '4.1*)
5904 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
5905 break 3;;
5906 esac
5907 done
5908 done
5909 done
5910IFS=$as_save_IFS
5911
5912fi
5913
5914 test -d ./--version && rmdir ./--version
5915 if test "${ac_cv_path_mkdir+set}" = set; then
5916 MKDIR_P="$ac_cv_path_mkdir -p"
5917 else
5918 # As a last resort, use the slow shell script. Don't cache a
5919 # value for MKDIR_P within a source directory, because that will
5920 # break other packages using the cache if that directory is
5921 # removed, or if the value is a relative name.
5922 MKDIR_P="$ac_install_sh -d"
5923 fi
5924fi
5925{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
5926$as_echo "$MKDIR_P" >&6; }
5927
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005928
5929# Not every filesystem supports hard links
5930
5931if test -z "$LN" ; then
5932 case $ac_sys_system in
5933 BeOS*) LN="ln -s";;
5934 CYGWIN*) LN="ln -s";;
5935 atheos*) LN="ln -s";;
5936 *) LN=ln;;
5937 esac
5938fi
5939
5940# Check for --with-pydebug
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5942$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005943
5944# Check whether --with-pydebug was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005945if test "${with_pydebug+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005946 withval=$with_pydebug;
5947if test "$withval" != no
5948then
5949
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005950$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005951
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5953$as_echo "yes" >&6; };
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005954 Py_DEBUG='true'
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005955else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5956$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005957fi
5958else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005959 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5960$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005961fi
5962
5963
5964# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5965# merged with this chunk of code?
5966
5967# Optimizer/debugger flags
5968# ------------------------
5969# (The following bit of code is complicated enough - please keep things
5970# indented properly. Just pretend you're editing Python code. ;-)
5971
5972# There are two parallel sets of case statements below, one that checks to
5973# see if OPT was set and one that does BASECFLAGS setting based upon
5974# compiler and platform. BASECFLAGS tweaks need to be made even if the
5975# user set OPT.
5976
5977# tweak OPT based on compiler and platform, only if the user didn't set
5978# it on the command line
5979
Benjamin Petersond4b721b2010-03-23 20:58:37 +00005980if test "${OPT-unset}" = "unset"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005981then
5982 case $GCC in
5983 yes)
5984 if test "$CC" != 'g++' ; then
5985 STRICT_PROTO="-Wstrict-prototypes"
5986 fi
5987 # For gcc 4.x we need to use -fwrapv so lets check if its supported
5988 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
5989 WRAP="-fwrapv"
5990 fi
Stefan Krah503e5e12011-09-14 15:19:42 +02005991
5992 # Clang also needs -fwrapv
Stefan Krah2bc1e8f2011-12-08 22:26:06 +01005993 case $CC in
5994 *clang*) WRAP="-fwrapv"
5995 ;;
5996 esac
Stefan Krah503e5e12011-09-14 15:19:42 +02005997
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005998 case $ac_cv_prog_cc_g in
5999 yes)
6000 if test "$Py_DEBUG" = 'true' ; then
6001 # Optimization messes up debuggers, so turn it off for
6002 # debug builds.
Mark Dickinsond2f3e3f2010-05-05 22:23:58 +00006003 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006004 else
6005 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
6006 fi
6007 ;;
6008 *)
6009 OPT="-O3 -Wall $STRICT_PROTO"
6010 ;;
6011 esac
6012 case $ac_sys_system in
6013 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6014 ;;
6015 esac
6016 ;;
6017
6018 *)
6019 OPT="-O"
6020 ;;
6021 esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006022fi
6023
6024
6025
6026# The -arch flags for universal builds on OSX
6027UNIVERSAL_ARCH_FLAGS=
6028
6029
6030# tweak BASECFLAGS based on compiler and platform
6031case $GCC in
6032yes)
6033 # Python violates C99 rules, by casting between incompatible
6034 # pointer types. GCC may generate bad code as a result of that,
6035 # so use -fno-strict-aliasing if supported.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006036 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -fno-strict-aliasing" >&5
6037$as_echo_n "checking whether $CC accepts -fno-strict-aliasing... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006038 ac_save_cc="$CC"
6039 CC="$CC -fno-strict-aliasing"
Matthias Klose3cef2a92012-03-14 23:39:33 +01006040 if ${ac_cv_no_strict_aliasing_ok+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006041 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00006042else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006043 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006044/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00006045
6046int
6047main ()
6048{
Mark Dickinson5e13e292010-05-11 08:55:06 +00006049
Gregory P. Smith373469a2009-11-01 21:03:38 +00006050 ;
6051 return 0;
6052}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006053_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006054if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006055 ac_cv_no_strict_aliasing_ok=yes
6056else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006057 ac_cv_no_strict_aliasing_ok=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006058fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00006059rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00006060fi
6061
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006062 CC="$ac_save_cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing_ok" >&5
6064$as_echo "$ac_cv_no_strict_aliasing_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006065 if test $ac_cv_no_strict_aliasing_ok = yes
6066 then
6067 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6068 fi
6069
6070 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
6071 # support. Without this, treatment of subnormals doesn't follow
6072 # the standard.
doko@python.orgd65e2ba2013-01-31 23:52:03 +01006073 case $host in
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006074 alpha*)
6075 BASECFLAGS="$BASECFLAGS -mieee"
6076 ;;
6077 esac
6078
6079 case $ac_sys_system in
6080 SCO_SV*)
6081 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
6082 ;;
6083 # is there any other compiler on Darwin besides gcc?
6084 Darwin*)
6085 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
6086 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006087 if test "${CC}" = gcc
6088 then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006089 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
6090$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006091 case "${UNIVERSALSDK}" in
6092 */MacOSX10.4u.sdk)
6093 # Build using 10.4 SDK, force usage of gcc when the
6094 # compiler is gcc, otherwise the user will get very
6095 # confusing error messages when building on OSX 10.6
6096 CC=gcc-4.0
6097 CPP=cpp-4.0
6098 ;;
6099 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
6101$as_echo "$CC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006102 fi
6103
6104 # Calculate the right deployment target for this build.
6105 #
Ned Deilyc40b9032014-06-25 13:48:46 -07006106 cur_target_major=`sw_vers -productVersion | \
6107 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
6108 cur_target_minor=`sw_vers -productVersion | \
6109 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
6110 cur_target="${cur_target_major}.${cur_target_minor}"
6111 if test ${cur_target_major} -eq 10 && \
6112 test ${cur_target_minor} -ge 3
6113 then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006114 cur_target=10.3
Ronald Oussoren25967582009-09-06 10:00:26 +00006115 if test ${enable_universalsdk}; then
6116 if test "${UNIVERSAL_ARCHS}" = "all"; then
6117 # Ensure that the default platform for a
6118 # 4-way universal build is OSX 10.5,
6119 # that's the first OS release where
6120 # 4-way builds make sense.
6121 cur_target='10.5'
Ronald Oussoren23d92532009-09-07 06:12:00 +00006122
6123 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
6124 cur_target='10.5'
6125
6126 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
6127 cur_target='10.5'
6128
6129 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
6130 cur_target='10.5'
Ronald Oussoren25967582009-09-06 10:00:26 +00006131 fi
6132 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00006133 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren25967582009-09-06 10:00:26 +00006134 # On Intel macs default to a deployment
6135 # target of 10.4, that's the first OSX
6136 # release with Intel support.
6137 cur_target="10.4"
6138 fi
6139 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006140 fi
6141 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
6142
6143 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
6144 # environment with a value that is the same as what we'll use
6145 # in the Makefile to ensure that we'll get the same compiler
6146 # environment during configure and build time.
6147 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
6148 export MACOSX_DEPLOYMENT_TARGET
6149 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
6150
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006151 if test "${enable_universalsdk}"; then
6152 UNIVERSAL_ARCH_FLAGS=""
6153 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
6154 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
6155 ARCH_RUN_32BIT=""
Ronald Oussoren75912852010-04-08 08:13:31 +00006156 LIPO_32BIT_FLAGS=""
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006157
6158 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
6159 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
6160 LIPO_32BIT_FLAGS=""
6161 ARCH_RUN_32BIT="true"
6162
6163 elif test "$UNIVERSAL_ARCHS" = "all" ; then
6164 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
6165 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren92397ce2010-01-17 19:32:00 +00006166 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006167
6168 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
6169 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
6170 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren92397ce2010-01-17 19:32:00 +00006171 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006172
6173 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
6174 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
6175 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren9922f172010-02-11 13:19:34 +00006176 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006177
6178 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006179 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 +00006180
6181 fi
6182
6183
Ronald Oussoren974eb5e2010-04-18 17:59:37 +00006184 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
6185 if test "${UNIVERSALSDK}" != "/"
6186 then
6187 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
6188 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
6189 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006190 fi
6191
6192 fi
6193
6194
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006195 ;;
6196 OSF*)
6197 BASECFLAGS="$BASECFLAGS -mieee"
6198 ;;
6199 esac
6200 ;;
6201
6202*)
6203 case $ac_sys_system in
6204 OpenUNIX*|UnixWare*)
6205 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
6206 ;;
6207 OSF*)
6208 BASECFLAGS="$BASECFLAGS -ieee -std"
6209 ;;
6210 SCO_SV*)
6211 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
6212 ;;
6213 esac
6214 ;;
6215esac
6216
Zachary Ware6ed42ea2015-12-21 11:43:03 -06006217# ICC needs -fp-model strict or floats behave badly
6218case "$CC" in
6219*icc*)
6220 BASECFLAGS="$BASECFLAGS -fp-model strict"
6221 ;;
6222esac
6223
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006224if test "$Py_DEBUG" = 'true'; then
6225 :
6226else
6227 OPT="-DNDEBUG $OPT"
6228fi
6229
6230if test "$ac_arch_flags"
6231then
6232 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
6233fi
6234
6235# disable check for icc since it seems to pass, but generates a warning
6236if test "$CC" = icc
6237then
6238 ac_cv_opt_olimit_ok=no
6239fi
6240
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -OPT:Olimit=0" >&5
6242$as_echo_n "checking whether $CC accepts -OPT:Olimit=0... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006243if ${ac_cv_opt_olimit_ok+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006244 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006245else
6246 ac_save_cc="$CC"
6247CC="$CC -OPT:Olimit=0"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006248cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006249/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00006250
6251int
6252main ()
6253{
Mark Dickinson5e13e292010-05-11 08:55:06 +00006254
Gregory P. Smith373469a2009-11-01 21:03:38 +00006255 ;
6256 return 0;
6257}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006258_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006259if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006260 ac_cv_opt_olimit_ok=yes
6261else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006262 ac_cv_opt_olimit_ok=no
Matthias Klosec511b472010-05-08 11:01:39 +00006263
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006264fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00006265rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006266CC="$ac_save_cc"
6267fi
6268
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006269{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_opt_olimit_ok" >&5
6270$as_echo "$ac_cv_opt_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006271if test $ac_cv_opt_olimit_ok = yes; then
6272 case $ac_sys_system in
6273 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
6274 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
6275 # environment?
6276 Darwin*)
6277 ;;
Trent Nelson34562e12012-10-17 18:01:12 -04006278 # XXX thankfully this useless troublemaker of a flag has been
6279 # eradicated in the 3.x line. For now, make sure it isn't picked
6280 # up by any of our other platforms that use CC.
6281 AIX*|SunOS*|HP-UX*|IRIX*)
6282 ;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006283 *)
6284 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
6285 ;;
6286 esac
6287else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006288 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Olimit 1500" >&5
6289$as_echo_n "checking whether $CC accepts -Olimit 1500... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006290 if ${ac_cv_olimit_ok+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006291 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006292else
6293 ac_save_cc="$CC"
6294 CC="$CC -Olimit 1500"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006295 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006296/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00006297
6298int
6299main ()
6300{
Mark Dickinson5e13e292010-05-11 08:55:06 +00006301
Gregory P. Smith373469a2009-11-01 21:03:38 +00006302 ;
6303 return 0;
6304}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006305_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006306if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006307 ac_cv_olimit_ok=yes
6308else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006309 ac_cv_olimit_ok=no
Matthias Klosec511b472010-05-08 11:01:39 +00006310
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006311fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00006312rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006313 CC="$ac_save_cc"
6314fi
6315
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_olimit_ok" >&5
6317$as_echo "$ac_cv_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006318 if test $ac_cv_olimit_ok = yes; then
Stefan Krah67473262012-11-29 00:17:05 +01006319 case $ac_sys_system in
6320 # Issue #16534: On HP-UX ac_cv_olimit_ok=yes is a false positive.
6321 HP-UX*)
6322 ;;
6323 *)
6324 BASECFLAGS="$BASECFLAGS -Olimit 1500"
6325 ;;
6326 esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006327 fi
6328fi
6329
6330# Check whether GCC supports PyArg_ParseTuple format
6331if test "$GCC" = "yes"
6332then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006333 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
6334$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006335 save_CFLAGS=$CFLAGS
Benjamin Petersonc8759662013-05-11 13:00:05 -05006336 CFLAGS="$CFLAGS -Werror -Wformat"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006337 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006338/* end confdefs.h. */
6339
6340 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006341int
6342main ()
6343{
6344
6345 ;
6346 return 0;
6347}
Matthias Klosec511b472010-05-08 11:01:39 +00006348
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006349_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006350if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006351
Matthias Klosec511b472010-05-08 11:01:39 +00006352
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006353$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006354
Matthias Klosec511b472010-05-08 11:01:39 +00006355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006356$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00006357
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006358else
Matthias Klosec511b472010-05-08 11:01:39 +00006359
6360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006361$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006362
6363fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006364rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6365 CFLAGS=$save_CFLAGS
6366fi
6367
Brett Cannon4ff151a2015-09-18 15:09:42 -07006368
6369# Enable PGO flags.
Zachary Ware6ed42ea2015-12-21 11:43:03 -06006370
6371
6372
6373
6374
6375
Brett Cannon4ff151a2015-09-18 15:09:42 -07006376# Extract the first word of "llvm-profdata", so it can be a program name with args.
6377set dummy llvm-profdata; ac_word=$2
6378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6379$as_echo_n "checking for $ac_word... " >&6; }
6380if ${ac_cv_prog_LLVM_PROF_FOUND+:} false; then :
6381 $as_echo_n "(cached) " >&6
6382else
6383 if test -n "$LLVM_PROF_FOUND"; then
6384 ac_cv_prog_LLVM_PROF_FOUND="$LLVM_PROF_FOUND" # Let the user override the test.
6385else
6386as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6387for as_dir in $PATH
6388do
6389 IFS=$as_save_IFS
6390 test -z "$as_dir" && as_dir=.
6391 for ac_exec_ext in '' $ac_executable_extensions; do
6392 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6393 ac_cv_prog_LLVM_PROF_FOUND="found"
6394 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6395 break 2
6396 fi
6397done
6398 done
6399IFS=$as_save_IFS
6400
6401 test -z "$ac_cv_prog_LLVM_PROF_FOUND" && ac_cv_prog_LLVM_PROF_FOUND="not-found"
6402fi
6403fi
6404LLVM_PROF_FOUND=$ac_cv_prog_LLVM_PROF_FOUND
6405if test -n "$LLVM_PROF_FOUND"; then
6406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROF_FOUND" >&5
6407$as_echo "$LLVM_PROF_FOUND" >&6; }
6408else
6409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6410$as_echo "no" >&6; }
6411fi
6412
6413
6414LLVM_PROF_ERR=no
6415case $CC in
6416 *clang*)
6417 # Any changes made here should be reflected in the GCC+Darwin case below
6418 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6419 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
6420 LLVM_PROF_MERGER="llvm-profdata merge -output=code.profclangd *.profclangr"
6421 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6422 if test $LLVM_PROF_FOUND = not-found
6423 then
6424 LLVM_PROF_ERR=yes
6425 fi
6426 ;;
6427 *gcc*)
6428 case $ac_sys_system in
6429 Darwin*)
6430 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6431 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
6432 LLVM_PROF_MERGER="llvm-profdata merge -output=code.profclangd *.profclangr"
6433 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6434 if test $LLVM_PROF_FOUND = not-found
6435 then
6436 LLVM_PROF_ERR=yes
6437 fi
6438 ;;
6439 *)
6440 PGO_PROF_GEN_FLAG="-fprofile-generate"
6441 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6442 LLVM_PROF_MERGER="true"
6443 LLVM_PROF_FILE=""
6444 ;;
6445 esac
6446 ;;
Zachary Ware6ed42ea2015-12-21 11:43:03 -06006447 *icc*)
6448 PGO_PROF_GEN_FLAG="-prof-gen"
6449 PGO_PROF_USE_FLAG="-prof-use"
6450 LLVM_PROF_MERGER="true"
6451 LLVM_PROF_FILE=""
6452 ;;
Brett Cannon4ff151a2015-09-18 15:09:42 -07006453esac
6454
6455
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006456# On some compilers, pthreads are available without further options
6457# (e.g. MacOS X). On some of these systems, the compiler will not
6458# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
6459# So we have to see first whether pthreads are available without
6460# options before we can check whether -Kpthread improves anything.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
6462$as_echo_n "checking whether pthreads are available without options... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006463if ${ac_cv_pthread_is_default+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006464 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006465else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006466 if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006467 ac_cv_pthread_is_default=no
6468else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006469 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006470/* end confdefs.h. */
6471
Stefan Krahae66ca62012-11-22 22:36:57 +01006472#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006473#include <pthread.h>
6474
6475void* routine(void* p){return NULL;}
6476
6477int main(){
6478 pthread_t p;
6479 if(pthread_create(&p,NULL,routine,NULL)!=0)
6480 return 1;
6481 (void)pthread_detach(p);
6482 return 0;
6483}
6484
6485_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006486if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006487
6488 ac_cv_pthread_is_default=yes
6489 ac_cv_kthread=no
6490 ac_cv_pthread=no
6491
6492else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006493 ac_cv_pthread_is_default=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006494fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006495rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6496 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006497fi
6498
6499
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006500fi
6501
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006502{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
6503$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006504
6505
6506if test $ac_cv_pthread_is_default = yes
6507then
6508 ac_cv_kpthread=no
6509else
6510# -Kpthread, if available, provides the right #defines
6511# and linker options to make pthread_create available
6512# Some compilers won't report that they do not support -Kpthread,
6513# so we need to run a program to see whether it really made the
6514# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
6516$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006517if ${ac_cv_kpthread+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006518 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006519else
6520 ac_save_cc="$CC"
6521CC="$CC -Kpthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006522if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006523 ac_cv_kpthread=no
6524else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006525 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006526/* end confdefs.h. */
6527
Stefan Krahae66ca62012-11-22 22:36:57 +01006528#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006529#include <pthread.h>
6530
6531void* routine(void* p){return NULL;}
6532
6533int main(){
6534 pthread_t p;
6535 if(pthread_create(&p,NULL,routine,NULL)!=0)
6536 return 1;
6537 (void)pthread_detach(p);
6538 return 0;
6539}
6540
6541_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006542if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006543 ac_cv_kpthread=yes
6544else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006545 ac_cv_kpthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006546fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006547rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6548 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006549fi
6550
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006551CC="$ac_save_cc"
6552fi
6553
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006554{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
6555$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006556fi
6557
6558if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
6559then
6560# -Kthread, if available, provides the right #defines
6561# and linker options to make pthread_create available
6562# Some compilers won't report that they do not support -Kthread,
6563# so we need to run a program to see whether it really made the
6564# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
6566$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006567if ${ac_cv_kthread+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006568 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006569else
6570 ac_save_cc="$CC"
6571CC="$CC -Kthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006572if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006573 ac_cv_kthread=no
6574else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006575 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006576/* end confdefs.h. */
6577
Stefan Krahae66ca62012-11-22 22:36:57 +01006578#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006579#include <pthread.h>
6580
6581void* routine(void* p){return NULL;}
6582
6583int main(){
6584 pthread_t p;
6585 if(pthread_create(&p,NULL,routine,NULL)!=0)
6586 return 1;
6587 (void)pthread_detach(p);
6588 return 0;
6589}
6590
6591_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006592if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006593 ac_cv_kthread=yes
6594else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006595 ac_cv_kthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006596fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006597rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6598 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006599fi
6600
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006601CC="$ac_save_cc"
6602fi
6603
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006604{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
6605$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006606fi
6607
6608if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
6609then
6610# -pthread, if available, provides the right #defines
6611# and linker options to make pthread_create available
6612# Some compilers won't report that they do not support -pthread,
6613# so we need to run a program to see whether it really made the
6614# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
6616$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.orgfa3f9a32013-01-25 15:32:31 +01006617if ${ac_cv_pthread+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006618 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006619else
6620 ac_save_cc="$CC"
6621CC="$CC -pthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006622if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006623 ac_cv_pthread=no
6624else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006625 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006626/* end confdefs.h. */
6627
Stefan Krahae66ca62012-11-22 22:36:57 +01006628#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006629#include <pthread.h>
6630
6631void* routine(void* p){return NULL;}
6632
6633int main(){
6634 pthread_t p;
6635 if(pthread_create(&p,NULL,routine,NULL)!=0)
6636 return 1;
6637 (void)pthread_detach(p);
6638 return 0;
6639}
6640
6641_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006642if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006643 ac_cv_pthread=yes
6644else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006645 ac_cv_pthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006646fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006647rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6648 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006649fi
6650
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006651CC="$ac_save_cc"
6652fi
6653
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006654{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
6655$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006656fi
6657
6658# If we have set a CC compiler flag for thread support then
6659# check if it works for CXX, too.
6660ac_cv_cxx_thread=no
6661if test ! -z "$CXX"
6662then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
6664$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006665ac_save_cxx="$CXX"
6666
6667if test "$ac_cv_kpthread" = "yes"
6668then
6669 CXX="$CXX -Kpthread"
6670 ac_cv_cxx_thread=yes
6671elif test "$ac_cv_kthread" = "yes"
6672then
6673 CXX="$CXX -Kthread"
6674 ac_cv_cxx_thread=yes
6675elif test "$ac_cv_pthread" = "yes"
6676then
6677 CXX="$CXX -pthread"
6678 ac_cv_cxx_thread=yes
6679fi
6680
6681if test $ac_cv_cxx_thread = yes
6682then
6683 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
6684 $CXX -c conftest.$ac_ext 2>&5
6685 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
6686 && test -s conftest$ac_exeext && ./conftest$ac_exeext
6687 then
6688 ac_cv_cxx_thread=yes
6689 else
6690 ac_cv_cxx_thread=no
6691 fi
6692 rm -fr conftest*
6693fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006694{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
6695$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006696fi
6697CXX="$ac_save_cxx"
6698
6699
6700# checks for header files
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6702$as_echo_n "checking for ANSI C header files... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006703if ${ac_cv_header_stdc+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006704 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006705else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006706 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006707/* end confdefs.h. */
6708#include <stdlib.h>
6709#include <stdarg.h>
6710#include <string.h>
6711#include <float.h>
6712
6713int
6714main ()
6715{
6716
6717 ;
6718 return 0;
6719}
6720_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006721if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006722 ac_cv_header_stdc=yes
6723else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006724 ac_cv_header_stdc=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006725fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006726rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6727
6728if test $ac_cv_header_stdc = yes; then
6729 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006730 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006731/* end confdefs.h. */
6732#include <string.h>
6733
6734_ACEOF
6735if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006736 $EGREP "memchr" >/dev/null 2>&1; then :
6737
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006738else
6739 ac_cv_header_stdc=no
6740fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006741rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006742
6743fi
6744
6745if test $ac_cv_header_stdc = yes; then
6746 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006747 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006748/* end confdefs.h. */
6749#include <stdlib.h>
6750
6751_ACEOF
6752if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006753 $EGREP "free" >/dev/null 2>&1; then :
6754
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006755else
6756 ac_cv_header_stdc=no
6757fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006758rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006759
6760fi
6761
6762if test $ac_cv_header_stdc = yes; then
6763 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006764 if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006765 :
6766else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006767 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006768/* end confdefs.h. */
6769#include <ctype.h>
6770#include <stdlib.h>
6771#if ((' ' & 0x0FF) == 0x020)
6772# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6773# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6774#else
6775# define ISLOWER(c) \
6776 (('a' <= (c) && (c) <= 'i') \
6777 || ('j' <= (c) && (c) <= 'r') \
6778 || ('s' <= (c) && (c) <= 'z'))
6779# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6780#endif
6781
6782#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6783int
6784main ()
6785{
6786 int i;
6787 for (i = 0; i < 256; i++)
6788 if (XOR (islower (i), ISLOWER (i))
6789 || toupper (i) != TOUPPER (i))
6790 return 2;
6791 return 0;
6792}
6793_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006794if ac_fn_c_try_run "$LINENO"; then :
6795
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006796else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006797 ac_cv_header_stdc=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006798fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006799rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6800 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006801fi
6802
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006803fi
6804fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006805{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6806$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006807if test $ac_cv_header_stdc = yes; then
6808
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006809$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006810
6811fi
6812
doko@ubuntu.comf27ec3e2014-04-17 20:11:19 +02006813for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00006814fcntl.h grp.h \
doko@ubuntu.comf27ec3e2014-04-17 20:11:19 +02006815ieeefp.h io.h langinfo.h libintl.h poll.h process.h pthread.h \
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00006816shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006817unistd.h utime.h \
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00006818sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
6819sys/lock.h sys/mkdev.h sys/modem.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00006820sys/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 +00006821sys/termio.h sys/time.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00006822sys/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 +00006823sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimes3aa138f2013-06-18 13:25:24 +02006824bluetooth/bluetooth.h linux/tipc.h spawn.h util.h alloca.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006825do :
6826 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6827ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006828if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006829 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006830#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006831_ACEOF
6832
6833fi
6834
Guido van Rossum627b2d71993-12-24 10:39:16 +00006835done
6836
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006837ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006838for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006839 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6841$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006842if eval \${$as_ac_Header+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006843 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006844else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006845 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006846/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006847#include <sys/types.h>
6848#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006849
Martin v. Löwis11437992002-04-12 09:54:03 +00006850int
6851main ()
6852{
6853if ((DIR *) 0)
6854return 0;
6855 ;
6856 return 0;
6857}
6858_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006859if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006860 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006861else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006862 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006863fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006864rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006865fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006866eval ac_res=\$$as_ac_Header
6867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6868$as_echo "$ac_res" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006869if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006870 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006871#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006872_ACEOF
6873
6874ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006875fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006876
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006877done
6878# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6879if test $ac_header_dirent = dirent.h; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006880 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6881$as_echo_n "checking for library containing opendir... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006882if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006883 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006884else
Martin v. Löwis11437992002-04-12 09:54:03 +00006885 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006886cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006887/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006888
Martin v. Löwiseba40652007-08-30 20:10:57 +00006889/* Override any GCC internal prototype to avoid an error.
6890 Use char because int might match the return type of a GCC
6891 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006892#ifdef __cplusplus
6893extern "C"
6894#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006895char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006896int
6897main ()
6898{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006899return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006900 ;
6901 return 0;
6902}
6903_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006904for ac_lib in '' dir; do
6905 if test -z "$ac_lib"; then
6906 ac_res="none required"
6907 else
6908 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00006909 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00006910 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006911 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006912 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00006913fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006914rm -f core conftest.err conftest.$ac_objext \
6915 conftest$ac_exeext
Matthias Klose3cef2a92012-03-14 23:39:33 +01006916 if ${ac_cv_search_opendir+:} false; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006917 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00006918fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006919done
Matthias Klose3cef2a92012-03-14 23:39:33 +01006920if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006921
Martin v. Löwiseba40652007-08-30 20:10:57 +00006922else
6923 ac_cv_search_opendir=no
6924fi
6925rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006926LIBS=$ac_func_search_save_LIBS
6927fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006928{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6929$as_echo "$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006930ac_res=$ac_cv_search_opendir
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006931if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006932 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006933
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006934fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006935
Michael W. Hudson54241132001-12-07 15:38:26 +00006936else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006937 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6938$as_echo_n "checking for library containing opendir... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006939if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006940 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006941else
6942 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006943cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006944/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006945
Martin v. Löwiseba40652007-08-30 20:10:57 +00006946/* Override any GCC internal prototype to avoid an error.
6947 Use char because int might match the return type of a GCC
6948 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006949#ifdef __cplusplus
6950extern "C"
6951#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006952char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006953int
6954main ()
6955{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006956return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006957 ;
6958 return 0;
6959}
6960_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006961for ac_lib in '' x; do
6962 if test -z "$ac_lib"; then
6963 ac_res="none required"
6964 else
6965 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00006966 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00006967 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006968 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006969 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00006970fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006971rm -f core conftest.err conftest.$ac_objext \
6972 conftest$ac_exeext
Matthias Klose3cef2a92012-03-14 23:39:33 +01006973 if ${ac_cv_search_opendir+:} false; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006974 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00006975fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006976done
Matthias Klose3cef2a92012-03-14 23:39:33 +01006977if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006978
Martin v. Löwiseba40652007-08-30 20:10:57 +00006979else
6980 ac_cv_search_opendir=no
6981fi
6982rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006983LIBS=$ac_func_search_save_LIBS
6984fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006985{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6986$as_echo "$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006987ac_res=$ac_cv_search_opendir
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006988if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006989 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006990
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006991fi
6992
6993fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006994
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
6996$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006997if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006998 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006999else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007000 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007001/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007002#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007003int
7004main ()
7005{
7006return makedev(0, 0);
7007 ;
7008 return 0;
7009}
7010_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007011if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007012 ac_cv_header_sys_types_h_makedev=yes
7013else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007014 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007015fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007016rm -f core conftest.err conftest.$ac_objext \
7017 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007018
7019fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007020{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7021$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007022
7023if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007024ac_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 +01007025if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007026
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007027$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007028
7029fi
7030
7031
7032
7033 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007034 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 +01007035if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007036
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007037$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007038
7039fi
7040
7041
7042 fi
7043fi
7044
Michael W. Hudson54241132001-12-07 15:38:26 +00007045
Martin v. Löwis11017b12006-01-14 18:12:57 +00007046# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007047for ac_header in linux/netlink.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007048do :
7049 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 +00007050#ifdef HAVE_ASM_TYPES_H
7051#include <asm/types.h>
7052#endif
7053#ifdef HAVE_SYS_SOCKET_H
7054#include <sys/socket.h>
7055#endif
7056
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007057"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007058if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007059 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007060#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007061_ACEOF
7062
7063fi
7064
7065done
7066
7067
Guido van Rossum627b2d71993-12-24 10:39:16 +00007068# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00007069was_it_defined=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
7071$as_echo_n "checking for clock_t in time.h... " >&6; }
7072cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007073/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007074#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007075
7076_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007077if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007078 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00007079 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007080else
Martin v. Löwis11437992002-04-12 09:54:03 +00007081
7082
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007083$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00007084
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007085
Guido van Rossum627b2d71993-12-24 10:39:16 +00007086fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00007087rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007088
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007089{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
7090$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00007091
Neal Norwitz11690112002-07-30 01:08:28 +00007092# Check whether using makedev requires defining _OSF_SOURCE
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
7094$as_echo_n "checking for makedev... " >&6; }
7095cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007096/* end confdefs.h. */
Jesus Cea616de772010-04-28 10:32:30 +00007097
7098#if defined(MAJOR_IN_MKDEV)
7099#include <sys/mkdev.h>
7100#elif defined(MAJOR_IN_SYSMACROS)
7101#include <sys/sysmacros.h>
7102#else
Neal Norwitz6eb37f02003-02-23 23:28:15 +00007103#include <sys/types.h>
Jesus Cea616de772010-04-28 10:32:30 +00007104#endif
Neal Norwitz11690112002-07-30 01:08:28 +00007105int
7106main ()
7107{
7108 makedev(0, 0)
7109 ;
7110 return 0;
7111}
7112_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007113if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007114 ac_cv_has_makedev=yes
7115else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007116 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007117fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007118rm -f core conftest.err conftest.$ac_objext \
7119 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00007120if test "$ac_cv_has_makedev" = "no"; then
7121 # we didn't link, try if _OSF_SOURCE will allow us to link
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007122 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007123/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00007124
Neal Norwitz6eb37f02003-02-23 23:28:15 +00007125#define _OSF_SOURCE 1
7126#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00007127
Neal Norwitz11690112002-07-30 01:08:28 +00007128int
7129main ()
7130{
7131 makedev(0, 0)
7132 ;
7133 return 0;
7134}
7135_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007136if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007137 ac_cv_has_makedev=yes
7138else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007139 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007140fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007141rm -f core conftest.err conftest.$ac_objext \
7142 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00007143 if test "$ac_cv_has_makedev" = "yes"; then
7144
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007145$as_echo "#define _OSF_SOURCE 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007146
7147 fi
7148fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007149{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
7150$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007151if test "$ac_cv_has_makedev" = "yes"; then
7152
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007153$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007154
7155fi
7156
Martin v. Löwis399a6892002-10-04 10:22:02 +00007157# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7158# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7159# defined, but the compiler does not support pragma redefine_extname,
7160# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7161# structures (such as rlimit64) without declaring them. As a
7162# work-around, disable LFS on such configurations
7163
7164use_lfs=yes
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
7166$as_echo_n "checking Solaris LFS bug... " >&6; }
7167cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007168/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007169
7170#define _LARGEFILE_SOURCE 1
7171#define _FILE_OFFSET_BITS 64
7172#include <sys/resource.h>
7173
Martin v. Löwis399a6892002-10-04 10:22:02 +00007174int
7175main ()
7176{
7177struct rlimit foo;
7178 ;
7179 return 0;
7180}
7181_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007182if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00007183 sol_lfs_bug=no
7184else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007185 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00007186fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007187rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007188{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
7189$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007190if test "$sol_lfs_bug" = "yes"; then
7191 use_lfs=no
7192fi
7193
7194if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00007195# Two defines needed to enable largefile support on various platforms
7196# These may affect some typedefs
Georg Brandl94800df2011-02-25 11:09:02 +00007197case $ac_sys_system/$ac_sys_release in
7198AIX*)
7199
7200$as_echo "#define _LARGE_FILES 1" >>confdefs.h
7201
7202 ;;
7203esac
Guido van Rossum810cc512001-09-09 23:51:39 +00007204
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007205$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007206
7207
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007208$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00007209
Martin v. Löwis399a6892002-10-04 10:22:02 +00007210fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007211
Guido van Rossum84e7b241996-08-19 21:59:00 +00007212# Add some code to confdefs.h so that the test for off_t works on SCO
7213cat >> confdefs.h <<\EOF
7214#if defined(SCO_DS)
7215#undef _OFF_T
7216#endif
7217EOF
7218
Guido van Rossumef2255b2000-03-10 22:30:29 +00007219# Type availability checks
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007220ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007221if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007222
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007223else
Martin v. Löwis11437992002-04-12 09:54:03 +00007224
7225cat >>confdefs.h <<_ACEOF
7226#define mode_t int
7227_ACEOF
7228
7229fi
7230
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007231ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007232if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007233
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007234else
Martin v. Löwis11437992002-04-12 09:54:03 +00007235
7236cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007237#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00007238_ACEOF
7239
7240fi
7241
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007242ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007243if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007244
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007245else
Martin v. Löwis11437992002-04-12 09:54:03 +00007246
7247cat >>confdefs.h <<_ACEOF
7248#define pid_t int
7249_ACEOF
7250
7251fi
7252
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007253
Martin v. Löwis11437992002-04-12 09:54:03 +00007254cat >>confdefs.h <<_ACEOF
Matthias Klosecbf54b12010-05-08 11:04:18 +00007255#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00007256_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007257
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007258ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007259if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007260
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007261else
Martin v. Löwis11437992002-04-12 09:54:03 +00007262
7263cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007264#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007265_ACEOF
7266
7267fi
7268
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
7270$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007271if ${ac_cv_type_uid_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007272 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007273else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007274 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007275/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007276#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007277
7278_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007279if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007280 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007281 ac_cv_type_uid_t=yes
7282else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007283 ac_cv_type_uid_t=no
7284fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00007285rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007286
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007287fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007288{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
7289$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007290if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007291
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007292$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007293
7294
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007295$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007296
7297fi
7298
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007299
7300# There are two separate checks for each of the exact-width integer types we
7301# need. First we check whether the type is available using the usual
7302# AC_CHECK_TYPE macro with the default includes (which includes <inttypes.h>
7303# and <stdint.h> where available). We then also use the special type checks of
7304# the form AC_TYPE_UINT32_T, which in the case that uint32_t is not available
7305# directly, #define's uint32_t to be a suitable type.
7306
7307ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
7308if test "x$ac_cv_type_uint32_t" = xyes; then :
7309
7310$as_echo "#define HAVE_UINT32_T 1" >>confdefs.h
7311
7312fi
7313
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007314ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
7315case $ac_cv_c_uint32_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007316 no|yes) ;; #(
7317 *)
7318
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007319$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007320
7321
7322cat >>confdefs.h <<_ACEOF
7323#define uint32_t $ac_cv_c_uint32_t
7324_ACEOF
7325;;
7326 esac
7327
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007328
7329ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
7330if test "x$ac_cv_type_uint64_t" = xyes; then :
7331
7332$as_echo "#define HAVE_UINT64_T 1" >>confdefs.h
7333
7334fi
7335
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007336ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
7337case $ac_cv_c_uint64_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007338 no|yes) ;; #(
7339 *)
7340
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007341$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007342
7343
7344cat >>confdefs.h <<_ACEOF
7345#define uint64_t $ac_cv_c_uint64_t
7346_ACEOF
7347;;
7348 esac
7349
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007350
7351ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
7352if test "x$ac_cv_type_int32_t" = xyes; then :
7353
7354$as_echo "#define HAVE_INT32_T 1" >>confdefs.h
7355
7356fi
7357
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007358ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
7359case $ac_cv_c_int32_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007360 no|yes) ;; #(
7361 *)
7362
7363cat >>confdefs.h <<_ACEOF
7364#define int32_t $ac_cv_c_int32_t
7365_ACEOF
7366;;
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007367esac
7368
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007369
7370ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
7371if test "x$ac_cv_type_int64_t" = xyes; then :
7372
7373$as_echo "#define HAVE_INT64_T 1" >>confdefs.h
7374
7375fi
7376
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007377ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
7378case $ac_cv_c_int64_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007379 no|yes) ;; #(
7380 *)
7381
7382cat >>confdefs.h <<_ACEOF
7383#define int64_t $ac_cv_c_int64_t
7384_ACEOF
7385;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007386esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00007387
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007388
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007389ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007390if test "x$ac_cv_type_ssize_t" = xyes; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007391
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007392$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00007393
7394fi
7395
Jack Jansendd19cf82001-12-06 22:36:17 +00007396
Michael W. Hudson54241132001-12-07 15:38:26 +00007397# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007398# ANSI C requires sizeof(char) == 1, so no need to check it
Martin v. Löwiseba40652007-08-30 20:10:57 +00007399# The cast to long int works around a bug in the HP C Compiler
7400# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7401# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7402# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
7404$as_echo_n "checking size of int... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007405if ${ac_cv_sizeof_int+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007406 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007407else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007408 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 +00007409
Martin v. Löwis11437992002-04-12 09:54:03 +00007410else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007411 if test "$ac_cv_type_int" = yes; then
7412 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7413$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007414as_fn_error 77 "cannot compute sizeof (int)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007415See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007416 else
7417 ac_cv_sizeof_int=0
7418 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007419fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007420
Martin v. Löwis11437992002-04-12 09:54:03 +00007421fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007422{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
7423$as_echo "$ac_cv_sizeof_int" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007424
7425
7426
Martin v. Löwis11437992002-04-12 09:54:03 +00007427cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007428#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007429_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007430
7431
Martin v. Löwiseba40652007-08-30 20:10:57 +00007432# The cast to long int works around a bug in the HP C Compiler
7433# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7434# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7435# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
7437$as_echo_n "checking size of long... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007438if ${ac_cv_sizeof_long+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007439 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007440else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007441 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 +00007442
Martin v. Löwis11437992002-04-12 09:54:03 +00007443else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007444 if test "$ac_cv_type_long" = yes; then
7445 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7446$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007447as_fn_error 77 "cannot compute sizeof (long)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007448See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007449 else
7450 ac_cv_sizeof_long=0
7451 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007452fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007453
Martin v. Löwis11437992002-04-12 09:54:03 +00007454fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007455{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
7456$as_echo "$ac_cv_sizeof_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007457
7458
7459
Martin v. Löwis11437992002-04-12 09:54:03 +00007460cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007461#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007462_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007463
7464
Martin v. Löwiseba40652007-08-30 20:10:57 +00007465# The cast to long int works around a bug in the HP C Compiler
7466# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7467# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7468# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
7470$as_echo_n "checking size of void *... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007471if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007472 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007473else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007474 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 +00007475
Martin v. Löwis11437992002-04-12 09:54:03 +00007476else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007477 if test "$ac_cv_type_void_p" = yes; then
7478 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7479$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007480as_fn_error 77 "cannot compute sizeof (void *)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007481See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007482 else
7483 ac_cv_sizeof_void_p=0
7484 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007485fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007486
Martin v. Löwis11437992002-04-12 09:54:03 +00007487fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007488{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
7489$as_echo "$ac_cv_sizeof_void_p" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007490
7491
7492
Martin v. Löwis11437992002-04-12 09:54:03 +00007493cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007494#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00007495_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007496
7497
Martin v. Löwiseba40652007-08-30 20:10:57 +00007498# The cast to long int works around a bug in the HP C Compiler
7499# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7500# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7501# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
7503$as_echo_n "checking size of short... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007504if ${ac_cv_sizeof_short+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007505 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007506else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007507 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 +00007508
Martin v. Löwis11437992002-04-12 09:54:03 +00007509else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007510 if test "$ac_cv_type_short" = yes; then
7511 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7512$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007513as_fn_error 77 "cannot compute sizeof (short)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007514See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007515 else
7516 ac_cv_sizeof_short=0
7517 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007518fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007519
Martin v. Löwis11437992002-04-12 09:54:03 +00007520fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007521{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
7522$as_echo "$ac_cv_sizeof_short" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007523
7524
7525
Martin v. Löwis11437992002-04-12 09:54:03 +00007526cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007527#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007528_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007529
7530
Martin v. Löwiseba40652007-08-30 20:10:57 +00007531# The cast to long int works around a bug in the HP C Compiler
7532# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7533# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7534# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
7536$as_echo_n "checking size of float... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007537if ${ac_cv_sizeof_float+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007538 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007539else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007540 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 +00007541
Martin v. Löwis11437992002-04-12 09:54:03 +00007542else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007543 if test "$ac_cv_type_float" = yes; then
7544 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7545$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007546as_fn_error 77 "cannot compute sizeof (float)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007547See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007548 else
7549 ac_cv_sizeof_float=0
7550 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007551fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007552
Martin v. Löwis11437992002-04-12 09:54:03 +00007553fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007554{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
7555$as_echo "$ac_cv_sizeof_float" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007556
7557
7558
Martin v. Löwis11437992002-04-12 09:54:03 +00007559cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007560#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007561_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007562
7563
Martin v. Löwiseba40652007-08-30 20:10:57 +00007564# The cast to long int works around a bug in the HP C Compiler
7565# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7566# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7567# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
7569$as_echo_n "checking size of double... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007570if ${ac_cv_sizeof_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007571 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007572else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007573 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 +00007574
Martin v. Löwis11437992002-04-12 09:54:03 +00007575else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007576 if test "$ac_cv_type_double" = yes; then
7577 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7578$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007579as_fn_error 77 "cannot compute sizeof (double)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007580See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007581 else
7582 ac_cv_sizeof_double=0
7583 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007584fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007585
Martin v. Löwis11437992002-04-12 09:54:03 +00007586fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007587{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
7588$as_echo "$ac_cv_sizeof_double" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007589
7590
7591
Martin v. Löwis11437992002-04-12 09:54:03 +00007592cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007593#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007594_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007595
7596
Martin v. Löwiseba40652007-08-30 20:10:57 +00007597# The cast to long int works around a bug in the HP C Compiler
7598# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7599# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7600# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
7602$as_echo_n "checking size of fpos_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007603if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007604 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007605else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007606 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 +00007607
Martin v. Löwis11437992002-04-12 09:54:03 +00007608else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007609 if test "$ac_cv_type_fpos_t" = yes; then
7610 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7611$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007612as_fn_error 77 "cannot compute sizeof (fpos_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007613See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007614 else
7615 ac_cv_sizeof_fpos_t=0
7616 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007617fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007618
Martin v. Löwis11437992002-04-12 09:54:03 +00007619fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007620{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
7621$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007622
7623
7624
Martin v. Löwis11437992002-04-12 09:54:03 +00007625cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007626#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007627_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007628
Michael W. Hudson54241132001-12-07 15:38:26 +00007629
Martin v. Löwiseba40652007-08-30 20:10:57 +00007630# The cast to long int works around a bug in the HP C Compiler
7631# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7632# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7633# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
7635$as_echo_n "checking size of size_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007636if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007637 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007638else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007639 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 +00007640
Martin v. Löwis18e16552006-02-15 17:27:45 +00007641else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007642 if test "$ac_cv_type_size_t" = yes; then
7643 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7644$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007645as_fn_error 77 "cannot compute sizeof (size_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007646See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007647 else
7648 ac_cv_sizeof_size_t=0
7649 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00007650fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007651
Martin v. Löwis18e16552006-02-15 17:27:45 +00007652fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007653{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
7654$as_echo "$ac_cv_sizeof_size_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007655
7656
7657
Martin v. Löwis18e16552006-02-15 17:27:45 +00007658cat >>confdefs.h <<_ACEOF
7659#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
7660_ACEOF
7661
7662
Christian Heimes951cc0f2008-01-31 23:08:23 +00007663# The cast to long int works around a bug in the HP C Compiler
7664# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7665# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7666# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
7668$as_echo_n "checking size of pid_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007669if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007670 $as_echo_n "(cached) " >&6
Christian Heimes951cc0f2008-01-31 23:08:23 +00007671else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007672 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 +00007673
Christian Heimes951cc0f2008-01-31 23:08:23 +00007674else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007675 if test "$ac_cv_type_pid_t" = yes; then
7676 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7677$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007678as_fn_error 77 "cannot compute sizeof (pid_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007679See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes951cc0f2008-01-31 23:08:23 +00007680 else
7681 ac_cv_sizeof_pid_t=0
7682 fi
7683fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007684
Christian Heimes951cc0f2008-01-31 23:08:23 +00007685fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007686{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
7687$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes951cc0f2008-01-31 23:08:23 +00007688
7689
7690
7691cat >>confdefs.h <<_ACEOF
7692#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
7693_ACEOF
7694
7695
Michael W. Hudson54241132001-12-07 15:38:26 +00007696
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
7698$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007699have_long_long=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007700cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007701/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007702
Martin v. Löwis11437992002-04-12 09:54:03 +00007703int
7704main ()
7705{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007706long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007707 ;
7708 return 0;
7709}
7710_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007711if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007712
7713
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007714$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007715
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007716 have_long_long=yes
7717
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007718fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007719rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007720{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
7721$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007722if test "$have_long_long" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00007723# The cast to long int works around a bug in the HP C Compiler
7724# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7725# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7726# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
7728$as_echo_n "checking size of long long... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007729if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007730 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007731else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007732 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 +00007733
Martin v. Löwis11437992002-04-12 09:54:03 +00007734else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007735 if test "$ac_cv_type_long_long" = yes; then
7736 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7737$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007738as_fn_error 77 "cannot compute sizeof (long long)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007739See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007740 else
7741 ac_cv_sizeof_long_long=0
7742 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007743fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007744
Martin v. Löwis11437992002-04-12 09:54:03 +00007745fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007746{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
7747$as_echo "$ac_cv_sizeof_long_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007748
7749
7750
Martin v. Löwis11437992002-04-12 09:54:03 +00007751cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007752#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007753_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007754
Michael W. Hudson54241132001-12-07 15:38:26 +00007755
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007756fi
7757
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
7759$as_echo_n "checking for long double support... " >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007760have_long_double=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007761cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007762/* end confdefs.h. */
7763
7764int
7765main ()
7766{
Matthias Klosec511b472010-05-08 11:01:39 +00007767long double x; x = (long double)0;
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007768 ;
7769 return 0;
7770}
7771_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007772if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007773
7774
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007775$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007776
7777 have_long_double=yes
7778
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007779fi
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007780rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007781{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
7782$as_echo "$have_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007783if test "$have_long_double" = yes ; then
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007784# The cast to long int works around a bug in the HP C Compiler
7785# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7786# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7787# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
7789$as_echo_n "checking size of long double... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007790if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007791 $as_echo_n "(cached) " >&6
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007792else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007793 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 +00007794
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007795else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007796 if test "$ac_cv_type_long_double" = yes; then
7797 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7798$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007799as_fn_error 77 "cannot compute sizeof (long double)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007800See \`config.log' for more details" "$LINENO" 5; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007801 else
7802 ac_cv_sizeof_long_double=0
7803 fi
7804fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007805
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007806fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007807{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
7808$as_echo "$ac_cv_sizeof_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007809
7810
7811
7812cat >>confdefs.h <<_ACEOF
7813#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7814_ACEOF
7815
7816
7817fi
7818
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7820$as_echo_n "checking for _Bool support... " >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007821have_c99_bool=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007822cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007823/* end confdefs.h. */
7824
7825int
7826main ()
7827{
7828_Bool x; x = (_Bool)0;
7829 ;
7830 return 0;
7831}
7832_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007833if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007834
7835
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007836$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007837
7838 have_c99_bool=yes
7839
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007840fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007841rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007842{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7843$as_echo "$have_c99_bool" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007844if test "$have_c99_bool" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00007845# The cast to long int works around a bug in the HP C Compiler
7846# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7847# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7848# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7850$as_echo_n "checking size of _Bool... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007851if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007852 $as_echo_n "(cached) " >&6
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007853else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007854 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 +00007855
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007856else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007857 if test "$ac_cv_type__Bool" = yes; then
7858 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7859$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007860as_fn_error 77 "cannot compute sizeof (_Bool)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007861See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007862 else
7863 ac_cv_sizeof__Bool=0
7864 fi
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007865fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007866
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007867fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007868{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7869$as_echo "$ac_cv_sizeof__Bool" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007870
7871
7872
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007873cat >>confdefs.h <<_ACEOF
7874#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7875_ACEOF
7876
7877
7878fi
7879
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007880ac_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 +00007881 #include <stdint.h>
7882 #endif
Antoine Pitrou7be5a652010-10-10 08:14:41 +00007883 #ifdef HAVE_INTTYPES_H
7884 #include <inttypes.h>
7885 #endif
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007886"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007887if test "x$ac_cv_type_uintptr_t" = xyes; then :
Martin v. Löwisebe26702006-10-02 14:55:51 +00007888
7889cat >>confdefs.h <<_ACEOF
7890#define HAVE_UINTPTR_T 1
7891_ACEOF
7892
Martin v. Löwiseba40652007-08-30 20:10:57 +00007893# The cast to long int works around a bug in the HP C Compiler
7894# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7895# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7896# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7898$as_echo_n "checking size of uintptr_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007899if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007900 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007901else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007902 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 +00007903
Martin v. Löwis11437992002-04-12 09:54:03 +00007904else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007905 if test "$ac_cv_type_uintptr_t" = yes; then
7906 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7907$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007908as_fn_error 77 "cannot compute sizeof (uintptr_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007909See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007910 else
7911 ac_cv_sizeof_uintptr_t=0
7912 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007913fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007914
Martin v. Löwis11437992002-04-12 09:54:03 +00007915fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007916{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7917$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007918
7919
7920
Martin v. Löwis11437992002-04-12 09:54:03 +00007921cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007922#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007923_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007924
Michael W. Hudson54241132001-12-07 15:38:26 +00007925
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007926fi
7927
Martin v. Löwisebe26702006-10-02 14:55:51 +00007928
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007929# The cast to long int works around a bug in the HP C Compiler
7930# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7931# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7932# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7934$as_echo_n "checking size of off_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007935if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007936 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007937else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007938 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007939#ifdef HAVE_SYS_TYPES_H
7940#include <sys/types.h>
7941#endif
7942
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007943"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007944
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007945else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007946 if test "$ac_cv_type_off_t" = yes; then
7947 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7948$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007949as_fn_error 77 "cannot compute sizeof (off_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007950See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007951 else
7952 ac_cv_sizeof_off_t=0
7953 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007954fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007955
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007956fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007957{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
7958$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007959
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007960
7961
Martin v. Löwis11437992002-04-12 09:54:03 +00007962cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007963#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007964_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007965
Michael W. Hudson54241132001-12-07 15:38:26 +00007966
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007967
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
7969$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson0ef0b912009-12-31 21:11:48 +00007970if test "$have_long_long" = yes
7971then
7972if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007973 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007974
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007975$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007976
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7978$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007979else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7981$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007982fi
Mark Dickinson0ef0b912009-12-31 21:11:48 +00007983else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7985$as_echo "no" >&6; }
Mark Dickinson0ef0b912009-12-31 21:11:48 +00007986fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00007987
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007988# The cast to long int works around a bug in the HP C Compiler
7989# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7990# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7991# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
7993$as_echo_n "checking size of time_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007994if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007995 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007996else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007997 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007998#ifdef HAVE_SYS_TYPES_H
7999#include <sys/types.h>
8000#endif
8001#ifdef HAVE_TIME_H
8002#include <time.h>
8003#endif
8004
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008005"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008006
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008007else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008008 if test "$ac_cv_type_time_t" = yes; then
8009 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8010$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008011as_fn_error 77 "cannot compute sizeof (time_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01008012See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008013 else
8014 ac_cv_sizeof_time_t=0
8015 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008016fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008017
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008018fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008019{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8020$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008021
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008022
8023
Martin v. Löwis11437992002-04-12 09:54:03 +00008024cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008025#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008026_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008027
Michael W. Hudson54241132001-12-07 15:38:26 +00008028
8029
Trent Mick635f6fb2000-08-23 21:33:05 +00008030# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008031ac_save_cc="$CC"
8032if test "$ac_cv_kpthread" = "yes"
8033then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008034elif test "$ac_cv_kthread" = "yes"
8035then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008036elif test "$ac_cv_pthread" = "yes"
8037then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008038fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8040$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008041have_pthread_t=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008042cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008043/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00008044
8045 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008046int
8047main ()
8048{
Guido van Rossum12580492000-09-24 16:47:19 +00008049pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008050 ;
8051 return 0;
8052}
Matthias Klosec511b472010-05-08 11:01:39 +00008053
Martin v. Löwis11437992002-04-12 09:54:03 +00008054_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008055if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008056 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008057fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008058rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008059{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8060$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008061if test "$have_pthread_t" = yes ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008062 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008063# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8064# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8065# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8067$as_echo_n "checking size of pthread_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008068if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008069 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008070else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008071 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008072#ifdef HAVE_PTHREAD_H
8073#include <pthread.h>
8074#endif
8075
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008076"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008077
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008078else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008079 if test "$ac_cv_type_pthread_t" = yes; then
8080 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8081$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008082as_fn_error 77 "cannot compute sizeof (pthread_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01008083See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008084 else
8085 ac_cv_sizeof_pthread_t=0
8086 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008087fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008088
Trent Mick635f6fb2000-08-23 21:33:05 +00008089fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008090{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8091$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008092
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008093
8094
Martin v. Löwis11437992002-04-12 09:54:03 +00008095cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008096#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008097_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008098
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008099
Trent Mick635f6fb2000-08-23 21:33:05 +00008100fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008101CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008102
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-toolbox-glue" >&5
8104$as_echo_n "checking for --enable-toolbox-glue... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008105# Check whether --enable-toolbox-glue was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008106if test "${enable_toolbox_glue+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008107 enableval=$enable_toolbox_glue;
8108fi
Jack Jansene578a632001-08-15 01:27:14 +00008109
8110
8111if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +00008112then
Jack Jansene578a632001-08-15 01:27:14 +00008113 case $ac_sys_system/$ac_sys_release in
8114 Darwin/*)
8115 enable_toolbox_glue="yes";;
8116 *)
8117 enable_toolbox_glue="no";;
8118 esac
8119fi
8120case "$enable_toolbox_glue" in
8121yes)
Jack Jansene578a632001-08-15 01:27:14 +00008122 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008123 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +00008124
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008125$as_echo "#define USE_TOOLBOX_OBJECT_GLUE 1" >>confdefs.h
Jack Jansene578a632001-08-15 01:27:14 +00008126
8127 ;;
8128*)
Jack Jansene578a632001-08-15 01:27:14 +00008129 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00008130 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00008131 ;;
8132esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008133{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_toolbox_glue" >&5
8134$as_echo "$enable_toolbox_glue" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008135
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008136
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00008137
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008138case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +00008139 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008140 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8141 ;;
8142 Darwin/*)
8143 OTHER_LIBTOOL_OPT=""
8144 ;;
8145esac
8146
8147
Ronald Oussoren25967582009-09-06 10:00:26 +00008148
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008149case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +00008150 Darwin/[01567]\..*)
Ronald Oussoren988117f2006-04-29 11:31:35 +00008151 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8152 if test "${enable_universalsdk}"; then
8153 :
8154 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00008155 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Ronald Oussoren988117f2006-04-29 11:31:35 +00008156 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008157 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008158 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008159 Darwin/*)
Ronald Oussorena55af9a2010-01-17 16:25:57 +00008160 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008161 if test ${gcc_version} '<' 4.0
8162 then
8163 LIBTOOL_CRUFT="-lcc_dynamic"
8164 else
8165 LIBTOOL_CRUFT=""
8166 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008167 if test "$cross_compiling" = yes; then :
Ronald Oussoren23d92532009-09-07 06:12:00 +00008168 ac_osx_32bit=yes
Ronald Oussoren25967582009-09-06 10:00:26 +00008169else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008170 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren25967582009-09-06 10:00:26 +00008171/* end confdefs.h. */
Ronald Oussoren23d92532009-09-07 06:12:00 +00008172
Ronald Oussoren25967582009-09-06 10:00:26 +00008173 #include <unistd.h>
8174 int main(int argc, char*argv[])
8175 {
8176 if (sizeof(long) == 4) {
8177 return 0;
8178 } else {
8179 return 1;
8180 }
Ronald Oussoren84ddd722009-09-08 07:17:10 +00008181 }
Ronald Oussoren23d92532009-09-07 06:12:00 +00008182
Ronald Oussoren25967582009-09-06 10:00:26 +00008183_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008184if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren25967582009-09-06 10:00:26 +00008185 ac_osx_32bit=yes
8186else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008187 ac_osx_32bit=no
Ronald Oussoren25967582009-09-06 10:00:26 +00008188fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008189rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8190 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren25967582009-09-06 10:00:26 +00008191fi
8192
8193
Ronald Oussoren25967582009-09-06 10:00:26 +00008194 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00008195 case `/usr/bin/arch` in
Ronald Oussoren25967582009-09-06 10:00:26 +00008196 i386)
8197 MACOSX_DEFAULT_ARCH="i386"
8198 ;;
8199 ppc)
8200 MACOSX_DEFAULT_ARCH="ppc"
8201 ;;
8202 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008203 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren25967582009-09-06 10:00:26 +00008204 ;;
8205 esac
8206 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00008207 case `/usr/bin/arch` in
Ronald Oussoren25967582009-09-06 10:00:26 +00008208 i386)
8209 MACOSX_DEFAULT_ARCH="x86_64"
8210 ;;
8211 ppc)
8212 MACOSX_DEFAULT_ARCH="ppc64"
8213 ;;
8214 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008215 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren25967582009-09-06 10:00:26 +00008216 ;;
8217 esac
8218
8219 #ARCH_RUN_32BIT="true"
8220 fi
8221
8222 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00008223 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008224 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008225esac
8226
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
8228$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008229if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008230then
Skip Montanarodecc6a42003-01-01 20:07:49 +00008231 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00008232 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008233 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008234
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008235$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008236
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8238$as_echo "yes" >&6; }
Ronald Oussoren450d5612009-06-08 21:12:41 +00008239 if test $enable_shared = "yes"
8240 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008241 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 +00008242 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008243else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8245$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008246fi
8247
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
8249$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008250case $ac_sys_system/$ac_sys_release in
8251 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008252
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008253$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008254
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008255 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
8256$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008257 ;;
8258 *)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008259 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8260$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008261 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008262esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008263
Guido van Rossum0a516c91994-09-12 10:58:40 +00008264# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008265
Michael W. Hudson54241132001-12-07 15:38:26 +00008266
8267
8268
8269
Ronald Oussoren75912852010-04-08 08:13:31 +00008270
Guido van Rossum0a516c91994-09-12 10:58:40 +00008271# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00008272# -- usually .so, .sl on HP-UX, .dll on Cygwin
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
8274$as_echo_n "checking SO... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008275if test -z "$SO"
8276then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008277 case $ac_sys_system in
Neal Norwitz58e28882006-05-19 07:00:58 +00008278 hp*|HP*)
8279 case `uname -m` in
8280 ia64) SO=.so;;
8281 *) SO=.sl;;
8282 esac
8283 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00008284 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00008285 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008286 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +00008287else
8288 # this might also be a termcap variable, see #610332
8289 echo
8290 echo '====================================================================='
8291 echo '+ +'
8292 echo '+ WARNING: You have set SO in your environment. +'
8293 echo '+ Do you really mean to change the extension for shared libraries? +'
8294 echo '+ Continuing in 10 seconds to let you to ponder. +'
8295 echo '+ +'
8296 echo '====================================================================='
8297 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +00008298fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008299{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
8300$as_echo "$SO" >&6; }
Neal Norwitz58e28882006-05-19 07:00:58 +00008301
Ronald Oussoren79f90492009-01-02 10:44:46 +00008302
Neal Norwitz58e28882006-05-19 07:00:58 +00008303cat >>confdefs.h <<_ACEOF
8304#define SHLIB_EXT "$SO"
8305_ACEOF
8306
Guido van Rossum0a516c91994-09-12 10:58:40 +00008307# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00008308# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008309# (Shared libraries in this instance are shared modules to be loaded into
8310# Python, as opposed to building Python itself as a shared library.)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
8312$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008313if test -z "$LDSHARED"
8314then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008315 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008316 AIX*)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008317 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00008318 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008319 ;;
8320 BeOS*)
8321 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00008322 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008323 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008324 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008325 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008326 SunOS/5*)
Ronald Oussoren75912852010-04-08 08:13:31 +00008327 if test "$GCC" = "yes" ; then
8328 LDSHARED='$(CC) -shared'
8329 LDCXXSHARED='$(CXX) -shared'
8330 else
8331 LDSHARED='$(CC) -G'
8332 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a662000-05-26 12:22:54 +00008333 fi ;;
Thomas Hellerdc96a772008-04-04 10:07:55 +00008334 hp*|HP*)
Ronald Oussoren75912852010-04-08 08:13:31 +00008335 if test "$GCC" = "yes" ; then
8336 LDSHARED='$(CC) -shared'
8337 LDCXXSHARED='$(CXX) -shared'
8338 else
8339 LDSHARED='ld -b'
Thomas Hellerdc96a772008-04-04 10:07:55 +00008340 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +00008341 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +00008342 Darwin/1.3*)
Stefan Krah3a3e2032010-11-28 15:30:05 +00008343 LDSHARED='$(CC) -bundle'
8344 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00008345 if test "$enable_framework" ; then
8346 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008347 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8348 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008349 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008350 else
8351 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008352 LDSHARED="$LDSHARED -undefined suppress"
Ronald Oussoren75912852010-04-08 08:13:31 +00008353 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008354 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008355 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Stefan Krah3a3e2032010-11-28 15:30:05 +00008356 LDSHARED='$(CC) -bundle'
8357 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00008358 if test "$enable_framework" ; then
8359 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008360 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8361 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008362 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008363 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008364 # No framework, use the Python app as bundle-loader
8365 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00008366 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008367 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008368 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008369 Darwin/*)
8370 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
8371 # This allows an extension to be used in any Python
Ronald Oussoren38f1b982007-09-02 09:46:07 +00008372
Ned Deilyc40b9032014-06-25 13:48:46 -07008373 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
8374 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
8375 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
8376 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
8377 if test ${dep_target_major} -eq 10 && \
8378 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00008379 then
Ned Deilyc40b9032014-06-25 13:48:46 -07008380 # building for OS X 10.0 through 10.2
Stefan Krah3a3e2032010-11-28 15:30:05 +00008381 LDSHARED='$(CC) -bundle'
8382 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00008383 if test "$enable_framework" ; then
8384 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008385 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8386 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008387 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008388 else
8389 # No framework, use the Python app as bundle-loader
8390 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8391 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008392 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008393 fi
Ned Deilyc40b9032014-06-25 13:48:46 -07008394 else
8395 # building for OS X 10.3 and later
8396 if test "${enable_universalsdk}"; then
8397 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
8398 fi
8399 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
8400 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
8401 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00008402 fi
8403 ;;
Ronald Oussoren75912852010-04-08 08:13:31 +00008404 Linux*|GNU*|QNX*)
8405 LDSHARED='$(CC) -shared'
8406 LDCXXSHARED='$(CXX) -shared';;
8407 BSD/OS*/4*)
8408 LDSHARED="gcc -shared"
8409 LDCXXSHARED="g++ -shared";;
Martin v. Löwis222c5152006-06-03 07:37:13 +00008410 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008411 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008412 then
Stefan Krah3a3e2032010-11-28 15:30:05 +00008413 LDSHARED='$(CC) -shared'
8414 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00008415 else
Stefan Krah3a3e2032010-11-28 15:30:05 +00008416 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00008417 fi;;
Martin v. Löwis222c5152006-06-03 07:37:13 +00008418 OpenBSD*)
8419 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8420 then
Stefan Krah3a3e2032010-11-28 15:30:05 +00008421 LDSHARED='$(CC) -shared $(CCSHARED)'
8422 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Martin v. Löwis222c5152006-06-03 07:37:13 +00008423 else
8424 case `uname -r` in
8425 [01].* | 2.[0-7] | 2.[0-7].*)
8426 LDSHARED="ld -Bshareable ${LDFLAGS}"
8427 ;;
8428 *)
Stefan Krah3a3e2032010-11-28 15:30:05 +00008429 LDSHARED='$(CC) -shared $(CCSHARED)'
8430 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Martin v. Löwis222c5152006-06-03 07:37:13 +00008431 ;;
8432 esac
8433 fi;;
Ronald Oussoren75912852010-04-08 08:13:31 +00008434 NetBSD*|DragonFly*)
Antoine Pitroucb402772011-01-02 20:51:34 +00008435 LDSHARED='$(CC) -shared'
8436 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008437 OpenUNIX*|UnixWare*)
Ronald Oussoren75912852010-04-08 08:13:31 +00008438 if test "$GCC" = "yes" ; then
8439 LDSHARED='$(CC) -shared'
8440 LDCXXSHARED='$(CXX) -shared'
8441 else
8442 LDSHARED='$(CC) -G'
8443 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00008444 fi;;
Ronald Oussoren75912852010-04-08 08:13:31 +00008445 SCO_SV*)
8446 LDSHARED='$(CC) -Wl,-G,-Bexport'
8447 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
8448 CYGWIN*)
8449 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
8450 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
8451 atheos*)
8452 LDSHARED="gcc -shared"
8453 LDCXXSHARED="g++ -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008454 *) LDSHARED="ld";;
8455 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008456fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008457{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
8458$as_echo "$LDSHARED" >&6; }
Ronald Oussoren75912852010-04-08 08:13:31 +00008459LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008460BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008461# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008462# library (module) -- this is only needed for a few systems
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
8464$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008465if test -z "$CCSHARED"
8466then
Guido van Rossum07397971997-04-29 21:49:50 +00008467 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008468 SunOS*) if test "$GCC" = yes;
Martin v. Löwiseb623572007-03-12 10:50:39 +00008469 then CCSHARED="-fPIC";
8470 elif test `uname -p` = sparc;
8471 then CCSHARED="-xcode=pic32";
8472 else CCSHARED="-Kpic";
8473 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00008474 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00008475 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00008476 else CCSHARED="+z";
8477 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008478 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008479 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008480 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008481 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008482 if test "$GCC" = "yes"
8483 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008484 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008485 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008486 SCO_SV*)
8487 if test "$GCC" = "yes"
8488 then CCSHARED="-fPIC"
8489 else CCSHARED="-Kpic -belf"
8490 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008491 IRIX*/6*) case $CC in
8492 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00008493 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008494 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008495 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008496 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008497fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008498{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
8499$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008500# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008501# the python executable -- this is only needed for a few systems
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
8503$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008504if test -z "$LINKFORSHARED"
8505then
Guido van Rossum07397971997-04-29 21:49:50 +00008506 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008507 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008508 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00008509 LINKFORSHARED="-Wl,-E -Wl,+s";;
8510# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008511 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008512 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008513 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00008514 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008515 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
8516 # which is
Jack Jansene578a632001-08-15 01:27:14 +00008517 # not used by the core itself but which needs to be in the core so
8518 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +00008519 # -prebind is no longer used, because it actually seems to give a
8520 # slowdown in stead of a speedup, maybe due to the large number of
8521 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008522
8523 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +00008524 if test "$enable_framework"
8525 then
Jack Jansenda49e192005-01-07 13:08:22 +00008526 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008527 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008528 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008529 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008530 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00008531 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008532 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00008533 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8534 then
8535 LINKFORSHARED="-Wl,--export-dynamic"
8536 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008537 SunOS/5*) case $CC in
8538 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00008539 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00008540 then
8541 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008542 fi;;
8543 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00008544 CYGWIN*)
8545 if test $enable_shared = "no"
8546 then
8547 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
8548 fi;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00008549 QNX*)
8550 # -Wl,-E causes the symbols to be added to the dynamic
8551 # symbol table so that they can be found when a module
8552 # is loaded. -N 2048K causes the stack size to be set
8553 # to 2048 kilobytes so that the stack doesn't overflow
8554 # when running test_compile.py.
8555 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008556 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008557fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008558{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
8559$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008560
Michael W. Hudson54241132001-12-07 15:38:26 +00008561
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00008562
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
8564$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008565if test ! "$LIBRARY" = "$LDLIBRARY"
8566then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00008567 case $ac_sys_system in
8568 CYGWIN*)
8569 # Cygwin needs CCSHARED when building extension DLLs
8570 # but not when building the interpreter DLL.
8571 CFLAGSFORSHARED='';;
8572 *)
8573 CFLAGSFORSHARED='$(CCSHARED)'
8574 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008575fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008576{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
8577$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008578
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008579# SHLIBS are libraries (except -lc and -lm) to link to the python shared
8580# library (with --enable-shared).
8581# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008582# symbols, this must be set to $(LIBS) (expanded by make). We do this even
8583# if it is not required, since it creates a dependency of the shared library
8584# to LIBS. This, in turn, means that applications linking the shared libpython
8585# don't need to link LIBS explicitly. The default should be only changed
8586# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008587
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
8589$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008590case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008591 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008592 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008593esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008594{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
8595$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008596
8597
Guido van Rossum627b2d71993-12-24 10:39:16 +00008598# checks for libraries
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
8600$as_echo_n "checking for dlopen in -ldl... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008601if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008602 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008603else
Martin v. Löwis11437992002-04-12 09:54:03 +00008604 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008605LIBS="-ldl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008606cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008607/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008608
Martin v. Löwiseba40652007-08-30 20:10:57 +00008609/* Override any GCC internal prototype to avoid an error.
8610 Use char because int might match the return type of a GCC
8611 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008612#ifdef __cplusplus
8613extern "C"
8614#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008615char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008616int
8617main ()
8618{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008619return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008620 ;
8621 return 0;
8622}
8623_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008624if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008625 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008626else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008627 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008628fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008629rm -f core conftest.err conftest.$ac_objext \
8630 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008631LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008632fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008633{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
8634$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008635if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008636 cat >>confdefs.h <<_ACEOF
8637#define HAVE_LIBDL 1
8638_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008639
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008640 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00008641
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008642fi
8643 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
8645$as_echo_n "checking for shl_load in -ldld... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008646if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008647 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008648else
Martin v. Löwis11437992002-04-12 09:54:03 +00008649 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008650LIBS="-ldld $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008651cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008652/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008653
Martin v. Löwiseba40652007-08-30 20:10:57 +00008654/* Override any GCC internal prototype to avoid an error.
8655 Use char because int might match the return type of a GCC
8656 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008657#ifdef __cplusplus
8658extern "C"
8659#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008660char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008661int
8662main ()
8663{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008664return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008665 ;
8666 return 0;
8667}
8668_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008669if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008670 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008671else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008672 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008673fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008674rm -f core conftest.err conftest.$ac_objext \
8675 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008676LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008677fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008678{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
8679$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008680if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008681 cat >>confdefs.h <<_ACEOF
8682#define HAVE_LIBDLD 1
8683_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008684
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008685 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008686
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008687fi
8688 # Dynamic linking for HP-UX
Victor Stinner7c906672015-01-06 13:53:37 +01008689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for RAND_egd in -lcrypto" >&5
8690$as_echo_n "checking for RAND_egd in -lcrypto... " >&6; }
8691if ${ac_cv_lib_crypto_RAND_egd+:} false; then :
8692 $as_echo_n "(cached) " >&6
8693else
8694 ac_check_lib_save_LIBS=$LIBS
8695LIBS="-lcrypto $LIBS"
8696cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8697/* end confdefs.h. */
8698
8699/* Override any GCC internal prototype to avoid an error.
8700 Use char because int might match the return type of a GCC
8701 builtin and then its argument prototype would still apply. */
8702#ifdef __cplusplus
8703extern "C"
8704#endif
8705char RAND_egd ();
8706int
8707main ()
8708{
8709return RAND_egd ();
8710 ;
8711 return 0;
8712}
8713_ACEOF
8714if ac_fn_c_try_link "$LINENO"; then :
8715 ac_cv_lib_crypto_RAND_egd=yes
8716else
8717 ac_cv_lib_crypto_RAND_egd=no
8718fi
8719rm -f core conftest.err conftest.$ac_objext \
8720 conftest$ac_exeext conftest.$ac_ext
8721LIBS=$ac_check_lib_save_LIBS
8722fi
8723{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_RAND_egd" >&5
8724$as_echo "$ac_cv_lib_crypto_RAND_egd" >&6; }
8725if test "x$ac_cv_lib_crypto_RAND_egd" = xyes; then :
8726
8727$as_echo "#define HAVE_RAND_EGD 1" >>confdefs.h
8728
8729fi
8730
Martin v. Löwis519adae2003-09-20 10:47:47 +00008731
Ronald Oussoren79f90492009-01-02 10:44:46 +00008732# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00008733if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008734 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
8735$as_echo_n "checking for library containing sem_init... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008736if ${ac_cv_search_sem_init+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008737 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008738else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008739 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008740cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008741/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008742
Martin v. Löwiseba40652007-08-30 20:10:57 +00008743/* Override any GCC internal prototype to avoid an error.
8744 Use char because int might match the return type of a GCC
8745 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008746#ifdef __cplusplus
8747extern "C"
8748#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008749char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008750int
8751main ()
8752{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008753return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008754 ;
8755 return 0;
8756}
8757_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00008758for ac_lib in '' pthread rt posix4; do
8759 if test -z "$ac_lib"; then
8760 ac_res="none required"
8761 else
8762 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00008763 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00008764 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008765 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008766 ac_cv_search_sem_init=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00008767fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008768rm -f core conftest.err conftest.$ac_objext \
8769 conftest$ac_exeext
Matthias Klose3cef2a92012-03-14 23:39:33 +01008770 if ${ac_cv_search_sem_init+:} false; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008771 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00008772fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008773done
Matthias Klose3cef2a92012-03-14 23:39:33 +01008774if ${ac_cv_search_sem_init+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008775
Martin v. Löwiseba40652007-08-30 20:10:57 +00008776else
8777 ac_cv_search_sem_init=no
8778fi
8779rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008780LIBS=$ac_func_search_save_LIBS
8781fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008782{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
8783$as_echo "$ac_cv_search_sem_init" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008784ac_res=$ac_cv_search_sem_init
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008785if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008786 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008787
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008788fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00008789 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00008790 # posix4 on Solaris 2.6
8791 # pthread (first!) on Linux
8792fi
8793
Martin v. Löwis19d17342003-06-14 21:03:05 +00008794# check if we need libintl for locale functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
8796$as_echo_n "checking for textdomain in -lintl... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008797if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008798 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00008799else
8800 ac_check_lib_save_LIBS=$LIBS
8801LIBS="-lintl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008802cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008803/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008804
Martin v. Löwiseba40652007-08-30 20:10:57 +00008805/* Override any GCC internal prototype to avoid an error.
8806 Use char because int might match the return type of a GCC
8807 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008808#ifdef __cplusplus
8809extern "C"
8810#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00008811char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008812int
8813main ()
8814{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008815return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008816 ;
8817 return 0;
8818}
8819_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008820if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008821 ac_cv_lib_intl_textdomain=yes
8822else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008823 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00008824fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008825rm -f core conftest.err conftest.$ac_objext \
8826 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00008827LIBS=$ac_check_lib_save_LIBS
8828fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008829{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
8830$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008831if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008832
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008833$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00008834
8835fi
8836
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008837
8838# checks for system dependent C++ extensions support
8839case "$ac_sys_system" in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008840 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
8841$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
8842 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008843/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00008844
Georg Brandl94800df2011-02-25 11:09:02 +00008845 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008846int
8847main ()
8848{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008849loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00008850 ;
8851 return 0;
8852}
Matthias Klosec511b472010-05-08 11:01:39 +00008853
Martin v. Löwis11437992002-04-12 09:54:03 +00008854_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008855if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008856
Matthias Klosec511b472010-05-08 11:01:39 +00008857
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008858$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008859
Matthias Klosec511b472010-05-08 11:01:39 +00008860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008861$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00008862
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008863else
Matthias Klosec511b472010-05-08 11:01:39 +00008864
8865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008866$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00008867
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008868fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008869rm -f core conftest.err conftest.$ac_objext \
8870 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008871 *) ;;
8872esac
8873
Guido van Rossum70c7f481998-03-26 18:44:10 +00008874# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008875# BeOS' sockets are stashed in libnet.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
8877$as_echo_n "checking for t_open in -lnsl... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008878if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008879 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008880else
Martin v. Löwis11437992002-04-12 09:54:03 +00008881 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008882LIBS="-lnsl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008883cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008884/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008885
Martin v. Löwiseba40652007-08-30 20:10:57 +00008886/* Override any GCC internal prototype to avoid an error.
8887 Use char because int might match the return type of a GCC
8888 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008889#ifdef __cplusplus
8890extern "C"
8891#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008892char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008893int
8894main ()
8895{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008896return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008897 ;
8898 return 0;
8899}
8900_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008901if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008902 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008903else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008904 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008905fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008906rm -f core conftest.err conftest.$ac_objext \
8907 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008908LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008909fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008910{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
8911$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008912if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008913 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008914fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00008915 # SVR4
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8917$as_echo_n "checking for socket in -lsocket... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008918if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008919 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008920else
Martin v. Löwis11437992002-04-12 09:54:03 +00008921 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008922LIBS="-lsocket $LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008923cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008924/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008925
Martin v. Löwiseba40652007-08-30 20:10:57 +00008926/* Override any GCC internal prototype to avoid an error.
8927 Use char because int might match the return type of a GCC
8928 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008929#ifdef __cplusplus
8930extern "C"
8931#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008932char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008933int
8934main ()
8935{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008936return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008937 ;
8938 return 0;
8939}
8940_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008941if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008942 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008943else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008944 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008945fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008946rm -f core conftest.err conftest.$ac_objext \
8947 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008948LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008949fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008950{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8951$as_echo "$ac_cv_lib_socket_socket" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008952if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00008953 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00008954fi
8955 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008956
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00008957case "$ac_sys_system" in
8958BeOS*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008959{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lnet" >&5
8960$as_echo_n "checking for socket in -lnet... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008961if ${ac_cv_lib_net_socket+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008962 $as_echo_n "(cached) " >&6
Guido van Rossumad678af1998-10-02 14:42:15 +00008963else
Martin v. Löwis11437992002-04-12 09:54:03 +00008964 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00008965LIBS="-lnet $LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008966cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008967/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008968
Martin v. Löwiseba40652007-08-30 20:10:57 +00008969/* Override any GCC internal prototype to avoid an error.
8970 Use char because int might match the return type of a GCC
8971 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008972#ifdef __cplusplus
8973extern "C"
8974#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008975char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008976int
8977main ()
8978{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008979return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008980 ;
8981 return 0;
8982}
8983_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008984if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008985 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +00008986else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008987 ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +00008988fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008989rm -f core conftest.err conftest.$ac_objext \
8990 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008991LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00008992fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008993{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_net_socket" >&5
8994$as_echo "$ac_cv_lib_net_socket" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008995if test "x$ac_cv_lib_net_socket" = xyes; then :
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008996 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008997fi
8998 # BeOS
8999;;
9000esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00009001
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9003$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009004
Martin v. Löwiseba40652007-08-30 20:10:57 +00009005# Check whether --with-libs was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009006if test "${with_libs+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009007 withval=$with_libs;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009008{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9009$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009010LIBS="$withval $LIBS"
9011
9012else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9014$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009015fi
9016
Guido van Rossum7f43da71994-08-01 12:15:30 +00009017
Benjamin Peterson64e8f6e2014-12-15 00:00:23 -05009018
9019
9020
9021
9022
9023
9024
9025if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9026 if test -n "$ac_tool_prefix"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009027 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9028set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9030$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009031if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009032 $as_echo_n "(cached) " >&6
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009033else
9034 case $PKG_CONFIG in
9035 [\\/]* | ?:[\\/]*)
9036 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9037 ;;
9038 *)
9039 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9040for as_dir in $PATH
9041do
9042 IFS=$as_save_IFS
9043 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009044 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009045 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009046 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009047 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009048 break 2
9049 fi
9050done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009051 done
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009052IFS=$as_save_IFS
9053
9054 ;;
9055esac
9056fi
9057PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9058if test -n "$PKG_CONFIG"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9060$as_echo "$PKG_CONFIG" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009061else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9063$as_echo "no" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009064fi
9065
9066
9067fi
9068if test -z "$ac_cv_path_PKG_CONFIG"; then
9069 ac_pt_PKG_CONFIG=$PKG_CONFIG
9070 # Extract the first word of "pkg-config", so it can be a program name with args.
9071set dummy pkg-config; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9073$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009074if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009075 $as_echo_n "(cached) " >&6
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009076else
9077 case $ac_pt_PKG_CONFIG in
9078 [\\/]* | ?:[\\/]*)
9079 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9080 ;;
9081 *)
9082 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9083for as_dir in $PATH
9084do
9085 IFS=$as_save_IFS
9086 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009087 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009088 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009089 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009090 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009091 break 2
9092 fi
9093done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009094 done
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009095IFS=$as_save_IFS
9096
9097 ;;
9098esac
9099fi
9100ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9101if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9103$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009104else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9106$as_echo "no" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009107fi
9108
9109 if test "x$ac_pt_PKG_CONFIG" = x; then
9110 PKG_CONFIG=""
9111 else
9112 case $cross_compiling:$ac_tool_warned in
9113yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009114{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9115$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009116ac_tool_warned=yes ;;
9117esac
9118 PKG_CONFIG=$ac_pt_PKG_CONFIG
9119 fi
9120else
9121 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9122fi
9123
Benjamin Peterson64e8f6e2014-12-15 00:00:23 -05009124fi
9125if test -n "$PKG_CONFIG"; then
9126 _pkg_min_version=0.9.0
9127 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
9128$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
9129 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9131$as_echo "yes" >&6; }
9132 else
9133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9134$as_echo "no" >&6; }
9135 PKG_CONFIG=""
9136 fi
9137fi
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009138
9139# Check for use of the system expat library
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
9141$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009142
9143# Check whether --with-system_expat was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009144if test "${with_system_expat+set}" = set; then :
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009145 withval=$with_system_expat;
Benjamin Petersonf2d1b2a2010-10-31 16:53:53 +00009146else
9147 with_system_expat="no"
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009148fi
9149
9150
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009151{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
9152$as_echo "$with_system_expat" >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009153
9154# Check for use of the system libffi library
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
9156$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009157
9158# Check whether --with-system_ffi was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009159if test "${with_system_ffi+set}" = set; then :
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009160 withval=$with_system_ffi;
Benjamin Petersonf2d1b2a2010-10-31 16:53:53 +00009161else
9162 with_system_ffi="no"
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009163fi
9164
9165
9166if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009167 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
9168else
9169 LIBFFI_INCLUDEDIR=""
9170fi
9171
9172
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009173{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
9174$as_echo "$with_system_ffi" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +00009175
Ned Deilya2a9f572013-10-25 00:30:10 -07009176# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
9177
9178
9179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
9180$as_echo_n "checking for --with-tcltk-includes... " >&6; }
9181
9182# Check whether --with-tcltk-includes was given.
9183if test "${with_tcltk_includes+set}" = set; then :
9184 withval=$with_tcltk_includes;
9185else
9186 with_tcltk_includes="default"
9187fi
9188
9189{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
9190$as_echo "$with_tcltk_includes" >&6; }
9191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
9192$as_echo_n "checking for --with-tcltk-libs... " >&6; }
9193
9194# Check whether --with-tcltk-libs was given.
9195if test "${with_tcltk_libs+set}" = set; then :
9196 withval=$with_tcltk_libs;
9197else
9198 with_tcltk_libs="default"
9199fi
9200
9201{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
9202$as_echo "$with_tcltk_libs" >&6; }
9203if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
9204then
9205 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
9206 then
9207 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
9208 fi
9209 TCLTK_INCLUDES=""
9210 TCLTK_LIBS=""
9211else
9212 TCLTK_INCLUDES="$with_tcltk_includes"
9213 TCLTK_LIBS="$with_tcltk_libs"
9214fi
9215
Benjamin Peterson867475c2009-04-29 20:36:25 +00009216# Check for --with-dbmliborder
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
9218$as_echo_n "checking for --with-dbmliborder... " >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +00009219
9220# Check whether --with-dbmliborder was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009221if test "${with_dbmliborder+set}" = set; then :
Benjamin Peterson867475c2009-04-29 20:36:25 +00009222 withval=$with_dbmliborder;
9223if test x$with_dbmliborder = xyes
9224then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009225as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Benjamin Peterson867475c2009-04-29 20:36:25 +00009226else
9227 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
9228 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
9229 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009230 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Benjamin Peterson867475c2009-04-29 20:36:25 +00009231 fi
9232 done
9233fi
9234fi
9235
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009236{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
9237$as_echo "$with_dbmliborder" >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +00009238
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009239# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009240
9241
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
9243$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009244
Martin v. Löwiseba40652007-08-30 20:10:57 +00009245# Check whether --with-signal-module was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009246if test "${with_signal_module+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009247 withval=$with_signal_module;
9248fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009249
9250
9251if test -z "$with_signal_module"
9252then with_signal_module="yes"
9253fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009254{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
9255$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009256
9257if test "${with_signal_module}" = "yes"; then
9258 USE_SIGNAL_MODULE=""
9259 SIGNAL_OBJS=""
9260else
9261 USE_SIGNAL_MODULE="#"
9262 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9263fi
9264
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009265# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009266
Barry Warsawc0d24d82000-06-29 16:12:00 +00009267USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009268
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dec-threads" >&5
9270$as_echo_n "checking for --with-dec-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009271
Guido van Rossumec2f0731997-01-22 20:54:01 +00009272
Martin v. Löwiseba40652007-08-30 20:10:57 +00009273# Check whether --with-dec-threads was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009274if test "${with_dec_threads+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009275 withval=$with_dec_threads;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009276{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9277$as_echo "$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +00009278LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00009279if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00009280 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00009281fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009282else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009283 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9284$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009285fi
9286
Martin v. Löwis11437992002-04-12 09:54:03 +00009287
9288# Templates for things AC_DEFINEd more than once.
9289# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009290
9291
Martin v. Löwis11437992002-04-12 09:54:03 +00009292
9293
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
9295$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009296
Martin v. Löwiseba40652007-08-30 20:10:57 +00009297# Check whether --with-threads was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009298if test "${with_threads+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009299 withval=$with_threads;
9300fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009301
9302
Barry Warsawc0d24d82000-06-29 16:12:00 +00009303# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009304
Martin v. Löwiseba40652007-08-30 20:10:57 +00009305# Check whether --with-thread was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009306if test "${with_thread+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009307 withval=$with_thread; with_threads=$with_thread
9308fi
9309
Barry Warsawc0d24d82000-06-29 16:12:00 +00009310
9311if test -z "$with_threads"
9312then with_threads="yes"
9313fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009314{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
9315$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d82000-06-29 16:12:00 +00009316
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009317
Barry Warsawc0d24d82000-06-29 16:12:00 +00009318if test "$with_threads" = "no"
9319then
9320 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009321elif test "$ac_cv_pthread_is_default" = yes
9322then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009323 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009324
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009325 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009326 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009327
9328 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009329 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009330elif test "$ac_cv_kpthread" = "yes"
9331then
9332 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009333 if test "$ac_cv_cxx_thread" = "yes"; then
9334 CXX="$CXX -Kpthread"
9335 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009336 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009337
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009338 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009339 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009340elif test "$ac_cv_kthread" = "yes"
9341then
9342 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009343 if test "$ac_cv_cxx_thread" = "yes"; then
9344 CXX="$CXX -Kthread"
9345 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009346 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009347
9348 posix_threads=yes
9349 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009350elif test "$ac_cv_pthread" = "yes"
9351then
9352 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009353 if test "$ac_cv_cxx_thread" = "yes"; then
9354 CXX="$CXX -pthread"
9355 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009356 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009357
9358 posix_threads=yes
9359 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009360else
9361 if test ! -z "$with_threads" -a -d "$with_threads"
9362 then LDFLAGS="$LDFLAGS -L$with_threads"
9363 fi
9364 if test ! -z "$withval" -a -d "$withval"
9365 then LDFLAGS="$LDFLAGS -L$withval"
9366 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009367
9368 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00009369 # define _POSIX_THREADS in unistd.h. Some apparently don't
9370 # (e.g. gnu pth with pthread emulation)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009371 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
9372$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
9373 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009374/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009375
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009376#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009377#ifdef _POSIX_THREADS
9378yes
9379#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009380
9381_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009382if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009383 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009384 unistd_defines_pthreads=yes
9385else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009386 unistd_defines_pthreads=no
9387fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009388rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009389
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
9391$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009392
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009393 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009394
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009395 ac_fn_c_check_header_mongrel "$LINENO" "cthreads.h" "ac_cv_header_cthreads_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01009396if test "x$ac_cv_header_cthreads_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009397 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00009398
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009399 $as_echo "#define C_THREADS 1" >>confdefs.h
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009400
Martin v. Löwis11437992002-04-12 09:54:03 +00009401
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009402$as_echo "#define HURD_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009403
9404 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009405 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009406else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009407
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009408 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 +01009409if test "x$ac_cv_header_mach_cthreads_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009410 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00009411
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009412 $as_echo "#define C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009413
Martin v. Löwis11437992002-04-12 09:54:03 +00009414
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009415$as_echo "#define MACH_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009416
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009417 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009418else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009419
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009420 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pth" >&5
9421$as_echo_n "checking for --with-pth... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009422
Martin v. Löwiseba40652007-08-30 20:10:57 +00009423# Check whether --with-pth was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009424if test "${with_pth+set}" = set; then :
9425 withval=$with_pth; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9426$as_echo "$withval" >&6; }
9427 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009428
9429
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009430$as_echo "#define HAVE_PTH 1" >>confdefs.h
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009431
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009432 LIBS="-lpth $LIBS"
9433 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009434else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9436$as_echo "no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009437
9438 # Just looking for pthread_create in libpthread is not enough:
9439 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
9440 # So we really have to include pthread.h, and then link.
9441 _libs=$LIBS
9442 LIBS="$LIBS -lpthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009443 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
9444$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
9445 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009446/* end confdefs.h. */
Stefan Krahae66ca62012-11-22 22:36:57 +01009447
9448#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009449#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00009450
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009451void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00009452int
9453main ()
9454{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009455
9456pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00009457 ;
9458 return 0;
9459}
9460_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009461if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009462
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9464$as_echo "yes" >&6; }
9465 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00009466
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009467 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009468 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009469else
Martin v. Löwis11437992002-04-12 09:54:03 +00009470
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009471 LIBS=$_libs
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009472 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Matthias Klose3cef2a92012-03-14 23:39:33 +01009473if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009474 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00009475
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009476 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009477 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00009478else
Guido van Rossumad678af1998-10-02 14:42:15 +00009479
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009480 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 +01009481if test "x$ac_cv_header_atheos_threads_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009482 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009483
9484
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009485$as_echo "#define ATHEOS_THREADS 1" >>confdefs.h
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009486
9487 THREADOBJ="Python/thread.o"
9488else
9489
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009490 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 +01009491if test "x$ac_cv_header_kernel_OS_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009492 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009493
9494
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009495$as_echo "#define BEOS_THREADS 1" >>confdefs.h
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009496
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009497 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009498else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009499
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009500 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
9501$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009502if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009503 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009504else
Martin v. Löwis11437992002-04-12 09:54:03 +00009505 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009506LIBS="-lpthreads $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009507cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009508/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009509
Martin v. Löwiseba40652007-08-30 20:10:57 +00009510/* Override any GCC internal prototype to avoid an error.
9511 Use char because int might match the return type of a GCC
9512 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009513#ifdef __cplusplus
9514extern "C"
9515#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009516char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009517int
9518main ()
9519{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009520return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009521 ;
9522 return 0;
9523}
9524_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009525if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009526 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00009527else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009528 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00009529fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009530rm -f core conftest.err conftest.$ac_objext \
9531 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009532LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009533fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009534{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
9535$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009536if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009537 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00009538
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009539 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009540 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009541 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00009542else
Greg Steinadf63d62000-07-05 10:38:09 +00009543
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009544 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
9545$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009546if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009547 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00009548else
Martin v. Löwis11437992002-04-12 09:54:03 +00009549 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009550LIBS="-lc_r $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009551cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009552/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009553
Martin v. Löwiseba40652007-08-30 20:10:57 +00009554/* Override any GCC internal prototype to avoid an error.
9555 Use char because int might match the return type of a GCC
9556 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009557#ifdef __cplusplus
9558extern "C"
9559#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009560char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009561int
9562main ()
9563{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009564return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009565 ;
9566 return 0;
9567}
9568_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009569if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009570 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00009571else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009572 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00009573fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009574rm -f core conftest.err conftest.$ac_objext \
9575 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009576LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00009577fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009578{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
9579$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009580if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009581 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00009582
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009583 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009584 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009585 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009586else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009587
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009588 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
9589$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009590if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009591 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009592else
Martin v. Löwis11437992002-04-12 09:54:03 +00009593 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009594LIBS="-lpthread $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009595cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009596/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009597
Martin v. Löwiseba40652007-08-30 20:10:57 +00009598/* Override any GCC internal prototype to avoid an error.
9599 Use char because int might match the return type of a GCC
9600 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009601#ifdef __cplusplus
9602extern "C"
9603#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009604char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009605int
9606main ()
9607{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009608return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009609 ;
9610 return 0;
9611}
9612_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009613if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009614 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009615else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009616 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009617fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009618rm -f core conftest.err conftest.$ac_objext \
9619 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009620LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009621fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009622{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
9623$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009624if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009625 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009626
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009627 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009628 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009629 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009630else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009631
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009632 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
9633$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009634if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009635 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00009636else
Martin v. Löwis11437992002-04-12 09:54:03 +00009637 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009638LIBS="-lcma $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009639cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009640/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009641
Martin v. Löwiseba40652007-08-30 20:10:57 +00009642/* Override any GCC internal prototype to avoid an error.
9643 Use char because int might match the return type of a GCC
9644 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009645#ifdef __cplusplus
9646extern "C"
9647#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009648char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009649int
9650main ()
9651{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009652return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009653 ;
9654 return 0;
9655}
9656_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009657if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009658 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00009659else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009660 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00009661fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009662rm -f core conftest.err conftest.$ac_objext \
9663 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009664LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009665fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009666{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
9667$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009668if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009669 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00009670
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009671 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009672 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009673 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00009674else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00009675
Martin v. Löwis130fb172001-07-19 11:00:41 +00009676 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00009677fi
9678
Guido van Rossum627b2d71993-12-24 10:39:16 +00009679
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009680fi
9681
Guido van Rossum0be3e491997-05-22 20:33:33 +00009682fi
9683
Guido van Rossum49545951997-12-02 19:28:29 +00009684fi
9685
Guido van Rossumb93a8621998-05-07 13:27:32 +00009686fi
9687
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009688
Michael W. Hudson54241132001-12-07 15:38:26 +00009689fi
9690
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009691
9692fi
9693
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009694fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009695rm -f core conftest.err conftest.$ac_objext \
9696 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009697fi
9698
Martin v. Löwis11437992002-04-12 09:54:03 +00009699fi
9700
9701
9702fi
9703
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009704
Michael W. Hudson54241132001-12-07 15:38:26 +00009705
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009706 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
9707$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009708if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009709 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009710else
Martin v. Löwis11437992002-04-12 09:54:03 +00009711 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009712LIBS="-lmpc $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009713cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009714/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009715
Martin v. Löwiseba40652007-08-30 20:10:57 +00009716/* Override any GCC internal prototype to avoid an error.
9717 Use char because int might match the return type of a GCC
9718 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009719#ifdef __cplusplus
9720extern "C"
9721#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009722char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009723int
9724main ()
9725{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009726return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009727 ;
9728 return 0;
9729}
9730_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009731if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009732 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009733else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009734 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009735fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009736rm -f core conftest.err conftest.$ac_objext \
9737 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009738LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009739fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009740{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
9741$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009742if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009743 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009744
Martin v. Löwis130fb172001-07-19 11:00:41 +00009745 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009746 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009747 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009748fi
9749
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009750
Neal Norwitza978ab02002-11-02 16:58:05 +00009751 if test "$posix_threads" != "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009752 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
9753$as_echo_n "checking for thr_create in -lthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009754if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009755 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009756else
Martin v. Löwis11437992002-04-12 09:54:03 +00009757 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009758LIBS="-lthread $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009759cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009760/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009761
Martin v. Löwiseba40652007-08-30 20:10:57 +00009762/* Override any GCC internal prototype to avoid an error.
9763 Use char because int might match the return type of a GCC
9764 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009765#ifdef __cplusplus
9766extern "C"
9767#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009768char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009769int
9770main ()
9771{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009772return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009773 ;
9774 return 0;
9775}
9776_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009777if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009778 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009779else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009780 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009781fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009782rm -f core conftest.err conftest.$ac_objext \
9783 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009784LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009785fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009786{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
9787$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009788if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009789 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009790
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009791 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009792 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009793 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009794fi
9795
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009796 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009797
Martin v. Löwis130fb172001-07-19 11:00:41 +00009798 if test "$USE_THREAD_MODULE" != "#"
9799 then
9800 # If the above checks didn't disable threads, (at least) OSF1
9801 # needs this '-threads' argument during linking.
9802 case $ac_sys_system in
9803 OSF1) LDLAST=-threads;;
9804 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00009805 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009806fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009807
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009808if test "$posix_threads" = "yes"; then
9809 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009810
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009811$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009812
9813 fi
9814
9815 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
9816 case $ac_sys_system/$ac_sys_release in
Charles-François Natali4929eb92011-07-21 19:41:04 +02009817 SunOS/5.6)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009818$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009819
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009820 ;;
9821 SunOS/5.8)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009822$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009823
9824 ;;
Charles-François Natali4929eb92011-07-21 19:41:04 +02009825 AIX/*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009826$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimescba36bb2008-01-30 22:54:18 +00009827
9828 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009829 esac
9830
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009831 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
9832$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009833 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009834 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009835else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009836 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009837 ac_cv_pthread_system_supported=no
9838else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009839 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009840/* end confdefs.h. */
Stefan Krahae66ca62012-11-22 22:36:57 +01009841
9842 #include <stdio.h>
9843 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009844 void *foo(void *parm) {
9845 return NULL;
9846 }
9847 main() {
9848 pthread_attr_t attr;
9849 pthread_t id;
9850 if (pthread_attr_init(&attr)) exit(-1);
9851 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
9852 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
9853 exit(0);
9854 }
9855_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009856if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009857 ac_cv_pthread_system_supported=yes
9858else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009859 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009860fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009861rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9862 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009863fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009864
Martin v. Löwiseba40652007-08-30 20:10:57 +00009865
Guido van Rossum627b2d71993-12-24 10:39:16 +00009866fi
9867
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
9869$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009870 if test "$ac_cv_pthread_system_supported" = "yes"; then
9871
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009872$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009873
9874 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009875 for ac_func in pthread_sigmask
9876do :
9877 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Matthias Klose3cef2a92012-03-14 23:39:33 +01009878if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009879 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009880#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009881_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00009882 case $ac_sys_system in
9883 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009884
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009885$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00009886
9887 ;;
9888 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009889fi
9890done
9891
Christian Heimes0d604cf2013-08-21 13:26:05 +02009892 for ac_func in pthread_atfork
9893do :
9894 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
9895if test "x$ac_cv_func_pthread_atfork" = xyes; then :
9896 cat >>confdefs.h <<_ACEOF
9897#define HAVE_PTHREAD_ATFORK 1
9898_ACEOF
9899
9900fi
9901done
9902
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009903fi
9904
9905
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009906# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00009907
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
9909$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009910# Check whether --enable-ipv6 was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009911if test "${enable_ipv6+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009912 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009913 no)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9915$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009916 ipv6=no
9917 ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009918 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9919$as_echo "yes" >&6; }
9920 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009921
9922 ipv6=yes
9923 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009924 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009925else
Martin v. Löwis11437992002-04-12 09:54:03 +00009926
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009927 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009928/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009929 /* AF_INET6 available check */
9930#include <sys/types.h>
9931#include <sys/socket.h>
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009932int
9933main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009934{
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009935int domain = AF_INET6;
9936 ;
9937 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009938}
Martin v. Löwis11437992002-04-12 09:54:03 +00009939_ACEOF
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009940if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +00009941
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9943$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009944 ipv6=yes
Matthias Klosec511b472010-05-08 11:01:39 +00009945
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009946else
Matthias Klosec511b472010-05-08 11:01:39 +00009947
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9949$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009950 ipv6=no
Matthias Klosec511b472010-05-08 11:01:39 +00009951
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009952fi
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009953rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009954
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009955if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009956 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
9957$as_echo_n "checking if RFC2553 API is available... " >&6; }
9958 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009959/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00009960
9961 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009962#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009963int
9964main ()
9965{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009966struct sockaddr_in6 x;
Matthias Klosec511b472010-05-08 11:01:39 +00009967 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00009968 ;
9969 return 0;
9970}
Matthias Klosec511b472010-05-08 11:01:39 +00009971
Martin v. Löwis11437992002-04-12 09:54:03 +00009972_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009973if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +00009974
9975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009976$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00009977 ipv6=yes
9978
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009979else
Matthias Klosec511b472010-05-08 11:01:39 +00009980
9981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009982$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00009983 ipv6=no
9984
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009985fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009986rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009987fi
9988
9989if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009990 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009991
9992fi
9993
Martin v. Löwiseba40652007-08-30 20:10:57 +00009994fi
9995
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009996
9997ipv6type=unknown
9998ipv6lib=none
9999ipv6trylibc=no
10000
10001if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010002 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10003$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010004 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10005 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010006 case $i in
10007 inria)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010008 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010009/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010010
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010011#include <netinet/in.h>
10012#ifdef IPV6_INRIA_VERSION
10013yes
10014#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010015_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010016if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010017 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010018 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010019fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000010020rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010021
10022 ;;
10023 kame)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010024 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010025/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010026
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010027#include <netinet/in.h>
10028#ifdef __KAME__
10029yes
10030#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010031_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010032if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010033 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010034 ipv6type=$i;
10035 ipv6lib=inet6
10036 ipv6libdir=/usr/local/v6/lib
10037 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010038fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000010039rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010040
10041 ;;
10042 linux-glibc)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010043 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010044/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010045
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010046#include <features.h>
10047#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10048yes
10049#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010050_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010051if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010052 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010053 ipv6type=$i;
10054 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010055fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000010056rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010057
10058 ;;
10059 linux-inet6)
10060 if test -d /usr/inet6; then
10061 ipv6type=$i
10062 ipv6lib=inet6
10063 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010064 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010065 fi
10066 ;;
10067 solaris)
10068 if test -f /etc/netconfig; then
Antoine Pitrou31e85952011-01-03 18:57:14 +000010069 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010070 ipv6type=$i
10071 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010072 fi
10073 fi
10074 ;;
10075 toshiba)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010076 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010077/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010078
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010079#include <sys/param.h>
10080#ifdef _TOSHIBA_INET6
10081yes
10082#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010083_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010084if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010085 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010086 ipv6type=$i;
10087 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010088 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010089fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000010090rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010091
10092 ;;
10093 v6d)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010094 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010095/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010096
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010097#include </usr/local/v6/include/sys/v6config.h>
10098#ifdef __V6D__
10099yes
10100#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010101_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010102if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010103 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010104 ipv6type=$i;
10105 ipv6lib=v6;
10106 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010107 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010108fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000010109rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010110
10111 ;;
10112 zeta)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010113 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010114/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010115
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010116#include <sys/param.h>
10117#ifdef _ZETA_MINAMI_INET6
10118yes
10119#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010120_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010121if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010122 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010123 ipv6type=$i;
10124 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010125 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010126fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000010127rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010128
10129 ;;
10130 esac
10131 if test "$ipv6type" != "unknown"; then
10132 break
10133 fi
10134 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010135 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10136$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010137fi
10138
10139if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10140 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10141 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10142 echo "using lib$ipv6lib"
10143 else
10144 if test $ipv6trylibc = "yes"; then
10145 echo "using libc"
10146 else
10147 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10148 echo "You need to fetch lib$ipv6lib.a from appropriate"
10149 echo 'ipv6 kit and compile beforehand.'
10150 exit 1
10151 fi
10152 fi
10153fi
10154
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
10156$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
10157cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010158/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +000010159
10160 #include <Carbon/Carbon.h>
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010161int
10162main ()
10163{
10164FSIORefNum fRef = 0
10165 ;
10166 return 0;
10167}
Mark Dickinson0712b562010-05-08 19:13:21 +000010168
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010169_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010170if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +000010171
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010172
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010173$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010174
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10176$as_echo "yes" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010177
Mark Dickinson0712b562010-05-08 19:13:21 +000010178else
10179
10180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10181$as_echo "no" >&6; }
10182
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010183fi
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010184rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10185
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010186# Check for --with-doc-strings
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10188$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010189
Martin v. Löwiseba40652007-08-30 20:10:57 +000010190# Check whether --with-doc-strings was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010191if test "${with_doc_strings+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010192 withval=$with_doc_strings;
10193fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010194
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010195
10196if test -z "$with_doc_strings"
10197then with_doc_strings="yes"
10198fi
10199if test "$with_doc_strings" != "no"
10200then
10201
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010202$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010203
10204fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010205{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10206$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010207
Neil Schemenauera35c6882001-02-27 04:45:05 +000010208# Check for Python-specific malloc support
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
10210$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010211
Martin v. Löwiseba40652007-08-30 20:10:57 +000010212# Check whether --with-tsc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010213if test "${with_tsc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010214 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010215if test "$withval" != no
10216then
10217
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010218$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010219
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10221$as_echo "yes" >&6; }
10222else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10223$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010224fi
10225else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10227$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010228fi
10229
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010230
10231# Check for Python-specific malloc support
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10233$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010234
Martin v. Löwiseba40652007-08-30 20:10:57 +000010235# Check whether --with-pymalloc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010236if test "${with_pymalloc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010237 withval=$with_pymalloc;
10238fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010239
Neil Schemenauera35c6882001-02-27 04:45:05 +000010240
Neil Schemenauer16c22972002-03-22 15:34:49 +000010241if test -z "$with_pymalloc"
10242then with_pymalloc="yes"
10243fi
10244if test "$with_pymalloc" != "no"
10245then
Martin v. Löwis11437992002-04-12 09:54:03 +000010246
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010247$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010248
10249fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010250{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10251$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010252
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010253# Check for Valgrind support
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
10255$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010256
10257# Check whether --with-valgrind was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010258if test "${with_valgrind+set}" = set; then :
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010259 withval=$with_valgrind;
10260else
10261 with_valgrind=no
10262fi
10263
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010264{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
10265$as_echo "$with_valgrind" >&6; }
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010266if test "$with_valgrind" != no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010267 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 +010010268if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010269
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010270$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010271
10272else
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010273 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010274
10275fi
10276
10277
10278fi
10279
Barry Warsawef82cd72000-06-30 16:21:01 +000010280# Check for --with-wctype-functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-wctype-functions" >&5
10282$as_echo_n "checking for --with-wctype-functions... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010283
Martin v. Löwiseba40652007-08-30 20:10:57 +000010284# Check whether --with-wctype-functions was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010285if test "${with_wctype_functions+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010286 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000010287if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000010288then
10289
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010290$as_echo "#define WANT_WCTYPE_FUNCTIONS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010291
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010292 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10293$as_echo "yes" >&6; }
10294else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10295$as_echo "no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000010296fi
10297else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10299$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010300fi
10301
Barry Warsawef82cd72000-06-30 16:21:01 +000010302
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010303# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000010304
Guido van Rossum98935bf2001-09-05 19:13:16 +000010305DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000010306
Guido van Rossume97ee181999-12-20 21:27:22 +000010307# the dlopen() function means we might want to use dynload_shlib.o. some
10308# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000010309for ac_func in dlopen
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010310do :
10311 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010312if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010313 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010314#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010315_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000010316
Guido van Rossume97ee181999-12-20 21:27:22 +000010317fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010318done
Guido van Rossume97ee181999-12-20 21:27:22 +000010319
Michael W. Hudson54241132001-12-07 15:38:26 +000010320
Guido van Rossume97ee181999-12-20 21:27:22 +000010321# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
10322# loading of modules.
10323
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
10325$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010326if test -z "$DYNLOADFILE"
10327then
10328 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000010329 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
10330 if test "$ac_cv_func_dlopen" = yes
10331 then DYNLOADFILE="dynload_shlib.o"
10332 else DYNLOADFILE="dynload_aix.o"
10333 fi
10334 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000010335 BeOS*) DYNLOADFILE="dynload_beos.o";;
10336 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Anthony Baxter82201742006-04-09 15:07:40 +000010337 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
10338 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010339 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000010340 *)
10341 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
10342 # out any dynamic loading
10343 if test "$ac_cv_func_dlopen" = yes
10344 then DYNLOADFILE="dynload_shlib.o"
10345 else DYNLOADFILE="dynload_stub.o"
10346 fi
10347 ;;
10348 esac
10349fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010350{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
10351$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010352if test "$DYNLOADFILE" != "dynload_stub.o"
10353then
Martin v. Löwis11437992002-04-12 09:54:03 +000010354
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010355$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000010356
10357fi
10358
Neil Schemenauer4e425612001-06-19 15:44:15 +000010359# MACHDEP_OBJS can be set to platform-specific object files needed by Python
10360
Michael W. Hudson54241132001-12-07 15:38:26 +000010361
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
10363$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010364if test -z "$MACHDEP_OBJS"
10365then
Jack Jansene578a632001-08-15 01:27:14 +000010366 MACHDEP_OBJS=$extra_machdep_objs
10367else
10368 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000010369fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010370{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
10371$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010372
Guido van Rossum627b2d71993-12-24 10:39:16 +000010373# checks for library functions
Martin v. Löwisaef18b12008-03-24 13:31:16 +000010374for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
10375 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
doko@ubuntu.coma50b0de2015-04-13 21:55:59 +020010376 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
10377 getentropy \
Martin v. Löwis50ea4562009-11-27 13:56:01 +000010378 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Benjamin Petersond16e01c2014-02-04 10:20:26 -050010379 initgroups kill killpg lchmod lchown lstat mkfifo mknod mktime mmap \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000010380 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000010381 putenv readlink realpath \
Jesse Noller355b1262009-04-02 00:03:28 +000010382 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
10383 setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000010384 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Martin v. Löwis50ea4562009-11-27 13:56:01 +000010385 setlocale setregid setreuid setresuid setresgid \
10386 setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +000010387 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000010388 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Neal Norwitz05a45592006-03-20 06:30:08 +000010389 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010390do :
10391 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10392ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010393if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010394 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010395#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010396_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010397
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010398fi
10399done
10400
Michael W. Hudson54241132001-12-07 15:38:26 +000010401
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010402# For some functions, having a definition is not sufficient, since
10403# we want to take their address.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
10405$as_echo_n "checking for chroot... " >&6; }
10406cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010407/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010408#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010409int
10410main ()
10411{
10412void *x=chroot
10413 ;
10414 return 0;
10415}
10416_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010417if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010418
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010419$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010420
Matthias Klosec511b472010-05-08 11:01:39 +000010421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010422$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010423else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010424 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10425$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010426
10427fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010428rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
10430$as_echo_n "checking for link... " >&6; }
10431cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010432/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010433#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010434int
10435main ()
10436{
10437void *x=link
10438 ;
10439 return 0;
10440}
10441_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010442if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010443
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010444$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010445
Matthias Klosec511b472010-05-08 11:01:39 +000010446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010447$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010448else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10450$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010451
10452fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010453rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
10455$as_echo_n "checking for symlink... " >&6; }
10456cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010457/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010458#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010459int
10460main ()
10461{
10462void *x=symlink
10463 ;
10464 return 0;
10465}
10466_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010467if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010468
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010469$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010470
Matthias Klosec511b472010-05-08 11:01:39 +000010471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010472$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010473else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10475$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010476
10477fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010478rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010479{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
10480$as_echo_n "checking for fchdir... " >&6; }
10481cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010482/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010483#include <unistd.h>
10484int
10485main ()
10486{
10487void *x=fchdir
10488 ;
10489 return 0;
10490}
10491_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010492if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010493
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010494$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010495
Matthias Klosec511b472010-05-08 11:01:39 +000010496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010497$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010498else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10500$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010501
10502fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010503rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
10505$as_echo_n "checking for fsync... " >&6; }
10506cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010507/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010508#include <unistd.h>
10509int
10510main ()
10511{
10512void *x=fsync
10513 ;
10514 return 0;
10515}
10516_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010517if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010518
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010519$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010520
Matthias Klosec511b472010-05-08 11:01:39 +000010521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010522$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010523else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10525$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010526
10527fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010528rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
10530$as_echo_n "checking for fdatasync... " >&6; }
10531cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010532/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010533#include <unistd.h>
10534int
10535main ()
10536{
10537void *x=fdatasync
10538 ;
10539 return 0;
10540}
10541_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010542if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010543
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010544$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010545
Matthias Klosec511b472010-05-08 11:01:39 +000010546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010547$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010548else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10550$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010551
10552fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010553rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
10555$as_echo_n "checking for epoll... " >&6; }
10556cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010557/* end confdefs.h. */
10558#include <sys/epoll.h>
10559int
10560main ()
10561{
10562void *x=epoll_create
10563 ;
10564 return 0;
10565}
10566_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010567if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010568
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010569$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010570
Matthias Klosec511b472010-05-08 11:01:39 +000010571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010572$as_echo "yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010573else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10575$as_echo "no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010576
10577fi
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010578rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
10580$as_echo_n "checking for kqueue... " >&6; }
10581cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010582/* end confdefs.h. */
10583
10584#include <sys/types.h>
10585#include <sys/event.h>
10586
10587int
10588main ()
10589{
10590int x=kqueue()
10591 ;
10592 return 0;
10593}
10594_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010595if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010596
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010597$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010598
Matthias Klosec511b472010-05-08 11:01:39 +000010599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010600$as_echo "yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010601else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10603$as_echo "no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010604
10605fi
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010606rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010607# On some systems (eg. FreeBSD 5), we would find a definition of the
10608# functions ctermid_r, setgroups in the library, but no prototype
10609# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
10610# address to avoid compiler warnings and potential miscompilations
10611# because of the missing prototypes.
10612
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
10614$as_echo_n "checking for ctermid_r... " >&6; }
10615cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010616/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010617
Martin v. Löwisd5843682002-11-21 20:41:28 +000010618#include <stdio.h>
10619
Martin v. Löwisd5843682002-11-21 20:41:28 +000010620int
10621main ()
10622{
10623void* p = ctermid_r
10624 ;
10625 return 0;
10626}
10627_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010628if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010629
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010630$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010631
Matthias Klosec511b472010-05-08 11:01:39 +000010632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010633$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010634else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010635 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10636$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010637
10638fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010639rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10640
Antoine Pitroub170f172010-09-10 18:47:36 +000010641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
10642$as_echo_n "checking for flock declaration... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010643if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010644 $as_echo_n "(cached) " >&6
10645else
10646 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010647/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010648#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010649int
10650main ()
10651{
10652void* p = flock
Antoine Pitroub170f172010-09-10 18:47:36 +000010653
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010654 ;
10655 return 0;
10656}
10657_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010658if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010659 ac_cv_flock_decl=yes
10660else
10661 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010662
10663fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010664rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitrou85729812010-09-07 14:55:24 +000010665
Antoine Pitroub170f172010-09-10 18:47:36 +000010666fi
10667{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
10668$as_echo "$ac_cv_flock_decl" >&6; }
10669if test "x${ac_cv_flock_decl}" = xyes; then
10670 for ac_func in flock
10671do :
10672 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010673if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010674 cat >>confdefs.h <<_ACEOF
10675#define HAVE_FLOCK 1
Antoine Pitrou85729812010-09-07 14:55:24 +000010676_ACEOF
Antoine Pitroub170f172010-09-10 18:47:36 +000010677
Antoine Pitrou85729812010-09-07 14:55:24 +000010678else
Antoine Pitroub170f172010-09-10 18:47:36 +000010679 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitrou85729812010-09-07 14:55:24 +000010680$as_echo_n "checking for flock in -lbsd... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010681if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitrou85729812010-09-07 14:55:24 +000010682 $as_echo_n "(cached) " >&6
10683else
10684 ac_check_lib_save_LIBS=$LIBS
10685LIBS="-lbsd $LIBS"
10686cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10687/* end confdefs.h. */
10688
10689/* Override any GCC internal prototype to avoid an error.
10690 Use char because int might match the return type of a GCC
10691 builtin and then its argument prototype would still apply. */
10692#ifdef __cplusplus
10693extern "C"
10694#endif
10695char flock ();
10696int
10697main ()
10698{
10699return flock ();
10700 ;
10701 return 0;
10702}
10703_ACEOF
10704if ac_fn_c_try_link "$LINENO"; then :
10705 ac_cv_lib_bsd_flock=yes
10706else
10707 ac_cv_lib_bsd_flock=no
10708fi
10709rm -f core conftest.err conftest.$ac_objext \
10710 conftest$ac_exeext conftest.$ac_ext
10711LIBS=$ac_check_lib_save_LIBS
10712fi
10713{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
10714$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010715if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010716 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitrou85729812010-09-07 14:55:24 +000010717
10718
10719$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
10720
10721
10722fi
10723
10724
10725fi
Antoine Pitroub170f172010-09-10 18:47:36 +000010726done
10727
Antoine Pitrou85729812010-09-07 14:55:24 +000010728fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010729
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
10731$as_echo_n "checking for getpagesize... " >&6; }
10732cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010733/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010734
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010735#include <unistd.h>
10736
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010737int
10738main ()
10739{
10740void* p = getpagesize
10741 ;
10742 return 0;
10743}
10744_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010745if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010746
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010747$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010748
Matthias Klosec511b472010-05-08 11:01:39 +000010749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010750$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010751else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10753$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010754
10755fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010756rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010757
Charles-François Natali93a11752011-11-27 13:01:35 +010010758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
10759$as_echo_n "checking for broken unsetenv... " >&6; }
10760cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10761/* end confdefs.h. */
10762
10763#include <stdlib.h>
10764
10765int
10766main ()
10767{
10768int res = unsetenv("DUMMY")
10769 ;
10770 return 0;
10771}
10772_ACEOF
10773if ac_fn_c_try_compile "$LINENO"; then :
10774 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10775$as_echo "no" >&6; }
10776else
10777
10778$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
10779
10780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10781$as_echo "yes" >&6; }
10782
10783fi
10784rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10785
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010786for ac_prog in true
10787do
10788 # Extract the first word of "$ac_prog", so it can be a program name with args.
10789set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10791$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010792if ${ac_cv_prog_TRUE+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010793 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010794else
10795 if test -n "$TRUE"; then
10796 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
10797else
10798as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10799for as_dir in $PATH
10800do
10801 IFS=$as_save_IFS
10802 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010803 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +010010804 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010805 ac_cv_prog_TRUE="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010806 $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 +000010807 break 2
10808 fi
10809done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010810 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000010811IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010812
10813fi
10814fi
10815TRUE=$ac_cv_prog_TRUE
10816if test -n "$TRUE"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
10818$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010819else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10821$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010822fi
10823
Martin v. Löwiseba40652007-08-30 20:10:57 +000010824
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010825 test -n "$TRUE" && break
10826done
10827test -n "$TRUE" || TRUE="/bin/true"
10828
10829
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
10831$as_echo_n "checking for inet_aton in -lc... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010832if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010833 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010834else
10835 ac_check_lib_save_LIBS=$LIBS
10836LIBS="-lc $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010837cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010838/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010839
Martin v. Löwiseba40652007-08-30 20:10:57 +000010840/* Override any GCC internal prototype to avoid an error.
10841 Use char because int might match the return type of a GCC
10842 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010843#ifdef __cplusplus
10844extern "C"
10845#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010846char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010847int
10848main ()
10849{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010850return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010851 ;
10852 return 0;
10853}
10854_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010855if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010856 ac_cv_lib_c_inet_aton=yes
10857else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010858 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010859fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010860rm -f core conftest.err conftest.$ac_objext \
10861 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010862LIBS=$ac_check_lib_save_LIBS
10863fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010864{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
10865$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010866if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010867 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010868else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010869 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
10870$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010871if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010872 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010873else
10874 ac_check_lib_save_LIBS=$LIBS
10875LIBS="-lresolv $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010876cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010877/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010878
Martin v. Löwiseba40652007-08-30 20:10:57 +000010879/* Override any GCC internal prototype to avoid an error.
10880 Use char because int might match the return type of a GCC
10881 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010882#ifdef __cplusplus
10883extern "C"
10884#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010885char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010886int
10887main ()
10888{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010889return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010890 ;
10891 return 0;
10892}
10893_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010894if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010895 ac_cv_lib_resolv_inet_aton=yes
10896else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010897 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010898fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010899rm -f core conftest.err conftest.$ac_objext \
10900 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010901LIBS=$ac_check_lib_save_LIBS
10902fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010903{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
10904$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010905if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010906 cat >>confdefs.h <<_ACEOF
10907#define HAVE_LIBRESOLV 1
10908_ACEOF
10909
10910 LIBS="-lresolv $LIBS"
10911
10912fi
10913
10914
10915fi
10916
10917
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010918# On Tru64, chflags seems to be present, but calling it will
10919# exit Python
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
10921$as_echo_n "checking for chflags... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010922if ${ac_cv_have_chflags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010923 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010924else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010925 if test "$cross_compiling" = yes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010926 ac_cv_have_chflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010927else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010928 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010929/* end confdefs.h. */
Ned Deily43e10542011-06-27 23:41:53 -070010930
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010931#include <sys/stat.h>
10932#include <unistd.h>
10933int main(int argc, char*argv[])
10934{
10935 if(chflags(argv[0], 0) != 0)
10936 return 1;
10937 return 0;
10938}
Ned Deily43e10542011-06-27 23:41:53 -070010939
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010940_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010941if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010942 ac_cv_have_chflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010943else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010944 ac_cv_have_chflags=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010945fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010946rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10947 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000010948fi
10949
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010950
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010951fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010952{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
10953$as_echo "$ac_cv_have_chflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000010954if test "$ac_cv_have_chflags" = cross ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010955 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010956if test "x$ac_cv_func_chflags" = xyes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010957 ac_cv_have_chflags="yes"
10958else
10959 ac_cv_have_chflags="no"
10960fi
10961
10962fi
10963if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010964
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010965$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010966
10967fi
10968
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
10970$as_echo_n "checking for lchflags... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010971if ${ac_cv_have_lchflags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010972 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010973else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010974 if test "$cross_compiling" = yes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010975 ac_cv_have_lchflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010976else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010977 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010978/* end confdefs.h. */
Ned Deily43e10542011-06-27 23:41:53 -070010979
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010980#include <sys/stat.h>
10981#include <unistd.h>
10982int main(int argc, char*argv[])
10983{
10984 if(lchflags(argv[0], 0) != 0)
10985 return 1;
10986 return 0;
10987}
Ned Deily43e10542011-06-27 23:41:53 -070010988
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010989_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010990if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010991 ac_cv_have_lchflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010992else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010993 ac_cv_have_lchflags=no
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010994fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010995rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10996 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010997fi
10998
10999
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011000fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011001{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11002$as_echo "$ac_cv_have_lchflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000011003if test "$ac_cv_have_lchflags" = cross ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011004 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011005if test "x$ac_cv_func_lchflags" = xyes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000011006 ac_cv_have_lchflags="yes"
11007else
11008 ac_cv_have_lchflags="no"
11009fi
11010
11011fi
11012if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011013
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011014$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011015
11016fi
11017
Ronald Oussorenf8752642006-07-06 10:13:35 +000011018case $ac_sys_system/$ac_sys_release in
11019Darwin/*)
11020 _CUR_CFLAGS="${CFLAGS}"
11021 _CUR_LDFLAGS="${LDFLAGS}"
11022 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11023 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11024 ;;
11025esac
11026
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11028$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011029if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011030 $as_echo_n "(cached) " >&6
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011031else
11032 ac_check_lib_save_LIBS=$LIBS
11033LIBS="-lz $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011034cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011035/* end confdefs.h. */
11036
Martin v. Löwiseba40652007-08-30 20:10:57 +000011037/* Override any GCC internal prototype to avoid an error.
11038 Use char because int might match the return type of a GCC
11039 builtin and then its argument prototype would still apply. */
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011040#ifdef __cplusplus
11041extern "C"
11042#endif
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011043char inflateCopy ();
11044int
11045main ()
11046{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011047return inflateCopy ();
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011048 ;
11049 return 0;
11050}
11051_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011052if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011053 ac_cv_lib_z_inflateCopy=yes
11054else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011055 ac_cv_lib_z_inflateCopy=no
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011056fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011057rm -f core conftest.err conftest.$ac_objext \
11058 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011059LIBS=$ac_check_lib_save_LIBS
11060fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011061{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
11062$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011063if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011064
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011065$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011066
11067fi
11068
11069
Ronald Oussorenf8752642006-07-06 10:13:35 +000011070case $ac_sys_system/$ac_sys_release in
11071Darwin/*)
11072 CFLAGS="${_CUR_CFLAGS}"
11073 LDFLAGS="${_CUR_LDFLAGS}"
11074 ;;
11075esac
11076
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
11078$as_echo_n "checking for hstrerror... " >&6; }
11079cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011080/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011081
Martin v. Löwise9416172003-05-03 10:12:45 +000011082#include <netdb.h>
11083
Martin v. Löwise9416172003-05-03 10:12:45 +000011084int
11085main ()
11086{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011087void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011088 ;
11089 return 0;
11090}
11091_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011092if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011093
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011094$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011095
Matthias Klosec511b472010-05-08 11:01:39 +000011096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011097$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011098else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11100$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011101
11102fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011103rm -f core conftest.err conftest.$ac_objext \
11104 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011105
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
11107$as_echo_n "checking for inet_aton... " >&6; }
11108cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011109/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011110
Martin v. Löwis86d66262006-02-17 08:40:11 +000011111#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011112#include <sys/socket.h>
11113#include <netinet/in.h>
11114#include <arpa/inet.h>
11115
Martin v. Löwise9416172003-05-03 10:12:45 +000011116int
11117main ()
11118{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011119void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011120 ;
11121 return 0;
11122}
11123_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011124if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011125
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011126$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011127
Matthias Klosec511b472010-05-08 11:01:39 +000011128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011129$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011130else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11132$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011133
11134fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011135rm -f core conftest.err conftest.$ac_objext \
11136 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011137
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
11139$as_echo_n "checking for inet_pton... " >&6; }
11140cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011141/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011142
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011143#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011144#include <sys/socket.h>
11145#include <netinet/in.h>
11146#include <arpa/inet.h>
11147
Martin v. Löwise9416172003-05-03 10:12:45 +000011148int
11149main ()
11150{
11151void* p = inet_pton
11152 ;
11153 return 0;
11154}
11155_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011156if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011157
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011158$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011159
Matthias Klosec511b472010-05-08 11:01:39 +000011160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011161$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011162else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011163 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11164$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011165
11166fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011167rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000011168
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011169# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
11171$as_echo_n "checking for setgroups... " >&6; }
11172cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011173/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011174
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011175#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011176#ifdef HAVE_GRP_H
11177#include <grp.h>
11178#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000011179
Martin v. Löwisd5843682002-11-21 20:41:28 +000011180int
11181main ()
11182{
11183void* p = setgroups
11184 ;
11185 return 0;
11186}
11187_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011188if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011189
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011190$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011191
Matthias Klosec511b472010-05-08 11:01:39 +000011192 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011193$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011194else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011195 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11196$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011197
11198fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011199rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000011200
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011201# check for openpty and forkpty
11202
11203for ac_func in openpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011204do :
11205 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011206if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011207 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011208#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011209_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011210
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011211else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011212 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
11213$as_echo_n "checking for openpty in -lutil... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011214if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011215 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011216else
Martin v. Löwis11437992002-04-12 09:54:03 +000011217 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011218LIBS="-lutil $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011219cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011220/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011221
Martin v. Löwiseba40652007-08-30 20:10:57 +000011222/* Override any GCC internal prototype to avoid an error.
11223 Use char because int might match the return type of a GCC
11224 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011225#ifdef __cplusplus
11226extern "C"
11227#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011228char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011229int
11230main ()
11231{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011232return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011233 ;
11234 return 0;
11235}
11236_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011237if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011238 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011239else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011240 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011241fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011242rm -f core conftest.err conftest.$ac_objext \
11243 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011244LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011245fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011246{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
11247$as_echo "$ac_cv_lib_util_openpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011248if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011249 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011250 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011251else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011252 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
11253$as_echo_n "checking for openpty in -lbsd... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011254if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011255 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011256else
11257 ac_check_lib_save_LIBS=$LIBS
11258LIBS="-lbsd $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011259cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011260/* end confdefs.h. */
11261
Martin v. Löwiseba40652007-08-30 20:10:57 +000011262/* Override any GCC internal prototype to avoid an error.
11263 Use char because int might match the return type of a GCC
11264 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011265#ifdef __cplusplus
11266extern "C"
11267#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011268char openpty ();
11269int
11270main ()
11271{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011272return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011273 ;
11274 return 0;
11275}
11276_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011277if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011278 ac_cv_lib_bsd_openpty=yes
11279else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011280 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011281fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011282rm -f core conftest.err conftest.$ac_objext \
11283 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011284LIBS=$ac_check_lib_save_LIBS
11285fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011286{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
11287$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011288if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011289 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011290 LIBS="$LIBS -lbsd"
11291fi
11292
11293
11294fi
11295
Fred Drake8cef4cf2000-06-28 16:40:38 +000011296
11297fi
11298done
11299
11300for ac_func in forkpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011301do :
11302 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011303if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011304 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011305#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011306_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011307
Fred Drake8cef4cf2000-06-28 16:40:38 +000011308else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011309 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
11310$as_echo_n "checking for forkpty in -lutil... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011311if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011312 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011313else
Martin v. Löwis11437992002-04-12 09:54:03 +000011314 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011315LIBS="-lutil $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011316cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011317/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011318
Martin v. Löwiseba40652007-08-30 20:10:57 +000011319/* Override any GCC internal prototype to avoid an error.
11320 Use char because int might match the return type of a GCC
11321 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011322#ifdef __cplusplus
11323extern "C"
11324#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011325char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011326int
11327main ()
11328{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011329return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011330 ;
11331 return 0;
11332}
11333_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011334if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011335 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011336else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011337 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011338fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011339rm -f core conftest.err conftest.$ac_objext \
11340 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011341LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011342fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011343{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
11344$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011345if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011346 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011347 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011348else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011349 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
11350$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011351if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011352 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011353else
11354 ac_check_lib_save_LIBS=$LIBS
11355LIBS="-lbsd $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011356cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011357/* end confdefs.h. */
11358
Martin v. Löwiseba40652007-08-30 20:10:57 +000011359/* Override any GCC internal prototype to avoid an error.
11360 Use char because int might match the return type of a GCC
11361 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011362#ifdef __cplusplus
11363extern "C"
11364#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011365char forkpty ();
11366int
11367main ()
11368{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011369return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011370 ;
11371 return 0;
11372}
11373_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011374if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011375 ac_cv_lib_bsd_forkpty=yes
11376else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011377 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011378fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011379rm -f core conftest.err conftest.$ac_objext \
11380 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011381LIBS=$ac_check_lib_save_LIBS
11382fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011383{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
11384$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011385if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011386 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011387 LIBS="$LIBS -lbsd"
11388fi
11389
11390
11391fi
11392
Fred Drake8cef4cf2000-06-28 16:40:38 +000011393
11394fi
11395done
11396
Jack Jansendd19cf82001-12-06 22:36:17 +000011397
Brett Cannonaa5778d2008-03-18 04:09:00 +000011398# Stuff for expat.
Brett Cannonaa5778d2008-03-18 04:09:00 +000011399for ac_func in memmove
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011400do :
11401 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011402if test "x$ac_cv_func_memmove" = xyes; then :
Brett Cannonaa5778d2008-03-18 04:09:00 +000011403 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011404#define HAVE_MEMMOVE 1
Brett Cannonaa5778d2008-03-18 04:09:00 +000011405_ACEOF
11406
11407fi
11408done
11409
11410
Michael W. Hudson54241132001-12-07 15:38:26 +000011411# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000011412for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011413do :
11414 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11415ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011416if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011417 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011418#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011419_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000011420
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011421fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000011422done
11423
Michael W. Hudson54241132001-12-07 15:38:26 +000011424
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011425ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011426if test "x$ac_cv_func_dup2" = xyes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011427 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000011428
Martin v. Löwis1142de32002-03-29 16:28:31 +000011429else
Martin v. Löwiseba40652007-08-30 20:10:57 +000011430 case " $LIBOBJS " in
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011431 *" dup2.$ac_objext "* ) ;;
11432 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Martin v. Löwiseba40652007-08-30 20:10:57 +000011433 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011434esac
11435
Martin v. Löwis1142de32002-03-29 16:28:31 +000011436fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011437
11438ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011439if test "x$ac_cv_func_getcwd" = xyes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011440 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
11441
11442else
11443 case " $LIBOBJS " in
11444 *" getcwd.$ac_objext "* ) ;;
11445 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
11446 ;;
11447esac
11448
11449fi
11450
11451ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011452if test "x$ac_cv_func_strdup" = xyes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011453 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
11454
11455else
11456 case " $LIBOBJS " in
11457 *" strdup.$ac_objext "* ) ;;
11458 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
11459 ;;
11460esac
11461
11462fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000011463
11464
11465for ac_func in getpgrp
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011466do :
11467 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011468if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011469 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011470#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011471_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011472 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011473/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011474#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011475int
11476main ()
11477{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011478getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011479 ;
11480 return 0;
11481}
11482_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011483if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011484
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011485$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011486
Guido van Rossum627b2d71993-12-24 10:39:16 +000011487fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011488rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011489
Guido van Rossum627b2d71993-12-24 10:39:16 +000011490fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011491done
Guido van Rossum627b2d71993-12-24 10:39:16 +000011492
Jack Jansen150753c2003-03-29 22:07:47 +000011493for ac_func in setpgrp
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011494do :
11495 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011496if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000011497 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011498#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000011499_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011500 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011501/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000011502#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000011503int
11504main ()
11505{
11506setpgrp(0,0);
11507 ;
11508 return 0;
11509}
11510_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011511if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011512
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011513$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011514
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011515fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011516rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000011517
11518fi
11519done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011520
Thomas Wouters3a584202000-08-05 23:28:51 +000011521for ac_func in gettimeofday
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011522do :
11523 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011524if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011525 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011526#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011527_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011528 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011529/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011530#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011531int
11532main ()
11533{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011534gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011535 ;
11536 return 0;
11537}
11538_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011539if ac_fn_c_try_compile "$LINENO"; then :
11540
Guido van Rossum627b2d71993-12-24 10:39:16 +000011541else
Skip Montanaro6dead952003-09-25 14:50:04 +000011542
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011543$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011544
Martin v. Löwis11437992002-04-12 09:54:03 +000011545
Guido van Rossum627b2d71993-12-24 10:39:16 +000011546fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011547rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011548
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011549fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011550done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011551
Michael W. Hudson54241132001-12-07 15:38:26 +000011552
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
11554$as_echo_n "checking for major... " >&6; }
11555cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011556/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011557
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011558#if defined(MAJOR_IN_MKDEV)
11559#include <sys/mkdev.h>
11560#elif defined(MAJOR_IN_SYSMACROS)
11561#include <sys/sysmacros.h>
11562#else
11563#include <sys/types.h>
11564#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011565
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011566int
11567main ()
11568{
11569
11570 makedev(major(0),minor(0));
11571
11572 ;
11573 return 0;
11574}
11575_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011576if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011577
11578
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011579$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011580
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011581 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11582$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011583
11584else
Skip Montanaro6dead952003-09-25 14:50:04 +000011585
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11587$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011588
11589fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011590rm -f core conftest.err conftest.$ac_objext \
11591 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011592
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011593# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000011594# for [no]getaddrinfo in netdb.h.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
11596$as_echo_n "checking for getaddrinfo... " >&6; }
11597cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011598/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011599
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011600#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011601#include <sys/socket.h>
11602#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011603#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011604
Martin v. Löwis11437992002-04-12 09:54:03 +000011605int
11606main ()
11607{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011608getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000011609 ;
11610 return 0;
11611}
11612_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011613if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011614 have_getaddrinfo=yes
11615else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011616 have_getaddrinfo=no
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011617fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011618rm -f core conftest.err conftest.$ac_objext \
11619 conftest$ac_exeext conftest.$ac_ext
11620{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
11621$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011622if test $have_getaddrinfo = yes
11623then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011624 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
11625$as_echo_n "checking getaddrinfo bug... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011626 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011627 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011628else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011629 if test "$cross_compiling" = yes; then :
doko@python.orgd65e2ba2013-01-31 23:52:03 +010011630
11631if test "${enable_ipv6+set}" = set; then
11632 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
11633else
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011634 ac_cv_buggy_getaddrinfo=yes
doko@python.orgd65e2ba2013-01-31 23:52:03 +010011635fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011636else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011637 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011638/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011639
Stefan Krah0afe4e42012-11-22 23:56:51 +010011640#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011641#include <sys/types.h>
11642#include <netdb.h>
11643#include <string.h>
11644#include <sys/socket.h>
11645#include <netinet/in.h>
11646
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011647int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011648{
11649 int passive, gaierr, inet4 = 0, inet6 = 0;
11650 struct addrinfo hints, *ai, *aitop;
11651 char straddr[INET6_ADDRSTRLEN], strport[16];
11652
11653 for (passive = 0; passive <= 1; passive++) {
11654 memset(&hints, 0, sizeof(hints));
11655 hints.ai_family = AF_UNSPEC;
11656 hints.ai_flags = passive ? AI_PASSIVE : 0;
11657 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000011658 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011659 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
11660 (void)gai_strerror(gaierr);
11661 goto bad;
11662 }
11663 for (ai = aitop; ai; ai = ai->ai_next) {
11664 if (ai->ai_addr == NULL ||
11665 ai->ai_addrlen == 0 ||
11666 getnameinfo(ai->ai_addr, ai->ai_addrlen,
11667 straddr, sizeof(straddr), strport, sizeof(strport),
11668 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
11669 goto bad;
11670 }
11671 switch (ai->ai_family) {
11672 case AF_INET:
11673 if (strcmp(strport, "54321") != 0) {
11674 goto bad;
11675 }
11676 if (passive) {
11677 if (strcmp(straddr, "0.0.0.0") != 0) {
11678 goto bad;
11679 }
11680 } else {
11681 if (strcmp(straddr, "127.0.0.1") != 0) {
11682 goto bad;
11683 }
11684 }
11685 inet4++;
11686 break;
11687 case AF_INET6:
11688 if (strcmp(strport, "54321") != 0) {
11689 goto bad;
11690 }
11691 if (passive) {
11692 if (strcmp(straddr, "::") != 0) {
11693 goto bad;
11694 }
11695 } else {
11696 if (strcmp(straddr, "::1") != 0) {
11697 goto bad;
11698 }
11699 }
11700 inet6++;
11701 break;
11702 case AF_UNSPEC:
11703 goto bad;
11704 break;
11705 default:
11706 /* another family support? */
11707 break;
11708 }
11709 }
11710 }
11711
11712 if (!(inet4 == 0 || inet4 == 2))
11713 goto bad;
11714 if (!(inet6 == 0 || inet6 == 2))
11715 goto bad;
11716
11717 if (aitop)
11718 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011719 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011720
11721 bad:
11722 if (aitop)
11723 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011724 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011725}
11726
Martin v. Löwis11437992002-04-12 09:54:03 +000011727_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011728if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011729 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011730else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011731 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011732fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011733rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11734 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011735fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011736
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011737fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011738
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011739fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011740
Benjamin Peterson75fed812010-11-01 01:47:19 +000011741{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
11742$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
11743
Mark Dickinson0ef0b912009-12-31 21:11:48 +000011744if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011745then
11746 if test $ipv6 = yes
11747 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011748 echo 'Fatal: You must get working getaddrinfo() function.'
11749 echo ' or you can specify "--disable-ipv6"'.
11750 exit 1
11751 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011752else
Martin v. Löwis11437992002-04-12 09:54:03 +000011753
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011754$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011755
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011756fi
Benjamin Peterson75fed812010-11-01 01:47:19 +000011757
Jack Jansen9a66b6d2001-08-08 13:56:14 +000011758for ac_func in getnameinfo
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011759do :
11760 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011761if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011762 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011763#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011764_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011765
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011766fi
11767done
11768
Michael W. Hudson54241132001-12-07 15:38:26 +000011769
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011770# checks for structures
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
11772$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011773if ${ac_cv_header_time+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011774 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011775else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011776 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011777/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011778#include <sys/types.h>
11779#include <sys/time.h>
11780#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011781
Martin v. Löwis11437992002-04-12 09:54:03 +000011782int
11783main ()
11784{
11785if ((struct tm *) 0)
11786return 0;
11787 ;
11788 return 0;
11789}
11790_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011791if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011792 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011793else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011794 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011795fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011796rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011797fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011798{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
11799$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011800if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011801
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011802$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011803
11804fi
11805
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
11807$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011808if ${ac_cv_struct_tm+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011809 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011810else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011811 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011812/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011813#include <sys/types.h>
11814#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011815
Martin v. Löwis11437992002-04-12 09:54:03 +000011816int
11817main ()
11818{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011819struct tm tm;
11820 int *p = &tm.tm_sec;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011821 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000011822 ;
11823 return 0;
11824}
11825_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011826if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011827 ac_cv_struct_tm=time.h
11828else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011829 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011830fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011831rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011832fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011833{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
11834$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011835if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011836
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011837$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011838
11839fi
11840
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011841ac_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 +000011842#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000011843
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011844"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011845if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011846
11847cat >>confdefs.h <<_ACEOF
11848#define HAVE_STRUCT_TM_TM_ZONE 1
11849_ACEOF
11850
11851
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011852fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011853
Martin v. Löwis11437992002-04-12 09:54:03 +000011854if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
11855
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011856$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011857
11858else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011859 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
11860"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011861if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011862 ac_have_decl=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000011863else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011864 ac_have_decl=0
Martin v. Löwiseba40652007-08-30 20:10:57 +000011865fi
11866
Martin v. Löwiseba40652007-08-30 20:10:57 +000011867cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011868#define HAVE_DECL_TZNAME $ac_have_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +000011869_ACEOF
11870
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011871 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
11872$as_echo_n "checking for tzname... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011873if ${ac_cv_var_tzname+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011874 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000011875else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011876 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011877/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011878#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000011879#if !HAVE_DECL_TZNAME
11880extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000011881#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011882
Martin v. Löwis11437992002-04-12 09:54:03 +000011883int
11884main ()
11885{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011886return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000011887 ;
11888 return 0;
11889}
11890_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011891if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011892 ac_cv_var_tzname=yes
11893else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011894 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011895fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011896rm -f core conftest.err conftest.$ac_objext \
11897 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000011898fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011899{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
11900$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011901 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011902
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011903$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011904
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011905 fi
11906fi
11907
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011908ac_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 +010011909if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011910
11911cat >>confdefs.h <<_ACEOF
11912#define HAVE_STRUCT_STAT_ST_RDEV 1
11913_ACEOF
11914
11915
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011916fi
11917
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011918ac_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 +010011919if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011920
Martin v. Löwis11437992002-04-12 09:54:03 +000011921cat >>confdefs.h <<_ACEOF
11922#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
11923_ACEOF
11924
11925
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011926fi
11927
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011928ac_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 +010011929if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000011930
11931cat >>confdefs.h <<_ACEOF
11932#define HAVE_STRUCT_STAT_ST_FLAGS 1
11933_ACEOF
11934
11935
11936fi
11937
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011938ac_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 +010011939if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011940
11941cat >>confdefs.h <<_ACEOF
11942#define HAVE_STRUCT_STAT_ST_GEN 1
11943_ACEOF
11944
11945
11946fi
11947
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011948ac_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 +010011949if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011950
11951cat >>confdefs.h <<_ACEOF
11952#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
11953_ACEOF
11954
11955
11956fi
11957
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011958ac_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 +010011959if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011960
Martin v. Löwis11437992002-04-12 09:54:03 +000011961cat >>confdefs.h <<_ACEOF
11962#define HAVE_STRUCT_STAT_ST_BLOCKS 1
11963_ACEOF
11964
11965
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011966fi
11967
Michael W. Hudson54241132001-12-07 15:38:26 +000011968
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
11970$as_echo_n "checking for time.h that defines altzone... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011971if ${ac_cv_header_time_altzone+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011972 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011973else
Matthias Klosec511b472010-05-08 11:01:39 +000011974
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011975 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011976/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011977#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011978int
11979main ()
11980{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011981return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000011982 ;
11983 return 0;
11984}
11985_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011986if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011987 ac_cv_header_time_altzone=yes
11988else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011989 ac_cv_header_time_altzone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011990fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011991rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosec511b472010-05-08 11:01:39 +000011992
Martin v. Löwiseba40652007-08-30 20:10:57 +000011993fi
11994
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011995{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
11996$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011997if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011998
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011999$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012000
12001fi
12002
Guido van Rossumda88dad1995-01-26 00:46:29 +000012003was_it_defined=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
12005$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
12006cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012007/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012008
12009#include <sys/types.h>
12010#include <sys/select.h>
12011#include <sys/time.h>
12012
Martin v. Löwis11437992002-04-12 09:54:03 +000012013int
12014main ()
12015{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012016;
Martin v. Löwis11437992002-04-12 09:54:03 +000012017 ;
12018 return 0;
12019}
12020_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012021if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012022
12023
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012024$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012025
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012026 was_it_defined=yes
12027
Martin v. Löwiseba40652007-08-30 20:10:57 +000012028fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012029rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012030{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
12031$as_echo "$was_it_defined" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012032
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
12034$as_echo_n "checking for addrinfo... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012035if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012036 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012037else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012038 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012039/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +000012040#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012041int
12042main ()
12043{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012044struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000012045 ;
12046 return 0;
12047}
12048_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012049if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012050 ac_cv_struct_addrinfo=yes
12051else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012052 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012053fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012054rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12055fi
12056
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012057{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
12058$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012059if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012060
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012061$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012062
12063fi
12064
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
12066$as_echo_n "checking for sockaddr_storage... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012067if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012068 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012069else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012070 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012071/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012072
12073# include <sys/types.h>
12074# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012075int
12076main ()
12077{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012078struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000012079 ;
12080 return 0;
12081}
12082_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012083if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012084 ac_cv_struct_sockaddr_storage=yes
12085else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012086 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012087fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012088rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12089fi
12090
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012091{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
12092$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012093if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012094
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012095$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012096
12097fi
12098
Guido van Rossum627b2d71993-12-24 10:39:16 +000012099# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000012100
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
12102$as_echo_n "checking whether char is unsigned... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012103if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012104 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000012105else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012106 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012107/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012108$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012109int
12110main ()
12111{
12112static int test_array [1 - 2 * !(((char) -1) < 0)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012113test_array [0] = 0;
12114return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012115
12116 ;
12117 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000012118}
Martin v. Löwis11437992002-04-12 09:54:03 +000012119_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012120if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012121 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012122else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012123 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012124fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012125rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012126fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012127{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
12128$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012129if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012130 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012131
12132fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000012133
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12135$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012136if ${ac_cv_c_const+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012137 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012138else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012139 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012140/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012141
Martin v. Löwis11437992002-04-12 09:54:03 +000012142int
12143main ()
12144{
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012145
Martin v. Löwis11437992002-04-12 09:54:03 +000012146#ifndef __cplusplus
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012147 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012148 typedef int charset[2];
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012149 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000012150 /* SunOS 4.1.1 cc rejects this. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000012151 char const *const *pcpcc;
12152 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000012153 /* NEC SVR4.0.2 mips cc rejects this. */
12154 struct point {int x, y;};
12155 static struct point const zero = {0,0};
12156 /* AIX XL C 1.02.0.0 rejects this.
12157 It does not let you subtract one const X* pointer from another in
12158 an arm of an if-expression whose if-part is not a constant
12159 expression */
12160 const char *g = "string";
Martin v. Löwiseba40652007-08-30 20:10:57 +000012161 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012162 /* HPUX 7.0 cc rejects these. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000012163 ++pcpcc;
12164 ppc = (char**) pcpcc;
12165 pcpcc = (char const *const *) ppc;
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012166 { /* SCO 3.2v4 cc rejects this sort of thing. */
12167 char tx;
12168 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000012169 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012170
Martin v. Löwis11437992002-04-12 09:54:03 +000012171 *t++ = 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012172 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012173 }
12174 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12175 int x[] = {25, 17};
12176 const int *foo = &x[0];
12177 ++foo;
12178 }
12179 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12180 typedef const int *iptr;
12181 iptr p = 0;
12182 ++p;
12183 }
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012184 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000012185 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012186 struct s { int j; const int *ap[3]; } bx;
12187 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000012188 }
12189 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12190 const int foo = 10;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012191 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012192 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012193 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000012194#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000012195
Martin v. Löwis11437992002-04-12 09:54:03 +000012196 ;
12197 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012198}
Martin v. Löwis11437992002-04-12 09:54:03 +000012199_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012200if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012201 ac_cv_c_const=yes
12202else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012203 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012204fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012205rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012206fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012207{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12208$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012209if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012210
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012211$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012212
12213fi
12214
Michael W. Hudson54241132001-12-07 15:38:26 +000012215
Guido van Rossumda88dad1995-01-26 00:46:29 +000012216works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
12218$as_echo_n "checking for working volatile... " >&6; }
12219cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012220/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012221
Martin v. Löwis11437992002-04-12 09:54:03 +000012222int
12223main ()
12224{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012225volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012226 ;
12227 return 0;
12228}
12229_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012230if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012231 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012232else
Skip Montanaro6dead952003-09-25 14:50:04 +000012233
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012234$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012235
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012236
Guido van Rossum627b2d71993-12-24 10:39:16 +000012237fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012238rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012239{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12240$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012241
Guido van Rossumda88dad1995-01-26 00:46:29 +000012242works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
12244$as_echo_n "checking for working signed char... " >&6; }
12245cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012246/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012247
Martin v. Löwis11437992002-04-12 09:54:03 +000012248int
12249main ()
12250{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012251signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000012252 ;
12253 return 0;
12254}
12255_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012256if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012257 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012258else
Skip Montanaro6dead952003-09-25 14:50:04 +000012259
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012260$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000012261
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012262
Guido van Rossum7f43da71994-08-01 12:15:30 +000012263fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012264rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012265{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12266$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012267
Guido van Rossumda88dad1995-01-26 00:46:29 +000012268have_prototypes=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
12270$as_echo_n "checking for prototypes... " >&6; }
12271cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012272/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012273int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012274int
12275main ()
12276{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012277return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000012278 ;
12279 return 0;
12280}
12281_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012282if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012283
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012284$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012285
Matthias Klosec511b472010-05-08 11:01:39 +000012286 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012287fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012288rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012289{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
12290$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012291
Guido van Rossumda88dad1995-01-26 00:46:29 +000012292works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
12294$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
12295cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012296/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012297
12298#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000012299int foo(int x, ...) {
12300 va_list va;
12301 va_start(va, x);
12302 va_arg(va, int);
12303 va_arg(va, char *);
12304 va_arg(va, double);
12305 return 0;
12306}
Guido van Rossum7f43da71994-08-01 12:15:30 +000012307
Martin v. Löwis11437992002-04-12 09:54:03 +000012308int
12309main ()
12310{
Guido van Rossum90eea071996-08-30 20:58:57 +000012311return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000012312 ;
12313 return 0;
12314}
12315_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012316if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012317
12318
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012319$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012320
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012321 works=yes
12322
Guido van Rossum627b2d71993-12-24 10:39:16 +000012323fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012324rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012325{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12326$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012327
Martin v. Löwisd6320502004-08-12 13:45:08 +000012328# check for socketpair
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
12330$as_echo_n "checking for socketpair... " >&6; }
12331cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012332/* end confdefs.h. */
12333
12334#include <sys/types.h>
12335#include <sys/socket.h>
12336
12337int
12338main ()
12339{
12340void *x=socketpair
12341 ;
12342 return 0;
12343}
12344_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012345if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000012346
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012347$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000012348
Matthias Klosec511b472010-05-08 11:01:39 +000012349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012350$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012351else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12353$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012354
12355fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012356rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012357
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012358# check if sockaddr has sa_len member
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
12360$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
12361cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012362/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012363#include <sys/types.h>
12364#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012365int
12366main ()
12367{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012368struct sockaddr x;
12369x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012370 ;
12371 return 0;
12372}
12373_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012374if ac_fn_c_try_compile "$LINENO"; then :
12375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12376$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012377
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012378$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012379
12380else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12382$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000012383
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012384fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012385rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012386
Guido van Rossumda88dad1995-01-26 00:46:29 +000012387va_list_is_array=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
12389$as_echo_n "checking whether va_list is an array... " >&6; }
12390cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012391/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012392
12393#ifdef HAVE_STDARG_PROTOTYPES
12394#include <stdarg.h>
12395#else
12396#include <varargs.h>
12397#endif
12398
Martin v. Löwis11437992002-04-12 09:54:03 +000012399int
12400main ()
12401{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012402va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000012403 ;
12404 return 0;
12405}
12406_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012407if ac_fn_c_try_compile "$LINENO"; then :
12408
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012409else
Skip Montanaro6dead952003-09-25 14:50:04 +000012410
Martin v. Löwis11437992002-04-12 09:54:03 +000012411
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012412$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012413
Guido van Rossumda88dad1995-01-26 00:46:29 +000012414 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012415
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012416fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012417rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012418{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
12419$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012420
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012421# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000012422
12423
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012424ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012425if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012426
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012427 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000012428
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012429 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
12430$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012431 OLD_CFLAGS=$CFLAGS
12432 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012433 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012434/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012435
12436# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012437
Martin v. Löwis11437992002-04-12 09:54:03 +000012438int
12439main ()
12440{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012441
12442 char *name;
12443 struct hostent *he, *res;
12444 char buffer[2048];
12445 int buflen = 2048;
12446 int h_errnop;
12447
12448 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012449
12450 ;
12451 return 0;
12452}
12453_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012454if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012455
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012456 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012457
Martin v. Löwis11437992002-04-12 09:54:03 +000012458
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012459$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012460
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12462$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012463
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012464else
Skip Montanaro6dead952003-09-25 14:50:04 +000012465
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012466 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12467$as_echo "no" >&6; }
12468 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
12469$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
12470 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012471/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012472
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012473# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012474
Martin v. Löwis11437992002-04-12 09:54:03 +000012475int
12476main ()
12477{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012478
12479 char *name;
12480 struct hostent *he;
Matthias Klosec511b472010-05-08 11:01:39 +000012481 char buffer[2048];
12482 int buflen = 2048;
12483 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012484
Matthias Klosec511b472010-05-08 11:01:39 +000012485 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012486
12487 ;
12488 return 0;
12489}
12490_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012491if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012492
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012493 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012494
Martin v. Löwis11437992002-04-12 09:54:03 +000012495
Matthias Klosec511b472010-05-08 11:01:39 +000012496$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012497
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012498 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12499$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012500
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012501else
Skip Montanaro6dead952003-09-25 14:50:04 +000012502
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012503 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12504$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000012505 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
12506$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
12507 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12508/* end confdefs.h. */
12509
12510# include <netdb.h>
12511
12512int
12513main ()
12514{
12515
12516 char *name;
12517 struct hostent *he;
12518 struct hostent_data data;
12519
12520 (void) gethostbyname_r(name, he, &data);
12521
12522 ;
12523 return 0;
12524}
12525_ACEOF
12526if ac_fn_c_try_compile "$LINENO"; then :
12527
12528 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
12529
12530
12531$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
12532
12533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12534$as_echo "yes" >&6; }
12535
12536else
12537
12538 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12539$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012540
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012541fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012542rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012543
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012544fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012545rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012546
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012547fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012548rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012549 CFLAGS=$OLD_CFLAGS
12550
12551else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012552
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012553 for ac_func in gethostbyname
12554do :
12555 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012556if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012557 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012558#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012559_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012560
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012561fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012562done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012563
Michael W. Hudson54241132001-12-07 15:38:26 +000012564
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012565fi
12566
Michael W. Hudson54241132001-12-07 15:38:26 +000012567
12568
12569
12570
12571
12572
Guido van Rossum627b2d71993-12-24 10:39:16 +000012573# checks for system services
12574# (none yet)
12575
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012576# Linux requires this for correct f.p. operations
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012577ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012578if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012579
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012580else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012581 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
12582$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012583if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012584 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012585else
Martin v. Löwis11437992002-04-12 09:54:03 +000012586 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012587LIBS="-lieee $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012588cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012589/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012590
Martin v. Löwiseba40652007-08-30 20:10:57 +000012591/* Override any GCC internal prototype to avoid an error.
12592 Use char because int might match the return type of a GCC
12593 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012594#ifdef __cplusplus
12595extern "C"
12596#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012597char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012598int
12599main ()
12600{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012601return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012602 ;
12603 return 0;
12604}
12605_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012606if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012607 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012608else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012609 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012610fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012611rm -f core conftest.err conftest.$ac_objext \
12612 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012613LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012614fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012615{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
12616$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012617if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012618 cat >>confdefs.h <<_ACEOF
12619#define HAVE_LIBIEEE 1
12620_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012621
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012622 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012623
Guido van Rossum627b2d71993-12-24 10:39:16 +000012624fi
12625
Michael W. Hudson54241132001-12-07 15:38:26 +000012626
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012627fi
12628
Michael W. Hudson54241132001-12-07 15:38:26 +000012629
Guido van Rossum7f253911997-05-09 02:42:48 +000012630# Check for --with-fpectl
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
12632$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012633
Martin v. Löwiseba40652007-08-30 20:10:57 +000012634# Check whether --with-fpectl was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012635if test "${with_fpectl+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000012636 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000012637if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000012638then
12639
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012640$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012641
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12643$as_echo "yes" >&6; }
12644else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12645$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012646fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000012647else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12649$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012650fi
12651
Guido van Rossum7f253911997-05-09 02:42:48 +000012652
Guido van Rossum7f43da71994-08-01 12:15:30 +000012653# check for --with-libm=...
12654
Guido van Rossum563e7081996-09-10 18:20:48 +000012655case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000012656Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012657BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000012658*) LIBM=-lm
12659esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
12661$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012662
Martin v. Löwiseba40652007-08-30 20:10:57 +000012663# Check whether --with-libm was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012664if test "${with_libm+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000012665 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000012666if test "$withval" = no
12667then LIBM=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
12669$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012670elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012671then LIBM=$withval
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
12673$as_echo "set LIBM=\"$withval\"" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012674else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012675fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012676else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
12678$as_echo "default LIBM=\"$LIBM\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012679fi
12680
Guido van Rossum7f43da71994-08-01 12:15:30 +000012681
12682# check for --with-libc=...
12683
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
12685$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012686
Martin v. Löwiseba40652007-08-30 20:10:57 +000012687# Check whether --with-libc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012688if test "${with_libc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000012689 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000012690if test "$withval" = no
12691then LIBC=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
12693$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012694elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012695then LIBC=$withval
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
12697$as_echo "set LIBC=\"$withval\"" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012698else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012699fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012700else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
12702$as_echo "default LIBC=\"$LIBC\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012703fi
12704
Guido van Rossum7f43da71994-08-01 12:15:30 +000012705
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012706# **************************************************
12707# * Check for various properties of floating point *
12708# **************************************************
Mark Dickinson265d7382008-04-21 22:32:24 +000012709
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
12711$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012712if ${ac_cv_little_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012713 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012714else
12715
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012716if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012717 ac_cv_little_endian_double=no
12718else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012719 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012720/* end confdefs.h. */
12721
12722#include <string.h>
12723int main() {
12724 double x = 9006104071832581.0;
12725 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
12726 return 0;
12727 else
12728 return 1;
12729}
12730
12731_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012732if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012733 ac_cv_little_endian_double=yes
12734else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012735 ac_cv_little_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012736fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012737rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12738 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012739fi
12740
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012741fi
12742
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012743{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
12744$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012745if test "$ac_cv_little_endian_double" = yes
12746then
12747
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012748$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012749
12750fi
12751
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
12753$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012754if ${ac_cv_big_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012755 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012756else
12757
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012758if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012759 ac_cv_big_endian_double=no
12760else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012761 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012762/* end confdefs.h. */
12763
12764#include <string.h>
12765int main() {
12766 double x = 9006104071832581.0;
12767 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
12768 return 0;
12769 else
12770 return 1;
12771}
12772
12773_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012774if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012775 ac_cv_big_endian_double=yes
12776else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012777 ac_cv_big_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012778fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012779rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12780 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012781fi
12782
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012783fi
12784
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012785{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
12786$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012787if test "$ac_cv_big_endian_double" = yes
12788then
12789
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012790$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012791
12792fi
12793
12794# Some ARM platforms use a mixed-endian representation for doubles.
12795# While Python doesn't currently have full support for these platforms
12796# (see e.g., issue 1762561), we can at least make sure that float <-> string
12797# conversions work.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
12799$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012800if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012801 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012802else
12803
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012804if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012805 ac_cv_mixed_endian_double=no
12806else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012807 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012808/* end confdefs.h. */
12809
12810#include <string.h>
12811int main() {
12812 double x = 9006104071832581.0;
12813 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
12814 return 0;
12815 else
12816 return 1;
12817}
12818
12819_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012820if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012821 ac_cv_mixed_endian_double=yes
12822else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012823 ac_cv_mixed_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012824fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012825rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12826 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012827fi
12828
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012829fi
12830
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012831{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
12832$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012833if test "$ac_cv_mixed_endian_double" = yes
12834then
12835
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012836$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012837
12838fi
12839
12840# The short float repr introduced in Python 3.1 requires the
12841# correctly-rounded string <-> double conversion functions from
12842# Python/dtoa.c, which in turn require that the FPU uses 53-bit
12843# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsona548dee2009-11-15 13:12:43 +000012844# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012845# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsona548dee2009-11-15 13:12:43 +000012846
12847# This inline assembler syntax may also work for suncc and icc,
12848# so we try it on all platforms.
12849
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
12851$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
12852cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012853/* end confdefs.h. */
12854
12855int
12856main ()
12857{
12858
Mark Dickinsona548dee2009-11-15 13:12:43 +000012859 unsigned short cw;
12860 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
12861 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012862
12863 ;
12864 return 0;
12865}
12866_ACEOF
Stefan Krah99e36b92015-07-03 15:30:54 +020012867if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012868 have_gcc_asm_for_x87=yes
12869else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012870 have_gcc_asm_for_x87=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012871fi
Stefan Krah99e36b92015-07-03 15:30:54 +020012872rm -f core conftest.err conftest.$ac_objext \
12873 conftest$ac_exeext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012874{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
12875$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsona548dee2009-11-15 13:12:43 +000012876if test "$have_gcc_asm_for_x87" = yes
12877then
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012878
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012879$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012880
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012881fi
Mark Dickinson7a3d8642008-04-22 00:54:27 +000012882
Mark Dickinson04b27232009-01-04 12:29:36 +000012883# Detect whether system arithmetic is subject to x87-style double
12884# rounding issues. The result of this test has little meaning on non
12885# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
12886# mode is round-to-nearest and double rounding issues are present, and
12887# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
12889$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinson99abd142009-10-24 13:44:16 +000012890# $BASECFLAGS may affect the result
12891ac_save_cc="$CC"
12892CC="$CC $BASECFLAGS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012893if test "$cross_compiling" = yes; then :
Mark Dickinson04b27232009-01-04 12:29:36 +000012894 ac_cv_x87_double_rounding=no
12895else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012896 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson04b27232009-01-04 12:29:36 +000012897/* end confdefs.h. */
12898
12899#include <stdlib.h>
12900#include <math.h>
12901int main() {
12902 volatile double x, y, z;
12903 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
12904 x = 0.99999999999999989; /* 1-2**-53 */
12905 y = 1./x;
12906 if (y != 1.)
12907 exit(0);
12908 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
12909 x = 1e16;
12910 y = 2.99999;
12911 z = x + y;
12912 if (z != 1e16+4.)
12913 exit(0);
12914 /* both tests show evidence of double rounding */
12915 exit(1);
12916}
12917
12918_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012919if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson04b27232009-01-04 12:29:36 +000012920 ac_cv_x87_double_rounding=no
12921else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012922 ac_cv_x87_double_rounding=yes
Mark Dickinson04b27232009-01-04 12:29:36 +000012923fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012924rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12925 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson04b27232009-01-04 12:29:36 +000012926fi
12927
Mark Dickinson99abd142009-10-24 13:44:16 +000012928CC="$ac_save_cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012929{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
12930$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson04b27232009-01-04 12:29:36 +000012931if test "$ac_cv_x87_double_rounding" = yes
12932then
12933
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012934$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson04b27232009-01-04 12:29:36 +000012935
12936fi
12937
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012938# ************************************
12939# * Check for mathematical functions *
12940# ************************************
12941
12942LIBS_SAVE=$LIBS
12943LIBS="$LIBS $LIBM"
12944
Mark Dickinson265d7382008-04-21 22:32:24 +000012945# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
12946# -0. on some architectures.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
12948$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012949if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012950 $as_echo_n "(cached) " >&6
Mark Dickinson265d7382008-04-21 22:32:24 +000012951else
12952
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012953if test "$cross_compiling" = yes; then :
Mark Dickinson265d7382008-04-21 22:32:24 +000012954 ac_cv_tanh_preserves_zero_sign=no
12955else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012956 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson265d7382008-04-21 22:32:24 +000012957/* end confdefs.h. */
12958
12959#include <math.h>
Mark Dickinson7a3d8642008-04-22 00:54:27 +000012960#include <stdlib.h>
Mark Dickinson265d7382008-04-21 22:32:24 +000012961int main() {
12962 /* return 0 if either negative zeros don't exist
12963 on this platform or if negative zeros exist
12964 and tanh(-0.) == -0. */
12965 if (atan2(0., -1.) == atan2(-0., -1.) ||
12966 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
12967 else exit(1);
12968}
12969
12970_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012971if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson265d7382008-04-21 22:32:24 +000012972 ac_cv_tanh_preserves_zero_sign=yes
12973else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012974 ac_cv_tanh_preserves_zero_sign=no
Mark Dickinson265d7382008-04-21 22:32:24 +000012975fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012976rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12977 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson265d7382008-04-21 22:32:24 +000012978fi
12979
Mark Dickinson265d7382008-04-21 22:32:24 +000012980fi
12981
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012982{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
12983$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Mark Dickinson265d7382008-04-21 22:32:24 +000012984if test "$ac_cv_tanh_preserves_zero_sign" = yes
12985then
12986
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012987$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Mark Dickinson265d7382008-04-21 22:32:24 +000012988
12989fi
12990
Mark Dickinson65898e02009-09-05 10:27:00 +000012991for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012992do :
12993 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12994ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012995if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinson65898e02009-09-05 10:27:00 +000012996 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012997#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Mark Dickinson65898e02009-09-05 10:27:00 +000012998_ACEOF
12999
13000fi
13001done
13002
Mark Dickinson65898e02009-09-05 10:27:00 +000013003for ac_func in hypot lgamma log1p round tgamma
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013004do :
13005 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13006ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013007if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Christian Heimes0a8143f2007-12-18 23:22:54 +000013008 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013009#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes0a8143f2007-12-18 23:22:54 +000013010_ACEOF
13011
13012fi
13013done
13014
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013015ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
13016"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013017if test "x$ac_cv_have_decl_isinf" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013018 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013019else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013020 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013021fi
13022
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013023cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013024#define HAVE_DECL_ISINF $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013025_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013026ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
13027"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013028if test "x$ac_cv_have_decl_isnan" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013029 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013030else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013031 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013032fi
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013033
13034cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013035#define HAVE_DECL_ISNAN $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013036_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013037ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
13038"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013039if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013040 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013041else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013042 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013043fi
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013044
13045cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013046#define HAVE_DECL_ISFINITE $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013047_ACEOF
13048
13049
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000013050LIBS=$LIBS_SAVE
13051
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013052# For multiprocessing module, check that sem_open
13053# actually works. For FreeBSD versions <= 7.2,
13054# the kernel module that provides POSIX semaphores
13055# isn't loaded by default, so an attempt to call
13056# sem_open results in a 'Signal 12' error.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
13058$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013059if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013060 $as_echo_n "(cached) " >&6
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013061else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013062 if test "$cross_compiling" = yes; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013063 ac_cv_posix_semaphores_enabled=yes
13064else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013065 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013066/* end confdefs.h. */
13067
13068#include <unistd.h>
13069#include <fcntl.h>
13070#include <stdio.h>
13071#include <semaphore.h>
13072#include <sys/stat.h>
13073
13074int main(void) {
13075 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
13076 if (a == SEM_FAILED) {
13077 perror("sem_open");
13078 return 1;
13079 }
13080 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000013081 sem_unlink("/autoconf");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013082 return 0;
13083}
13084
13085_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013086if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013087 ac_cv_posix_semaphores_enabled=yes
13088else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013089 ac_cv_posix_semaphores_enabled=no
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013090fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013091rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13092 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013093fi
13094
13095
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013096fi
13097
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013098{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
13099$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013100if test $ac_cv_posix_semaphores_enabled = no
13101then
13102
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013103$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013104
13105fi
13106
13107# Multiprocessing check for broken sem_getvalue
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
13109$as_echo_n "checking for broken sem_getvalue... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013110if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013111 $as_echo_n "(cached) " >&6
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013112else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013113 if test "$cross_compiling" = yes; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013114 ac_cv_broken_sem_getvalue=yes
13115else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013116 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013117/* end confdefs.h. */
13118
13119#include <unistd.h>
13120#include <fcntl.h>
13121#include <stdio.h>
13122#include <semaphore.h>
13123#include <sys/stat.h>
13124
13125int main(void){
Mark Dickinson59dc89e2009-12-13 21:06:06 +000013126 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013127 int count;
13128 int res;
13129 if(a==SEM_FAILED){
13130 perror("sem_open");
13131 return 1;
13132
13133 }
13134 res = sem_getvalue(a, &count);
13135 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000013136 sem_unlink("/autocftw");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013137 return res==-1 ? 1 : 0;
13138}
13139
13140_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013141if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013142 ac_cv_broken_sem_getvalue=no
13143else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013144 ac_cv_broken_sem_getvalue=yes
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013145fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013146rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13147 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013148fi
13149
13150
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013151fi
13152
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013153{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
13154$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013155if test $ac_cv_broken_sem_getvalue = yes
13156then
13157
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013158$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013159
13160fi
13161
Mark Dickinsonefc82f72009-03-20 15:51:55 +000013162# determine what size digit to use for Python's longs
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
13164$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000013165# Check whether --enable-big-digits was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013166if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonefc82f72009-03-20 15:51:55 +000013167 enableval=$enable_big_digits; case $enable_big_digits in
13168yes)
13169 enable_big_digits=30 ;;
13170no)
13171 enable_big_digits=15 ;;
1317215|30)
13173 ;;
13174*)
Matthias Klose3cef2a92012-03-14 23:39:33 +010013175 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 +000013176esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013177{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
13178$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000013179
13180cat >>confdefs.h <<_ACEOF
13181#define PYLONG_BITS_IN_DIGIT $enable_big_digits
13182_ACEOF
13183
13184
13185else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013186 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13187$as_echo "no value specified" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000013188fi
13189
13190
Guido van Rossumef2255b2000-03-10 22:30:29 +000013191# check for wchar.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013192ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013193if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013194
13195
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013196$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013197
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013198 wchar_h="yes"
13199
Guido van Rossumef2255b2000-03-10 22:30:29 +000013200else
Martin v. Löwis11437992002-04-12 09:54:03 +000013201 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000013202
13203fi
13204
Michael W. Hudson54241132001-12-07 15:38:26 +000013205
Martin v. Löwis11437992002-04-12 09:54:03 +000013206
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013207# determine wchar_t size
13208if test "$wchar_h" = yes
13209then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013210 # The cast to long int works around a bug in the HP C Compiler
Martin v. Löwiseba40652007-08-30 20:10:57 +000013211# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13212# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13213# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
13215$as_echo_n "checking size of wchar_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013216if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013217 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013218else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013219 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
13220"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013221
Martin v. Löwis11437992002-04-12 09:54:03 +000013222else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013223 if test "$ac_cv_type_wchar_t" = yes; then
13224 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13225$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013226as_fn_error 77 "cannot compute sizeof (wchar_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +010013227See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013228 else
13229 ac_cv_sizeof_wchar_t=0
13230 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013231fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013232
Martin v. Löwis11437992002-04-12 09:54:03 +000013233fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013234{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
13235$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013236
13237
13238
Martin v. Löwis11437992002-04-12 09:54:03 +000013239cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013240#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013241_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013242
Michael W. Hudson54241132001-12-07 15:38:26 +000013243
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013244fi
13245
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
13247$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013248have_ucs4_tcl=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013249cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013250/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013251
13252#include <tcl.h>
13253#if TCL_UTF_MAX != 6
13254# error "NOT UCS4_TCL"
13255#endif
13256int
13257main ()
13258{
13259
13260 ;
13261 return 0;
13262}
13263_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013264if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013265
13266
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013267$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013268
13269 have_ucs4_tcl=yes
13270
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013271fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013272rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013273{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
13274$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013275
Skip Montanaro6dead952003-09-25 14:50:04 +000013276# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013277if test "$wchar_h" = yes
13278then
13279 # check whether wchar_t is signed or not
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013280 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
13281$as_echo_n "checking whether wchar_t is signed... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013282 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013283 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013284else
13285
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013286 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013287 ac_cv_wchar_t_signed=yes
13288else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013289 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013290/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013291
13292 #include <wchar.h>
13293 int main()
13294 {
Martin v. Löwis44fe0e42006-04-11 07:15:30 +000013295 /* Success: exit code 0 */
13296 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013297 }
13298
13299_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013300if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013301 ac_cv_wchar_t_signed=yes
13302else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013303 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013304fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013305rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13306 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013307fi
13308
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013309fi
13310
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
13312$as_echo "$ac_cv_wchar_t_signed" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013313fi
13314
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for unicode" >&5
13316$as_echo_n "checking what type to use for unicode... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013317# Check whether --enable-unicode was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013318if test "${enable_unicode+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000013319 enableval=$enable_unicode;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013320else
13321 enable_unicode=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +000013322fi
13323
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013324
13325if test $enable_unicode = yes
13326then
Martin v. Löwisfd917792001-06-27 20:22:04 +000013327 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013328 case "$have_ucs4_tcl" in
13329 yes) enable_unicode="ucs4"
13330 ;;
13331 *) enable_unicode="ucs2"
13332 ;;
13333 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013334fi
13335
Martin v. Löwis0036cba2002-04-12 09:58:45 +000013336
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013337case "$enable_unicode" in
13338ucs2) unicode_size="2"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013339 $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013340
13341 ;;
13342ucs4) unicode_size="4"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013343 $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013344
13345 ;;
Martin v. Löwised11a5d2012-05-20 10:42:17 +020013346no) ;; # To allow --disable-unicode
Matthias Klose3cef2a92012-03-14 23:39:33 +010013347*) 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 +000013348esac
13349
Michael W. Hudson54241132001-12-07 15:38:26 +000013350
Martin v. Löwis11437992002-04-12 09:54:03 +000013351
13352
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013353if test "$enable_unicode" = "no"
13354then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000013355 UNICODE_OBJS=""
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not used" >&5
13357$as_echo "not used" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013358else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000013359 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000013360
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013361$as_echo "#define Py_USING_UNICODE 1" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013362
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013363
13364 # wchar_t is only usable if it maps to an unsigned type
13365 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000013366 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013367 then
13368 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013369
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013370$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013371
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013372 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013373
13374 elif test "$ac_cv_sizeof_short" = "$unicode_size"
13375 then
13376 PY_UNICODE_TYPE="unsigned short"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013377 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013378
13379 elif test "$ac_cv_sizeof_long" = "$unicode_size"
13380 then
13381 PY_UNICODE_TYPE="unsigned long"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013382 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013383
13384 else
13385 PY_UNICODE_TYPE="no type found"
13386 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
13388$as_echo "$PY_UNICODE_TYPE" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013389fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000013390
13391# check for endianness
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013392 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13393$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013394if ${ac_cv_c_bigendian+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013395 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000013396else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013397 ac_cv_c_bigendian=unknown
13398 # See if we're dealing with a universal compiler.
13399 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13400/* end confdefs.h. */
13401#ifndef __APPLE_CC__
13402 not a universal capable compiler
13403 #endif
13404 typedef int dummy;
13405
Skip Montanaro6dead952003-09-25 14:50:04 +000013406_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013407if ac_fn_c_try_compile "$LINENO"; then :
13408
13409 # Check for potential -arch flags. It is not universal unless
13410 # there are at least two -arch flags with different values.
13411 ac_arch=
13412 ac_prev=
13413 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13414 if test -n "$ac_prev"; then
13415 case $ac_word in
13416 i?86 | x86_64 | ppc | ppc64)
13417 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13418 ac_arch=$ac_word
13419 else
13420 ac_cv_c_bigendian=universal
13421 break
13422 fi
13423 ;;
13424 esac
13425 ac_prev=
13426 elif test "x$ac_word" = "x-arch"; then
13427 ac_prev=arch
13428 fi
13429 done
13430fi
13431rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13432 if test $ac_cv_c_bigendian = unknown; then
13433 # See if sys/param.h defines the BYTE_ORDER macro.
13434 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013435/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013436#include <sys/types.h>
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013437 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013438
Martin v. Löwis11437992002-04-12 09:54:03 +000013439int
13440main ()
13441{
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013442#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13443 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13444 && LITTLE_ENDIAN)
13445 bogus endian macros
13446 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013447
13448 ;
13449 return 0;
13450}
13451_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013452if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013453 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013454 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013455/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013456#include <sys/types.h>
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013457 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013458
Martin v. Löwis11437992002-04-12 09:54:03 +000013459int
13460main ()
13461{
Guido van Rossumef2255b2000-03-10 22:30:29 +000013462#if BYTE_ORDER != BIG_ENDIAN
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013463 not big endian
13464 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013465
13466 ;
13467 return 0;
13468}
13469_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013470if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013471 ac_cv_c_bigendian=yes
13472else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013473 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000013474fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013475rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013476fi
13477rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13478 fi
13479 if test $ac_cv_c_bigendian = unknown; then
13480 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13481 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013482/* end confdefs.h. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013483#include <limits.h>
13484
Martin v. Löwis11437992002-04-12 09:54:03 +000013485int
13486main ()
13487{
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013488#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13489 bogus endian macros
13490 #endif
13491
Martin v. Löwis11437992002-04-12 09:54:03 +000013492 ;
13493 return 0;
13494}
13495_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013496if ac_fn_c_try_compile "$LINENO"; then :
13497 # It does; now see whether it defined to _BIG_ENDIAN or not.
13498 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13499/* end confdefs.h. */
13500#include <limits.h>
13501
13502int
13503main ()
13504{
13505#ifndef _BIG_ENDIAN
13506 not big endian
13507 #endif
13508
13509 ;
13510 return 0;
13511}
13512_ACEOF
13513if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013514 ac_cv_c_bigendian=yes
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000013515else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013516 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013517fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013518rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13519fi
13520rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13521 fi
13522 if test $ac_cv_c_bigendian = unknown; then
13523 # Compile a test program.
13524 if test "$cross_compiling" = yes; then :
13525 # Try to guess by grepping values from an object file.
13526 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13527/* end confdefs.h. */
13528short int ascii_mm[] =
13529 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13530 short int ascii_ii[] =
13531 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13532 int use_ascii (int i) {
13533 return ascii_mm[i] + ascii_ii[i];
13534 }
13535 short int ebcdic_ii[] =
13536 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13537 short int ebcdic_mm[] =
13538 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13539 int use_ebcdic (int i) {
13540 return ebcdic_mm[i] + ebcdic_ii[i];
13541 }
13542 extern int foo;
Martin v. Löwiseba40652007-08-30 20:10:57 +000013543
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013544int
13545main ()
13546{
13547return use_ascii (foo) == use_ebcdic (foo);
13548 ;
13549 return 0;
13550}
13551_ACEOF
13552if ac_fn_c_try_compile "$LINENO"; then :
13553 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13554 ac_cv_c_bigendian=yes
13555 fi
13556 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13557 if test "$ac_cv_c_bigendian" = unknown; then
13558 ac_cv_c_bigendian=no
13559 else
13560 # finding both strings is unlikely to happen, but who knows?
13561 ac_cv_c_bigendian=unknown
13562 fi
13563 fi
13564fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013565rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013566else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013567 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013568/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000013569$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013570int
13571main ()
13572{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013573
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013574 /* Are we little or big endian? From Harbison&Steele. */
13575 union
13576 {
13577 long int l;
13578 char c[sizeof (long int)];
13579 } u;
13580 u.l = 1;
13581 return u.c[sizeof (long int) - 1] == 1;
Martin v. Löwiseba40652007-08-30 20:10:57 +000013582
13583 ;
13584 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000013585}
Martin v. Löwis11437992002-04-12 09:54:03 +000013586_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013587if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013588 ac_cv_c_bigendian=no
13589else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013590 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000013591fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013592rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13593 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000013594fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013595
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013596 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013597fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013598{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
13599$as_echo "$ac_cv_c_bigendian" >&6; }
13600 case $ac_cv_c_bigendian in #(
13601 yes)
13602 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
13603;; #(
13604 no)
13605 ;; #(
13606 universal)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013607
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013608$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000013609
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013610 ;; #(
13611 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013612 as_fn_error $? "unknown endianness
Matthias Klose3cef2a92012-03-14 23:39:33 +010013613 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013614 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000013615
Michael W. Hudson54241132001-12-07 15:38:26 +000013616
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013617# Check whether right shifting a negative integer extends the sign bit
13618# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
13620$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013621if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013622 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000013623else
Martin v. Löwis11437992002-04-12 09:54:03 +000013624
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013625if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013626 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013627else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013628 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013629/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013630
13631int main()
13632{
Vladimir Marangozova6180282000-07-12 05:05:06 +000013633 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013634}
13635
Martin v. Löwis11437992002-04-12 09:54:03 +000013636_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013637if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000013638 ac_cv_rshift_extends_sign=yes
13639else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013640 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000013641fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013642rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13643 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000013644fi
13645
Martin v. Löwiseba40652007-08-30 20:10:57 +000013646fi
13647
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013648{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
13649$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000013650if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013651then
Martin v. Löwis11437992002-04-12 09:54:03 +000013652
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013653$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013654
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013655fi
13656
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013657# check for getc_unlocked and related locking functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
13659$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013660if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013661 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013662else
Martin v. Löwis11437992002-04-12 09:54:03 +000013663
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013664cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013665/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013666#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013667int
13668main ()
13669{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013670
13671 FILE *f = fopen("/dev/null", "r");
13672 flockfile(f);
13673 getc_unlocked(f);
13674 funlockfile(f);
13675
Martin v. Löwis11437992002-04-12 09:54:03 +000013676 ;
13677 return 0;
13678}
13679_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013680if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013681 ac_cv_have_getc_unlocked=yes
13682else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013683 ac_cv_have_getc_unlocked=no
13684fi
13685rm -f core conftest.err conftest.$ac_objext \
13686 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013687fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013688
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013689{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
13690$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013691if test "$ac_cv_have_getc_unlocked" = yes
13692then
Martin v. Löwis11437992002-04-12 09:54:03 +000013693
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013694$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013695
13696fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013697
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013698# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000013699# save the value of LIBS so we don't actually link Python with readline
13700LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013701
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013702# On some systems we need to link readline to a termcap compatible
13703# library. NOTE: Keep the precedence of listed libraries synchronised
13704# with setup.py.
13705py_cv_lib_readline=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
13707$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013708for py_libtermcap in "" ncursesw ncurses curses termcap; do
13709 if test -z "$py_libtermcap"; then
13710 READLINE_LIBS="-lreadline"
13711 else
13712 READLINE_LIBS="-lreadline -l$py_libtermcap"
13713 fi
13714 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013715 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013716/* end confdefs.h. */
13717
Martin v. Löwiseba40652007-08-30 20:10:57 +000013718/* Override any GCC internal prototype to avoid an error.
13719 Use char because int might match the return type of a GCC
13720 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013721#ifdef __cplusplus
13722extern "C"
13723#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013724char readline ();
13725int
13726main ()
13727{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013728return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013729 ;
13730 return 0;
13731}
13732_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013733if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013734 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013735fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013736rm -f core conftest.err conftest.$ac_objext \
13737 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013738 if test $py_cv_lib_readline = yes; then
13739 break
13740 fi
13741done
13742# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
13743#AC_SUBST([READLINE_LIBS])
Gregory P. Smithe080cdf2008-09-07 19:19:04 +000013744if test $py_cv_lib_readline = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
13746$as_echo "none" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013747else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
13749$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013750
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013751$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013752
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013753fi
13754
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013755# check for readline 2.1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
13757$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013758if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013759 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013760else
13761 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013762LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013763cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013764/* end confdefs.h. */
13765
Martin v. Löwiseba40652007-08-30 20:10:57 +000013766/* Override any GCC internal prototype to avoid an error.
13767 Use char because int might match the return type of a GCC
13768 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013769#ifdef __cplusplus
13770extern "C"
13771#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013772char rl_callback_handler_install ();
13773int
13774main ()
13775{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013776return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013777 ;
13778 return 0;
13779}
13780_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013781if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013782 ac_cv_lib_readline_rl_callback_handler_install=yes
13783else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013784 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013785fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013786rm -f core conftest.err conftest.$ac_objext \
13787 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013788LIBS=$ac_check_lib_save_LIBS
13789fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013790{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
13791$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013792if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013793
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013794$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013795
13796fi
13797
13798
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013799# check for readline 2.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013800cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013801/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013802#include <readline/readline.h>
13803_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013804if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013805 have_readline=yes
13806else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013807 have_readline=no
Matthias Klosec511b472010-05-08 11:01:39 +000013808
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013809fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013810rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013811if test $have_readline = yes
13812then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013813 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013814/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013815#include <readline/readline.h>
13816
13817_ACEOF
13818if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013819 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013820
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013821$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013822
13823fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000013824rm -f conftest*
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000013825
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013826 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000013827/* end confdefs.h. */
13828#include <readline/readline.h>
13829
13830_ACEOF
13831if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013832 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000013833
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013834$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000013835
13836fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000013837rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013838
13839fi
13840
Martin v. Löwis0daad592001-09-30 21:09:59 +000013841# check for readline 4.0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
13843$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013844if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013845 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000013846else
Martin v. Löwis11437992002-04-12 09:54:03 +000013847 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013848LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013849cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013850/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013851
Martin v. Löwiseba40652007-08-30 20:10:57 +000013852/* Override any GCC internal prototype to avoid an error.
13853 Use char because int might match the return type of a GCC
13854 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013855#ifdef __cplusplus
13856extern "C"
13857#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013858char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013859int
13860main ()
13861{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013862return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013863 ;
13864 return 0;
13865}
13866_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013867if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013868 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000013869else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013870 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000013871fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013872rm -f core conftest.err conftest.$ac_objext \
13873 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013874LIBS=$ac_check_lib_save_LIBS
13875fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013876{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
13877$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013878if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013879
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013880$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000013881
Martin v. Löwis0daad592001-09-30 21:09:59 +000013882fi
13883
Michael W. Hudson54241132001-12-07 15:38:26 +000013884
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013885# also in 4.0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
13887$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013888if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013889 $as_echo_n "(cached) " >&6
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013890else
13891 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013892LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013893cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013894/* end confdefs.h. */
13895
13896/* Override any GCC internal prototype to avoid an error.
13897 Use char because int might match the return type of a GCC
13898 builtin and then its argument prototype would still apply. */
13899#ifdef __cplusplus
13900extern "C"
13901#endif
13902char rl_completion_display_matches_hook ();
13903int
13904main ()
13905{
13906return rl_completion_display_matches_hook ();
13907 ;
13908 return 0;
13909}
13910_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013911if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013912 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
13913else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013914 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013915fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013916rm -f core conftest.err conftest.$ac_objext \
13917 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013918LIBS=$ac_check_lib_save_LIBS
13919fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013920{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
13921$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013922if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013923
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013924$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013925
13926fi
13927
13928
Martin Pantera70c3232016-04-03 02:54:58 +000013929# also in 4.0, but not in editline
13930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
13931$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
13932if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
13933 $as_echo_n "(cached) " >&6
13934else
13935 ac_check_lib_save_LIBS=$LIBS
13936LIBS="-lreadline $READLINE_LIBS $LIBS"
13937cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13938/* end confdefs.h. */
13939
13940/* Override any GCC internal prototype to avoid an error.
13941 Use char because int might match the return type of a GCC
13942 builtin and then its argument prototype would still apply. */
13943#ifdef __cplusplus
13944extern "C"
13945#endif
13946char rl_resize_terminal ();
13947int
13948main ()
13949{
13950return rl_resize_terminal ();
13951 ;
13952 return 0;
13953}
13954_ACEOF
13955if ac_fn_c_try_link "$LINENO"; then :
13956 ac_cv_lib_readline_rl_resize_terminal=yes
13957else
13958 ac_cv_lib_readline_rl_resize_terminal=no
13959fi
13960rm -f core conftest.err conftest.$ac_objext \
13961 conftest$ac_exeext conftest.$ac_ext
13962LIBS=$ac_check_lib_save_LIBS
13963fi
13964{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
13965$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
13966if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
13967
13968$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
13969
13970fi
13971
13972
Martin v. Löwis0daad592001-09-30 21:09:59 +000013973# check for readline 4.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
13975$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013976if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013977 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000013978else
Martin v. Löwis11437992002-04-12 09:54:03 +000013979 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013980LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013981cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013982/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013983
Martin v. Löwiseba40652007-08-30 20:10:57 +000013984/* Override any GCC internal prototype to avoid an error.
13985 Use char because int might match the return type of a GCC
13986 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013987#ifdef __cplusplus
13988extern "C"
13989#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013990char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013991int
13992main ()
13993{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013994return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013995 ;
13996 return 0;
13997}
13998_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013999if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014000 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000014001else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014002 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000014003fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014004rm -f core conftest.err conftest.$ac_objext \
14005 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014006LIBS=$ac_check_lib_save_LIBS
14007fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014008{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
14009$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014010if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014011
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014012$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000014013
Guido van Rossum353ae582001-07-10 16:45:32 +000014014fi
14015
Jack Jansendd19cf82001-12-06 22:36:17 +000014016
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014017# also in readline 4.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014018cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014019/* end confdefs.h. */
14020#include <readline/readline.h>
14021_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014022if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014023 have_readline=yes
14024else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014025 have_readline=no
Matthias Klosec511b472010-05-08 11:01:39 +000014026
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014027fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014028rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014029if test $have_readline = yes
14030then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014031 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014032/* end confdefs.h. */
14033#include <readline/readline.h>
14034
14035_ACEOF
14036if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014037 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014038
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014039$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014040
14041fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000014042rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014043
14044fi
14045
Martin v. Löwis82bca632006-02-10 20:49:30 +000014046# End of readline checks: restore LIBS
14047LIBS=$LIBS_no_readline
14048
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
14050$as_echo_n "checking for broken nice()... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014051if ${ac_cv_broken_nice+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014052 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014053else
Martin v. Löwis11437992002-04-12 09:54:03 +000014054
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014055if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014056 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014057else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014058 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014059/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014060
14061int main()
14062{
14063 int val1 = nice(1);
14064 if (val1 != -1 && val1 == nice(2))
14065 exit(0);
14066 exit(1);
14067}
14068
Martin v. Löwis11437992002-04-12 09:54:03 +000014069_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014070if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014071 ac_cv_broken_nice=yes
14072else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014073 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014074fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014075rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14076 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014077fi
14078
Martin v. Löwiseba40652007-08-30 20:10:57 +000014079fi
14080
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014081{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
14082$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014083if test "$ac_cv_broken_nice" = yes
14084then
Martin v. Löwis11437992002-04-12 09:54:03 +000014085
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014086$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014087
14088fi
14089
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
14091$as_echo_n "checking for broken poll()... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014092if ${ac_cv_broken_poll+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014093 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014094else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014095 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014096 ac_cv_broken_poll=no
14097else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014098 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014099/* end confdefs.h. */
14100
14101#include <poll.h>
14102
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014103int main()
14104{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014105 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014106 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014107
14108 close (42);
14109
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014110 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014111 if (poll_test < 0)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014112 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014113 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014114 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014115 else
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014116 return 1;
14117}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014118
14119_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014120if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014121 ac_cv_broken_poll=yes
14122else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014123 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014124fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014125rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14126 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014127fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014128
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014129fi
14130
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014131{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
14132$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014133if test "$ac_cv_broken_poll" = yes
14134then
14135
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014136$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014137
14138fi
14139
Brett Cannon43802422005-02-10 20:48:03 +000014140# 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 +000014141# (which is not required by ISO C or UNIX spec) and/or if we support
14142# tzname[]
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014143ac_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 +000014144#include <$ac_cv_struct_tm>
14145
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014146"
Matthias Klose3cef2a92012-03-14 23:39:33 +010014147if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000014148
14149cat >>confdefs.h <<_ACEOF
14150#define HAVE_STRUCT_TM_TM_ZONE 1
14151_ACEOF
14152
14153
14154fi
14155
14156if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14157
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014158$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014159
14160else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014161 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
14162"
Matthias Klose3cef2a92012-03-14 23:39:33 +010014163if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014164 ac_have_decl=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000014165else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014166 ac_have_decl=0
Martin v. Löwiseba40652007-08-30 20:10:57 +000014167fi
14168
Martin v. Löwiseba40652007-08-30 20:10:57 +000014169cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014170#define HAVE_DECL_TZNAME $ac_have_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +000014171_ACEOF
14172
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014173 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
14174$as_echo_n "checking for tzname... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014175if ${ac_cv_var_tzname+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014176 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000014177else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014178 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014179/* end confdefs.h. */
14180#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000014181#if !HAVE_DECL_TZNAME
14182extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000014183#endif
14184
14185int
14186main ()
14187{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014188return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000014189 ;
14190 return 0;
14191}
14192_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014193if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000014194 ac_cv_var_tzname=yes
14195else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014196 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000014197fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014198rm -f core conftest.err conftest.$ac_objext \
14199 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014200fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014201{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
14202$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000014203 if test $ac_cv_var_tzname = yes; then
14204
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014205$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014206
14207 fi
14208fi
14209
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014210
Martin v. Löwis1d459062005-03-14 21:23:33 +000014211# check tzset(3) exists and works like we expect it to
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
14213$as_echo_n "checking for working tzset()... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014214if ${ac_cv_working_tzset+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014215 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014216else
14217
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014218if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014219 ac_cv_working_tzset=no
14220else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014221 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014222/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014223
14224#include <stdlib.h>
14225#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000014226#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000014227
14228#if HAVE_TZNAME
14229extern char *tzname[];
14230#endif
14231
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014232int main()
14233{
Brett Cannon18367812003-09-19 00:59:16 +000014234 /* Note that we need to ensure that not only does tzset(3)
14235 do 'something' with localtime, but it works as documented
14236 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000014237 This includes making sure that tzname is set properly if
14238 tm->tm_zone does not exist since it is the alternative way
14239 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000014240
14241 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000014242 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000014243 */
14244
Martin v. Löwis1d459062005-03-14 21:23:33 +000014245 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000014246 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
14247
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014248 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014249 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014250 if (localtime(&groundhogday)->tm_hour != 0)
14251 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014252#if HAVE_TZNAME
14253 /* For UTC, tzname[1] is sometimes "", sometimes " " */
14254 if (strcmp(tzname[0], "UTC") ||
14255 (tzname[1][0] != 0 && tzname[1][0] != ' '))
14256 exit(1);
14257#endif
Brett Cannon18367812003-09-19 00:59:16 +000014258
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014259 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014260 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014261 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014262 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014263#if HAVE_TZNAME
14264 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
14265 exit(1);
14266#endif
Brett Cannon18367812003-09-19 00:59:16 +000014267
14268 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
14269 tzset();
14270 if (localtime(&groundhogday)->tm_hour != 11)
14271 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014272#if HAVE_TZNAME
14273 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
14274 exit(1);
14275#endif
14276
14277#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000014278 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
14279 exit(1);
14280 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
14281 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014282#endif
Brett Cannon18367812003-09-19 00:59:16 +000014283
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014284 exit(0);
14285}
14286
14287_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014288if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014289 ac_cv_working_tzset=yes
14290else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014291 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014292fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014293rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14294 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014295fi
14296
Martin v. Löwiseba40652007-08-30 20:10:57 +000014297fi
14298
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014299{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
14300$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014301if test "$ac_cv_working_tzset" = yes
14302then
14303
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014304$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014305
14306fi
14307
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014308# Look for subsecond timestamps in struct stat
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
14310$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014311if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014312 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014313else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014314 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014315/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014316#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014317int
14318main ()
14319{
14320
14321struct stat st;
14322st.st_mtim.tv_nsec = 1;
14323
14324 ;
14325 return 0;
14326}
14327_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014328if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000014329 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014330else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014331 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014332fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014333rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14334fi
14335
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014336{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
14337$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014338if test "$ac_cv_stat_tv_nsec" = yes
14339then
14340
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014341$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014342
14343fi
14344
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014345# Look for BSD style subsecond timestamps in struct stat
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
14347$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014348if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014349 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014350else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014351 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014352/* end confdefs.h. */
14353#include <sys/stat.h>
14354int
14355main ()
14356{
14357
14358struct stat st;
14359st.st_mtimespec.tv_nsec = 1;
14360
14361 ;
14362 return 0;
14363}
14364_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014365if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014366 ac_cv_stat_tv_nsec2=yes
14367else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014368 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014369fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014370rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14371fi
14372
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014373{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
14374$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014375if test "$ac_cv_stat_tv_nsec2" = yes
14376then
14377
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014378$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014379
14380fi
14381
doko@ubuntu.comf27ec3e2014-04-17 20:11:19 +020014382# first curses configure check
14383ac_save_cppflags="$CPPFLAGS"
14384CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
14385
14386for ac_header in curses.h ncurses.h
14387do :
14388 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14389ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14390if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14391 cat >>confdefs.h <<_ACEOF
14392#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14393_ACEOF
14394
14395fi
14396
14397done
14398
14399
14400# On Solaris, term.h requires curses.h
14401for ac_header in term.h
14402do :
14403 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
14404#ifdef HAVE_CURSES_H
14405#include <curses.h>
14406#endif
14407
14408"
14409if test "x$ac_cv_header_term_h" = xyes; then :
14410 cat >>confdefs.h <<_ACEOF
14411#define HAVE_TERM_H 1
14412_ACEOF
14413
14414fi
14415
14416done
14417
14418
Jack Jansen666b1e72001-10-31 12:11:48 +000014419# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
14421$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014422if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014423 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014424else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014425 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014426/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014427#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014428int
14429main ()
14430{
Jack Jansen666b1e72001-10-31 12:11:48 +000014431
14432 int rtn;
14433 rtn = mvwdelch(0,0,0);
14434
Martin v. Löwis11437992002-04-12 09:54:03 +000014435 ;
14436 return 0;
14437}
14438_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014439if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014440 ac_cv_mvwdelch_is_expression=yes
14441else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014442 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014443fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014444rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14445fi
14446
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014447{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
14448$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000014449
14450if test "$ac_cv_mvwdelch_is_expression" = yes
14451then
Martin v. Löwis11437992002-04-12 09:54:03 +000014452
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014453$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014454
14455fi
14456
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
14458$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014459if ${ac_cv_window_has_flags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014460 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014461else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014462 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014463/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014464#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014465int
14466main ()
14467{
Jack Jansen666b1e72001-10-31 12:11:48 +000014468
14469 WINDOW *w;
14470 w->_flags = 0;
14471
Martin v. Löwis11437992002-04-12 09:54:03 +000014472 ;
14473 return 0;
14474}
14475_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014476if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014477 ac_cv_window_has_flags=yes
14478else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014479 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014480fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014481rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14482fi
14483
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014484{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
14485$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000014486
Jack Jansen666b1e72001-10-31 12:11:48 +000014487
14488if test "$ac_cv_window_has_flags" = yes
14489then
Martin v. Löwis11437992002-04-12 09:54:03 +000014490
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014491$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014492
14493fi
14494
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
14496$as_echo_n "checking for is_term_resized... " >&6; }
14497cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000014498/* end confdefs.h. */
14499#include <curses.h>
14500int
14501main ()
14502{
14503void *x=is_term_resized
14504 ;
14505 return 0;
14506}
14507_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014508if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000014509
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014510$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000014511
Matthias Klosec511b472010-05-08 11:01:39 +000014512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014513$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014514else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14516$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014517
14518fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014519rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14520
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
14522$as_echo_n "checking for resize_term... " >&6; }
14523cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000014524/* end confdefs.h. */
14525#include <curses.h>
14526int
14527main ()
14528{
14529void *x=resize_term
14530 ;
14531 return 0;
14532}
14533_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014534if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000014535
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014536$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000014537
Matthias Klosec511b472010-05-08 11:01:39 +000014538 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014539$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014540else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14542$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014543
14544fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014545rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14546
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
14548$as_echo_n "checking for resizeterm... " >&6; }
14549cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000014550/* end confdefs.h. */
14551#include <curses.h>
14552int
14553main ()
14554{
14555void *x=resizeterm
14556 ;
14557 return 0;
14558}
14559_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014560if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000014561
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014562$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000014563
Matthias Klosec511b472010-05-08 11:01:39 +000014564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014565$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014566else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14568$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014569
14570fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014571rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.comf27ec3e2014-04-17 20:11:19 +020014572# last curses configure check
14573CPPFLAGS=$ac_save_cppflags
Martin v. Löwiseba40652007-08-30 20:10:57 +000014574
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
14576$as_echo "$as_me: checking for device files" >&6;}
14577
14578if test "x$cross_compiling" = xyes; then
14579 if test "${ac_cv_file__dev_ptmx+set}" != set; then
14580 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14581$as_echo_n "checking for /dev/ptmx... " >&6; }
14582 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14583$as_echo "not set" >&6; }
14584 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14585 fi
14586 if test "${ac_cv_file__dev_ptc+set}" != set; then
14587 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14588$as_echo_n "checking for /dev/ptc... " >&6; }
14589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14590$as_echo "not set" >&6; }
14591 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14592 fi
14593fi
14594
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14596$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014597if ${ac_cv_file__dev_ptmx+:} false; then :
14598 $as_echo_n "(cached) " >&6
14599else
14600 test "$cross_compiling" = yes &&
14601 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14602if test -r "/dev/ptmx"; then
14603 ac_cv_file__dev_ptmx=yes
14604else
14605 ac_cv_file__dev_ptmx=no
14606fi
14607fi
14608{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
14609$as_echo "$ac_cv_file__dev_ptmx" >&6; }
14610if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Martin v. Löwisfefbc202006-10-17 18:59:23 +000014611
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014612fi
14613
14614if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014615
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014616$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014617
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014618fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14620$as_echo_n "checking for /dev/ptc... " >&6; }
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014621if ${ac_cv_file__dev_ptc+:} false; then :
14622 $as_echo_n "(cached) " >&6
14623else
14624 test "$cross_compiling" = yes &&
14625 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14626if test -r "/dev/ptc"; then
14627 ac_cv_file__dev_ptc=yes
14628else
14629 ac_cv_file__dev_ptc=no
14630fi
14631fi
14632{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
14633$as_echo "$ac_cv_file__dev_ptc" >&6; }
14634if test "x$ac_cv_file__dev_ptc" = xyes; then :
Martin v. Löwisfefbc202006-10-17 18:59:23 +000014635
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014636fi
14637
14638if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000014639
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014640$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000014641
Neal Norwitz865400f2003-03-21 01:42:58 +000014642fi
14643
Mark Dickinson82864d12009-11-15 16:18:58 +000014644if test "$have_long_long" = yes
14645then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014646 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
14647$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014648 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014649 $as_echo_n "(cached) " >&6
Mark Dickinson82864d12009-11-15 16:18:58 +000014650else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014651 if test "$cross_compiling" = yes; then :
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014652 ac_cv_have_long_long_format="cross -- assuming no"
14653 if test x$GCC = xyes; then
14654 save_CFLAGS=$CFLAGS
14655 CFLAGS="$CFLAGS -Werror -Wformat"
14656 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14657/* end confdefs.h. */
14658
14659 #include <stdio.h>
14660 #include <stddef.h>
14661
14662int
14663main ()
14664{
14665
14666 char *buffer;
14667 sprintf(buffer, "%lld", (long long)123);
14668 sprintf(buffer, "%lld", (long long)-123);
14669 sprintf(buffer, "%llu", (unsigned long long)123);
14670
14671 ;
14672 return 0;
14673}
14674_ACEOF
14675if ac_fn_c_try_compile "$LINENO"; then :
14676 ac_cv_have_long_long_format=yes
14677
14678fi
14679rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14680 CFLAGS=$save_CFLAGS
14681 fi
Mark Dickinson82864d12009-11-15 16:18:58 +000014682else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014683 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson82864d12009-11-15 16:18:58 +000014684/* end confdefs.h. */
14685
14686 #include <stdio.h>
14687 #include <stddef.h>
14688 #include <string.h>
14689
14690 #ifdef HAVE_SYS_TYPES_H
14691 #include <sys/types.h>
14692 #endif
14693
14694 int main()
14695 {
14696 char buffer[256];
14697
14698 if (sprintf(buffer, "%lld", (long long)123) < 0)
14699 return 1;
14700 if (strcmp(buffer, "123"))
14701 return 1;
14702
14703 if (sprintf(buffer, "%lld", (long long)-123) < 0)
14704 return 1;
14705 if (strcmp(buffer, "-123"))
14706 return 1;
14707
14708 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
14709 return 1;
14710 if (strcmp(buffer, "123"))
14711 return 1;
14712
14713 return 0;
14714 }
14715
14716_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014717if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson82864d12009-11-15 16:18:58 +000014718 ac_cv_have_long_long_format=yes
14719else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014720 ac_cv_have_long_long_format=no
Mark Dickinson82864d12009-11-15 16:18:58 +000014721fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014722rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14723 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson82864d12009-11-15 16:18:58 +000014724fi
14725
14726
Mark Dickinson82864d12009-11-15 16:18:58 +000014727fi
14728
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
14730$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson82864d12009-11-15 16:18:58 +000014731fi
14732
Mark Dickinson5ce84742009-12-31 20:48:04 +000014733if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson82864d12009-11-15 16:18:58 +000014734then
14735
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014736$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson82864d12009-11-15 16:18:58 +000014737
14738fi
14739
Ronald Oussoren315cd0c2009-11-19 16:25:21 +000014740if test $ac_sys_system = Darwin
14741then
14742 LIBS="$LIBS -framework CoreFoundation"
14743fi
14744
Mark Dickinson82864d12009-11-15 16:18:58 +000014745
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
14747$as_echo_n "checking for %zd printf() format support... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014748if ${ac_cv_have_size_t_format+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014749 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014750else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014751 if test "$cross_compiling" = yes; then :
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000014752 ac_cv_have_size_t_format="cross -- assuming yes"
14753
Brett Cannon09d12362006-05-11 05:11:33 +000014754else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon09d12362006-05-11 05:11:33 +000014756/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014757
Brett Cannon09d12362006-05-11 05:11:33 +000014758#include <stdio.h>
14759#include <stddef.h>
14760#include <string.h>
14761
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000014762#ifdef HAVE_SYS_TYPES_H
14763#include <sys/types.h>
14764#endif
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000014765
14766#ifdef HAVE_SSIZE_T
14767typedef ssize_t Py_ssize_t;
14768#elif SIZEOF_VOID_P == SIZEOF_LONG
14769typedef long Py_ssize_t;
14770#else
14771typedef int Py_ssize_t;
14772#endif
Brett Cannon09d12362006-05-11 05:11:33 +000014773
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000014774int main()
14775{
14776 char buffer[256];
14777
Brett Cannon09d12362006-05-11 05:11:33 +000014778 if(sprintf(buffer, "%zd", (size_t)123) < 0)
14779 return 1;
14780
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000014781 if (strcmp(buffer, "123"))
14782 return 1;
14783
14784 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
14785 return 1;
14786
14787 if (strcmp(buffer, "-123"))
Brett Cannon09d12362006-05-11 05:11:33 +000014788 return 1;
14789
14790 return 0;
14791}
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014792
Brett Cannon09d12362006-05-11 05:11:33 +000014793_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014794if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014795 ac_cv_have_size_t_format=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014796else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014797 ac_cv_have_size_t_format=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014798fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014799rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14800 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000014801fi
14802
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014803fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014804{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
14805$as_echo "$ac_cv_have_size_t_format" >&6; }
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000014806if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014807
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014808$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014809
14810fi
14811
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014812ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000014813#ifdef HAVE_SYS_TYPES_H
14814#include <sys/types.h>
14815#endif
14816#ifdef HAVE_SYS_SOCKET_H
14817#include <sys/socket.h>
14818#endif
14819
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014820"
Matthias Klose3cef2a92012-03-14 23:39:33 +010014821if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000014822
Martin v. Löwis11437992002-04-12 09:54:03 +000014823else
Guido van Rossum95713eb2000-05-18 20:53:31 +000014824
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014825$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000014826
14827fi
14828
Michael W. Hudson54241132001-12-07 15:38:26 +000014829
Benjamin Peterson7497e912010-10-16 00:53:39 +000014830case $ac_sys_system in
14831AIX*)
14832
14833$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
14834 ;;
14835esac
14836
14837
Michael W. Hudson54241132001-12-07 15:38:26 +000014838
14839
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000014840for h in `(cd $srcdir;echo Python/thread_*.h)`
14841do
14842 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
14843done
14844
Michael W. Hudson54241132001-12-07 15:38:26 +000014845
Neal Norwitzd24499d2005-12-18 21:36:39 +000014846SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
14848$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014849for dir in $SRCDIRS; do
14850 if test ! -d $dir; then
14851 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000014852 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014853done
Benjamin Peterson2c992a02015-05-28 12:45:31 -050014854
14855# BEGIN_COMPUTED_GOTO
14856# Check for --with-computed-gotos
14857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
14858$as_echo_n "checking for --with-computed-gotos... " >&6; }
14859
14860# Check whether --with-computed-gotos was given.
14861if test "${with_computed_gotos+set}" = set; then :
14862 withval=$with_computed_gotos;
14863if test "$withval" = yes
14864then
14865
14866$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
14867
14868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14869$as_echo "yes" >&6; }
14870fi
14871if test "$withval" = no
14872then
14873
14874$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
14875
14876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14877$as_echo "no" >&6; }
14878fi
14879
14880else
14881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14882$as_echo "no value specified" >&6; }
14883fi
14884
14885
14886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
14887$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
14888if ${ac_cv_computed_gotos+:} false; then :
14889 $as_echo_n "(cached) " >&6
14890else
14891 if test "$cross_compiling" = yes; then :
14892 if test "${with_computed_gotos+set}" = set; then
14893 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
14894 else
14895 ac_cv_computed_gotos=no
14896 fi
14897else
14898 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14899/* end confdefs.h. */
14900
14901int main(int argc, char **argv)
14902{
14903 static void *targets[1] = { &&LABEL1 };
14904 goto LABEL2;
14905LABEL1:
14906 return 0;
14907LABEL2:
14908 goto *targets[0];
14909 return 1;
14910}
14911
14912_ACEOF
14913if ac_fn_c_try_run "$LINENO"; then :
14914 ac_cv_computed_gotos=yes
14915else
14916 ac_cv_computed_gotos=no
14917fi
14918rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14919 conftest.$ac_objext conftest.beam conftest.$ac_ext
14920fi
14921
14922fi
14923
14924{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
14925$as_echo "$ac_cv_computed_gotos" >&6; }
14926case "$ac_cv_computed_gotos" in yes*)
14927
14928$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
14929
14930esac
14931# END_COMPUTED_GOTO
14932
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014933{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
14934$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000014935
Ned Deily3f1d0b32014-11-20 02:11:03 -080014936# ensurepip option
14937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
14938$as_echo_n "checking for ensurepip... " >&6; }
14939
14940# Check whether --with-ensurepip was given.
14941if test "${with_ensurepip+set}" = set; then :
14942 withval=$with_ensurepip;
14943else
14944 with_ensurepip=no
14945fi
14946
14947case $with_ensurepip in #(
14948 yes|upgrade) :
14949 ENSUREPIP=upgrade ;; #(
14950 install) :
14951 ENSUREPIP=install ;; #(
14952 no) :
14953 ENSUREPIP=no ;; #(
14954 *) :
14955 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
14956esac
14957{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
14958$as_echo "$ENSUREPIP" >&6; }
14959
14960
Guido van Rossum627b2d71993-12-24 10:39:16 +000014961# generate output files
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000014962ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000014963
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000014964ac_config_files="$ac_config_files Modules/ld_so_aix"
14965
Martin v. Löwis11437992002-04-12 09:54:03 +000014966cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014967# This file is a shell script that caches the results of configure
14968# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000014969# scripts and configure runs, see configure's option --config-cache.
14970# It is not useful on other systems. If it contains results you don't
14971# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014972#
Martin v. Löwis11437992002-04-12 09:54:03 +000014973# config.status only pays attention to the cache file if you give it
14974# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014975#
Skip Montanaro6dead952003-09-25 14:50:04 +000014976# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000014977# loading this file, other *unset* `ac_cv_foo' will be assigned the
14978# following values.
14979
14980_ACEOF
14981
Guido van Rossumf78abae1997-01-21 22:02:36 +000014982# The following way of writing the cache mishandles newlines in values,
14983# but we know of no workaround that is simple, portable, and efficient.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014984# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014985# Ultrix sh set writes to stderr and can't be redirected directly,
14986# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwiseba40652007-08-30 20:10:57 +000014987(
14988 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
14989 eval ac_val=\$$ac_var
14990 case $ac_val in #(
14991 *${as_nl}*)
14992 case $ac_var in #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014993 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
14994$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000014995 esac
14996 case $ac_var in #(
14997 _ | IFS | as_nl) ;; #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014998 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
14999 *) { eval $ac_var=; unset $ac_var;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015000 esac ;;
15001 esac
15002 done
15003
Martin v. Löwis11437992002-04-12 09:54:03 +000015004 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +000015005 case $as_nl`(ac_space=' '; set) 2>&1` in #(
15006 *${as_nl}ac_space=\ *)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015007 # `set' does not quote correctly, so add quotes: double-quote
15008 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000015009 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015010 "s/'/'\\\\''/g;
15011 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwiseba40652007-08-30 20:10:57 +000015012 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000015013 *)
15014 # `set' quotes correctly as required by POSIX, so do not add quotes.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015015 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000015016 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015017 esac |
15018 sort
15019) |
Martin v. Löwis11437992002-04-12 09:54:03 +000015020 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000015021 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000015022 t clear
Martin v. Löwiseba40652007-08-30 20:10:57 +000015023 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000015024 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15025 t end
Martin v. Löwiseba40652007-08-30 20:10:57 +000015026 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15027 :end' >>confcache
15028if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
15029 if test -w "$cache_file"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +010015030 if test "x$cache_file" != "x/dev/null"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015031 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
15032$as_echo "$as_me: updating cache $cache_file" >&6;}
Matthias Klose3cef2a92012-03-14 23:39:33 +010015033 if test ! -f "$cache_file" || test -h "$cache_file"; then
15034 cat confcache >"$cache_file"
15035 else
15036 case $cache_file in #(
15037 */* | ?:*)
15038 mv -f confcache "$cache_file"$$ &&
15039 mv -f "$cache_file"$$ "$cache_file" ;; #(
15040 *)
15041 mv -f confcache "$cache_file" ;;
15042 esac
15043 fi
15044 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015045 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015046 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
15047$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015048 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015049fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015050rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000015051
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015052test "x$prefix" = xNONE && prefix=$ac_default_prefix
15053# Let make expand exec_prefix.
15054test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000015055
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015056DEFS=-DHAVE_CONFIG_H
15057
Skip Montanaro6dead952003-09-25 14:50:04 +000015058ac_libobjs=
15059ac_ltlibobjs=
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015060U=
Skip Montanaro6dead952003-09-25 14:50:04 +000015061for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
15062 # 1. Remove the extension, and $U if already installed.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015063 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015064 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015065 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
15066 # will be set to the directory where LIBOBJS objects are built.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015067 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
15068 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000015069done
15070LIBOBJS=$ac_libobjs
15071
15072LTLIBOBJS=$ac_ltlibobjs
15073
15074
Martin v. Löwis11437992002-04-12 09:54:03 +000015075
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015076
Matthias Klose3cef2a92012-03-14 23:39:33 +010015077: "${CONFIG_STATUS=./config.status}"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015078ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000015079ac_clean_files_save=$ac_clean_files
15080ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015081{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
15082$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
15083as_write_fail=0
15084cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015085#! $SHELL
15086# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015087# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015088# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000015089# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015090
Martin v. Löwis11437992002-04-12 09:54:03 +000015091debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000015092ac_cs_recheck=false
15093ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000015094
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015095SHELL=\${CONFIG_SHELL-$SHELL}
15096export SHELL
15097_ASEOF
15098cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
15099## -------------------- ##
15100## M4sh Initialization. ##
15101## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000015102
Martin v. Löwiseba40652007-08-30 20:10:57 +000015103# Be more Bourne compatible
15104DUALCASE=1; export DUALCASE # for MKS sh
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015105if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015106 emulate sh
15107 NULLCMD=:
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015108 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000015109 # is contrary to our usage. Disable this feature.
15110 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000015111 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000015112else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015113 case `(set -o) 2>/dev/null` in #(
15114 *posix*) :
15115 set -o posix ;; #(
15116 *) :
15117 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015118esac
Martin v. Löwis11437992002-04-12 09:54:03 +000015119fi
Michael W. Hudson54241132001-12-07 15:38:26 +000015120
Skip Montanaro6dead952003-09-25 14:50:04 +000015121
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015122as_nl='
15123'
15124export as_nl
15125# Printing a long string crashes Solaris 7 /usr/bin/printf.
15126as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
15127as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
15128as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
15129# Prefer a ksh shell builtin over an external printf program on Solaris,
15130# but without wasting forks for bash or zsh.
15131if test -z "$BASH_VERSION$ZSH_VERSION" \
15132 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
15133 as_echo='print -r --'
15134 as_echo_n='print -rn --'
15135elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
15136 as_echo='printf %s\n'
15137 as_echo_n='printf %s'
15138else
15139 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
15140 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
15141 as_echo_n='/usr/ucb/echo -n'
15142 else
15143 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
15144 as_echo_n_body='eval
15145 arg=$1;
15146 case $arg in #(
15147 *"$as_nl"*)
15148 expr "X$arg" : "X\\(.*\\)$as_nl";
15149 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
15150 esac;
15151 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
15152 '
15153 export as_echo_n_body
15154 as_echo_n='sh -c $as_echo_n_body as_echo'
15155 fi
15156 export as_echo_body
15157 as_echo='sh -c $as_echo_body as_echo'
15158fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015159
15160# The user is always right.
15161if test "${PATH_SEPARATOR+set}" != set; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015162 PATH_SEPARATOR=:
15163 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
15164 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
15165 PATH_SEPARATOR=';'
15166 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000015167fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015168
Martin v. Löwiseba40652007-08-30 20:10:57 +000015169
15170# IFS
15171# We need space, tab and new line, in precisely that order. Quoting is
15172# there to prevent editors from complaining about space-tab.
15173# (If _AS_PATH_WALK were called with IFS unset, it would disable word
15174# splitting by setting IFS to empty value.)
Martin v. Löwiseba40652007-08-30 20:10:57 +000015175IFS=" "" $as_nl"
15176
15177# Find who we are. Look in the path if we contain no directory separator.
Matthias Klose3cef2a92012-03-14 23:39:33 +010015178as_myself=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015179case $0 in #((
Martin v. Löwiseba40652007-08-30 20:10:57 +000015180 *[\\/]* ) as_myself=$0 ;;
15181 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000015182for as_dir in $PATH
15183do
15184 IFS=$as_save_IFS
15185 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015186 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15187 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000015188IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000015189
Martin v. Löwiseba40652007-08-30 20:10:57 +000015190 ;;
15191esac
15192# We did not find ourselves, most probably we were run as `sh COMMAND'
15193# in which case we are not to be found in the path.
15194if test "x$as_myself" = x; then
15195 as_myself=$0
15196fi
15197if test ! -f "$as_myself"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015198 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
15199 exit 1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015200fi
15201
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015202# Unset variables that we do not need and which cause bugs (e.g. in
15203# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
15204# suppresses any "Segmentation fault" message there. '((' could
15205# trigger a bug in pdksh 5.2.14.
15206for as_var in BASH_ENV ENV MAIL MAILPATH
15207do eval test x\${$as_var+set} = xset \
15208 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Martin v. Löwiseba40652007-08-30 20:10:57 +000015209done
15210PS1='$ '
15211PS2='> '
15212PS4='+ '
15213
15214# NLS nuisances.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015215LC_ALL=C
15216export LC_ALL
15217LANGUAGE=C
15218export LANGUAGE
Martin v. Löwiseba40652007-08-30 20:10:57 +000015219
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015220# CDPATH.
15221(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
15222
15223
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015224# as_fn_error STATUS ERROR [LINENO LOG_FD]
15225# ----------------------------------------
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015226# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
15227# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015228# script with STATUS, using 1 if that was 0.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015229as_fn_error ()
15230{
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015231 as_status=$1; test $as_status -eq 0 && as_status=1
15232 if test "$4"; then
15233 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
15234 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015235 fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015236 $as_echo "$as_me: error: $2" >&2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015237 as_fn_exit $as_status
15238} # as_fn_error
15239
15240
15241# as_fn_set_status STATUS
15242# -----------------------
15243# Set $? to STATUS, without forking.
15244as_fn_set_status ()
15245{
15246 return $1
15247} # as_fn_set_status
15248
15249# as_fn_exit STATUS
15250# -----------------
15251# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
15252as_fn_exit ()
15253{
15254 set +e
15255 as_fn_set_status $1
15256 exit $1
15257} # as_fn_exit
15258
15259# as_fn_unset VAR
15260# ---------------
15261# Portably unset VAR.
15262as_fn_unset ()
15263{
15264 { eval $1=; unset $1;}
15265}
15266as_unset=as_fn_unset
15267# as_fn_append VAR VALUE
15268# ----------------------
15269# Append the text in VALUE to the end of the definition contained in VAR. Take
15270# advantage of any shell optimizations that allow amortized linear growth over
15271# repeated appends, instead of the typical quadratic growth present in naive
15272# implementations.
15273if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
15274 eval 'as_fn_append ()
15275 {
15276 eval $1+=\$2
15277 }'
15278else
15279 as_fn_append ()
15280 {
15281 eval $1=\$$1\$2
15282 }
15283fi # as_fn_append
15284
15285# as_fn_arith ARG...
15286# ------------------
15287# Perform arithmetic evaluation on the ARGs, and store the result in the
15288# global $as_val. Take advantage of shells that can avoid forks. The arguments
15289# must be portable across $(()) and expr.
15290if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
15291 eval 'as_fn_arith ()
15292 {
15293 as_val=$(( $* ))
15294 }'
15295else
15296 as_fn_arith ()
15297 {
15298 as_val=`expr "$@" || test $? -eq 1`
15299 }
15300fi # as_fn_arith
15301
15302
Martin v. Löwiseba40652007-08-30 20:10:57 +000015303if expr a : '\(a\)' >/dev/null 2>&1 &&
15304 test "X`expr 00001 : '.*\(...\)'`" = X001; then
15305 as_expr=expr
15306else
15307 as_expr=false
15308fi
15309
15310if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
15311 as_basename=basename
15312else
15313 as_basename=false
15314fi
15315
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015316if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
15317 as_dirname=dirname
15318else
15319 as_dirname=false
15320fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015321
Martin v. Löwiseba40652007-08-30 20:10:57 +000015322as_me=`$as_basename -- "$0" ||
15323$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15324 X"$0" : 'X\(//\)$' \| \
15325 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015326$as_echo X/"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000015327 sed '/^.*\/\([^/][^/]*\)\/*$/{
15328 s//\1/
15329 q
15330 }
15331 /^X\/\(\/\/\)$/{
15332 s//\1/
15333 q
15334 }
15335 /^X\/\(\/\).*/{
15336 s//\1/
15337 q
15338 }
15339 s/.*/./; q'`
15340
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015341# Avoid depending upon Character Ranges.
15342as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15343as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15344as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15345as_cr_digits='0123456789'
15346as_cr_alnum=$as_cr_Letters$as_cr_digits
Martin v. Löwiseba40652007-08-30 20:10:57 +000015347
15348ECHO_C= ECHO_N= ECHO_T=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015349case `echo -n x` in #(((((
Martin v. Löwiseba40652007-08-30 20:10:57 +000015350-n*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015351 case `echo 'xy\c'` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000015352 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015353 xy) ECHO_C='\c';;
15354 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
15355 ECHO_T=' ';;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015356 esac;;
15357*)
15358 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000015359esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015360
Martin v. Löwis11437992002-04-12 09:54:03 +000015361rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +000015362if test -d conf$$.dir; then
15363 rm -f conf$$.dir/conf$$.file
15364else
15365 rm -f conf$$.dir
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015366 mkdir conf$$.dir 2>/dev/null
Martin v. Löwiseba40652007-08-30 20:10:57 +000015367fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015368if (echo >conf$$.file) 2>/dev/null; then
15369 if ln -s conf$$.file conf$$ 2>/dev/null; then
15370 as_ln_s='ln -s'
15371 # ... but there are two gotchas:
15372 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
15373 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015374 # In both cases, we have to default to `cp -pR'.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015375 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015376 as_ln_s='cp -pR'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015377 elif ln conf$$.file conf$$ 2>/dev/null; then
15378 as_ln_s=ln
15379 else
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015380 as_ln_s='cp -pR'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015381 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015382else
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015383 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000015384fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015385rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
15386rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000015387
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015388
15389# as_fn_mkdir_p
15390# -------------
15391# Create "$as_dir" as a directory, including parents if necessary.
15392as_fn_mkdir_p ()
15393{
15394
15395 case $as_dir in #(
15396 -*) as_dir=./$as_dir;;
15397 esac
15398 test -d "$as_dir" || eval $as_mkdir_p || {
15399 as_dirs=
15400 while :; do
15401 case $as_dir in #(
15402 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
15403 *) as_qdir=$as_dir;;
15404 esac
15405 as_dirs="'$as_qdir' $as_dirs"
15406 as_dir=`$as_dirname -- "$as_dir" ||
15407$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15408 X"$as_dir" : 'X\(//\)[^/]' \| \
15409 X"$as_dir" : 'X\(//\)$' \| \
15410 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
15411$as_echo X"$as_dir" |
15412 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15413 s//\1/
15414 q
15415 }
15416 /^X\(\/\/\)[^/].*/{
15417 s//\1/
15418 q
15419 }
15420 /^X\(\/\/\)$/{
15421 s//\1/
15422 q
15423 }
15424 /^X\(\/\).*/{
15425 s//\1/
15426 q
15427 }
15428 s/.*/./; q'`
15429 test -d "$as_dir" && break
15430 done
15431 test -z "$as_dirs" || eval "mkdir $as_dirs"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015432 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015433
15434
15435} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000015436if mkdir -p . 2>/dev/null; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015437 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000015438else
Skip Montanarof0d5f792004-08-15 14:08:23 +000015439 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000015440 as_mkdir_p=false
15441fi
15442
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015443
15444# as_fn_executable_p FILE
15445# -----------------------
15446# Test if FILE is an executable regular file.
15447as_fn_executable_p ()
15448{
15449 test -f "$1" && test -x "$1"
15450} # as_fn_executable_p
15451as_test_x='test -x'
15452as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015453
15454# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015455as_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 +000015456
15457# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015458as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015459
15460
Martin v. Löwis11437992002-04-12 09:54:03 +000015461exec 6>&1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015462## ----------------------------------- ##
15463## Main body of $CONFIG_STATUS script. ##
15464## ----------------------------------- ##
15465_ASEOF
15466test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015467
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015468cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15469# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000015470# report actual input values of CONFIG_FILES etc. instead of their
Martin v. Löwiseba40652007-08-30 20:10:57 +000015471# values after options handling.
15472ac_log="
Martin v. Löwis174440b2008-10-03 08:59:41 +000015473This file was extended by python $as_me 2.7, which was
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015474generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000015475
15476 CONFIG_FILES = $CONFIG_FILES
15477 CONFIG_HEADERS = $CONFIG_HEADERS
15478 CONFIG_LINKS = $CONFIG_LINKS
15479 CONFIG_COMMANDS = $CONFIG_COMMANDS
15480 $ $0 $@
15481
Martin v. Löwiseba40652007-08-30 20:10:57 +000015482on `(hostname || uname -n) 2>/dev/null | sed 1q`
15483"
15484
Martin v. Löwis11437992002-04-12 09:54:03 +000015485_ACEOF
15486
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015487case $ac_config_files in *"
15488"*) set x $ac_config_files; shift; ac_config_files=$*;;
15489esac
15490
15491case $ac_config_headers in *"
15492"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
15493esac
15494
15495
15496cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015497# Files that config.status was made for.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015498config_files="$ac_config_files"
15499config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000015500
Martin v. Löwiseba40652007-08-30 20:10:57 +000015501_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015502
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015503cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015504ac_cs_usage="\
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015505\`$as_me' instantiates files and other configuration actions
15506from templates according to the current configuration. Unless the files
15507and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000015508
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015509Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000015510
15511 -h, --help print this help, then exit
Martin v. Löwiseba40652007-08-30 20:10:57 +000015512 -V, --version print version number and configuration settings, then exit
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015513 --config print configuration, then exit
15514 -q, --quiet, --silent
15515 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000015516 -d, --debug don't remove temporary files
15517 --recheck update $as_me by reconfiguring in the same conditions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015518 --file=FILE[:TEMPLATE]
15519 instantiate the configuration file FILE
15520 --header=FILE[:TEMPLATE]
15521 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000015522
15523Configuration files:
15524$config_files
15525
15526Configuration headers:
15527$config_headers
15528
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015529Report bugs to <http://bugs.python.org/>."
Skip Montanaro89e975f2007-08-22 19:05:21 +000015530
Martin v. Löwiseba40652007-08-30 20:10:57 +000015531_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015532cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15533ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000015534ac_cs_version="\\
Martin v. Löwis174440b2008-10-03 08:59:41 +000015535python config.status 2.7
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015536configured by $0, generated by GNU Autoconf 2.69,
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015537 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000015538
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015539Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000015540This config.status script is free software; the Free Software Foundation
15541gives unlimited permission to copy, distribute and modify it."
Martin v. Löwiseba40652007-08-30 20:10:57 +000015542
15543ac_pwd='$ac_pwd'
15544srcdir='$srcdir'
15545INSTALL='$INSTALL'
Trent Nelsonf6407a12012-08-30 14:56:13 +000015546MKDIR_P='$MKDIR_P'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015547test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000015548_ACEOF
15549
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015550cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15551# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000015552ac_need_defaults=:
15553while test $# != 0
15554do
15555 case $1 in
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015556 --*=?*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000015557 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15558 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000015559 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000015560 ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015561 --*=)
15562 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15563 ac_optarg=
15564 ac_shift=:
15565 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015566 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000015567 ac_option=$1
15568 ac_optarg=$2
15569 ac_shift=shift
15570 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015571 esac
15572
Skip Montanaro6dead952003-09-25 14:50:04 +000015573 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000015574 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000015575 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15576 ac_cs_recheck=: ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015577 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015578 $as_echo "$ac_cs_version"; exit ;;
15579 --config | --confi | --conf | --con | --co | --c )
15580 $as_echo "$ac_cs_config"; exit ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015581 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000015582 debug=: ;;
15583 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000015584 $ac_shift
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015585 case $ac_optarg in
15586 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015587 '') as_fn_error $? "missing file argument" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015588 esac
15589 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015590 ac_need_defaults=false;;
15591 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000015592 $ac_shift
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015593 case $ac_optarg in
15594 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15595 esac
15596 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015597 ac_need_defaults=false;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015598 --he | --h)
15599 # Conflict between --help and --header
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015600 as_fn_error $? "ambiguous option: \`$1'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015601Try \`$0 --help' for more information.";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015602 --help | --hel | -h )
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015603 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000015604 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
15605 | -silent | --silent | --silen | --sile | --sil | --si | --s)
15606 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015607
15608 # This is an error.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015609 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015610Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015611
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015612 *) as_fn_append ac_config_targets " $1"
Martin v. Löwiseba40652007-08-30 20:10:57 +000015613 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015614
15615 esac
15616 shift
15617done
15618
Skip Montanaro6dead952003-09-25 14:50:04 +000015619ac_configure_extra_args=
15620
15621if $ac_cs_silent; then
15622 exec 6>/dev/null
15623 ac_configure_extra_args="$ac_configure_extra_args --silent"
15624fi
15625
15626_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015627cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000015628if \$ac_cs_recheck; then
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015629 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015630 shift
15631 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
15632 CONFIG_SHELL='$SHELL'
Martin v. Löwiseba40652007-08-30 20:10:57 +000015633 export CONFIG_SHELL
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015634 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000015635fi
15636
Martin v. Löwis11437992002-04-12 09:54:03 +000015637_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015638cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015639exec 5>>config.log
15640{
15641 echo
15642 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
15643## Running $as_me. ##
15644_ASBOX
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015645 $as_echo "$ac_log"
Martin v. Löwiseba40652007-08-30 20:10:57 +000015646} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015647
Martin v. Löwiseba40652007-08-30 20:10:57 +000015648_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015649cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015650_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015651
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015652cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015653
15654# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000015655for ac_config_target in $ac_config_targets
15656do
Martin v. Löwiseba40652007-08-30 20:10:57 +000015657 case $ac_config_target in
15658 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
15659 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
15660 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
15661 "Mac/IDLE/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/IDLE/Makefile" ;;
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000015662 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
15663 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015664 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
15665 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000015666 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000015667 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015668
Matthias Klose3cef2a92012-03-14 23:39:33 +010015669 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015670 esac
15671done
15672
Martin v. Löwiseba40652007-08-30 20:10:57 +000015673
Martin v. Löwis11437992002-04-12 09:54:03 +000015674# If the user did not use the arguments to specify the items to instantiate,
15675# then the envvar interface is used. Set only those that are not.
15676# We use the long form for the default assignment because of an extremely
15677# bizarre bug on SunOS 4.1.3.
15678if $ac_need_defaults; then
15679 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15680 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15681fi
15682
Skip Montanaro6dead952003-09-25 14:50:04 +000015683# Have a temporary directory for convenience. Make it in the build tree
Martin v. Löwiseba40652007-08-30 20:10:57 +000015684# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000015685# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015686# Hook for its removal unless debugging.
15687# Note that there is a small window in which the directory will not be cleaned:
15688# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000015689$debug ||
15690{
Matthias Klose3cef2a92012-03-14 23:39:33 +010015691 tmp= ac_tmp=
Martin v. Löwiseba40652007-08-30 20:10:57 +000015692 trap 'exit_status=$?
Matthias Klose3cef2a92012-03-14 23:39:33 +010015693 : "${ac_tmp:=$tmp}"
15694 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +000015695' 0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015696 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000015697}
Martin v. Löwis11437992002-04-12 09:54:03 +000015698# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000015699
Martin v. Löwis11437992002-04-12 09:54:03 +000015700{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015701 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Matthias Klose3cef2a92012-03-14 23:39:33 +010015702 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000015703} ||
15704{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015705 tmp=./conf$$-$RANDOM
15706 (umask 077 && mkdir "$tmp")
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015707} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Matthias Klose3cef2a92012-03-14 23:39:33 +010015708ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000015709
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015710# Set up the scripts for CONFIG_FILES section.
15711# No need to generate them if there are no CONFIG_FILES.
15712# This happens for instance with `./config.status config.h'.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015713if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015714
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015715
15716ac_cr=`echo X | tr X '\015'`
15717# On cygwin, bash can eat \r inside `` if the user requested igncr.
15718# But we know of no other shell where ac_cr would be empty at this
15719# point, so we can use a bashism as a fallback.
15720if test "x$ac_cr" = x; then
15721 eval ac_cr=\$\'\\r\'
15722fi
15723ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
15724if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015725 ac_cs_awk_cr='\\r'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015726else
15727 ac_cs_awk_cr=$ac_cr
15728fi
15729
Matthias Klose3cef2a92012-03-14 23:39:33 +010015730echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000015731_ACEOF
15732
Martin v. Löwiseba40652007-08-30 20:10:57 +000015733
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015734{
15735 echo "cat >conf$$subs.awk <<_ACEOF" &&
15736 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
15737 echo "_ACEOF"
15738} >conf$$subs.sh ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015739 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15740ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015741ac_delim='%!_!# '
15742for ac_last_try in false false false false false :; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015743 . ./conf$$subs.sh ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015744 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015745
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015746 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
15747 if test $ac_delim_n = $ac_delim_num; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015748 break
15749 elif $ac_last_try; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015750 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015751 else
15752 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000015753 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015754done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015755rm -f conf$$subs.sh
Martin v. Löwiseba40652007-08-30 20:10:57 +000015756
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015757cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Matthias Klose3cef2a92012-03-14 23:39:33 +010015758cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000015759_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015760sed -n '
15761h
15762s/^/S["/; s/!.*/"]=/
15763p
15764g
15765s/^[^!]*!//
15766:repl
15767t repl
15768s/'"$ac_delim"'$//
15769t delim
15770:nl
15771h
15772s/\(.\{148\}\)..*/\1/
15773t more1
15774s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
15775p
15776n
15777b repl
15778:more1
15779s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15780p
15781g
15782s/.\{148\}//
15783t nl
15784:delim
15785h
15786s/\(.\{148\}\)..*/\1/
15787t more2
15788s/["\\]/\\&/g; s/^/"/; s/$/"/
15789p
15790b
15791:more2
15792s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15793p
15794g
15795s/.\{148\}//
15796t delim
15797' <conf$$subs.awk | sed '
15798/^[^""]/{
15799 N
15800 s/\n//
15801}
15802' >>$CONFIG_STATUS || ac_write_fail=1
15803rm -f conf$$subs.awk
15804cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15805_ACAWK
Matthias Klose3cef2a92012-03-14 23:39:33 +010015806cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015807 for (key in S) S_is_set[key] = 1
15808 FS = ""
15809
15810}
15811{
15812 line = $ 0
15813 nfields = split(line, field, "@")
15814 substed = 0
15815 len = length(field[1])
15816 for (i = 2; i < nfields; i++) {
15817 key = field[i]
15818 keylen = length(key)
15819 if (S_is_set[key]) {
15820 value = S[key]
15821 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
15822 len += length(value) + length(field[++i])
15823 substed = 1
15824 } else
15825 len += 1 + keylen
15826 }
15827
15828 print line
15829}
15830
15831_ACAWK
Martin v. Löwiseba40652007-08-30 20:10:57 +000015832_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015833cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15834if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
15835 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
15836else
15837 cat
Matthias Klose3cef2a92012-03-14 23:39:33 +010015838fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015839 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015840_ACEOF
15841
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015842# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
15843# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Martin v. Löwiseba40652007-08-30 20:10:57 +000015844# trailing colons and then remove the whole line if VPATH becomes empty
15845# (actually we leave an empty line to preserve line numbers).
15846if test "x$srcdir" = x.; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015847 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
15848h
15849s///
15850s/^/:/
15851s/[ ]*$/:/
15852s/:\$(srcdir):/:/g
15853s/:\${srcdir}:/:/g
15854s/:@srcdir@:/:/g
15855s/^:*//
Martin v. Löwiseba40652007-08-30 20:10:57 +000015856s/:*$//
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015857x
15858s/\(=[ ]*\).*/\1/
15859G
15860s/\n//
Martin v. Löwiseba40652007-08-30 20:10:57 +000015861s/^[^=]*=[ ]*$//
15862}'
15863fi
15864
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015865cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015866fi # test -n "$CONFIG_FILES"
15867
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015868# Set up the scripts for CONFIG_HEADERS section.
15869# No need to generate them if there are no CONFIG_HEADERS.
15870# This happens for instance with `./config.status Makefile'.
15871if test -n "$CONFIG_HEADERS"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +010015872cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015873BEGIN {
15874_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000015875
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015876# Transform confdefs.h into an awk script `defines.awk', embedded as
15877# here-document in config.status, that substitutes the proper values into
15878# config.h.in to produce config.h.
15879
15880# Create a delimiter string that does not exist in confdefs.h, to ease
15881# handling of long lines.
15882ac_delim='%!_!# '
15883for ac_last_try in false false :; do
Matthias Klose3cef2a92012-03-14 23:39:33 +010015884 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
15885 if test -z "$ac_tt"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015886 break
15887 elif $ac_last_try; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015888 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015889 else
15890 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
15891 fi
15892done
15893
15894# For the awk script, D is an array of macro values keyed by name,
15895# likewise P contains macro parameters if any. Preserve backslash
15896# newline sequences.
15897
15898ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
15899sed -n '
15900s/.\{148\}/&'"$ac_delim"'/g
15901t rset
15902:rset
15903s/^[ ]*#[ ]*define[ ][ ]*/ /
15904t def
15905d
15906:def
15907s/\\$//
15908t bsnl
15909s/["\\]/\\&/g
15910s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15911D["\1"]=" \3"/p
15912s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
15913d
15914:bsnl
15915s/["\\]/\\&/g
15916s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15917D["\1"]=" \3\\\\\\n"\\/p
15918t cont
15919s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
15920t cont
15921d
15922:cont
15923n
15924s/.\{148\}/&'"$ac_delim"'/g
15925t clear
15926:clear
15927s/\\$//
15928t bsnlc
15929s/["\\]/\\&/g; s/^/"/; s/$/"/p
15930d
15931:bsnlc
15932s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
15933b cont
15934' <confdefs.h | sed '
15935s/'"$ac_delim"'/"\\\
15936"/g' >>$CONFIG_STATUS || ac_write_fail=1
15937
15938cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15939 for (key in D) D_is_set[key] = 1
15940 FS = ""
15941}
15942/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
15943 line = \$ 0
15944 split(line, arg, " ")
15945 if (arg[1] == "#") {
15946 defundef = arg[2]
15947 mac1 = arg[3]
15948 } else {
15949 defundef = substr(arg[1], 2)
15950 mac1 = arg[2]
15951 }
15952 split(mac1, mac2, "(") #)
15953 macro = mac2[1]
15954 prefix = substr(line, 1, index(line, defundef) - 1)
15955 if (D_is_set[macro]) {
15956 # Preserve the white space surrounding the "#".
15957 print prefix "define", macro P[macro] D[macro]
15958 next
15959 } else {
15960 # Replace #undef with comments. This is necessary, for example,
15961 # in the case of _POSIX_SOURCE, which is predefined and required
15962 # on some systems where configure will not decide to define it.
15963 if (defundef == "undef") {
15964 print "/*", prefix defundef, macro, "*/"
15965 next
15966 }
15967 }
15968}
15969{ print }
15970_ACAWK
15971_ACEOF
15972cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015973 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015974fi # test -n "$CONFIG_HEADERS"
15975
15976
15977eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
15978shift
15979for ac_tag
Martin v. Löwiseba40652007-08-30 20:10:57 +000015980do
15981 case $ac_tag in
15982 :[FHLC]) ac_mode=$ac_tag; continue;;
15983 esac
15984 case $ac_mode$ac_tag in
15985 :[FHL]*:*);;
Matthias Klose3cef2a92012-03-14 23:39:33 +010015986 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015987 :[FH]-) ac_tag=-:-;;
15988 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
15989 esac
15990 ac_save_IFS=$IFS
15991 IFS=:
15992 set x $ac_tag
15993 IFS=$ac_save_IFS
15994 shift
15995 ac_file=$1
15996 shift
15997
15998 case $ac_mode in
15999 :L) ac_source=$1;;
16000 :[FH])
16001 ac_file_inputs=
16002 for ac_f
16003 do
16004 case $ac_f in
Matthias Klose3cef2a92012-03-14 23:39:33 +010016005 -) ac_f="$ac_tmp/stdin";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016006 *) # Look for the file first in the build tree, then in the source tree
16007 # (if the path is not absolute). The absolute path cannot be DOS-style,
16008 # because $ac_f cannot contain `:'.
16009 test -f "$ac_f" ||
16010 case $ac_f in
16011 [\\/$]*) false;;
16012 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
16013 esac ||
Matthias Klose3cef2a92012-03-14 23:39:33 +010016014 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016015 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016016 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
16017 as_fn_append ac_file_inputs " '$ac_f'"
Martin v. Löwiseba40652007-08-30 20:10:57 +000016018 done
16019
16020 # Let's still pretend it is `configure' which instantiates (i.e., don't
16021 # use $as_me), people would be surprised to read:
16022 # /* config.h. Generated by config.status. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016023 configure_input='Generated from '`
16024 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
16025 `' by configure.'
Martin v. Löwiseba40652007-08-30 20:10:57 +000016026 if test x"$ac_file" != x-; then
16027 configure_input="$ac_file. $configure_input"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016028 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
16029$as_echo "$as_me: creating $ac_file" >&6;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000016030 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016031 # Neutralize special characters interpreted by sed in replacement strings.
16032 case $configure_input in #(
16033 *\&* | *\|* | *\\* )
16034 ac_sed_conf_input=`$as_echo "$configure_input" |
16035 sed 's/[\\\\&|]/\\\\&/g'`;; #(
16036 *) ac_sed_conf_input=$configure_input;;
16037 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000016038
16039 case $ac_tag in
Matthias Klose3cef2a92012-03-14 23:39:33 +010016040 *:-:* | *:-) cat >"$ac_tmp/stdin" \
16041 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016042 esac
16043 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016044 esac
16045
Martin v. Löwiseba40652007-08-30 20:10:57 +000016046 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000016047$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016048 X"$ac_file" : 'X\(//\)[^/]' \| \
16049 X"$ac_file" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000016050 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016051$as_echo X"$ac_file" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000016052 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16053 s//\1/
16054 q
16055 }
16056 /^X\(\/\/\)[^/].*/{
16057 s//\1/
16058 q
16059 }
16060 /^X\(\/\/\)$/{
16061 s//\1/
16062 q
16063 }
16064 /^X\(\/\).*/{
16065 s//\1/
16066 q
16067 }
16068 s/.*/./; q'`
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016069 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000016070 ac_builddir=.
16071
Martin v. Löwiseba40652007-08-30 20:10:57 +000016072case "$ac_dir" in
16073.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
16074*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016075 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000016076 # A ".." for each directory in $ac_dir_suffix.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016077 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000016078 case $ac_top_builddir_sub in
16079 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
16080 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
16081 esac ;;
16082esac
16083ac_abs_top_builddir=$ac_pwd
16084ac_abs_builddir=$ac_pwd$ac_dir_suffix
16085# for backward compatibility:
16086ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000016087
16088case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +000016089 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000016090 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +000016091 ac_top_srcdir=$ac_top_builddir_sub
16092 ac_abs_top_srcdir=$ac_pwd ;;
16093 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000016094 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016095 ac_top_srcdir=$srcdir
16096 ac_abs_top_srcdir=$srcdir ;;
16097 *) # Relative name.
16098 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
16099 ac_top_srcdir=$ac_top_build_prefix$srcdir
16100 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016101esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000016102ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000016103
Martin v. Löwis11437992002-04-12 09:54:03 +000016104
Martin v. Löwiseba40652007-08-30 20:10:57 +000016105 case $ac_mode in
16106 :F)
16107 #
16108 # CONFIG_FILE
16109 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016110
16111 case $INSTALL in
16112 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016113 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016114 esac
Trent Nelsonf6407a12012-08-30 14:56:13 +000016115 ac_MKDIR_P=$MKDIR_P
16116 case $MKDIR_P in
16117 [\\/$]* | ?:[\\/]* ) ;;
16118 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
16119 esac
Brett Cannon19fab762007-06-02 03:02:29 +000016120_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000016121
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016122cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000016123# If the template does not know about datarootdir, expand it.
16124# FIXME: This hack should be removed a few years after 2.60.
16125ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016126ac_sed_dataroot='
16127/datarootdir/ {
Martin v. Löwiseba40652007-08-30 20:10:57 +000016128 p
16129 q
16130}
16131/@datadir@/p
16132/@docdir@/p
16133/@infodir@/p
16134/@localedir@/p
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016135/@mandir@/p'
16136case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000016137*datarootdir*) ac_datarootdir_seen=yes;;
16138*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016139 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
16140$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000016141_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016142cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000016143 ac_datarootdir_hack='
16144 s&@datadir@&$datadir&g
16145 s&@docdir@&$docdir&g
16146 s&@infodir@&$infodir&g
16147 s&@localedir@&$localedir&g
16148 s&@mandir@&$mandir&g
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016149 s&\\\${datarootdir}&$datarootdir&g' ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016150esac
16151_ACEOF
16152
16153# Neutralize VPATH when `$srcdir' = `.'.
16154# Shell code in configure.ac might set extrasub.
16155# FIXME: do we really want to maintain this feature?
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016156cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16157ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000016158$extrasub
16159_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016160cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016161:t
16162/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016163s|@configure_input@|$ac_sed_conf_input|;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000016164s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016165s&@top_build_prefix@&$ac_top_build_prefix&;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000016166s&@srcdir@&$ac_srcdir&;t t
16167s&@abs_srcdir@&$ac_abs_srcdir&;t t
16168s&@top_srcdir@&$ac_top_srcdir&;t t
16169s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
16170s&@builddir@&$ac_builddir&;t t
16171s&@abs_builddir@&$ac_abs_builddir&;t t
16172s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
16173s&@INSTALL@&$ac_INSTALL&;t t
Trent Nelsonf6407a12012-08-30 14:56:13 +000016174s&@MKDIR_P@&$ac_MKDIR_P&;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000016175$ac_datarootdir_hack
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016176"
Matthias Klose3cef2a92012-03-14 23:39:33 +010016177eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
16178 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016179
Martin v. Löwiseba40652007-08-30 20:10:57 +000016180test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Matthias Klose3cef2a92012-03-14 23:39:33 +010016181 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
16182 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
16183 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016184 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016185which seems to be undefined. Please make sure it is defined" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016186$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016187which seems to be undefined. Please make sure it is defined" >&2;}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016188
Matthias Klose3cef2a92012-03-14 23:39:33 +010016189 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000016190 case $ac_file in
Matthias Klose3cef2a92012-03-14 23:39:33 +010016191 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
16192 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016193 esac \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016194 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016195 ;;
16196 :H)
16197 #
16198 # CONFIG_HEADER
16199 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016200 if test x"$ac_file" != x-; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016201 {
16202 $as_echo "/* $configure_input */" \
Matthias Klose3cef2a92012-03-14 23:39:33 +010016203 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
16204 } >"$ac_tmp/config.h" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016205 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Matthias Klose3cef2a92012-03-14 23:39:33 +010016206 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016207 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
16208$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016209 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016210 rm -f "$ac_file"
Matthias Klose3cef2a92012-03-14 23:39:33 +010016211 mv "$ac_tmp/config.h" "$ac_file" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016212 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016213 fi
16214 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016215 $as_echo "/* $configure_input */" \
Matthias Klose3cef2a92012-03-14 23:39:33 +010016216 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016217 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016218 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016219 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000016220
Martin v. Löwiseba40652007-08-30 20:10:57 +000016221
16222 esac
16223
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000016224
16225 case $ac_file$ac_mode in
16226 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
16227
16228 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000016229done # for ac_tag
16230
Guido van Rossum627b2d71993-12-24 10:39:16 +000016231
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016232as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000016233_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016234ac_clean_files=$ac_clean_files_save
16235
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016236test $ac_write_fail = 0 ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016237 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016238
Martin v. Löwis11437992002-04-12 09:54:03 +000016239
16240# configure is writing to config.log, and then calls config.status.
16241# config.status does its own redirection, appending to config.log.
16242# Unfortunately, on DOS this fails, as config.log is still kept open
16243# by configure, so config.status won't be able to write to it; its
16244# output is simply discarded. So we exec the FD to /dev/null,
16245# effectively closing config.log, so it can be properly (re)opened and
16246# appended to by config.status. When coming back to configure, we
16247# need to make the FD available again.
16248if test "$no_create" != yes; then
16249 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000016250 ac_config_status_args=
16251 test "$silent" = yes &&
16252 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000016253 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000016254 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000016255 exec 5>>config.log
16256 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16257 # would make configure fail if this is the last instruction.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016258 $ac_cs_success || as_fn_exit 1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016259fi
16260if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
16261 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
16262$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016263fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000016264
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016265
Martin v. Löwisf7afe952006-04-14 15:16:15 +000016266echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016267if test ! -f Modules/Setup
16268then
16269 cp $srcdir/Modules/Setup.dist Modules/Setup
16270fi
16271
Martin v. Löwisf7afe952006-04-14 15:16:15 +000016272echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016273if test ! -f Modules/Setup.local
16274then
16275 echo "# Edit this file for local setup changes" >Modules/Setup.local
16276fi
16277
16278echo "creating Makefile"
16279$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
16280 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000016281 Modules/Setup.local Modules/Setup
Skip Montanaro89e975f2007-08-22 19:05:21 +000016282
16283case $ac_sys_system in
16284BeOS)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016285 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000016286
16287 Support for BeOS is deprecated as of Python 2.6.
16288 See PEP 11 for the gory details.
16289 " >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016290$as_echo "$as_me: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000016291
16292 Support for BeOS is deprecated as of Python 2.6.
16293 See PEP 11 for the gory details.
16294 " >&2;}
16295 ;;
16296*) ;;
16297esac
16298
Neil Schemenauerc761fc82001-02-19 04:50:49 +000016299mv config.c Modules