blob: 521dd7a06ce4c611127c6853cb9a9a32dfc16717 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Matthias Klose3cef2a92012-03-14 23:39:33 +01002# From configure.ac Revision.
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004# Generated by GNU Autoconf 2.69 for python 2.7.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Georg Brandl464432d2009-05-20 18:24:08 +00006# Report bugs to <http://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00007#
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008#
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010#
11#
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012# This configure script is free software; the Free Software Foundation
13# gives unlimited permission to copy, distribute and modify it.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014## -------------------- ##
15## M4sh Initialization. ##
16## -------------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +000017
Martin v. Löwiseba40652007-08-30 20:10:57 +000018# Be more Bourne compatible
19DUALCASE=1; export DUALCASE # for MKS sh
Matthias Klosea0bea5d2010-05-08 10:00:28 +000020if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000021 emulate sh
22 NULLCMD=:
Matthias Klosea0bea5d2010-05-08 10:00:28 +000023 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000024 # is contrary to our usage. Disable this feature.
25 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000026 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000027else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000028 case `(set -o) 2>/dev/null` in #(
29 *posix*) :
30 set -o posix ;; #(
31 *) :
32 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000033esac
Martin v. Löwis11437992002-04-12 09:54:03 +000034fi
35
Skip Montanaro6dead952003-09-25 14:50:04 +000036
Matthias Klosea0bea5d2010-05-08 10:00:28 +000037as_nl='
38'
39export as_nl
40# Printing a long string crashes Solaris 7 /usr/bin/printf.
41as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
42as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
43as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
44# Prefer a ksh shell builtin over an external printf program on Solaris,
45# but without wasting forks for bash or zsh.
46if test -z "$BASH_VERSION$ZSH_VERSION" \
47 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
48 as_echo='print -r --'
49 as_echo_n='print -rn --'
50elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
51 as_echo='printf %s\n'
52 as_echo_n='printf %s'
53else
54 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
55 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
56 as_echo_n='/usr/ucb/echo -n'
57 else
58 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
59 as_echo_n_body='eval
60 arg=$1;
61 case $arg in #(
62 *"$as_nl"*)
63 expr "X$arg" : "X\\(.*\\)$as_nl";
64 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
65 esac;
66 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
67 '
68 export as_echo_n_body
69 as_echo_n='sh -c $as_echo_n_body as_echo'
70 fi
71 export as_echo_body
72 as_echo='sh -c $as_echo_body as_echo'
73fi
Martin v. Löwis11437992002-04-12 09:54:03 +000074
75# The user is always right.
76if test "${PATH_SEPARATOR+set}" != set; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000077 PATH_SEPARATOR=:
78 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
79 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
80 PATH_SEPARATOR=';'
81 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000082fi
Martin v. Löwis11437992002-04-12 09:54:03 +000083
Martin v. Löwiseba40652007-08-30 20:10:57 +000084
85# IFS
86# We need space, tab and new line, in precisely that order. Quoting is
87# there to prevent editors from complaining about space-tab.
88# (If _AS_PATH_WALK were called with IFS unset, it would disable word
89# splitting by setting IFS to empty value.)
Martin v. Löwiseba40652007-08-30 20:10:57 +000090IFS=" "" $as_nl"
91
92# Find who we are. Look in the path if we contain no directory separator.
Matthias Klose3cef2a92012-03-14 23:39:33 +010093as_myself=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000094case $0 in #((
Martin v. Löwiseba40652007-08-30 20:10:57 +000095 *[\\/]* ) as_myself=$0 ;;
96 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000097for as_dir in $PATH
98do
99 IFS=$as_save_IFS
100 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000101 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
102 done
Martin v. Löwiseba40652007-08-30 20:10:57 +0000103IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +0000104
Martin v. Löwiseba40652007-08-30 20:10:57 +0000105 ;;
106esac
107# We did not find ourselves, most probably we were run as `sh COMMAND'
108# in which case we are not to be found in the path.
109if test "x$as_myself" = x; then
110 as_myself=$0
111fi
112if test ! -f "$as_myself"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000113 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
114 exit 1
Martin v. Löwiseba40652007-08-30 20:10:57 +0000115fi
116
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000117# Unset variables that we do not need and which cause bugs (e.g. in
118# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
119# suppresses any "Segmentation fault" message there. '((' could
120# trigger a bug in pdksh 5.2.14.
121for as_var in BASH_ENV ENV MAIL MAILPATH
122do eval test x\${$as_var+set} = xset \
123 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Martin v. Löwiseba40652007-08-30 20:10:57 +0000124done
125PS1='$ '
126PS2='> '
127PS4='+ '
128
129# NLS nuisances.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000130LC_ALL=C
131export LC_ALL
132LANGUAGE=C
133export LANGUAGE
Martin v. Löwiseba40652007-08-30 20:10:57 +0000134
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000135# CDPATH.
136(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
137
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100138# Use a proper internal environment variable to ensure we don't fall
139 # into an infinite loop, continuously re-executing ourselves.
140 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
141 _as_can_reexec=no; export _as_can_reexec;
142 # We cannot yet assume a decent shell, so we have to provide a
143# neutralization value for shells without unset; and this also
144# works around shells that cannot unset nonexistent variables.
145# Preserve -v and -x to the replacement shell.
146BASH_ENV=/dev/null
147ENV=/dev/null
148(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
149case $- in # ((((
150 *v*x* | *x*v* ) as_opts=-vx ;;
151 *v* ) as_opts=-v ;;
152 *x* ) as_opts=-x ;;
153 * ) as_opts= ;;
154esac
155exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
156# Admittedly, this is quite paranoid, since all the known shells bail
157# out after a failed `exec'.
158$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
159as_fn_exit 255
160 fi
161 # We don't want this to propagate to other subprocesses.
162 { _as_can_reexec=; unset _as_can_reexec;}
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000163if test "x$CONFIG_SHELL" = x; then
164 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
165 emulate sh
166 NULLCMD=:
167 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
168 # is contrary to our usage. Disable this feature.
169 alias -g '\${1+\"\$@\"}'='\"\$@\"'
170 setopt NO_GLOB_SUBST
171else
172 case \`(set -o) 2>/dev/null\` in #(
173 *posix*) :
174 set -o posix ;; #(
175 *) :
176 ;;
177esac
178fi
179"
180 as_required="as_fn_return () { (exit \$1); }
181as_fn_success () { as_fn_return 0; }
182as_fn_failure () { as_fn_return 1; }
183as_fn_ret_success () { return 0; }
184as_fn_ret_failure () { return 1; }
185
186exitcode=0
187as_fn_success || { exitcode=1; echo as_fn_success failed.; }
188as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
189as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
190as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
191if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
192
193else
194 exitcode=1; echo positional parameters were not saved.
195fi
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100196test x\$exitcode = x0 || exit 1
197test -x / || exit 1"
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000198 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
199 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
200 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
201 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
202test \$(( 1 + 1 )) = 2 || exit 1"
203 if (eval "$as_required") 2>/dev/null; then :
204 as_have_required=yes
205else
206 as_have_required=no
207fi
208 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
209
210else
211 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
212as_found=false
213for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
214do
215 IFS=$as_save_IFS
216 test -z "$as_dir" && as_dir=.
217 as_found=:
218 case $as_dir in #(
219 /*)
220 for as_base in sh bash ksh sh5; do
221 # Try only shells that exist, to save several forks.
222 as_shell=$as_dir/$as_base
223 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
224 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
225 CONFIG_SHELL=$as_shell as_have_required=yes
226 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
227 break 2
228fi
229fi
230 done;;
231 esac
232 as_found=false
233done
234$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
235 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
236 CONFIG_SHELL=$SHELL as_have_required=yes
237fi; }
238IFS=$as_save_IFS
239
240
241 if test "x$CONFIG_SHELL" != x; then :
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100242 export CONFIG_SHELL
243 # We cannot yet assume a decent shell, so we have to provide a
244# neutralization value for shells without unset; and this also
245# works around shells that cannot unset nonexistent variables.
246# Preserve -v and -x to the replacement shell.
247BASH_ENV=/dev/null
248ENV=/dev/null
249(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
250case $- in # ((((
251 *v*x* | *x*v* ) as_opts=-vx ;;
252 *v* ) as_opts=-v ;;
253 *x* ) as_opts=-x ;;
254 * ) as_opts= ;;
255esac
256exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
257# Admittedly, this is quite paranoid, since all the known shells bail
258# out after a failed `exec'.
259$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
260exit 255
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000261fi
262
263 if test x$as_have_required = xno; then :
264 $as_echo "$0: This script requires a shell more modern than all"
265 $as_echo "$0: the shells that I found on your system."
266 if test x${ZSH_VERSION+set} = xset ; then
267 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
268 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
269 else
270 $as_echo "$0: Please tell bug-autoconf@gnu.org and
271$0: http://bugs.python.org/ about your system, including
272$0: any error possibly output before this message. Then
273$0: install a modern shell, or manually run the script
274$0: under such a shell if you do have one."
275 fi
276 exit 1
277fi
278fi
279fi
280SHELL=${CONFIG_SHELL-/bin/sh}
281export SHELL
282# Unset more variables known to interfere with behavior of common tools.
283CLICOLOR_FORCE= GREP_OPTIONS=
284unset CLICOLOR_FORCE GREP_OPTIONS
285
286## --------------------- ##
287## M4sh Shell Functions. ##
288## --------------------- ##
289# as_fn_unset VAR
290# ---------------
291# Portably unset VAR.
292as_fn_unset ()
293{
294 { eval $1=; unset $1;}
295}
296as_unset=as_fn_unset
297
298# as_fn_set_status STATUS
299# -----------------------
300# Set $? to STATUS, without forking.
301as_fn_set_status ()
302{
303 return $1
304} # as_fn_set_status
305
306# as_fn_exit STATUS
307# -----------------
308# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
309as_fn_exit ()
310{
311 set +e
312 as_fn_set_status $1
313 exit $1
314} # as_fn_exit
315
316# as_fn_mkdir_p
317# -------------
318# Create "$as_dir" as a directory, including parents if necessary.
319as_fn_mkdir_p ()
320{
321
322 case $as_dir in #(
323 -*) as_dir=./$as_dir;;
324 esac
325 test -d "$as_dir" || eval $as_mkdir_p || {
326 as_dirs=
327 while :; do
328 case $as_dir in #(
329 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
330 *) as_qdir=$as_dir;;
331 esac
332 as_dirs="'$as_qdir' $as_dirs"
333 as_dir=`$as_dirname -- "$as_dir" ||
334$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
335 X"$as_dir" : 'X\(//\)[^/]' \| \
336 X"$as_dir" : 'X\(//\)$' \| \
337 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
338$as_echo X"$as_dir" |
339 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
340 s//\1/
341 q
342 }
343 /^X\(\/\/\)[^/].*/{
344 s//\1/
345 q
346 }
347 /^X\(\/\/\)$/{
348 s//\1/
349 q
350 }
351 /^X\(\/\).*/{
352 s//\1/
353 q
354 }
355 s/.*/./; q'`
356 test -d "$as_dir" && break
357 done
358 test -z "$as_dirs" || eval "mkdir $as_dirs"
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000359 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000360
361
362} # as_fn_mkdir_p
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100363
364# as_fn_executable_p FILE
365# -----------------------
366# Test if FILE is an executable regular file.
367as_fn_executable_p ()
368{
369 test -f "$1" && test -x "$1"
370} # as_fn_executable_p
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000371# as_fn_append VAR VALUE
372# ----------------------
373# Append the text in VALUE to the end of the definition contained in VAR. Take
374# advantage of any shell optimizations that allow amortized linear growth over
375# repeated appends, instead of the typical quadratic growth present in naive
376# implementations.
377if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
378 eval 'as_fn_append ()
379 {
380 eval $1+=\$2
381 }'
382else
383 as_fn_append ()
384 {
385 eval $1=\$$1\$2
386 }
387fi # as_fn_append
388
389# as_fn_arith ARG...
390# ------------------
391# Perform arithmetic evaluation on the ARGs, and store the result in the
392# global $as_val. Take advantage of shells that can avoid forks. The arguments
393# must be portable across $(()) and expr.
394if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
395 eval 'as_fn_arith ()
396 {
397 as_val=$(( $* ))
398 }'
399else
400 as_fn_arith ()
401 {
402 as_val=`expr "$@" || test $? -eq 1`
403 }
404fi # as_fn_arith
405
406
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000407# as_fn_error STATUS ERROR [LINENO LOG_FD]
408# ----------------------------------------
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000409# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
410# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000411# script with STATUS, using 1 if that was 0.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000412as_fn_error ()
413{
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000414 as_status=$1; test $as_status -eq 0 && as_status=1
415 if test "$4"; then
416 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
417 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000418 fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000419 $as_echo "$as_me: error: $2" >&2
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000420 as_fn_exit $as_status
421} # as_fn_error
422
Martin v. Löwiseba40652007-08-30 20:10:57 +0000423if expr a : '\(a\)' >/dev/null 2>&1 &&
424 test "X`expr 00001 : '.*\(...\)'`" = X001; then
425 as_expr=expr
426else
427 as_expr=false
428fi
429
430if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
431 as_basename=basename
432else
433 as_basename=false
434fi
435
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000436if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
437 as_dirname=dirname
438else
439 as_dirname=false
440fi
Martin v. Löwiseba40652007-08-30 20:10:57 +0000441
Martin v. Löwiseba40652007-08-30 20:10:57 +0000442as_me=`$as_basename -- "$0" ||
443$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
444 X"$0" : 'X\(//\)$' \| \
445 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000446$as_echo X/"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +0000447 sed '/^.*\/\([^/][^/]*\)\/*$/{
448 s//\1/
449 q
450 }
451 /^X\/\(\/\/\)$/{
452 s//\1/
453 q
454 }
455 /^X\/\(\/\).*/{
456 s//\1/
457 q
458 }
459 s/.*/./; q'`
460
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000461# Avoid depending upon Character Ranges.
462as_cr_letters='abcdefghijklmnopqrstuvwxyz'
463as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
464as_cr_Letters=$as_cr_letters$as_cr_LETTERS
465as_cr_digits='0123456789'
466as_cr_alnum=$as_cr_Letters$as_cr_digits
Martin v. Löwiseba40652007-08-30 20:10:57 +0000467
468
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000469 as_lineno_1=$LINENO as_lineno_1a=$LINENO
470 as_lineno_2=$LINENO as_lineno_2a=$LINENO
471 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
472 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
473 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
Martin v. Löwiseba40652007-08-30 20:10:57 +0000474 sed -n '
475 p
476 /[$]LINENO/=
477 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000478 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +0000479 s/[$]LINENO.*/&-/
480 t lineno
481 b
482 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000483 N
Martin v. Löwiseba40652007-08-30 20:10:57 +0000484 :loop
485 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000486 t loop
Martin v. Löwiseba40652007-08-30 20:10:57 +0000487 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000488 ' >$as_me.lineno &&
Martin v. Löwiseba40652007-08-30 20:10:57 +0000489 chmod +x "$as_me.lineno" ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000490 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
Martin v. Löwis11437992002-04-12 09:54:03 +0000491
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100492 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
493 # already done that, so ensure we don't try to do so again and fall
494 # in an infinite loop. This has already happened in practice.
495 _as_can_reexec=no; export _as_can_reexec
Martin v. Löwis11437992002-04-12 09:54:03 +0000496 # Don't try to exec as it changes $[0], causing all sort of problems
497 # (the dirname of $[0] is not the place where we might find the
Martin v. Löwiseba40652007-08-30 20:10:57 +0000498 # original and so on. Autoconf is especially sensitive to this).
499 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000500 # Exit status is that of the last command.
501 exit
502}
503
Martin v. Löwiseba40652007-08-30 20:10:57 +0000504ECHO_C= ECHO_N= ECHO_T=
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000505case `echo -n x` in #(((((
Martin v. Löwiseba40652007-08-30 20:10:57 +0000506-n*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000507 case `echo 'xy\c'` in
Martin v. Löwiseba40652007-08-30 20:10:57 +0000508 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000509 xy) ECHO_C='\c';;
510 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
511 ECHO_T=' ';;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000512 esac;;
513*)
514 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000515esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000516
Martin v. Löwis11437992002-04-12 09:54:03 +0000517rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +0000518if test -d conf$$.dir; then
519 rm -f conf$$.dir/conf$$.file
520else
521 rm -f conf$$.dir
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000522 mkdir conf$$.dir 2>/dev/null
Martin v. Löwiseba40652007-08-30 20:10:57 +0000523fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000524if (echo >conf$$.file) 2>/dev/null; then
525 if ln -s conf$$.file conf$$ 2>/dev/null; then
526 as_ln_s='ln -s'
527 # ... but there are two gotchas:
528 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
529 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100530 # In both cases, we have to default to `cp -pR'.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000531 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100532 as_ln_s='cp -pR'
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000533 elif ln conf$$.file conf$$ 2>/dev/null; then
534 as_ln_s=ln
535 else
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100536 as_ln_s='cp -pR'
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000537 fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000538else
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100539 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +0000540fi
Martin v. Löwiseba40652007-08-30 20:10:57 +0000541rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
542rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000543
Skip Montanaro6dead952003-09-25 14:50:04 +0000544if mkdir -p . 2>/dev/null; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000545 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +0000546else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000547 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000548 as_mkdir_p=false
549fi
550
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100551as_test_x='test -x'
552as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +0000553
554# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000555as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000556
557# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000558as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000559
560
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000561test -n "$DJDIR" || exec 7<&0 </dev/null
562exec 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000563
564# Name of the host.
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000565# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
Martin v. Löwis11437992002-04-12 09:54:03 +0000566# so uname gets run too.
567ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
568
Martin v. Löwis11437992002-04-12 09:54:03 +0000569#
570# Initializations.
571#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000572ac_default_prefix=/usr/local
Martin v. Löwiseba40652007-08-30 20:10:57 +0000573ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000574ac_config_libobj_dir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000575LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000576cross_compiling=no
577subdirs=
578MFLAGS=
579MAKEFLAGS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000580
Martin v. Löwis11437992002-04-12 09:54:03 +0000581# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000582PACKAGE_NAME='python'
583PACKAGE_TARNAME='python'
Martin v. Löwis174440b2008-10-03 08:59:41 +0000584PACKAGE_VERSION='2.7'
585PACKAGE_STRING='python 2.7'
Georg Brandl464432d2009-05-20 18:24:08 +0000586PACKAGE_BUGREPORT='http://bugs.python.org/'
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000587PACKAGE_URL=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000588
589ac_unique_file="Include/object.h"
590# Factoring default headers for most tests.
591ac_includes_default="\
592#include <stdio.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +0000593#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000594# include <sys/types.h>
595#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000596#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000597# include <sys/stat.h>
598#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000599#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000600# include <stdlib.h>
601# include <stddef.h>
602#else
Martin v. Löwiseba40652007-08-30 20:10:57 +0000603# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000604# include <stdlib.h>
605# endif
606#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000607#ifdef HAVE_STRING_H
608# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000609# include <memory.h>
610# endif
611# include <string.h>
612#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000613#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000614# include <strings.h>
615#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000616#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000617# include <inttypes.h>
Martin v. Löwis11437992002-04-12 09:54:03 +0000618#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000619#ifdef HAVE_STDINT_H
620# include <stdint.h>
621#endif
622#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000623# include <unistd.h>
624#endif"
625
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000626ac_subst_vars='LTLIBOBJS
Ned Deily3f1d0b32014-11-20 02:11:03 -0800627ENSUREPIP
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000628SRCDIRS
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000629THREADHEADERS
630UNICODE_OBJS
631LIBC
632LIBM
633HAVE_GETHOSTBYNAME
634HAVE_GETHOSTBYNAME_R
635HAVE_GETHOSTBYNAME_R_3_ARG
636HAVE_GETHOSTBYNAME_R_5_ARG
637HAVE_GETHOSTBYNAME_R_6_ARG
638LIBOBJS
639TRUE
640MACHDEP_OBJS
641DYNLOADFILE
642DLINCLDIR
643THREADOBJ
644LDLAST
645USE_THREAD_MODULE
646SIGNAL_OBJS
647USE_SIGNAL_MODULE
Ned Deilya2a9f572013-10-25 00:30:10 -0700648TCLTK_LIBS
649TCLTK_INCLUDES
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000650LIBFFI_INCLUDEDIR
Benjamin Peterson64e8f6e2014-12-15 00:00:23 -0500651PKG_CONFIG_LIBDIR
652PKG_CONFIG_PATH
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000653PKG_CONFIG
654SHLIBS
655CFLAGSFORSHARED
656LINKFORSHARED
657CCSHARED
658BLDSHARED
659LDCXXSHARED
660LDSHARED
661SO
662LIBTOOL_CRUFT
663OTHER_LIBTOOL_OPT
Brett Cannon4ff151a2015-09-18 15:09:42 -0700664LLVM_PROF_FOUND
665LLVM_PROF_ERR
666LLVM_PROF_FILE
667LLVM_PROF_MERGER
668PGO_PROF_USE_FLAG
669PGO_PROF_GEN_FLAG
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)c543a0f2016-06-02 23:44:40 +0000670LTOFLAGS
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000671UNIVERSAL_ARCH_FLAGS
672BASECFLAGS
673OPT
674LN
Trent Nelsonf6407a12012-08-30 14:56:13 +0000675MKDIR_P
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000676INSTALL_DATA
677INSTALL_SCRIPT
678INSTALL_PROGRAM
Georg Brandl3a5508e2011-03-06 10:42:21 +0100679HAS_HG
680HGBRANCH
681HGTAG
682HGVERSION
Trent Nelsond86ceec2012-10-16 09:42:45 -0400683BASECPPFLAGS
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000684SVNVERSION
685ARFLAGS
doko@python.orgd65e2ba2013-01-31 23:52:03 +0100686ac_ct_AR
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000687AR
688RANLIB
689GNULD
690LINKCC
691RUNSHARED
692INSTSONAME
693LDLIBRARYDIR
694BLDLIBRARY
695DLLLIBRARY
696LDLIBRARY
697LIBRARY
698BUILDEXEEXT
699EGREP
700GREP
701CPP
doko@python.org4e63fbe2013-01-25 13:08:27 +0100702MULTIARCH
doko@python.orgd65e2ba2013-01-31 23:52:03 +0100703ac_ct_CXX
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000704MAINCC
705CXX
706OBJEXT
707EXEEXT
708ac_ct_CC
709CPPFLAGS
710LDFLAGS
711CFLAGS
712CC
713EXPORT_MACOSX_DEPLOYMENT_TARGET
714CONFIGURE_MACOSX_DEPLOYMENT_TARGET
715EXTRAMACHDEPPATH
716EXTRAPLATDIR
doko@ubuntu.coma50b0de2015-04-13 21:55:59 +0200717PLATDIR
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000718SGI_ABI
doko@python.orgd65e2ba2013-01-31 23:52:03 +0100719_PYTHON_HOST_PLATFORM
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000720MACHDEP
721FRAMEWORKINSTALLAPPSPREFIX
722FRAMEWORKUNIXTOOLSPREFIX
723FRAMEWORKALTINSTALLLAST
724FRAMEWORKALTINSTALLFIRST
725FRAMEWORKINSTALLLAST
726FRAMEWORKINSTALLFIRST
727PYTHONFRAMEWORKINSTALLDIR
728PYTHONFRAMEWORKPREFIX
729PYTHONFRAMEWORKDIR
730PYTHONFRAMEWORKIDENTIFIER
731PYTHONFRAMEWORK
732LIPO_32BIT_FLAGS
733ARCH_RUN_32BIT
734UNIVERSALSDK
735CONFIG_ARGS
736SOVERSION
737VERSION
Martin Panter801110b2016-07-28 01:28:27 +0000738PGEN_DEPENDENCY
doko@python.orgd65e2ba2013-01-31 23:52:03 +0100739PYTHON_FOR_BUILD
740host_os
741host_vendor
742host_cpu
743host
744build_os
745build_vendor
746build_cpu
747build
Martin Pantere9ee3172016-04-23 00:58:44 +0000748cross_compiling
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000749target_alias
750host_alias
751build_alias
752LIBS
753ECHO_T
754ECHO_N
755ECHO_C
756DEFS
757mandir
758localedir
759libdir
760psdir
761pdfdir
762dvidir
763htmldir
764infodir
765docdir
766oldincludedir
767includedir
Benjamin Peterson42e10292016-07-07 00:02:31 -0700768runstatedir
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000769localstatedir
770sharedstatedir
771sysconfdir
772datadir
773datarootdir
774libexecdir
775sbindir
776bindir
777program_transform_name
778prefix
779exec_prefix
780PACKAGE_URL
781PACKAGE_BUGREPORT
782PACKAGE_STRING
783PACKAGE_VERSION
784PACKAGE_TARNAME
785PACKAGE_NAME
786PATH_SEPARATOR
787SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000788ac_subst_files=''
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000789ac_user_opts='
790enable_option_checking
791enable_universalsdk
792with_universal_archs
793with_framework_name
794enable_framework
795with_gcc
Zachary Ware6ed42ea2015-12-21 11:43:03 -0600796with_icc
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000797with_cxx_main
798with_suffix
799enable_shared
800enable_profiling
801with_pydebug
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)c543a0f2016-06-02 23:44:40 +0000802with_lto
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000803enable_toolbox_glue
804with_libs
805with_system_expat
806with_system_ffi
Ned Deilya2a9f572013-10-25 00:30:10 -0700807with_tcltk_includes
808with_tcltk_libs
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000809with_dbmliborder
810with_signal_module
811with_dec_threads
812with_threads
813with_thread
814with_pth
815enable_ipv6
816with_doc_strings
817with_tsc
818with_pymalloc
819with_valgrind
820with_wctype_functions
821with_fpectl
822with_libm
823with_libc
824enable_big_digits
825enable_unicode
Benjamin Peterson2c992a02015-05-28 12:45:31 -0500826with_computed_gotos
Ned Deily3f1d0b32014-11-20 02:11:03 -0800827with_ensurepip
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000828'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000829 ac_precious_vars='build_alias
830host_alias
831target_alias
832CC
833CFLAGS
834LDFLAGS
835LIBS
836CPPFLAGS
Benjamin Peterson64e8f6e2014-12-15 00:00:23 -0500837CPP
838PKG_CONFIG
839PKG_CONFIG_PATH
840PKG_CONFIG_LIBDIR'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000841
Guido van Rossum627b2d71993-12-24 10:39:16 +0000842
Guido van Rossum7f43da71994-08-01 12:15:30 +0000843# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000844ac_init_help=
845ac_init_version=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000846ac_unrecognized_opts=
847ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000848# The variables have the same names as the options, with
849# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000850cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000851exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000852no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000853no_recursion=
854prefix=NONE
855program_prefix=NONE
856program_suffix=NONE
857program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000858silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000859site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000860srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000861verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000862x_includes=NONE
863x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000864
865# Installation directory options.
866# These are left unexpanded so users can "make install exec_prefix=/foo"
867# and all the variables that are supposed to be based on exec_prefix
868# by default will actually change.
869# Use braces instead of parens because sh, perl, etc. also accept them.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000870# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000871bindir='${exec_prefix}/bin'
872sbindir='${exec_prefix}/sbin'
873libexecdir='${exec_prefix}/libexec'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000874datarootdir='${prefix}/share'
875datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000876sysconfdir='${prefix}/etc'
877sharedstatedir='${prefix}/com'
878localstatedir='${prefix}/var'
Benjamin Peterson42e10292016-07-07 00:02:31 -0700879runstatedir='${localstatedir}/run'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000880includedir='${prefix}/include'
881oldincludedir='/usr/include'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000882docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
883infodir='${datarootdir}/info'
884htmldir='${docdir}'
885dvidir='${docdir}'
886pdfdir='${docdir}'
887psdir='${docdir}'
888libdir='${exec_prefix}/lib'
889localedir='${datarootdir}/locale'
890mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000891
Guido van Rossum7f43da71994-08-01 12:15:30 +0000892ac_prev=
Martin v. Löwiseba40652007-08-30 20:10:57 +0000893ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000894for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000895do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000896 # If the previous option needs an argument, assign it.
897 if test -n "$ac_prev"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +0000898 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000899 ac_prev=
900 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000901 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000902
Martin v. Löwiseba40652007-08-30 20:10:57 +0000903 case $ac_option in
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000904 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
905 *=) ac_optarg= ;;
906 *) ac_optarg=yes ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000907 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000908
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000909 # Accept the important Cygnus configure options, so we can diagnose typos.
910
Martin v. Löwiseba40652007-08-30 20:10:57 +0000911 case $ac_dashdash$ac_option in
912 --)
913 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000914
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000915 -bindir | --bindir | --bindi | --bind | --bin | --bi)
916 ac_prev=bindir ;;
917 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000918 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000919
920 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000921 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000922 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000923 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000924
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000925 -cache-file | --cache-file | --cache-fil | --cache-fi \
926 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
927 ac_prev=cache_file ;;
928 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
929 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000930 cache_file=$ac_optarg ;;
931
932 --config-cache | -C)
933 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000934
Martin v. Löwiseba40652007-08-30 20:10:57 +0000935 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000936 ac_prev=datadir ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000937 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000938 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000939
Martin v. Löwiseba40652007-08-30 20:10:57 +0000940 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
941 | --dataroo | --dataro | --datar)
942 ac_prev=datarootdir ;;
943 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
944 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
945 datarootdir=$ac_optarg ;;
946
Guido van Rossum7f43da71994-08-01 12:15:30 +0000947 -disable-* | --disable-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000948 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000949 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000950 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000951 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000952 ac_useropt_orig=$ac_useropt
953 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
954 case $ac_user_opts in
955 *"
956"enable_$ac_useropt"
957"*) ;;
958 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
959 ac_unrecognized_sep=', ';;
960 esac
961 eval enable_$ac_useropt=no ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000962
963 -docdir | --docdir | --docdi | --doc | --do)
964 ac_prev=docdir ;;
965 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
966 docdir=$ac_optarg ;;
967
968 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
969 ac_prev=dvidir ;;
970 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
971 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000972
973 -enable-* | --enable-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000974 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000975 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000976 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000977 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000978 ac_useropt_orig=$ac_useropt
979 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
980 case $ac_user_opts in
981 *"
982"enable_$ac_useropt"
983"*) ;;
984 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
985 ac_unrecognized_sep=', ';;
986 esac
987 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000988
Guido van Rossum7f43da71994-08-01 12:15:30 +0000989 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
990 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
991 | --exec | --exe | --ex)
992 ac_prev=exec_prefix ;;
993 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
994 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
995 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000996 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000997
998 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000999 # Obsolete; use --with-gas.
1000 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001001
Martin v. Löwis11437992002-04-12 09:54:03 +00001002 -help | --help | --hel | --he | -h)
1003 ac_init_help=long ;;
1004 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1005 ac_init_help=recursive ;;
1006 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1007 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001008
1009 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001010 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001011 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001012 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001013
Martin v. Löwiseba40652007-08-30 20:10:57 +00001014 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1015 ac_prev=htmldir ;;
1016 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1017 | --ht=*)
1018 htmldir=$ac_optarg ;;
1019
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001020 -includedir | --includedir | --includedi | --included | --include \
1021 | --includ | --inclu | --incl | --inc)
1022 ac_prev=includedir ;;
1023 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1024 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001025 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001026
1027 -infodir | --infodir | --infodi | --infod | --info | --inf)
1028 ac_prev=infodir ;;
1029 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001030 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001031
1032 -libdir | --libdir | --libdi | --libd)
1033 ac_prev=libdir ;;
1034 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001035 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001036
1037 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1038 | --libexe | --libex | --libe)
1039 ac_prev=libexecdir ;;
1040 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1041 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001042 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001043
Martin v. Löwiseba40652007-08-30 20:10:57 +00001044 -localedir | --localedir | --localedi | --localed | --locale)
1045 ac_prev=localedir ;;
1046 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1047 localedir=$ac_optarg ;;
1048
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001049 -localstatedir | --localstatedir | --localstatedi | --localstated \
Martin v. Löwiseba40652007-08-30 20:10:57 +00001050 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001051 ac_prev=localstatedir ;;
1052 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Martin v. Löwiseba40652007-08-30 20:10:57 +00001053 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001054 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001055
1056 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1057 ac_prev=mandir ;;
1058 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001059 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001060
Guido van Rossum7f43da71994-08-01 12:15:30 +00001061 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001062 # Obsolete; use --without-fp.
1063 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001064
1065 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001066 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001067 no_create=yes ;;
1068
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001069 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1070 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1071 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001072
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001073 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1074 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1075 | --oldin | --oldi | --old | --ol | --o)
1076 ac_prev=oldincludedir ;;
1077 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1078 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1079 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001080 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001081
Guido van Rossum7f43da71994-08-01 12:15:30 +00001082 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1083 ac_prev=prefix ;;
1084 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001085 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001086
1087 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1088 | --program-pre | --program-pr | --program-p)
1089 ac_prev=program_prefix ;;
1090 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1091 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001092 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001093
1094 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1095 | --program-suf | --program-su | --program-s)
1096 ac_prev=program_suffix ;;
1097 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1098 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001099 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001100
1101 -program-transform-name | --program-transform-name \
1102 | --program-transform-nam | --program-transform-na \
1103 | --program-transform-n | --program-transform- \
1104 | --program-transform | --program-transfor \
1105 | --program-transfo | --program-transf \
1106 | --program-trans | --program-tran \
1107 | --progr-tra | --program-tr | --program-t)
1108 ac_prev=program_transform_name ;;
1109 -program-transform-name=* | --program-transform-name=* \
1110 | --program-transform-nam=* | --program-transform-na=* \
1111 | --program-transform-n=* | --program-transform-=* \
1112 | --program-transform=* | --program-transfor=* \
1113 | --program-transfo=* | --program-transf=* \
1114 | --program-trans=* | --program-tran=* \
1115 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001116 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001117
Martin v. Löwiseba40652007-08-30 20:10:57 +00001118 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1119 ac_prev=pdfdir ;;
1120 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1121 pdfdir=$ac_optarg ;;
1122
1123 -psdir | --psdir | --psdi | --psd | --ps)
1124 ac_prev=psdir ;;
1125 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1126 psdir=$ac_optarg ;;
1127
Guido van Rossum7f43da71994-08-01 12:15:30 +00001128 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1129 | -silent | --silent | --silen | --sile | --sil)
1130 silent=yes ;;
1131
Benjamin Peterson42e10292016-07-07 00:02:31 -07001132 -runstatedir | --runstatedir | --runstatedi | --runstated \
1133 | --runstate | --runstat | --runsta | --runst | --runs \
1134 | --run | --ru | --r)
1135 ac_prev=runstatedir ;;
1136 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1137 | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1138 | --run=* | --ru=* | --r=*)
1139 runstatedir=$ac_optarg ;;
1140
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001141 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1142 ac_prev=sbindir ;;
1143 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1144 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001145 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001146
1147 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1148 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1149 | --sharedst | --shareds | --shared | --share | --shar \
1150 | --sha | --sh)
1151 ac_prev=sharedstatedir ;;
1152 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1153 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1154 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1155 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001156 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001157
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001158 -site | --site | --sit)
1159 ac_prev=site ;;
1160 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001161 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001162
Guido van Rossum7f43da71994-08-01 12:15:30 +00001163 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1164 ac_prev=srcdir ;;
1165 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001166 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001167
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001168 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1169 | --syscon | --sysco | --sysc | --sys | --sy)
1170 ac_prev=sysconfdir ;;
1171 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1172 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001173 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001174
Guido van Rossum7f43da71994-08-01 12:15:30 +00001175 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001176 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001177 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001178 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001179
1180 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1181 verbose=yes ;;
1182
Martin v. Löwis11437992002-04-12 09:54:03 +00001183 -version | --version | --versio | --versi | --vers | -V)
1184 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001185
1186 -with-* | --with-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001187 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001188 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001189 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001190 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001191 ac_useropt_orig=$ac_useropt
1192 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1193 case $ac_user_opts in
1194 *"
1195"with_$ac_useropt"
1196"*) ;;
1197 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1198 ac_unrecognized_sep=', ';;
1199 esac
1200 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001201
1202 -without-* | --without-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001203 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001204 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001205 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001206 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001207 ac_useropt_orig=$ac_useropt
1208 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1209 case $ac_user_opts in
1210 *"
1211"with_$ac_useropt"
1212"*) ;;
1213 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1214 ac_unrecognized_sep=', ';;
1215 esac
1216 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001217
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001218 --x)
1219 # Obsolete; use --with-x.
1220 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001221
1222 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1223 | --x-incl | --x-inc | --x-in | --x-i)
1224 ac_prev=x_includes ;;
1225 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1226 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001227 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001228
1229 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1230 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1231 ac_prev=x_libraries ;;
1232 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1233 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001234 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001235
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001236 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1237Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001238 ;;
1239
Martin v. Löwis11437992002-04-12 09:54:03 +00001240 *=*)
1241 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1242 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001243 case $ac_envvar in #(
1244 '' | [0-9]* | *[!_$as_cr_alnum]* )
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001245 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001246 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001247 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001248 export $ac_envvar ;;
1249
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001250 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001251 # FIXME: should be removed in autoconf 3.0.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001252 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001253 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001254 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Matthias Klose3cef2a92012-03-14 23:39:33 +01001255 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001256 ;;
1257
1258 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001259done
1260
Guido van Rossum7f43da71994-08-01 12:15:30 +00001261if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001262 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001263 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001264fi
1265
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001266if test -n "$ac_unrecognized_opts"; then
1267 case $enable_option_checking in
1268 no) ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001269 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001270 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1271 esac
1272fi
1273
1274# Check all directory arguments for consistency.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001275for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1276 datadir sysconfdir sharedstatedir localstatedir includedir \
1277 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
Benjamin Peterson42e10292016-07-07 00:02:31 -07001278 libdir localedir mandir runstatedir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001279do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001280 eval ac_val=\$$ac_var
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001281 # Remove trailing slashes.
1282 case $ac_val in
1283 */ )
1284 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1285 eval $ac_var=\$ac_val;;
1286 esac
1287 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001288 case $ac_val in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001289 [\\/$]* | ?:[\\/]* ) continue;;
1290 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001291 esac
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001292 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001293done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001294
Martin v. Löwis11437992002-04-12 09:54:03 +00001295# There might be people who depend on the old broken behavior: `$host'
1296# used to hold the argument of --host etc.
1297# FIXME: To remove some day.
1298build=$build_alias
1299host=$host_alias
1300target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001301
Martin v. Löwis11437992002-04-12 09:54:03 +00001302# FIXME: To remove some day.
1303if test "x$host_alias" != x; then
1304 if test "x$build_alias" = x; then
1305 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001306 elif test "x$build_alias" != "x$host_alias"; then
1307 cross_compiling=yes
1308 fi
1309fi
1310
1311ac_tool_prefix=
1312test -n "$host_alias" && ac_tool_prefix=$host_alias-
1313
1314test "$silent" = yes && exec 6>/dev/null
1315
Guido van Rossum627b2d71993-12-24 10:39:16 +00001316
Martin v. Löwiseba40652007-08-30 20:10:57 +00001317ac_pwd=`pwd` && test -n "$ac_pwd" &&
1318ac_ls_di=`ls -di .` &&
1319ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001320 as_fn_error $? "working directory cannot be determined"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001321test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001322 as_fn_error $? "pwd does not report name of working directory"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001323
1324
Guido van Rossum627b2d71993-12-24 10:39:16 +00001325# Find the source files, if location was not specified.
1326if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001327 ac_srcdir_defaulted=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +00001328 # Try the directory containing this script, then the parent directory.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001329 ac_confdir=`$as_dirname -- "$as_myself" ||
1330$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1331 X"$as_myself" : 'X\(//\)[^/]' \| \
1332 X"$as_myself" : 'X\(//\)$' \| \
1333 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1334$as_echo X"$as_myself" |
Martin v. Löwiseba40652007-08-30 20:10:57 +00001335 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1336 s//\1/
1337 q
1338 }
1339 /^X\(\/\/\)[^/].*/{
1340 s//\1/
1341 q
1342 }
1343 /^X\(\/\/\)$/{
1344 s//\1/
1345 q
1346 }
1347 /^X\(\/\).*/{
1348 s//\1/
1349 q
1350 }
1351 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001352 srcdir=$ac_confdir
Martin v. Löwiseba40652007-08-30 20:10:57 +00001353 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001354 srcdir=..
1355 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001356else
1357 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001358fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001359if test ! -r "$srcdir/$ac_unique_file"; then
1360 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001361 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Brett Cannon19fab762007-06-02 03:02:29 +00001362fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001363ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1364ac_abs_confdir=`(
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001365 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001366 pwd)`
1367# When building in place, set srcdir=.
1368if test "$ac_abs_confdir" = "$ac_pwd"; then
1369 srcdir=.
1370fi
1371# Remove unnecessary trailing slashes from srcdir.
1372# Double slashes in file names in object file debugging info
1373# mess up M-x gdb in Emacs.
1374case $srcdir in
1375*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1376esac
1377for ac_var in $ac_precious_vars; do
1378 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1379 eval ac_env_${ac_var}_value=\$${ac_var}
1380 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1381 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1382done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001383
Martin v. Löwis11437992002-04-12 09:54:03 +00001384#
1385# Report the --help message.
1386#
1387if test "$ac_init_help" = "long"; then
1388 # Omit some internal or obsolete options to make the list less imposing.
1389 # This message is too long to be a string in the A/UX 3.1 sh.
1390 cat <<_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001391\`configure' configures python 2.7 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001392
1393Usage: $0 [OPTION]... [VAR=VALUE]...
1394
1395To assign environment variables (e.g., CC, CFLAGS...), specify them as
1396VAR=VALUE. See below for descriptions of some of the useful variables.
1397
1398Defaults for the options are specified in brackets.
1399
1400Configuration:
1401 -h, --help display this help and exit
1402 --help=short display options specific to this package
1403 --help=recursive display the short help of all the included packages
1404 -V, --version display version information and exit
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001405 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001406 --cache-file=FILE cache test results in FILE [disabled]
1407 -C, --config-cache alias for \`--cache-file=config.cache'
1408 -n, --no-create do not create output files
1409 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1410
Martin v. Löwis11437992002-04-12 09:54:03 +00001411Installation directories:
1412 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001413 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001414 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001415 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001416
1417By default, \`make install' will install all the files in
1418\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1419an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1420for instance \`--prefix=\$HOME'.
1421
1422For better control, use the options below.
1423
1424Fine tuning of the installation directories:
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001425 --bindir=DIR user executables [EPREFIX/bin]
1426 --sbindir=DIR system admin executables [EPREFIX/sbin]
1427 --libexecdir=DIR program executables [EPREFIX/libexec]
1428 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1429 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1430 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
Benjamin Peterson42e10292016-07-07 00:02:31 -07001431 --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001432 --libdir=DIR object code libraries [EPREFIX/lib]
1433 --includedir=DIR C header files [PREFIX/include]
1434 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1435 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1436 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1437 --infodir=DIR info documentation [DATAROOTDIR/info]
1438 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1439 --mandir=DIR man documentation [DATAROOTDIR/man]
1440 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1441 --htmldir=DIR html documentation [DOCDIR]
1442 --dvidir=DIR dvi documentation [DOCDIR]
1443 --pdfdir=DIR pdf documentation [DOCDIR]
1444 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001445_ACEOF
1446
1447 cat <<\_ACEOF
doko@python.orgd65e2ba2013-01-31 23:52:03 +01001448
1449System types:
1450 --build=BUILD configure for building on BUILD [guessed]
1451 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001452_ACEOF
1453fi
1454
1455if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001456 case $ac_init_help in
Martin v. Löwis174440b2008-10-03 08:59:41 +00001457 short | recursive ) echo "Configuration of python 2.7:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001458 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001459 cat <<\_ACEOF
1460
1461Optional Features:
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001462 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001463 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1464 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Brett Cannon91a1dec2008-02-13 19:15:44 +00001465 --enable-universalsdk[=SDKDIR]
Brett Cannon9a8bb0e2008-02-03 02:07:55 +00001466 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001467 --enable-framework[=INSTALLDIR]
1468 Build (MacOSX|Darwin) framework
1469 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001470 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001471 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
1472 --enable-ipv6 Enable ipv6 (with ipv4) support
1473 --disable-ipv6 Disable ipv6 support
Mark Dickinsonefc82f72009-03-20 15:51:55 +00001474 --enable-big-digits[=BITS]
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001475 use big digits for Python longs [[BITS=30]]
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001476 --enable-unicode[=ucs[24]]
Benjamin Peterson66556b02010-05-25 02:23:32 +00001477 Enable Unicode strings (default is ucs2)
Martin v. Löwis11437992002-04-12 09:54:03 +00001478
1479Optional Packages:
1480 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1481 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001482 --with-universal-archs=ARCH
1483 select architectures for universal build ("32-bit",
Ronald Oussoren23d92532009-09-07 06:12:00 +00001484 "64-bit", "3-way", "intel" or "all")
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001485 --with-framework-name=FRAMEWORK
1486 specify an alternate name of the framework built
1487 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001488 --without-gcc never use gcc
Zachary Ware6ed42ea2015-12-21 11:43:03 -06001489 --with-icc build with icc
Martin v. Löwis0f48d982006-04-14 14:34:26 +00001490 --with-cxx-main=<compiler>
1491 compile main() and link python executable with C++
1492 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001493 --with-suffix=.exe set executable suffix
1494 --with-pydebug build with Py_DEBUG defined
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)c543a0f2016-06-02 23:44:40 +00001495 --with-lto Enable Link Time Optimization in PGO builds.
1496 Disabled by default.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001497 --with-libs='lib1 ...' link against additional libs
Benjamin Peterson2c196742009-12-31 03:17:18 +00001498 --with-system-expat build pyexpat module using an installed expat
1499 library
Martin v. Löwis9176fc12006-04-11 11:12:43 +00001500 --with-system-ffi build _ctypes module using an installed ffi library
Ned Deilya2a9f572013-10-25 00:30:10 -07001501 --with-tcltk-includes='-I...'
1502 override search for Tcl and Tk include files
1503 --with-tcltk-libs='-L...'
1504 override search for Tcl and Tk libs
Benjamin Peterson867475c2009-04-29 20:36:25 +00001505 --with-dbmliborder=db1:db2:...
1506 order to check db backends for dbm. Valid value is a
1507 colon separated string with the backend names
1508 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001509 --with-signal-module disable/enable signal module
1510 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1511 --with(out)-threads[=DIRECTORY]
1512 disable/enable thread support
1513 --with(out)-thread[=DIRECTORY]
1514 deprecated; use --with(out)-threads
1515 --with-pth use GNU pth threading libraries
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001516 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001517 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001518 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00001519 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001520 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001521 --with-fpectl enable SIGFPE catching
1522 --with-libm=STRING math library
1523 --with-libc=STRING C library
Benjamin Peterson2c992a02015-05-28 12:45:31 -05001524 --with(out)-computed-gotos
1525 Use computed gotos in evaluation loop (enabled by
1526 default on supported compilers)
Ned Deily3f1d0b32014-11-20 02:11:03 -08001527 --with(out)-ensurepip=[=OPTION]
1528 "install" or "upgrade" using bundled pip, default is
1529 "no"
Martin v. Löwis11437992002-04-12 09:54:03 +00001530
1531Some influential environment variables:
1532 CC C compiler command
1533 CFLAGS C compiler flags
1534 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1535 nonstandard directory <lib dir>
Martin v. Löwiseba40652007-08-30 20:10:57 +00001536 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001537 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Martin v. Löwiseba40652007-08-30 20:10:57 +00001538 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001539 CPP C preprocessor
Benjamin Peterson64e8f6e2014-12-15 00:00:23 -05001540 PKG_CONFIG path to pkg-config utility
1541 PKG_CONFIG_PATH
1542 directories to add to pkg-config's search path
1543 PKG_CONFIG_LIBDIR
1544 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001545
1546Use these variables to override the choices made by `configure' or to help
1547it to find libraries and programs with nonstandard names/locations.
1548
Georg Brandl464432d2009-05-20 18:24:08 +00001549Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001550_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001551ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001552fi
1553
1554if test "$ac_init_help" = "recursive"; then
1555 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001556 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001557 test -d "$ac_dir" ||
1558 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1559 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001560 ac_builddir=.
1561
Martin v. Löwiseba40652007-08-30 20:10:57 +00001562case "$ac_dir" in
1563.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1564*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001565 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001566 # A ".." for each directory in $ac_dir_suffix.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001567 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001568 case $ac_top_builddir_sub in
1569 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1570 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1571 esac ;;
1572esac
1573ac_abs_top_builddir=$ac_pwd
1574ac_abs_builddir=$ac_pwd$ac_dir_suffix
1575# for backward compatibility:
1576ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001577
1578case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001579 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001580 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001581 ac_top_srcdir=$ac_top_builddir_sub
1582 ac_abs_top_srcdir=$ac_pwd ;;
1583 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001584 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001585 ac_top_srcdir=$srcdir
1586 ac_abs_top_srcdir=$srcdir ;;
1587 *) # Relative name.
1588 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1589 ac_top_srcdir=$ac_top_build_prefix$srcdir
1590 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001591esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001592ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001593
Martin v. Löwiseba40652007-08-30 20:10:57 +00001594 cd "$ac_dir" || { ac_status=$?; continue; }
1595 # Check for guested configure.
1596 if test -f "$ac_srcdir/configure.gnu"; then
1597 echo &&
1598 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1599 elif test -f "$ac_srcdir/configure"; then
1600 echo &&
1601 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001602 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001603 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001604 fi || ac_status=$?
1605 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001606 done
1607fi
1608
Martin v. Löwiseba40652007-08-30 20:10:57 +00001609test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001610if $ac_init_version; then
1611 cat <<\_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001612python configure 2.7
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001613generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001614
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001615Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001616This configure script is free software; the Free Software Foundation
1617gives unlimited permission to copy, distribute and modify it.
1618_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001619 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001620fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001621
1622## ------------------------ ##
1623## Autoconf initialization. ##
1624## ------------------------ ##
1625
1626# ac_fn_c_try_compile LINENO
1627# --------------------------
1628# Try to compile conftest.$ac_ext, and return whether this succeeded.
1629ac_fn_c_try_compile ()
1630{
1631 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1632 rm -f conftest.$ac_objext
1633 if { { ac_try="$ac_compile"
1634case "(($ac_try" in
1635 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1636 *) ac_try_echo=$ac_try;;
1637esac
1638eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1639$as_echo "$ac_try_echo"; } >&5
1640 (eval "$ac_compile") 2>conftest.err
1641 ac_status=$?
1642 if test -s conftest.err; then
1643 grep -v '^ *+' conftest.err >conftest.er1
1644 cat conftest.er1 >&5
1645 mv -f conftest.er1 conftest.err
1646 fi
1647 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1648 test $ac_status = 0; } && {
1649 test -z "$ac_c_werror_flag" ||
1650 test ! -s conftest.err
1651 } && test -s conftest.$ac_objext; then :
1652 ac_retval=0
1653else
1654 $as_echo "$as_me: failed program was:" >&5
1655sed 's/^/| /' conftest.$ac_ext >&5
1656
1657 ac_retval=1
1658fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01001659 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001660 as_fn_set_status $ac_retval
1661
1662} # ac_fn_c_try_compile
1663
1664# ac_fn_c_try_cpp LINENO
1665# ----------------------
1666# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1667ac_fn_c_try_cpp ()
1668{
1669 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1670 if { { ac_try="$ac_cpp conftest.$ac_ext"
1671case "(($ac_try" in
1672 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1673 *) ac_try_echo=$ac_try;;
1674esac
1675eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1676$as_echo "$ac_try_echo"; } >&5
1677 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1678 ac_status=$?
1679 if test -s conftest.err; then
1680 grep -v '^ *+' conftest.err >conftest.er1
1681 cat conftest.er1 >&5
1682 mv -f conftest.er1 conftest.err
1683 fi
1684 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001685 test $ac_status = 0; } > conftest.i && {
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001686 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1687 test ! -s conftest.err
1688 }; then :
1689 ac_retval=0
1690else
1691 $as_echo "$as_me: failed program was:" >&5
1692sed 's/^/| /' conftest.$ac_ext >&5
1693
1694 ac_retval=1
1695fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01001696 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001697 as_fn_set_status $ac_retval
1698
1699} # ac_fn_c_try_cpp
1700
1701# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1702# -------------------------------------------------------
1703# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1704# the include files in INCLUDES and setting the cache variable VAR
1705# accordingly.
1706ac_fn_c_check_header_mongrel ()
1707{
1708 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Matthias Klose3cef2a92012-03-14 23:39:33 +01001709 if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001710 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1711$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001712if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001713 $as_echo_n "(cached) " >&6
1714fi
1715eval ac_res=\$$3
1716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1717$as_echo "$ac_res" >&6; }
1718else
1719 # Is the header compilable?
1720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1721$as_echo_n "checking $2 usability... " >&6; }
1722cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1723/* end confdefs.h. */
1724$4
1725#include <$2>
1726_ACEOF
1727if ac_fn_c_try_compile "$LINENO"; then :
1728 ac_header_compiler=yes
1729else
1730 ac_header_compiler=no
1731fi
1732rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1733{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1734$as_echo "$ac_header_compiler" >&6; }
1735
1736# Is the header present?
1737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1738$as_echo_n "checking $2 presence... " >&6; }
1739cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1740/* end confdefs.h. */
1741#include <$2>
1742_ACEOF
1743if ac_fn_c_try_cpp "$LINENO"; then :
1744 ac_header_preproc=yes
1745else
1746 ac_header_preproc=no
1747fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001748rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001749{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1750$as_echo "$ac_header_preproc" >&6; }
1751
1752# So? What about this header?
1753case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1754 yes:no: )
1755 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1756$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1757 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1758$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1759 ;;
1760 no:yes:* )
1761 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1762$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1763 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1764$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1765 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1766$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1767 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1768$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1769 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1770$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001771( $as_echo "## -------------------------------------- ##
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001772## Report this to http://bugs.python.org/ ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001773## -------------------------------------- ##"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001774 ) | sed "s/^/$as_me: WARNING: /" >&2
1775 ;;
1776esac
1777 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1778$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001779if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001780 $as_echo_n "(cached) " >&6
1781else
1782 eval "$3=\$ac_header_compiler"
1783fi
1784eval ac_res=\$$3
1785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1786$as_echo "$ac_res" >&6; }
1787fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01001788 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001789
1790} # ac_fn_c_check_header_mongrel
1791
1792# ac_fn_c_try_run LINENO
1793# ----------------------
1794# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1795# that executables *can* be run.
1796ac_fn_c_try_run ()
1797{
1798 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1799 if { { ac_try="$ac_link"
1800case "(($ac_try" in
1801 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1802 *) ac_try_echo=$ac_try;;
1803esac
1804eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1805$as_echo "$ac_try_echo"; } >&5
1806 (eval "$ac_link") 2>&5
1807 ac_status=$?
1808 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1809 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1810 { { case "(($ac_try" in
1811 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1812 *) ac_try_echo=$ac_try;;
1813esac
1814eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1815$as_echo "$ac_try_echo"; } >&5
1816 (eval "$ac_try") 2>&5
1817 ac_status=$?
1818 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1819 test $ac_status = 0; }; }; then :
1820 ac_retval=0
1821else
1822 $as_echo "$as_me: program exited with status $ac_status" >&5
1823 $as_echo "$as_me: failed program was:" >&5
1824sed 's/^/| /' conftest.$ac_ext >&5
1825
1826 ac_retval=$ac_status
1827fi
1828 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Matthias Klose3cef2a92012-03-14 23:39:33 +01001829 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001830 as_fn_set_status $ac_retval
1831
1832} # ac_fn_c_try_run
1833
1834# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1835# -------------------------------------------------------
1836# Tests whether HEADER exists and can be compiled using the include files in
1837# INCLUDES, setting the cache variable VAR accordingly.
1838ac_fn_c_check_header_compile ()
1839{
1840 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1841 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1842$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001843if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001844 $as_echo_n "(cached) " >&6
1845else
1846 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1847/* end confdefs.h. */
1848$4
1849#include <$2>
1850_ACEOF
1851if ac_fn_c_try_compile "$LINENO"; then :
1852 eval "$3=yes"
1853else
1854 eval "$3=no"
1855fi
1856rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1857fi
1858eval ac_res=\$$3
1859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1860$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001861 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001862
1863} # ac_fn_c_check_header_compile
1864
1865# ac_fn_c_try_link LINENO
1866# -----------------------
1867# Try to link conftest.$ac_ext, and return whether this succeeded.
1868ac_fn_c_try_link ()
1869{
1870 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1871 rm -f conftest.$ac_objext conftest$ac_exeext
1872 if { { ac_try="$ac_link"
1873case "(($ac_try" in
1874 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1875 *) ac_try_echo=$ac_try;;
1876esac
1877eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1878$as_echo "$ac_try_echo"; } >&5
1879 (eval "$ac_link") 2>conftest.err
1880 ac_status=$?
1881 if test -s conftest.err; then
1882 grep -v '^ *+' conftest.err >conftest.er1
1883 cat conftest.er1 >&5
1884 mv -f conftest.er1 conftest.err
1885 fi
1886 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1887 test $ac_status = 0; } && {
1888 test -z "$ac_c_werror_flag" ||
1889 test ! -s conftest.err
1890 } && test -s conftest$ac_exeext && {
1891 test "$cross_compiling" = yes ||
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001892 test -x conftest$ac_exeext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001893 }; then :
1894 ac_retval=0
1895else
1896 $as_echo "$as_me: failed program was:" >&5
1897sed 's/^/| /' conftest.$ac_ext >&5
1898
1899 ac_retval=1
1900fi
1901 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1902 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1903 # interfere with the next link command; also delete a directory that is
1904 # left behind by Apple's compiler. We do this before executing the actions.
1905 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Matthias Klose3cef2a92012-03-14 23:39:33 +01001906 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001907 as_fn_set_status $ac_retval
1908
1909} # ac_fn_c_try_link
1910
1911# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1912# -------------------------------------------
1913# Tests whether TYPE exists after having included INCLUDES, setting cache
1914# variable VAR accordingly.
1915ac_fn_c_check_type ()
1916{
1917 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1918 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1919$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001920if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001921 $as_echo_n "(cached) " >&6
1922else
1923 eval "$3=no"
1924 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1925/* end confdefs.h. */
1926$4
1927int
1928main ()
1929{
1930if (sizeof ($2))
1931 return 0;
1932 ;
1933 return 0;
1934}
1935_ACEOF
1936if ac_fn_c_try_compile "$LINENO"; then :
1937 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1938/* end confdefs.h. */
1939$4
1940int
1941main ()
1942{
1943if (sizeof (($2)))
1944 return 0;
1945 ;
1946 return 0;
1947}
1948_ACEOF
1949if ac_fn_c_try_compile "$LINENO"; then :
1950
1951else
1952 eval "$3=yes"
1953fi
1954rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1955fi
1956rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1957fi
1958eval ac_res=\$$3
1959 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1960$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001961 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001962
1963} # ac_fn_c_check_type
1964
1965# ac_fn_c_find_uintX_t LINENO BITS VAR
1966# ------------------------------------
1967# Finds an unsigned integer type with width BITS, setting cache variable VAR
1968# accordingly.
1969ac_fn_c_find_uintX_t ()
1970{
1971 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1972 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1973$as_echo_n "checking for uint$2_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001974if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001975 $as_echo_n "(cached) " >&6
1976else
1977 eval "$3=no"
1978 # Order is important - never check a type that is potentially smaller
1979 # than half of the expected target width.
1980 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1981 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1982 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1983/* end confdefs.h. */
1984$ac_includes_default
1985int
1986main ()
1987{
1988static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001989test_array [0] = 0;
1990return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001991
1992 ;
1993 return 0;
1994}
1995_ACEOF
1996if ac_fn_c_try_compile "$LINENO"; then :
1997 case $ac_type in #(
1998 uint$2_t) :
1999 eval "$3=yes" ;; #(
2000 *) :
2001 eval "$3=\$ac_type" ;;
2002esac
2003fi
2004rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002005 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002006
2007else
2008 break
2009fi
2010 done
2011fi
2012eval ac_res=\$$3
2013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2014$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002015 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002016
2017} # ac_fn_c_find_uintX_t
2018
2019# ac_fn_c_find_intX_t LINENO BITS VAR
2020# -----------------------------------
2021# Finds a signed integer type with width BITS, setting cache variable VAR
2022# accordingly.
2023ac_fn_c_find_intX_t ()
2024{
2025 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2026 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
2027$as_echo_n "checking for int$2_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002028if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002029 $as_echo_n "(cached) " >&6
2030else
2031 eval "$3=no"
2032 # Order is important - never check a type that is potentially smaller
2033 # than half of the expected target width.
2034 for ac_type in int$2_t 'int' 'long int' \
2035 'long long int' 'short int' 'signed char'; do
2036 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2037/* end confdefs.h. */
2038$ac_includes_default
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002039 enum { N = $2 / 2 - 1 };
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002040int
2041main ()
2042{
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002043static 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 +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 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2053/* end confdefs.h. */
2054$ac_includes_default
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002055 enum { N = $2 / 2 - 1 };
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002056int
2057main ()
2058{
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002059static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002060 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002061test_array [0] = 0;
2062return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002063
2064 ;
2065 return 0;
2066}
2067_ACEOF
2068if ac_fn_c_try_compile "$LINENO"; then :
2069
2070else
2071 case $ac_type in #(
2072 int$2_t) :
2073 eval "$3=yes" ;; #(
2074 *) :
2075 eval "$3=\$ac_type" ;;
2076esac
2077fi
2078rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2079fi
2080rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002081 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002082
2083else
2084 break
2085fi
2086 done
2087fi
2088eval ac_res=\$$3
2089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2090$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002091 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002092
2093} # ac_fn_c_find_intX_t
2094
2095# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2096# --------------------------------------------
2097# Tries to find the compile-time value of EXPR in a program that includes
2098# INCLUDES, setting VAR accordingly. Returns whether the value could be
2099# computed
2100ac_fn_c_compute_int ()
2101{
2102 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2103 if test "$cross_compiling" = yes; then
2104 # Depending upon the size, compute the lo and hi bounds.
2105cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2106/* end confdefs.h. */
2107$4
2108int
2109main ()
2110{
2111static int test_array [1 - 2 * !(($2) >= 0)];
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_lo=0 ac_mid=0
2121 while :; do
2122 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2123/* end confdefs.h. */
2124$4
2125int
2126main ()
2127{
2128static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002129test_array [0] = 0;
2130return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002131
2132 ;
2133 return 0;
2134}
2135_ACEOF
2136if ac_fn_c_try_compile "$LINENO"; then :
2137 ac_hi=$ac_mid; break
2138else
2139 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2140 if test $ac_lo -le $ac_mid; then
2141 ac_lo= ac_hi=
2142 break
2143 fi
2144 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2145fi
2146rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2147 done
2148else
2149 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2150/* end confdefs.h. */
2151$4
2152int
2153main ()
2154{
2155static int test_array [1 - 2 * !(($2) < 0)];
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_hi=-1 ac_mid=-1
2165 while :; do
2166 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2167/* end confdefs.h. */
2168$4
2169int
2170main ()
2171{
2172static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002173test_array [0] = 0;
2174return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002175
2176 ;
2177 return 0;
2178}
2179_ACEOF
2180if ac_fn_c_try_compile "$LINENO"; then :
2181 ac_lo=$ac_mid; break
2182else
2183 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2184 if test $ac_mid -le $ac_hi; then
2185 ac_lo= ac_hi=
2186 break
2187 fi
2188 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2189fi
2190rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2191 done
2192else
2193 ac_lo= ac_hi=
2194fi
2195rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2196fi
2197rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2198# Binary search between lo and hi bounds.
2199while test "x$ac_lo" != "x$ac_hi"; do
2200 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2201 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2202/* end confdefs.h. */
2203$4
2204int
2205main ()
2206{
2207static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002208test_array [0] = 0;
2209return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002210
2211 ;
2212 return 0;
2213}
2214_ACEOF
2215if ac_fn_c_try_compile "$LINENO"; then :
2216 ac_hi=$ac_mid
2217else
2218 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2219fi
2220rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2221done
2222case $ac_lo in #((
2223?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2224'') ac_retval=1 ;;
2225esac
2226 else
2227 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2228/* end confdefs.h. */
2229$4
2230static long int longval () { return $2; }
2231static unsigned long int ulongval () { return $2; }
2232#include <stdio.h>
2233#include <stdlib.h>
2234int
2235main ()
2236{
2237
2238 FILE *f = fopen ("conftest.val", "w");
2239 if (! f)
2240 return 1;
2241 if (($2) < 0)
2242 {
2243 long int i = longval ();
2244 if (i != ($2))
2245 return 1;
2246 fprintf (f, "%ld", i);
2247 }
2248 else
2249 {
2250 unsigned long int i = ulongval ();
2251 if (i != ($2))
2252 return 1;
2253 fprintf (f, "%lu", i);
2254 }
2255 /* Do not output a trailing newline, as this causes \r\n confusion
2256 on some platforms. */
2257 return ferror (f) || fclose (f) != 0;
2258
2259 ;
2260 return 0;
2261}
2262_ACEOF
2263if ac_fn_c_try_run "$LINENO"; then :
2264 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2265else
2266 ac_retval=1
2267fi
2268rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2269 conftest.$ac_objext conftest.beam conftest.$ac_ext
2270rm -f conftest.val
2271
2272 fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01002273 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002274 as_fn_set_status $ac_retval
2275
2276} # ac_fn_c_compute_int
2277
2278# ac_fn_c_check_func LINENO FUNC VAR
2279# ----------------------------------
2280# Tests whether FUNC exists, setting the cache variable VAR accordingly
2281ac_fn_c_check_func ()
2282{
2283 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2284 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2285$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002286if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002287 $as_echo_n "(cached) " >&6
2288else
2289 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2290/* end confdefs.h. */
2291/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2292 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2293#define $2 innocuous_$2
2294
2295/* System header to define __stub macros and hopefully few prototypes,
2296 which can conflict with char $2 (); below.
2297 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2298 <limits.h> exists even on freestanding compilers. */
2299
2300#ifdef __STDC__
2301# include <limits.h>
2302#else
2303# include <assert.h>
2304#endif
2305
2306#undef $2
2307
2308/* Override any GCC internal prototype to avoid an error.
2309 Use char because int might match the return type of a GCC
2310 builtin and then its argument prototype would still apply. */
2311#ifdef __cplusplus
2312extern "C"
2313#endif
2314char $2 ();
2315/* The GNU C library defines this for functions which it implements
2316 to always fail with ENOSYS. Some functions are actually named
2317 something starting with __ and the normal name is an alias. */
2318#if defined __stub_$2 || defined __stub___$2
2319choke me
2320#endif
2321
2322int
2323main ()
2324{
2325return $2 ();
2326 ;
2327 return 0;
2328}
2329_ACEOF
2330if ac_fn_c_try_link "$LINENO"; then :
2331 eval "$3=yes"
2332else
2333 eval "$3=no"
2334fi
2335rm -f core conftest.err conftest.$ac_objext \
2336 conftest$ac_exeext conftest.$ac_ext
2337fi
2338eval ac_res=\$$3
2339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2340$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002341 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002342
2343} # ac_fn_c_check_func
2344
2345# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2346# ----------------------------------------------------
2347# Tries to find if the field MEMBER exists in type AGGR, after including
2348# INCLUDES, setting cache variable VAR accordingly.
2349ac_fn_c_check_member ()
2350{
2351 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2352 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2353$as_echo_n "checking for $2.$3... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002354if eval \${$4+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002355 $as_echo_n "(cached) " >&6
2356else
2357 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2358/* end confdefs.h. */
2359$5
2360int
2361main ()
2362{
2363static $2 ac_aggr;
2364if (ac_aggr.$3)
2365return 0;
2366 ;
2367 return 0;
2368}
2369_ACEOF
2370if ac_fn_c_try_compile "$LINENO"; then :
2371 eval "$4=yes"
2372else
2373 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2374/* end confdefs.h. */
2375$5
2376int
2377main ()
2378{
2379static $2 ac_aggr;
2380if (sizeof ac_aggr.$3)
2381return 0;
2382 ;
2383 return 0;
2384}
2385_ACEOF
2386if ac_fn_c_try_compile "$LINENO"; then :
2387 eval "$4=yes"
2388else
2389 eval "$4=no"
2390fi
2391rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2392fi
2393rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2394fi
2395eval ac_res=\$$4
2396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2397$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002398 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002399
2400} # ac_fn_c_check_member
2401
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002402# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2403# ---------------------------------------------
2404# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2405# accordingly.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002406ac_fn_c_check_decl ()
2407{
2408 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002409 as_decl_name=`echo $2|sed 's/ *(.*//'`
2410 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2411 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2412$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002413if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002414 $as_echo_n "(cached) " >&6
2415else
2416 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2417/* end confdefs.h. */
2418$4
2419int
2420main ()
2421{
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002422#ifndef $as_decl_name
2423#ifdef __cplusplus
2424 (void) $as_decl_use;
2425#else
2426 (void) $as_decl_name;
2427#endif
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002428#endif
2429
2430 ;
2431 return 0;
2432}
2433_ACEOF
2434if ac_fn_c_try_compile "$LINENO"; then :
2435 eval "$3=yes"
2436else
2437 eval "$3=no"
2438fi
2439rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2440fi
2441eval ac_res=\$$3
2442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2443$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002444 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002445
2446} # ac_fn_c_check_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +00002447cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002448This file contains any messages produced by compilers while
2449running configure, to aid debugging if configure makes a mistake.
2450
Martin v. Löwis174440b2008-10-03 08:59:41 +00002451It was created by python $as_me 2.7, which was
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002452generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002453
2454 $ $0 $@
2455
2456_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00002457exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002458{
2459cat <<_ASUNAME
2460## --------- ##
2461## Platform. ##
2462## --------- ##
2463
2464hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2465uname -m = `(uname -m) 2>/dev/null || echo unknown`
2466uname -r = `(uname -r) 2>/dev/null || echo unknown`
2467uname -s = `(uname -s) 2>/dev/null || echo unknown`
2468uname -v = `(uname -v) 2>/dev/null || echo unknown`
2469
2470/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2471/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2472
2473/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2474/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2475/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Martin v. Löwiseba40652007-08-30 20:10:57 +00002476/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002477/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2478/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2479/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2480
2481_ASUNAME
2482
2483as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2484for as_dir in $PATH
2485do
2486 IFS=$as_save_IFS
2487 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002488 $as_echo "PATH: $as_dir"
2489 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002490IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002491
2492} >&5
2493
2494cat >&5 <<_ACEOF
2495
2496
2497## ----------- ##
2498## Core tests. ##
2499## ----------- ##
2500
2501_ACEOF
2502
2503
2504# Keep a trace of the command line.
2505# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002506# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002507# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002508# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002509ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002510ac_configure_args0=
2511ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002512ac_must_keep_next=false
2513for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002514do
Skip Montanaro6dead952003-09-25 14:50:04 +00002515 for ac_arg
2516 do
2517 case $ac_arg in
2518 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2519 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2520 | -silent | --silent | --silen | --sile | --sil)
2521 continue ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002522 *\'*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002523 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002524 esac
2525 case $ac_pass in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002526 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002527 2)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002528 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002529 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002530 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002531 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002532 case $ac_arg in
2533 *=* | --config-cache | -C | -disable-* | --disable-* \
2534 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2535 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2536 | -with-* | --with-* | -without-* | --without-* | --x)
2537 case "$ac_configure_args0 " in
2538 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2539 esac
2540 ;;
2541 -* ) ac_must_keep_next=true ;;
2542 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002543 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002544 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002545 ;;
2546 esac
2547 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002548done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002549{ ac_configure_args0=; unset ac_configure_args0;}
2550{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002551
2552# When interrupted or exit'd, cleanup temporary files, and complete
2553# config.log. We remove comments because anyway the quotes in there
2554# would cause problems or look ugly.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002555# WARNING: Use '\'' to represent an apostrophe within the trap.
2556# 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 +00002557trap 'exit_status=$?
2558 # Save into config.log some information that might help in debugging.
2559 {
2560 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002561
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002562 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002563## Cache variables. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002564## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002565 echo
2566 # The following way of writing the cache mishandles newlines in values,
Martin v. Löwiseba40652007-08-30 20:10:57 +00002567(
2568 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2569 eval ac_val=\$$ac_var
2570 case $ac_val in #(
2571 *${as_nl}*)
2572 case $ac_var in #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002573 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2574$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002575 esac
2576 case $ac_var in #(
2577 _ | IFS | as_nl) ;; #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002578 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2579 *) { eval $ac_var=; unset $ac_var;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002580 esac ;;
2581 esac
2582 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002583 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +00002584 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2585 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002586 sed -n \
Martin v. Löwiseba40652007-08-30 20:10:57 +00002587 "s/'\''/'\''\\\\'\'''\''/g;
2588 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2589 ;; #(
Skip Montanaro89e975f2007-08-22 19:05:21 +00002590 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00002591 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaro89e975f2007-08-22 19:05:21 +00002592 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002593 esac |
2594 sort
2595)
Martin v. Löwis11437992002-04-12 09:54:03 +00002596 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002597
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002598 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002599## Output variables. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002600## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002601 echo
2602 for ac_var in $ac_subst_vars
2603 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002604 eval ac_val=\$$ac_var
2605 case $ac_val in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002606 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002607 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002608 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002609 done | sort
2610 echo
2611
2612 if test -n "$ac_subst_files"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002613 $as_echo "## ------------------- ##
Martin v. Löwiseba40652007-08-30 20:10:57 +00002614## File substitutions. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002615## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002616 echo
2617 for ac_var in $ac_subst_files
2618 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002619 eval ac_val=\$$ac_var
2620 case $ac_val in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002621 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002622 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002623 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002624 done | sort
2625 echo
2626 fi
2627
Martin v. Löwis11437992002-04-12 09:54:03 +00002628 if test -s confdefs.h; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002629 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002630## confdefs.h. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002631## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002632 echo
Martin v. Löwiseba40652007-08-30 20:10:57 +00002633 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002634 echo
2635 fi
2636 test "$ac_signal" != 0 &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002637 $as_echo "$as_me: caught signal $ac_signal"
2638 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002639 } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002640 rm -f core *.core core.conftest.* &&
2641 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002642 exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +00002643' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002644for ac_signal in 1 2 13 15; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002645 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002646done
2647ac_signal=0
2648
2649# confdefs.h avoids OS command line length limits that DEFS can exceed.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002650rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002651
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002652$as_echo "/* confdefs.h */" > confdefs.h
2653
Martin v. Löwis11437992002-04-12 09:54:03 +00002654# Predefined preprocessor variables.
2655
2656cat >>confdefs.h <<_ACEOF
2657#define PACKAGE_NAME "$PACKAGE_NAME"
2658_ACEOF
2659
Martin v. Löwis11437992002-04-12 09:54:03 +00002660cat >>confdefs.h <<_ACEOF
2661#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2662_ACEOF
2663
Martin v. Löwis11437992002-04-12 09:54:03 +00002664cat >>confdefs.h <<_ACEOF
2665#define PACKAGE_VERSION "$PACKAGE_VERSION"
2666_ACEOF
2667
Martin v. Löwis11437992002-04-12 09:54:03 +00002668cat >>confdefs.h <<_ACEOF
2669#define PACKAGE_STRING "$PACKAGE_STRING"
2670_ACEOF
2671
Martin v. Löwis11437992002-04-12 09:54:03 +00002672cat >>confdefs.h <<_ACEOF
2673#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2674_ACEOF
2675
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002676cat >>confdefs.h <<_ACEOF
2677#define PACKAGE_URL "$PACKAGE_URL"
2678_ACEOF
2679
Martin v. Löwis11437992002-04-12 09:54:03 +00002680
2681# Let the site file select an alternate cache file if it wants to.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002682# Prefer an explicitly selected file to automatically selected ones.
2683ac_site_file1=NONE
2684ac_site_file2=NONE
Martin v. Löwiseba40652007-08-30 20:10:57 +00002685if test -n "$CONFIG_SITE"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002686 # We do not want a PATH search for config.site.
2687 case $CONFIG_SITE in #((
2688 -*) ac_site_file1=./$CONFIG_SITE;;
2689 */*) ac_site_file1=$CONFIG_SITE;;
2690 *) ac_site_file1=./$CONFIG_SITE;;
2691 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00002692elif test "x$prefix" != xNONE; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002693 ac_site_file1=$prefix/share/config.site
2694 ac_site_file2=$prefix/etc/config.site
Martin v. Löwiseba40652007-08-30 20:10:57 +00002695else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002696 ac_site_file1=$ac_default_prefix/share/config.site
2697 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002698fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002699for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Martin v. Löwiseba40652007-08-30 20:10:57 +00002700do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002701 test "x$ac_site_file" = xNONE && continue
2702 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2703 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2704$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002705 sed 's/^/| /' "$ac_site_file" >&5
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002706 . "$ac_site_file" \
2707 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2708$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2709as_fn_error $? "failed to load site script $ac_site_file
Matthias Klose3cef2a92012-03-14 23:39:33 +01002710See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002711 fi
2712done
2713
2714if test -r "$cache_file"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002715 # Some versions of bash will fail to source /dev/null (special files
2716 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2717 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2718 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2719$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002720 case $cache_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00002721 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2722 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002723 esac
2724 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002725else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002726 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2727$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002728 >$cache_file
2729fi
2730
2731# Check that the precious variables saved in the cache have kept the same
2732# value.
2733ac_cache_corrupted=false
Martin v. Löwiseba40652007-08-30 20:10:57 +00002734for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002735 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2736 eval ac_new_set=\$ac_env_${ac_var}_set
Martin v. Löwiseba40652007-08-30 20:10:57 +00002737 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2738 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002739 case $ac_old_set,$ac_new_set in
2740 set,)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002741 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2742$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 +00002743 ac_cache_corrupted=: ;;
2744 ,set)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002745 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2746$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002747 ac_cache_corrupted=: ;;
2748 ,);;
2749 *)
2750 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002751 # differences in whitespace do not lead to failure.
2752 ac_old_val_w=`echo x $ac_old_val`
2753 ac_new_val_w=`echo x $ac_new_val`
2754 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2755 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2756$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2757 ac_cache_corrupted=:
2758 else
2759 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2760$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2761 eval $ac_var=\$ac_old_val
2762 fi
2763 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2764$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2765 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2766$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002767 fi;;
2768 esac
2769 # Pass precious variables to config.status.
2770 if test "$ac_new_set" = set; then
2771 case $ac_new_val in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002772 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002773 *) ac_arg=$ac_var=$ac_new_val ;;
2774 esac
2775 case " $ac_configure_args " in
2776 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002777 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002778 esac
2779 fi
2780done
2781if $ac_cache_corrupted; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002782 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2783$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2784 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2785$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002786 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002787fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002788## -------------------- ##
2789## Main body of script. ##
2790## -------------------- ##
Martin v. Löwiseba40652007-08-30 20:10:57 +00002791
Guido van Rossum7f43da71994-08-01 12:15:30 +00002792ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002793ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002794ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2795ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2796ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002797
Guido van Rossum627b2d71993-12-24 10:39:16 +00002798
Michael W. Hudson54241132001-12-07 15:38:26 +00002799
Martin v. Löwiseba40652007-08-30 20:10:57 +00002800ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002801
2802
Benjamin Peterson42e10292016-07-07 00:02:31 -07002803
doko@python.orgd65e2ba2013-01-31 23:52:03 +01002804ac_aux_dir=
2805for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2806 if test -f "$ac_dir/install-sh"; then
2807 ac_aux_dir=$ac_dir
2808 ac_install_sh="$ac_aux_dir/install-sh -c"
2809 break
2810 elif test -f "$ac_dir/install.sh"; then
2811 ac_aux_dir=$ac_dir
2812 ac_install_sh="$ac_aux_dir/install.sh -c"
2813 break
2814 elif test -f "$ac_dir/shtool"; then
2815 ac_aux_dir=$ac_dir
2816 ac_install_sh="$ac_aux_dir/shtool install -c"
2817 break
2818 fi
2819done
2820if test -z "$ac_aux_dir"; then
2821 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2822fi
2823
2824# These three variables are undocumented and unsupported,
2825# and are intended to be withdrawn in a future Autoconf release.
2826# They can cause serious problems if a builder's source tree is in a directory
2827# whose full name contains unusual characters.
2828ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2829ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2830ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2831
2832
2833# Make sure we can run config.sub.
2834$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2835 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2836
2837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2838$as_echo_n "checking build system type... " >&6; }
2839if ${ac_cv_build+:} false; then :
2840 $as_echo_n "(cached) " >&6
2841else
2842 ac_build_alias=$build_alias
2843test "x$ac_build_alias" = x &&
2844 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2845test "x$ac_build_alias" = x &&
2846 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2847ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2848 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2849
2850fi
2851{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2852$as_echo "$ac_cv_build" >&6; }
2853case $ac_cv_build in
2854*-*-*) ;;
2855*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2856esac
2857build=$ac_cv_build
2858ac_save_IFS=$IFS; IFS='-'
2859set x $ac_cv_build
2860shift
2861build_cpu=$1
2862build_vendor=$2
2863shift; shift
2864# Remember, the first character of IFS is used to create $*,
2865# except with old shells:
2866build_os=$*
2867IFS=$ac_save_IFS
2868case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2869
2870
2871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2872$as_echo_n "checking host system type... " >&6; }
2873if ${ac_cv_host+:} false; then :
2874 $as_echo_n "(cached) " >&6
2875else
2876 if test "x$host_alias" = x; then
2877 ac_cv_host=$ac_cv_build
2878else
2879 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2880 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2881fi
2882
2883fi
2884{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2885$as_echo "$ac_cv_host" >&6; }
2886case $ac_cv_host in
2887*-*-*) ;;
2888*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2889esac
2890host=$ac_cv_host
2891ac_save_IFS=$IFS; IFS='-'
2892set x $ac_cv_host
2893shift
2894host_cpu=$1
2895host_vendor=$2
2896shift; shift
2897# Remember, the first character of IFS is used to create $*,
2898# except with old shells:
2899host_os=$*
2900IFS=$ac_save_IFS
2901case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2902
2903
2904
2905
2906
Ned Deily983df862014-08-22 13:30:59 -07002907# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2908rm -f pybuilddir.txt
2909
doko@python.orgd65e2ba2013-01-31 23:52:03 +01002910if test "$cross_compiling" = yes; then
2911 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2912$as_echo_n "checking for python interpreter for cross build... " >&6; }
2913 if test -z "$PYTHON_FOR_BUILD"; then
2914 for interp in python$PACKAGE_VERSION python2 python; do
2915 which $interp >/dev/null 2>&1 || continue
2916 if $interp -c 'import sys;sys.exit(not (sys.version_info[:2] >= (2,7) and sys.version_info[0] < 3))'; then
2917 break
2918 fi
2919 interp=
2920 done
2921 if test x$interp = x; then
2922 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2923 fi
2924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2925$as_echo "$interp" >&6; }
doko@ubuntu.coma50b0de2015-04-13 21:55:59 +02002926 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 +01002927 fi
Martin Panter801110b2016-07-28 01:28:27 +00002928 PGEN_DEPENDENCY=''
doko@python.orgd65e2ba2013-01-31 23:52:03 +01002929elif test "$cross_compiling" = maybe; then
2930 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
2931else
2932 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
Martin Panter801110b2016-07-28 01:28:27 +00002933 PGEN_DEPENDENCY='$(PGEN)'
doko@python.orgd65e2ba2013-01-31 23:52:03 +01002934fi
2935
2936
Martin v. Löwis11437992002-04-12 09:54:03 +00002937
Martin Panter801110b2016-07-28 01:28:27 +00002938
Georg Brandlbcd64a32009-03-31 21:45:18 +00002939if test "$prefix" != "/"; then
2940 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2941fi
2942
2943
Martin v. Löwis11437992002-04-12 09:54:03 +00002944
2945
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002946# We don't use PACKAGE_ variables, and they cause conflicts
2947# with other autoconf-based packages that include Python.h
2948grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2949rm confdefs.h
2950mv confdefs.h.new confdefs.h
2951
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002952
Martin v. Löwis174440b2008-10-03 08:59:41 +00002953VERSION=2.7
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002954
Martin v. Löwis1142de32002-03-29 16:28:31 +00002955
2956SOVERSION=1.0
2957
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002958# The later defininition of _XOPEN_SOURCE disables certain features
2959# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2960
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002961$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002962
2963
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002964# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2965# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2966# them.
2967
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002968$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002969
2970
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002971# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2972# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2973# them.
2974
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002975$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002976
2977
Martin v. Löwisd6320502004-08-12 13:45:08 +00002978# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2979# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2980
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002981$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002982
2983
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002984# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2985# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2986# them.
2987
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002988$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002989
2990
2991
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002992define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002993
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002994# Arguments passed to configure.
2995
2996CONFIG_ARGS="$ac_configure_args"
2997
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
2999$as_echo_n "checking for --enable-universalsdk... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003000# Check whether --enable-universalsdk was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003001if test "${enable_universalsdk+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003002 enableval=$enable_universalsdk;
Ronald Oussoren988117f2006-04-29 11:31:35 +00003003 case $enableval in
3004 yes)
3005 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003006 if test ! -d "${enableval}"
3007 then
3008 enableval=/
3009 fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00003010 ;;
3011 esac
3012 case $enableval in
3013 no)
3014 UNIVERSALSDK=
3015 enable_universalsdk=
3016 ;;
3017 *)
3018 UNIVERSALSDK=$enableval
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003019 if test ! -d "${UNIVERSALSDK}"
3020 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003021 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003022 fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00003023 ;;
3024 esac
3025
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003026
Ronald Oussoren988117f2006-04-29 11:31:35 +00003027else
3028
3029 UNIVERSALSDK=
3030 enable_universalsdk=
3031
Martin v. Löwiseba40652007-08-30 20:10:57 +00003032fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00003033
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003034if test -n "${UNIVERSALSDK}"
3035then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3037$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003038else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3040$as_echo "no" >&6; }
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003041fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00003042
Martin v. Löwiseba40652007-08-30 20:10:57 +00003043
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +00003044
Ned Deily8e60f6e2013-05-30 00:14:29 -07003045ARCH_RUN_32BIT=""
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +00003046
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003047UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren92919a62009-12-24 13:30:58 +00003048
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3050$as_echo_n "checking for --with-universal-archs... " >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003051
3052# Check whether --with-universal-archs was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003053if test "${with_universal_archs+set}" = set; then :
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003054 withval=$with_universal_archs;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
3056$as_echo "$withval" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003057 UNIVERSAL_ARCHS="$withval"
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00003058 if test "${enable_universalsdk}" ; then
3059 :
3060 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003061 as_fn_error $? "--with-universal-archs without --enable-universalsdk. See Mac/README" "$LINENO" 5
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00003062 fi
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003063
3064else
3065
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 32-bit" >&5
3067$as_echo "32-bit" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003068
3069fi
3070
3071
3072
3073
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003074
3075# Check whether --with-framework-name was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003076if test "${with_framework_name+set}" = set; then :
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003077 withval=$with_framework_name;
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00003078 if test "${enable_framework}"; then
3079 :
3080 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003081 as_fn_error $? "--with-framework-name without --enable-framework. See Mac/README" "$LINENO" 5
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00003082 fi
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003083 PYTHONFRAMEWORK=${withval}
3084 PYTHONFRAMEWORKDIR=${withval}.framework
3085 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3086
3087else
3088
3089 PYTHONFRAMEWORK=Python
3090 PYTHONFRAMEWORKDIR=Python.framework
3091 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3092
3093fi
3094
Martin v. Löwiseba40652007-08-30 20:10:57 +00003095# Check whether --enable-framework was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003096if test "${enable_framework+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003097 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003098 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003099 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003100 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003101 esac
3102 case $enableval in
3103 no)
3104 PYTHONFRAMEWORK=
3105 PYTHONFRAMEWORKDIR=no-framework
3106 PYTHONFRAMEWORKPREFIX=
3107 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003108 FRAMEWORKINSTALLFIRST=
3109 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00003110 FRAMEWORKALTINSTALLFIRST=
3111 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00003112 if test "x${prefix}" = "xNONE"; then
3113 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3114 else
3115 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3116 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003117 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003118 ;;
3119 *)
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003120 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003121 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003122 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003123 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure bininstall maninstall"
Ronald Oussoren92919a62009-12-24 13:30:58 +00003124 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3125 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003126 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003127
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00003128 if test "x${prefix}" = "xNONE" ; then
3129 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003130
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00003131 else
3132 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3133 fi
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003134
3135 case "${enableval}" in
3136 /System*)
3137 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3138 if test "${prefix}" = "NONE" ; then
3139 # See below
3140 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3141 fi
3142 ;;
3143
3144 /Library*)
3145 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3146 ;;
3147
3148 */Library/Frameworks)
3149 MDIR="`dirname "${enableval}"`"
3150 MDIR="`dirname "${MDIR}"`"
3151 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3152
3153 if test "${prefix}" = "NONE"; then
3154 # User hasn't specified the
3155 # --prefix option, but wants to install
3156 # the framework in a non-default location,
3157 # ensure that the compatibility links get
3158 # installed relative to that prefix as well
3159 # instead of in /usr/local.
3160 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3161 fi
3162 ;;
3163
3164 *)
3165 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3166 ;;
3167 esac
3168
Jack Jansen127e56e2001-09-11 14:41:54 +00003169 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Ronald Oussoren836b0392006-05-14 19:56:34 +00003170
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003171 # Add files for Mac specific code to the list of output
Ronald Oussoren836b0392006-05-14 19:56:34 +00003172 # files:
Martin v. Löwiseba40652007-08-30 20:10:57 +00003173 ac_config_files="$ac_config_files Mac/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00003174
Martin v. Löwiseba40652007-08-30 20:10:57 +00003175 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00003176
Martin v. Löwiseba40652007-08-30 20:10:57 +00003177 ac_config_files="$ac_config_files Mac/IDLE/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00003178
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003179 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3180
3181 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3182
Jack Jansene578a632001-08-15 01:27:14 +00003183 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003184
Guido van Rossum563e7081996-09-10 18:20:48 +00003185else
Martin v. Löwis11437992002-04-12 09:54:03 +00003186
Jack Jansene578a632001-08-15 01:27:14 +00003187 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003188 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003189 PYTHONFRAMEWORKPREFIX=
3190 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003191 FRAMEWORKINSTALLFIRST=
3192 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00003193 FRAMEWORKALTINSTALLFIRST=
3194 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00003195 if test "x${prefix}" = "xNONE" ; then
3196 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3197 else
3198 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3199 fi
Jack Jansene578a632001-08-15 01:27:14 +00003200 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003201
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003202
Martin v. Löwiseba40652007-08-30 20:10:57 +00003203fi
3204
Michael W. Hudson54241132001-12-07 15:38:26 +00003205
3206
3207
3208
Jack Jansene578a632001-08-15 01:27:14 +00003209
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003210
3211
Ronald Oussoren5b787322006-06-06 19:50:24 +00003212
3213
3214
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003215
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003216
Jack Jansene578a632001-08-15 01:27:14 +00003217##AC_ARG_WITH(dyld,
Matthias Klose22520ea2010-05-08 10:14:46 +00003218## AS_HELP_STRING([--with-dyld],
3219## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003220##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003221# Set name for machine-dependent library files
3222
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3224$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003225if test -z "$MACHDEP"
3226then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003227 # avoid using uname for cross builds
3228 if test "$cross_compiling" = yes; then
3229 # ac_sys_system and ac_sys_release are only used for setting
3230 # `define_xopen_source' in the case statement below. For the
3231 # current supported cross builds, this macro is not adjusted.
3232 case "$host" in
3233 *-*-linux*)
3234 ac_sys_system=Linux
3235 ;;
3236 *-*-cygwin*)
3237 ac_sys_system=Cygwin
3238 ;;
3239 *)
3240 # for now, limit cross builds to known configurations
3241 MACHDEP="unknown"
3242 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3243 esac
3244 ac_sys_release=
3245 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003246 ac_sys_system=`uname -s`
Georg Brandlfe18a112009-09-04 07:55:14 +00003247 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003248 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003249 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003250 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003251 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003252 fi
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003253 fi
3254 ac_md_system=`echo $ac_sys_system |
3255 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3256 ac_md_release=`echo $ac_sys_release |
3257 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3258 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003259
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003260 case $MACHDEP in
Victor Stinneracacbaa2011-08-20 14:02:38 +02003261 linux*) MACHDEP="linux2";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003262 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003263 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003264 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00003265 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003266 '') MACHDEP="unknown";;
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003267 esac
3268fi
3269
3270
3271if test "$cross_compiling" = yes; then
3272 case "$host" in
3273 *-*-linux*)
3274 case "$host_cpu" in
3275 arm*)
3276 _host_cpu=arm
3277 ;;
3278 *)
3279 _host_cpu=$host_cpu
3280 esac
3281 ;;
3282 *-*-cygwin*)
3283 _host_cpu=
3284 ;;
3285 *)
3286 # for now, limit cross builds to known configurations
3287 MACHDEP="unknown"
3288 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003289 esac
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003290 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003291fi
Guido van Rossum91922671997-10-09 20:24:13 +00003292
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003293# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3294# disable features if it is defined, without any means to access these
3295# features as extensions. For these systems, we skip the definition of
3296# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3297# some feature, make sure there is no alternative way to access this
3298# feature. Also, when using wildcards, make sure you have verified the
3299# need for not defining _XOPEN_SOURCE on all systems matching the
3300# wildcard, and that the wildcard does not include future systems
3301# (which may remove their limitations).
3302case $ac_sys_system/$ac_sys_release in
3303 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3304 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003305 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis7875ef62010-02-15 21:41:12 +00003306 # In addition, Stefan Krah confirms that issue #1244610 exists through
3307 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali97781b02011-07-22 23:43:42 +02003308 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Martin v. Löwiscb78de62007-12-29 18:49:21 +00003309 define_xopen_source=no
3310 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3311 # also defined. This can be overridden by defining _BSD_SOURCE
3312 # As this has a different meaning on Linux, only define it on OpenBSD
3313
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003314$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwiscb78de62007-12-29 18:49:21 +00003315
3316 ;;
Charles-François Natali97781b02011-07-22 23:43:42 +02003317 OpenBSD/*)
Martin v. Löwis5e2dd862010-02-15 08:32:00 +00003318 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3319 # also defined. This can be overridden by defining _BSD_SOURCE
3320 # As this has a different meaning on Linux, only define it on OpenBSD
3321
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003322$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis5e2dd862010-02-15 08:32:00 +00003323
3324 ;;
Martin v. Löwis4d542ec2006-11-25 15:39:19 +00003325 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3326 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3327 # Marc Recht
Benjamin Petersoneac68f42008-11-16 17:54:55 +00003328 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 +00003329 define_xopen_source=no;;
Martin v. Löwisb41afb52010-05-28 15:28:47 +00003330 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3331 # request to enable features supported by the standard as a request
3332 # to disable features not supported by the standard. The best way
3333 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3334 # entirely and define __EXTENSIONS__ instead.
3335 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003336 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003337 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3338 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003339 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003340 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003341 define_xopen_source=no;;
3342 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003343 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003344 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003345 define_xopen_source=no;;
Martin v. Löwisbb86d832008-11-04 20:40:09 +00003346 # On FreeBSD 4, the math functions C89 does not cover are never defined
3347 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3348 FreeBSD/4.*)
3349 define_xopen_source=no;;
3350 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3351 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3352 # identifies itself as Darwin/7.*
3353 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3354 # disables platform specific features beyond repair.
3355 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3356 # has no effect, don't bother defining them
3357 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003358 define_xopen_source=no;;
Ronald Oussorena55af9a2010-01-17 16:25:57 +00003359 Darwin/1[0-9].*)
3360 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003361 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3362 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3363 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003364 AIX/4)
3365 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003366 AIX/5)
3367 if test `uname -r` -eq 1; then
3368 define_xopen_source=no
3369 fi
3370 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00003371 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3372 # defining NI_NUMERICHOST.
3373 QNX/6.3.2)
3374 define_xopen_source=no
3375 ;;
Martin v. Löwisa0588362006-04-04 06:03:50 +00003376
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003377esac
3378
3379if test $define_xopen_source = yes
3380then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003381
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003382$as_echo "#define _XOPEN_SOURCE 600" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003383
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003384
3385 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3386 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3387 # several APIs are not declared. Since this is also needed in some
3388 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003389
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003390$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003391
3392
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003393
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003394$as_echo "#define _POSIX_C_SOURCE 200112L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003395
3396
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003397fi
3398
Guido van Rossum91922671997-10-09 20:24:13 +00003399#
3400# SGI compilers allow the specification of the both the ABI and the
3401# ISA on the command line. Depending on the values of these switches,
Martin Panterb1d867f2016-05-26 05:28:50 +00003402# different and often incompatible code will be generated.
Guido van Rossum91922671997-10-09 20:24:13 +00003403#
3404# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3405# thus supply support for various ABI/ISA combinations. The MACHDEP
3406# variable is also adjusted.
3407#
3408
3409if test ! -z "$SGI_ABI"
3410then
3411 CC="cc $SGI_ABI"
3412 LDFLAGS="$SGI_ABI $LDFLAGS"
3413 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3414fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003415{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3416$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003417
doko@ubuntu.coma50b0de2015-04-13 21:55:59 +02003418
3419PLATDIR=plat-$MACHDEP
3420
Jack Jansen83f898c2002-12-30 22:23:40 +00003421# And add extra plat-mac for darwin
3422
Jack Jansen7b59b422003-03-17 15:44:10 +00003423
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking EXTRAPLATDIR" >&5
3425$as_echo_n "checking EXTRAPLATDIR... " >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00003426if test -z "$EXTRAPLATDIR"
3427then
3428 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00003429 darwin)
3430 EXTRAPLATDIR="\$(PLATMACDIRS)"
3431 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
3432 ;;
3433 *)
3434 EXTRAPLATDIR=""
3435 EXTRAMACHDEPPATH=""
3436 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00003437 esac
3438fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003439{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRAPLATDIR" >&5
3440$as_echo "$EXTRAPLATDIR" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00003441
Jack Jansen6b08a402004-06-03 12:41:45 +00003442# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3443# it may influence the way we can build extensions, so distutils
3444# needs to check it
3445
Ronald Oussoren988117f2006-04-29 11:31:35 +00003446
Jack Jansen6b08a402004-06-03 12:41:45 +00003447CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Ronald Oussoren988117f2006-04-29 11:31:35 +00003448EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003449
Guido van Rossum627b2d71993-12-24 10:39:16 +00003450# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003451
3452# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3453# for debug/optimization stuff. BASECFLAGS is for flags that are required
3454# just to get things to compile and link. Users are free to override OPT
3455# when running configure or make. The build should not break if they do.
3456# BASECFLAGS should generally not be messed with, however.
3457
3458# XXX shouldn't some/most/all of this code be merged with the stuff later
3459# on that fiddles with OPT and BASECFLAGS?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3461$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003462
Martin v. Löwiseba40652007-08-30 20:10:57 +00003463# Check whether --with-gcc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003464if test "${with_gcc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003465 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003466 case $withval in
Mark Dickinson04b27232009-01-04 12:29:36 +00003467 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003468 without_gcc=yes;;
3469 yes) CC=gcc
3470 without_gcc=no;;
3471 *) CC=$withval
3472 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003473 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003474else
Martin v. Löwis11437992002-04-12 09:54:03 +00003475
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003476 case $ac_sys_system in
Antoine Pitrou285cd162010-09-21 15:23:17 +00003477 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003478 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003479 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003480 case $BE_HOST_CPU in
3481 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00003482 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003483 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00003484 BASECFLAGS="$BASECFLAGS -export pragma"
3485 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003486 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003487 ;;
3488 x86)
Fred Drake5790be12000-10-09 17:06:13 +00003489 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003490 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00003491 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003492 ;;
3493 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003494 as_fn_error $? "Unknown BeOS platform \"$BE_HOST_CPU\"" "$LINENO" 5
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003495 ;;
3496 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003497 AR="\$(srcdir)/Modules/ar_beos"
3498 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003499 ;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003500 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003501 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00003502fi
3503
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003504{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3505$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003506
Zachary Ware6ed42ea2015-12-21 11:43:03 -06003507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-icc" >&5
3508$as_echo_n "checking for --with-icc... " >&6; }
3509
3510# Check whether --with-icc was given.
3511if test "${with_icc+set}" = set; then :
3512 withval=$with_icc;
3513 case $withval in
3514 no) CC=${CC:-cc}
3515 with_icc=no;;
3516 yes) CC=icc
3517 CXX=icpc
3518 with_icc=yes;;
3519 *) CC=$withval
3520 with_icc=$withval;;
3521 esac
3522else
3523
3524 with_icc=no
3525fi
3526
3527{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icc" >&5
3528$as_echo "$with_icc" >&6; }
3529
Guido van Rossum8b131c51995-03-09 14:10:13 +00003530# If the user switches compilers, we can't believe the cache
3531if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3532then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003533 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003534(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003535fi
3536
Trent Nelson15daa352012-12-13 06:46:39 +00003537if test "$MACHDEP" = "irix6" && test "$CC" != "gcc"; then
3538 # Normally, MIPSpro CC treats #error directives as warnings, which means
3539 # a successful exit code is returned (0). This is a problem because IRIX
3540 # has a bunch of system headers with this guard at the top:
3541 #
3542 # #ifndef __c99
3543 # #error This header file is to be used only for c99 mode compilations
3544 # #else
3545 #
3546 # When autoconf tests for such a header, like stdint.h, this happens:
3547 #
3548 # configure:4619: cc -c conftest.c >&5
3549 # cc-1035 cc: WARNING File = /usr/include/stdint.h, Line = 5
3550 # #error directive: This header file is to be used only for c99 mode
3551 # compilations
3552 #
3553 # #error This header file is to be used only for c99 mode compilations
3554 # ^
3555 #
3556 # configure:4619: $? = 0
3557 # configure:4619: result: yes
3558 #
3559 # Therefore, we use `-diag_error 1035` to have the compiler treat the
3560 # warning as an error, which causes cc to return a non-zero result,
3561 # which autoconf can interpret correctly.
3562 CFLAGS="$CFLAGS -diag_error 1035"
3563 # Whilst we're here, we might as well make sure CXX defaults to something
3564 # sensible if we're not using gcc.
3565 if test -z "$CXX"; then
3566 CXX="CC"
3567 fi
3568fi
3569
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00003570# If the user set CFLAGS, use this instead of the automatically
3571# determined setting
3572preset_cflags="$CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +00003573ac_ext=c
3574ac_cpp='$CPP $CPPFLAGS'
3575ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3576ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3577ac_compiler_gnu=$ac_cv_c_compiler_gnu
3578if test -n "$ac_tool_prefix"; then
3579 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3580set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3582$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003583if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003584 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003585else
3586 if test -n "$CC"; then
3587 ac_cv_prog_CC="$CC" # Let the user override the test.
3588else
Martin v. Löwis11437992002-04-12 09:54:03 +00003589as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3590for as_dir in $PATH
3591do
3592 IFS=$as_save_IFS
3593 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003594 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003595 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003596 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003597 $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 +00003598 break 2
3599 fi
3600done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003601 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003602IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003603
Jack Jansendd19cf82001-12-06 22:36:17 +00003604fi
3605fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003606CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003607if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3609$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003610else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3612$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003613fi
3614
Martin v. Löwiseba40652007-08-30 20:10:57 +00003615
Martin v. Löwis11437992002-04-12 09:54:03 +00003616fi
3617if test -z "$ac_cv_prog_CC"; then
3618 ac_ct_CC=$CC
3619 # Extract the first word of "gcc", so it can be a program name with args.
3620set dummy gcc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3622$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003623if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003624 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003625else
3626 if test -n "$ac_ct_CC"; then
3627 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3628else
3629as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3630for as_dir in $PATH
3631do
3632 IFS=$as_save_IFS
3633 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003634 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003635 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003636 ac_cv_prog_ac_ct_CC="gcc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003637 $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 +00003638 break 2
3639 fi
3640done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003641 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003642IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003643
3644fi
3645fi
3646ac_ct_CC=$ac_cv_prog_ac_ct_CC
3647if test -n "$ac_ct_CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3649$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003650else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3652$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003653fi
3654
Martin v. Löwiseba40652007-08-30 20:10:57 +00003655 if test "x$ac_ct_CC" = x; then
3656 CC=""
3657 else
3658 case $cross_compiling:$ac_tool_warned in
3659yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003660{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3661$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00003662ac_tool_warned=yes ;;
3663esac
3664 CC=$ac_ct_CC
3665 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003666else
3667 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003668fi
3669
Jack Jansendd19cf82001-12-06 22:36:17 +00003670if test -z "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003671 if test -n "$ac_tool_prefix"; then
3672 # 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 +00003673set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3675$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003676if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003677 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003678else
3679 if test -n "$CC"; then
3680 ac_cv_prog_CC="$CC" # Let the user override the test.
3681else
Martin v. Löwis11437992002-04-12 09:54:03 +00003682as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3683for as_dir in $PATH
3684do
3685 IFS=$as_save_IFS
3686 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003687 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003688 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003689 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003690 $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 +00003691 break 2
3692 fi
3693done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003694 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003695IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003696
3697fi
3698fi
3699CC=$ac_cv_prog_CC
3700if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3702$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003703else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3705$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003706fi
3707
Martin v. Löwiseba40652007-08-30 20:10:57 +00003708
Martin v. Löwis11437992002-04-12 09:54:03 +00003709 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003710fi
3711if test -z "$CC"; then
3712 # Extract the first word of "cc", so it can be a program name with args.
3713set dummy cc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3715$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003716if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003717 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003718else
3719 if test -n "$CC"; then
3720 ac_cv_prog_CC="$CC" # Let the user override the test.
3721else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003722 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003723as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3724for as_dir in $PATH
3725do
3726 IFS=$as_save_IFS
3727 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003728 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003729 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003730 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3731 ac_prog_rejected=yes
3732 continue
3733 fi
3734 ac_cv_prog_CC="cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003735 $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 +00003736 break 2
3737 fi
3738done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003739 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003740IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003741
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003742if test $ac_prog_rejected = yes; then
3743 # We found a bogon in the path, so make sure we never use it.
3744 set dummy $ac_cv_prog_CC
3745 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003746 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003747 # We chose a different compiler from the bogus one.
3748 # However, it has the same basename, so the bogon will be chosen
3749 # first if we set CC to just the basename; use the full file name.
3750 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003751 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003752 fi
3753fi
3754fi
3755fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003756CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003757if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3759$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003760else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3762$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003763fi
3764
Martin v. Löwiseba40652007-08-30 20:10:57 +00003765
Martin v. Löwis11437992002-04-12 09:54:03 +00003766fi
3767if test -z "$CC"; then
3768 if test -n "$ac_tool_prefix"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003769 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003770 do
3771 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3772set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3774$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003775if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003776 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003777else
3778 if test -n "$CC"; then
3779 ac_cv_prog_CC="$CC" # Let the user override the test.
3780else
Martin v. Löwis11437992002-04-12 09:54:03 +00003781as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3782for as_dir in $PATH
3783do
3784 IFS=$as_save_IFS
3785 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003786 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003787 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003788 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003789 $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 +00003790 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003791 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003792done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003793 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003794IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003795
3796fi
3797fi
3798CC=$ac_cv_prog_CC
3799if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3801$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003802else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3804$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003805fi
3806
Martin v. Löwiseba40652007-08-30 20:10:57 +00003807
Martin v. Löwis11437992002-04-12 09:54:03 +00003808 test -n "$CC" && break
3809 done
3810fi
3811if test -z "$CC"; then
3812 ac_ct_CC=$CC
Martin v. Löwiseba40652007-08-30 20:10:57 +00003813 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003814do
3815 # Extract the first word of "$ac_prog", so it can be a program name with args.
3816set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3818$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003819if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003820 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003821else
3822 if test -n "$ac_ct_CC"; then
3823 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3824else
3825as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3826for as_dir in $PATH
3827do
3828 IFS=$as_save_IFS
3829 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003830 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003831 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003832 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003833 $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 +00003834 break 2
3835 fi
3836done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003837 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003838IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003839
Martin v. Löwis11437992002-04-12 09:54:03 +00003840fi
3841fi
3842ac_ct_CC=$ac_cv_prog_ac_ct_CC
3843if test -n "$ac_ct_CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3845$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003846else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3848$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003849fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003850
Martin v. Löwiseba40652007-08-30 20:10:57 +00003851
Martin v. Löwis11437992002-04-12 09:54:03 +00003852 test -n "$ac_ct_CC" && break
3853done
Michael W. Hudson54241132001-12-07 15:38:26 +00003854
Martin v. Löwiseba40652007-08-30 20:10:57 +00003855 if test "x$ac_ct_CC" = x; then
3856 CC=""
3857 else
3858 case $cross_compiling:$ac_tool_warned in
3859yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003860{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3861$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00003862ac_tool_warned=yes ;;
3863esac
3864 CC=$ac_ct_CC
3865 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003866fi
3867
3868fi
3869
3870
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003871test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3872$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003873as_fn_error $? "no acceptable C compiler found in \$PATH
Matthias Klose3cef2a92012-03-14 23:39:33 +01003874See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003875
3876# Provide some information about the compiler.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003877$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3878set X $ac_compile
3879ac_compiler=$2
3880for ac_option in --version -v -V -qversion; do
3881 { { ac_try="$ac_compiler $ac_option >&5"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003882case "(($ac_try" in
3883 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3884 *) ac_try_echo=$ac_try;;
3885esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003886eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3887$as_echo "$ac_try_echo"; } >&5
3888 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003889 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003890 if test -s conftest.err; then
3891 sed '10a\
3892... rest of stderr output deleted ...
3893 10q' conftest.err >conftest.er1
3894 cat conftest.er1 >&5
3895 fi
3896 rm -f conftest.er1 conftest.err
3897 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3898 test $ac_status = 0; }
3899done
Martin v. Löwis11437992002-04-12 09:54:03 +00003900
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003901cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003902/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003903
Martin v. Löwis11437992002-04-12 09:54:03 +00003904int
3905main ()
3906{
3907
3908 ;
3909 return 0;
3910}
3911_ACEOF
3912ac_clean_files_save=$ac_clean_files
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003913ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003914# Try to create an executable without -o first, disregard a.out.
3915# It will help us diagnose broken compilers, and finding out an intuition
3916# of exeext.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3918$as_echo_n "checking whether the C compiler works... " >&6; }
3919ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3920
3921# The possible output files:
3922ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3923
Martin v. Löwiseba40652007-08-30 20:10:57 +00003924ac_rmfiles=
3925for ac_file in $ac_files
3926do
3927 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003928 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00003929 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3930 esac
3931done
3932rm -f $ac_rmfiles
3933
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003934if { { ac_try="$ac_link_default"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003935case "(($ac_try" in
3936 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3937 *) ac_try_echo=$ac_try;;
3938esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003939eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3940$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003941 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003942 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003943 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3944 test $ac_status = 0; }; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003945 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3946# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3947# in a Makefile. We should not override ac_cv_exeext if it was cached,
3948# so that the user can short-circuit this test for compilers unknown to
3949# Autoconf.
3950for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003951do
3952 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003953 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003954 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003955 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003956 [ab].out )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003957 # We found the default executable, but exeext='' is most
3958 # certainly right.
3959 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003960 *.* )
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003961 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Martin v. Löwiseba40652007-08-30 20:10:57 +00003962 then :; else
3963 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3964 fi
3965 # We set ac_cv_exeext here because the later test for it is not
3966 # safe: cross compilers may not add the suffix if given an `-o'
3967 # argument, so we may need to know it at that point already.
3968 # Even if this section looks crufty: it has the advantage of
3969 # actually working.
Skip Montanarof0d5f792004-08-15 14:08:23 +00003970 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003971 * )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003972 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003973 esac
3974done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003975test "$ac_cv_exeext" = no && ac_cv_exeext=
3976
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003977else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003978 ac_file=''
3979fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003980if test -z "$ac_file"; then :
3981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3982$as_echo "no" >&6; }
3983$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003984sed 's/^/| /' conftest.$ac_ext >&5
3985
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003986{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3987$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003988as_fn_error 77 "C compiler cannot create executables
Matthias Klose3cef2a92012-03-14 23:39:33 +01003989See \`config.log' for more details" "$LINENO" 5; }
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003990else
3991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3992$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003993fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3995$as_echo_n "checking for C compiler default output file name... " >&6; }
3996{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3997$as_echo "$ac_file" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003998ac_exeext=$ac_cv_exeext
Michael W. Hudson54241132001-12-07 15:38:26 +00003999
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004000rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00004001ac_clean_files=$ac_clean_files_save
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4003$as_echo_n "checking for suffix of executables... " >&6; }
4004if { { ac_try="$ac_link"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004005case "(($ac_try" in
4006 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4007 *) ac_try_echo=$ac_try;;
4008esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004009eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4010$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00004011 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004012 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004013 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4014 test $ac_status = 0; }; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004015 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4016# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4017# work properly (i.e., refer to `conftest.exe'), while it won't with
4018# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00004019for ac_file in conftest.exe conftest conftest.*; do
4020 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00004021 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004022 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004023 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
Skip Montanarof0d5f792004-08-15 14:08:23 +00004024 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004025 * ) break;;
4026 esac
4027done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004028else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004029 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4030$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004031as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Matthias Klose3cef2a92012-03-14 23:39:33 +01004032See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004033fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004034rm -f conftest conftest$ac_cv_exeext
4035{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4036$as_echo "$ac_cv_exeext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004037
4038rm -f conftest.$ac_ext
4039EXEEXT=$ac_cv_exeext
4040ac_exeext=$EXEEXT
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004041cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4042/* end confdefs.h. */
4043#include <stdio.h>
4044int
4045main ()
4046{
4047FILE *f = fopen ("conftest.out", "w");
4048 return ferror (f) || fclose (f) != 0;
4049
4050 ;
4051 return 0;
4052}
Skip Montanaro6dead952003-09-25 14:50:04 +00004053_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004054ac_clean_files="$ac_clean_files conftest.out"
4055# Check that the compiler produces executables we can run. If not, either
4056# the compiler is broken, or we cross compile.
4057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4058$as_echo_n "checking whether we are cross compiling... " >&6; }
4059if test "$cross_compiling" != yes; then
4060 { { ac_try="$ac_link"
4061case "(($ac_try" in
4062 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4063 *) ac_try_echo=$ac_try;;
4064esac
4065eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4066$as_echo "$ac_try_echo"; } >&5
4067 (eval "$ac_link") 2>&5
4068 ac_status=$?
4069 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4070 test $ac_status = 0; }
4071 if { ac_try='./conftest$ac_cv_exeext'
4072 { { case "(($ac_try" in
4073 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4074 *) ac_try_echo=$ac_try;;
4075esac
4076eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4077$as_echo "$ac_try_echo"; } >&5
4078 (eval "$ac_try") 2>&5
4079 ac_status=$?
4080 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4081 test $ac_status = 0; }; }; then
4082 cross_compiling=no
4083 else
4084 if test "$cross_compiling" = maybe; then
4085 cross_compiling=yes
4086 else
4087 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4088$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004089as_fn_error $? "cannot run C compiled programs.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004090If you meant to cross compile, use \`--host'.
Matthias Klose3cef2a92012-03-14 23:39:33 +01004091See \`config.log' for more details" "$LINENO" 5; }
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004092 fi
4093 fi
4094fi
4095{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4096$as_echo "$cross_compiling" >&6; }
4097
4098rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4099ac_clean_files=$ac_clean_files_save
4100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4101$as_echo_n "checking for suffix of object files... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004102if ${ac_cv_objext+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004103 $as_echo_n "(cached) " >&6
4104else
4105 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004106/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004107
Martin v. Löwis11437992002-04-12 09:54:03 +00004108int
4109main ()
4110{
4111
4112 ;
4113 return 0;
4114}
4115_ACEOF
4116rm -f conftest.o conftest.obj
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004117if { { ac_try="$ac_compile"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004118case "(($ac_try" in
4119 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4120 *) ac_try_echo=$ac_try;;
4121esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004122eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4123$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00004124 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004125 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004126 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4127 test $ac_status = 0; }; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004128 for ac_file in conftest.o conftest.obj conftest.*; do
4129 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004130 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004131 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004132 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4133 break;;
4134 esac
4135done
4136else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004137 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004138sed 's/^/| /' conftest.$ac_ext >&5
4139
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004140{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4141$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004142as_fn_error $? "cannot compute suffix of object files: cannot compile
Matthias Klose3cef2a92012-03-14 23:39:33 +01004143See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004144fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004145rm -f conftest.$ac_cv_objext conftest.$ac_ext
4146fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004147{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4148$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004149OBJEXT=$ac_cv_objext
4150ac_objext=$OBJEXT
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004151{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4152$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004153if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004154 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004155else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004156 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004157/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004158
Martin v. Löwis11437992002-04-12 09:54:03 +00004159int
4160main ()
4161{
4162#ifndef __GNUC__
4163 choke me
4164#endif
4165
4166 ;
4167 return 0;
4168}
4169_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004170if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004171 ac_compiler_gnu=yes
4172else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004173 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004174fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004175rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004176ac_cv_c_compiler_gnu=$ac_compiler_gnu
4177
4178fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004179{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4180$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4181if test $ac_compiler_gnu = yes; then
4182 GCC=yes
4183else
4184 GCC=
4185fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004186ac_test_CFLAGS=${CFLAGS+set}
4187ac_save_CFLAGS=$CFLAGS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4189$as_echo_n "checking whether $CC accepts -g... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004190if ${ac_cv_prog_cc_g+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004191 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004192else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004193 ac_save_c_werror_flag=$ac_c_werror_flag
4194 ac_c_werror_flag=yes
4195 ac_cv_prog_cc_g=no
4196 CFLAGS="-g"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004197 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004198/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004199
Martin v. Löwis11437992002-04-12 09:54:03 +00004200int
4201main ()
4202{
4203
4204 ;
4205 return 0;
4206}
4207_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004208if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004209 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004210else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004211 CFLAGS=""
4212 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004213/* end confdefs.h. */
4214
4215int
4216main ()
4217{
4218
4219 ;
4220 return 0;
4221}
4222_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004223if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004224
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004225else
4226 ac_c_werror_flag=$ac_save_c_werror_flag
Martin v. Löwiseba40652007-08-30 20:10:57 +00004227 CFLAGS="-g"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004228 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004229/* end confdefs.h. */
4230
4231int
4232main ()
4233{
4234
4235 ;
4236 return 0;
4237}
4238_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004239if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004240 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004241fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004242rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004243fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004244rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4245fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004246rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4247 ac_c_werror_flag=$ac_save_c_werror_flag
4248fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004249{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4250$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004251if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004252 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004253elif test $ac_cv_prog_cc_g = yes; then
4254 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004255 CFLAGS="-g -O2"
4256 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004257 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004258 fi
4259else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004260 if test "$GCC" = yes; then
4261 CFLAGS="-O2"
4262 else
4263 CFLAGS=
4264 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004265fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4267$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004268if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004269 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004270else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004271 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004272ac_save_CC=$CC
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004273cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004274/* end confdefs.h. */
4275#include <stdarg.h>
4276#include <stdio.h>
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004277struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004278/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4279struct buf { int x; };
4280FILE * (*rcsopen) (struct buf *, struct stat *, int);
4281static char *e (p, i)
4282 char **p;
4283 int i;
4284{
4285 return p[i];
4286}
4287static char *f (char * (*g) (char **, int), char **p, ...)
4288{
4289 char *s;
4290 va_list v;
4291 va_start (v,p);
4292 s = g (p, va_arg (v,int));
4293 va_end (v);
4294 return s;
4295}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004296
4297/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4298 function prototypes and stuff, but not '\xHH' hex character constants.
4299 These don't provoke an error unfortunately, instead are silently treated
Martin v. Löwiseba40652007-08-30 20:10:57 +00004300 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004301 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4302 array size at least. It's necessary to write '\x00'==0 to get something
Martin v. Löwiseba40652007-08-30 20:10:57 +00004303 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004304int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4305
Martin v. Löwiseba40652007-08-30 20:10:57 +00004306/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4307 inside strings and character constants. */
4308#define FOO(x) 'x'
4309int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4310
Skip Montanaro6dead952003-09-25 14:50:04 +00004311int test (int i, double x);
4312struct s1 {int (*f) (int a);};
4313struct s2 {int (*f) (double a);};
4314int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4315int argc;
4316char **argv;
4317int
4318main ()
4319{
4320return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4321 ;
4322 return 0;
4323}
4324_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00004325for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4326 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004327do
4328 CC="$ac_save_CC $ac_arg"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004329 if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004330 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004331fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004332rm -f core conftest.err conftest.$ac_objext
4333 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004334done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004335rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004336CC=$ac_save_CC
4337
4338fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004339# AC_CACHE_VAL
4340case "x$ac_cv_prog_cc_c89" in
4341 x)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4343$as_echo "none needed" >&6; } ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00004344 xno)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4346$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004347 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00004348 CC="$CC $ac_cv_prog_cc_c89"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4350$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004351esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004352if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004353
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004354fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004355
Martin v. Löwis11437992002-04-12 09:54:03 +00004356ac_ext=c
4357ac_cpp='$CPP $CPPFLAGS'
4358ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4359ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4360ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004361
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00004362if test ! -z "$preset_cflags"
4363then
4364 CFLAGS=$preset_cflags
4365fi
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004366
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004367
4368
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4370$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004371
Martin v. Löwiseba40652007-08-30 20:10:57 +00004372# Check whether --with-cxx_main was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004373if test "${with_cxx_main+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004374 withval=$with_cxx_main;
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004375
4376 case $withval in
4377 no) with_cxx_main=no
4378 MAINCC='$(CC)';;
4379 yes) with_cxx_main=yes
4380 MAINCC='$(CXX)';;
4381 *) with_cxx_main=yes
4382 MAINCC=$withval
4383 if test -z "$CXX"
4384 then
4385 CXX=$withval
4386 fi;;
4387 esac
4388else
4389
4390 with_cxx_main=no
4391 MAINCC='$(CC)'
4392
Martin v. Löwiseba40652007-08-30 20:10:57 +00004393fi
4394
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004395{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4396$as_echo "$with_cxx_main" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004397
4398preset_cxx="$CXX"
4399if test -z "$CXX"
4400then
4401 case "$CC" in
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004402 gcc) if test -n "$ac_tool_prefix"; then
4403 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4404set dummy ${ac_tool_prefix}g++; ac_word=$2
4405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4406$as_echo_n "checking for $ac_word... " >&6; }
4407if ${ac_cv_path_CXX+:} false; then :
4408 $as_echo_n "(cached) " >&6
4409else
4410 case $CXX in
4411 [\\/]* | ?:[\\/]*)
4412 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4413 ;;
4414 *)
4415 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4416for as_dir in notfound
4417do
4418 IFS=$as_save_IFS
4419 test -z "$as_dir" && as_dir=.
4420 for ac_exec_ext in '' $ac_executable_extensions; do
4421 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4422 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4423 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4424 break 2
4425 fi
4426done
4427 done
4428IFS=$as_save_IFS
4429
4430 ;;
4431esac
4432fi
4433CXX=$ac_cv_path_CXX
4434if test -n "$CXX"; then
4435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4436$as_echo "$CXX" >&6; }
4437else
4438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4439$as_echo "no" >&6; }
4440fi
4441
4442
4443fi
4444if test -z "$ac_cv_path_CXX"; then
4445 ac_pt_CXX=$CXX
4446 # Extract the first word of "g++", so it can be a program name with args.
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004447set dummy g++; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4449$as_echo_n "checking for $ac_word... " >&6; }
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004450if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004451 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004452else
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004453 case $ac_pt_CXX in
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004454 [\\/]* | ?:[\\/]*)
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004455 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 +00004456 ;;
4457 *)
4458 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4459for as_dir in notfound
4460do
4461 IFS=$as_save_IFS
4462 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004463 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004464 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004465 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004466 $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 +00004467 break 2
4468 fi
4469done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004470 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004471IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004472
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004473 ;;
4474esac
4475fi
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004476ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4477if test -n "$ac_pt_CXX"; then
4478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4479$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004480else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004481 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4482$as_echo "no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004483fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004484
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004485 if test "x$ac_pt_CXX" = x; then
4486 CXX="g++"
4487 else
4488 case $cross_compiling:$ac_tool_warned in
4489yes:)
4490{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4491$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4492ac_tool_warned=yes ;;
4493esac
4494 CXX=$ac_pt_CXX
4495 fi
4496else
4497 CXX="$ac_cv_path_CXX"
4498fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004499 ;;
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004500 cc) if test -n "$ac_tool_prefix"; then
4501 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4502set dummy ${ac_tool_prefix}c++; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4504$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004505if ${ac_cv_path_CXX+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004506 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004507else
4508 case $CXX in
4509 [\\/]* | ?:[\\/]*)
4510 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4511 ;;
4512 *)
4513 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4514for as_dir in notfound
4515do
4516 IFS=$as_save_IFS
4517 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004518 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004519 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004520 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004521 $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 +00004522 break 2
4523 fi
4524done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004525 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004526IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004527
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004528 ;;
4529esac
4530fi
4531CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00004532if test -n "$CXX"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4534$as_echo "$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004535else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4537$as_echo "no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004538fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004539
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004540
4541fi
4542if test -z "$ac_cv_path_CXX"; then
4543 ac_pt_CXX=$CXX
4544 # Extract the first word of "c++", so it can be a program name with args.
4545set dummy c++; ac_word=$2
4546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4547$as_echo_n "checking for $ac_word... " >&6; }
4548if ${ac_cv_path_ac_pt_CXX+:} false; then :
4549 $as_echo_n "(cached) " >&6
4550else
4551 case $ac_pt_CXX in
4552 [\\/]* | ?:[\\/]*)
4553 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4554 ;;
4555 *)
4556 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4557for as_dir in notfound
4558do
4559 IFS=$as_save_IFS
4560 test -z "$as_dir" && as_dir=.
4561 for ac_exec_ext in '' $ac_executable_extensions; do
4562 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4563 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4564 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4565 break 2
4566 fi
4567done
4568 done
4569IFS=$as_save_IFS
4570
4571 ;;
4572esac
4573fi
4574ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4575if test -n "$ac_pt_CXX"; then
4576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4577$as_echo "$ac_pt_CXX" >&6; }
4578else
4579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4580$as_echo "no" >&6; }
4581fi
4582
4583 if test "x$ac_pt_CXX" = x; then
4584 CXX="c++"
4585 else
4586 case $cross_compiling:$ac_tool_warned in
4587yes:)
4588{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4589$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4590ac_tool_warned=yes ;;
4591esac
4592 CXX=$ac_pt_CXX
4593 fi
4594else
4595 CXX="$ac_cv_path_CXX"
4596fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004597 ;;
4598 esac
4599 if test "$CXX" = "notfound"
4600 then
4601 CXX=""
4602 fi
4603fi
4604if test -z "$CXX"
4605then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004606 if test -n "$ac_tool_prefix"; then
4607 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4608 do
4609 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4610set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4612$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004613if ${ac_cv_prog_CXX+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004614 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004615else
4616 if test -n "$CXX"; then
4617 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4618else
4619as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4620for as_dir in $PATH
4621do
4622 IFS=$as_save_IFS
4623 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004624 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004625 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004626 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004627 $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 +00004628 break 2
4629 fi
4630done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004631 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004632IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004633
4634fi
4635fi
4636CXX=$ac_cv_prog_CXX
4637if test -n "$CXX"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4639$as_echo "$CXX" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004640else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4642$as_echo "no" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004643fi
4644
Martin v. Löwiseba40652007-08-30 20:10:57 +00004645
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004646 test -n "$CXX" && break
4647 done
4648fi
4649if test -z "$CXX"; then
4650 ac_ct_CXX=$CXX
4651 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4652do
4653 # Extract the first word of "$ac_prog", so it can be a program name with args.
4654set dummy $ac_prog; ac_word=$2
4655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4656$as_echo_n "checking for $ac_word... " >&6; }
4657if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4658 $as_echo_n "(cached) " >&6
4659else
4660 if test -n "$ac_ct_CXX"; then
4661 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4662else
4663as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4664for as_dir in $PATH
4665do
4666 IFS=$as_save_IFS
4667 test -z "$as_dir" && as_dir=.
4668 for ac_exec_ext in '' $ac_executable_extensions; do
4669 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4670 ac_cv_prog_ac_ct_CXX="$ac_prog"
4671 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4672 break 2
4673 fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004674done
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004675 done
4676IFS=$as_save_IFS
4677
4678fi
4679fi
4680ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4681if test -n "$ac_ct_CXX"; then
4682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4683$as_echo "$ac_ct_CXX" >&6; }
4684else
4685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4686$as_echo "no" >&6; }
4687fi
4688
4689
4690 test -n "$ac_ct_CXX" && break
4691done
4692
4693 if test "x$ac_ct_CXX" = x; then
4694 CXX="notfound"
4695 else
4696 case $cross_compiling:$ac_tool_warned in
4697yes:)
4698{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4699$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4700ac_tool_warned=yes ;;
4701esac
4702 CXX=$ac_ct_CXX
4703 fi
4704fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004705
4706 if test "$CXX" = "notfound"
4707 then
4708 CXX=""
4709 fi
4710fi
4711if test "$preset_cxx" != "$CXX"
4712then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004713 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004714
4715 By default, distutils will build C++ extension modules with \"$CXX\".
4716 If this is not intended, then set CXX on the configure command line.
4717 " >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004718$as_echo "$as_me: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004719
4720 By default, distutils will build C++ extension modules with \"$CXX\".
4721 If this is not intended, then set CXX on the configure command line.
4722 " >&2;}
4723fi
4724
doko@python.org4e63fbe2013-01-25 13:08:27 +01004725MULTIARCH=$($CC --print-multiarch 2>/dev/null)
4726
4727
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004728
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004729# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004730
4731ac_ext=c
4732ac_cpp='$CPP $CPPFLAGS'
4733ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4734ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4735ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4737$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004738# On Suns, sometimes $CPP names a directory.
4739if test -n "$CPP" && test -d "$CPP"; then
4740 CPP=
4741fi
4742if test -z "$CPP"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +01004743 if ${ac_cv_prog_CPP+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004744 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004745else
Martin v. Löwis11437992002-04-12 09:54:03 +00004746 # Double quotes because CPP needs to be expanded
4747 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4748 do
4749 ac_preproc_ok=false
4750for ac_c_preproc_warn_flag in '' yes
4751do
4752 # Use a header file that comes with gcc, so configuring glibc
4753 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004754 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4755 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004756 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004757 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004758 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004759/* end confdefs.h. */
4760#ifdef __STDC__
4761# include <limits.h>
4762#else
4763# include <assert.h>
4764#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004765 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004766_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004767if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004768
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004769else
Martin v. Löwis11437992002-04-12 09:54:03 +00004770 # Broken: fails on valid input.
4771continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004772fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004773rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004774
Martin v. Löwiseba40652007-08-30 20:10:57 +00004775 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004776 # can be detected and how.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004777 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004778/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004779#include <ac_nonexistent.h>
4780_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004781if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004782 # Broken: success on invalid input.
4783continue
4784else
Martin v. Löwis11437992002-04-12 09:54:03 +00004785 # Passes both tests.
4786ac_preproc_ok=:
4787break
4788fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004789rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004790
4791done
4792# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004793rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004794if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004795 break
4796fi
4797
4798 done
4799 ac_cv_prog_CPP=$CPP
4800
4801fi
4802 CPP=$ac_cv_prog_CPP
4803else
4804 ac_cv_prog_CPP=$CPP
4805fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004806{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4807$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004808ac_preproc_ok=false
4809for ac_c_preproc_warn_flag in '' yes
4810do
4811 # Use a header file that comes with gcc, so configuring glibc
4812 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004813 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4814 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004815 # On the NeXT, cc -E runs the code through the compiler's parser,
4816 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004817 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004818/* end confdefs.h. */
4819#ifdef __STDC__
4820# include <limits.h>
4821#else
4822# include <assert.h>
4823#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004824 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004825_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004826if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004827
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004828else
Martin v. Löwis11437992002-04-12 09:54:03 +00004829 # Broken: fails on valid input.
4830continue
4831fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004832rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004833
Martin v. Löwiseba40652007-08-30 20:10:57 +00004834 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004835 # can be detected and how.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004836 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004837/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004838#include <ac_nonexistent.h>
4839_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004840if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004841 # Broken: success on invalid input.
4842continue
4843else
Martin v. Löwis11437992002-04-12 09:54:03 +00004844 # Passes both tests.
4845ac_preproc_ok=:
4846break
4847fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004848rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004849
4850done
4851# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004852rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004853if $ac_preproc_ok; then :
4854
Martin v. Löwis11437992002-04-12 09:54:03 +00004855else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004856 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4857$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004858as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
Matthias Klose3cef2a92012-03-14 23:39:33 +01004859See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004860fi
4861
4862ac_ext=c
4863ac_cpp='$CPP $CPPFLAGS'
4864ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4865ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4866ac_compiler_gnu=$ac_cv_c_compiler_gnu
4867
4868
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4870$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004871if ${ac_cv_path_GREP+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004872 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004873else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004874 if test -z "$GREP"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004875 ac_path_GREP_found=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004876 # Loop through the user's path and test for each of PROGNAME-LIST
4877 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00004878for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4879do
4880 IFS=$as_save_IFS
4881 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004882 for ac_prog in grep ggrep; do
4883 for ac_exec_ext in '' $ac_executable_extensions; do
4884 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004885 as_fn_executable_p "$ac_path_GREP" || continue
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004886# Check for GNU ac_path_GREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004887 # Check for GNU $ac_path_GREP
4888case `"$ac_path_GREP" --version 2>&1` in
4889*GNU*)
4890 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4891*)
4892 ac_count=0
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004893 $as_echo_n 0123456789 >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004894 while :
4895 do
4896 cat "conftest.in" "conftest.in" >"conftest.tmp"
4897 mv "conftest.tmp" "conftest.in"
4898 cp "conftest.in" "conftest.nl"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004899 $as_echo 'GREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004900 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4901 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004902 as_fn_arith $ac_count + 1 && ac_count=$as_val
Martin v. Löwiseba40652007-08-30 20:10:57 +00004903 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4904 # Best one so far, save it but keep looking for a better one
4905 ac_cv_path_GREP="$ac_path_GREP"
4906 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004907 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004908 # 10*(2^10) chars as input seems more than enough
4909 test $ac_count -gt 10 && break
4910 done
4911 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4912esac
4913
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004914 $ac_path_GREP_found && break 3
4915 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004916 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004917 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004918IFS=$as_save_IFS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004919 if test -z "$ac_cv_path_GREP"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004920 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 +00004921 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004922else
4923 ac_cv_path_GREP=$GREP
4924fi
4925
Martin v. Löwiseba40652007-08-30 20:10:57 +00004926fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004927{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4928$as_echo "$ac_cv_path_GREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00004929 GREP="$ac_cv_path_GREP"
4930
4931
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4933$as_echo_n "checking for egrep... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004934if ${ac_cv_path_EGREP+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004935 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +00004936else
4937 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4938 then ac_cv_path_EGREP="$GREP -E"
4939 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004940 if test -z "$EGREP"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004941 ac_path_EGREP_found=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004942 # Loop through the user's path and test for each of PROGNAME-LIST
4943 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00004944for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4945do
4946 IFS=$as_save_IFS
4947 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004948 for ac_prog in egrep; do
4949 for ac_exec_ext in '' $ac_executable_extensions; do
4950 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004951 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004952# Check for GNU ac_path_EGREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004953 # Check for GNU $ac_path_EGREP
4954case `"$ac_path_EGREP" --version 2>&1` in
4955*GNU*)
4956 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4957*)
4958 ac_count=0
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004959 $as_echo_n 0123456789 >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004960 while :
4961 do
4962 cat "conftest.in" "conftest.in" >"conftest.tmp"
4963 mv "conftest.tmp" "conftest.in"
4964 cp "conftest.in" "conftest.nl"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004965 $as_echo 'EGREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004966 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4967 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004968 as_fn_arith $ac_count + 1 && ac_count=$as_val
Martin v. Löwiseba40652007-08-30 20:10:57 +00004969 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4970 # Best one so far, save it but keep looking for a better one
4971 ac_cv_path_EGREP="$ac_path_EGREP"
4972 ac_path_EGREP_max=$ac_count
4973 fi
4974 # 10*(2^10) chars as input seems more than enough
4975 test $ac_count -gt 10 && break
4976 done
4977 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4978esac
4979
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004980 $ac_path_EGREP_found && break 3
4981 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004982 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004983 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004984IFS=$as_save_IFS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004985 if test -z "$ac_cv_path_EGREP"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004986 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 +00004987 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004988else
4989 ac_cv_path_EGREP=$EGREP
4990fi
4991
Martin v. Löwiseba40652007-08-30 20:10:57 +00004992 fi
4993fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004994{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4995$as_echo "$ac_cv_path_EGREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00004996 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00004997
4998
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5000$as_echo_n "checking for ANSI C header files... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005001if ${ac_cv_header_stdc+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005002 $as_echo_n "(cached) " >&6
5003else
5004 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00005005/* end confdefs.h. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005006#include <stdlib.h>
5007#include <stdarg.h>
5008#include <string.h>
5009#include <float.h>
5010
5011int
5012main ()
5013{
5014
5015 ;
5016 return 0;
5017}
5018_ACEOF
5019if ac_fn_c_try_compile "$LINENO"; then :
5020 ac_cv_header_stdc=yes
5021else
5022 ac_cv_header_stdc=no
5023fi
5024rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5025
5026if test $ac_cv_header_stdc = yes; then
5027 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5028 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5029/* end confdefs.h. */
5030#include <string.h>
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00005031
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00005032_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005033if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005034 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005035
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005036else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005037 ac_cv_header_stdc=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005038fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00005039rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005040
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005041fi
5042
5043if test $ac_cv_header_stdc = yes; then
5044 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5045 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5046/* end confdefs.h. */
5047#include <stdlib.h>
5048
5049_ACEOF
5050if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5051 $EGREP "free" >/dev/null 2>&1; then :
5052
5053else
5054 ac_cv_header_stdc=no
5055fi
5056rm -f conftest*
5057
5058fi
5059
5060if test $ac_cv_header_stdc = yes; then
5061 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5062 if test "$cross_compiling" = yes; then :
5063 :
5064else
5065 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5066/* end confdefs.h. */
5067#include <ctype.h>
5068#include <stdlib.h>
5069#if ((' ' & 0x0FF) == 0x020)
5070# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5071# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5072#else
5073# define ISLOWER(c) \
5074 (('a' <= (c) && (c) <= 'i') \
5075 || ('j' <= (c) && (c) <= 'r') \
5076 || ('s' <= (c) && (c) <= 'z'))
5077# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5078#endif
5079
5080#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5081int
5082main ()
5083{
5084 int i;
5085 for (i = 0; i < 256; i++)
5086 if (XOR (islower (i), ISLOWER (i))
5087 || toupper (i) != TOUPPER (i))
5088 return 2;
5089 return 0;
5090}
5091_ACEOF
5092if ac_fn_c_try_run "$LINENO"; then :
5093
5094else
5095 ac_cv_header_stdc=no
5096fi
5097rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5098 conftest.$ac_objext conftest.beam conftest.$ac_ext
5099fi
5100
5101fi
5102fi
5103{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5104$as_echo "$ac_cv_header_stdc" >&6; }
5105if test $ac_cv_header_stdc = yes; then
5106
5107$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5108
5109fi
5110
5111# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5112for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5113 inttypes.h stdint.h unistd.h
5114do :
5115 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5116ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5117"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00005118if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005119 cat >>confdefs.h <<_ACEOF
5120#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5121_ACEOF
5122
5123fi
5124
5125done
5126
5127
5128
5129 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 +01005130if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005131 MINIX=yes
5132else
5133 MINIX=
5134fi
5135
5136
5137 if test "$MINIX" = yes; then
5138
5139$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5140
5141
5142$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5143
5144
5145$as_echo "#define _MINIX 1" >>confdefs.h
5146
5147 fi
5148
5149
5150 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5151$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005152if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005153 $as_echo_n "(cached) " >&6
5154else
5155 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5156/* end confdefs.h. */
5157
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005158# define __EXTENSIONS__ 1
5159 $ac_includes_default
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005160int
5161main ()
5162{
5163
5164 ;
5165 return 0;
5166}
5167_ACEOF
5168if ac_fn_c_try_compile "$LINENO"; then :
5169 ac_cv_safe_to_define___extensions__=yes
5170else
5171 ac_cv_safe_to_define___extensions__=no
5172fi
5173rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5174fi
5175{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5176$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5177 test $ac_cv_safe_to_define___extensions__ = yes &&
5178 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5179
5180 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5181
5182 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5183
5184 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5185
5186 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5187
5188
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005189
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005190# Check for unsupported systems
5191case $ac_sys_system/$ac_sys_release in
5192atheos*|Linux*/1*)
5193 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5194 echo See README for details.
5195 exit 1;;
5196esac
5197
5198
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5200$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005201
5202# Check whether --with-suffix was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005203if test "${with_suffix+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005204 withval=$with_suffix;
5205 case $withval in
5206 no) EXEEXT=;;
5207 yes) EXEEXT=.exe;;
5208 *) EXEEXT=$withval;;
5209 esac
5210fi
5211
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005212{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5213$as_echo "$EXEEXT" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005214
5215# Test whether we're running on a non-case-sensitive system, in which
5216# case we give a warning if no ext is given
5217
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5219$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005220if test ! -d CaseSensitiveTestDir; then
5221mkdir CaseSensitiveTestDir
5222fi
5223
5224if test -d casesensitivetestdir
5225then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5227$as_echo "yes" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005228 BUILDEXEEXT=.exe
5229else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5231$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005232 BUILDEXEEXT=$EXEEXT
5233fi
5234rmdir CaseSensitiveTestDir
5235
5236case $MACHDEP in
5237bsdos*)
5238 case $CC in
5239 gcc) CC="$CC -D_HAVE_BSDI";;
5240 esac;;
5241esac
5242
5243case $ac_sys_system in
5244hp*|HP*)
5245 case $CC in
5246 cc|*/cc) CC="$CC -Ae";;
5247 esac;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005248SunOS*)
5249 # Some functions have a prototype only with that define, e.g. confstr
5250
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005251$as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005252
5253 ;;
5254esac
5255
5256
5257
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5259$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005260if test -z "$LIBRARY"
5261then
5262 LIBRARY='libpython$(VERSION).a'
5263fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005264{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5265$as_echo "$LIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005266
5267# LDLIBRARY is the name of the library to link against (as opposed to the
5268# name of the library into which to insert object files). BLDLIBRARY is also
5269# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5270# is blank as the main program is not linked directly against LDLIBRARY.
5271# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5272# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5273# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5274# DLLLIBRARY is the shared (i.e., DLL) library.
5275#
5276# RUNSHARED is used to run shared python without installed libraries
5277#
5278# INSTSONAME is the name of the shared library that will be use to install
5279# on the system - some systems like version suffix, others don't
5280
5281
5282
5283
5284
5285
5286LDLIBRARY="$LIBRARY"
5287BLDLIBRARY='$(LDLIBRARY)'
5288INSTSONAME='$(LDLIBRARY)'
5289DLLLIBRARY=''
5290LDLIBRARYDIR=''
5291RUNSHARED=''
5292
5293# LINKCC is the command that links the python executable -- default is $(CC).
5294# If CXX is set, and if it is needed to link a main function that was
5295# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5296# python might then depend on the C++ runtime
5297# This is altered for AIX in order to build the export list before
5298# linking.
5299
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5301$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005302if test -z "$LINKCC"
5303then
5304 LINKCC='$(PURIFY) $(MAINCC)'
5305 case $ac_sys_system in
5306 AIX*)
5307 exp_extra="\"\""
5308 if test $ac_sys_release -ge 5 -o \
5309 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5310 exp_extra="."
5311 fi
5312 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005313 QNX*)
5314 # qcc must be used because the other compilers do not
5315 # support -N.
5316 LINKCC=qcc;;
5317 esac
5318fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005319{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5320$as_echo "$LINKCC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005321
5322# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5323# make sure we default having it set to "no": this is used by
5324# distutils.unixccompiler to know if it should add --enable-new-dtags
5325# to linker command lines, and failing to detect GNU ld simply results
5326# in the same bahaviour as before.
5327
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5329$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005330ac_prog=ld
5331if test "$GCC" = yes; then
5332 ac_prog=`$CC -print-prog-name=ld`
5333fi
5334case `"$ac_prog" -V 2>&1 < /dev/null` in
5335 *GNU*)
5336 GNULD=yes;;
5337 *)
5338 GNULD=no;;
5339esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005340{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5341$as_echo "$GNULD" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005342
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005343{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5344$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005345# Check whether --enable-shared was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005346if test "${enable_shared+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005347 enableval=$enable_shared;
5348fi
5349
5350
5351if test -z "$enable_shared"
5352then
5353 case $ac_sys_system in
5354 CYGWIN* | atheos*)
5355 enable_shared="yes";;
5356 *)
5357 enable_shared="no";;
5358 esac
5359fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005360{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5361$as_echo "$enable_shared" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005362
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5364$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005365# Check whether --enable-profiling was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005366if test "${enable_profiling+set}" = set; then :
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005367 enableval=$enable_profiling;
5368fi
5369
5370if test "x$enable_profiling" = xyes; then
5371 ac_save_cc="$CC"
Benjamin Petersonb9be7bb2013-03-26 08:55:37 -04005372 CC="$CC -pg"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005373 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005374/* end confdefs.h. */
5375int main() { return 0; }
5376_ACEOF
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005377if ac_fn_c_try_link "$LINENO"; then :
5378
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005379else
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005380 enable_profiling=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005381fi
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005382rm -f core conftest.err conftest.$ac_objext \
5383 conftest$ac_exeext conftest.$ac_ext
5384 CC="$ac_save_cc"
5385else
5386 enable_profiling=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005387fi
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005388{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5389$as_echo "$enable_profiling" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005390
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005391if test "x$enable_profiling" = xyes; then
5392 BASECFLAGS="-pg $BASECFLAGS"
5393 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005394fi
5395
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5397$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005398
5399# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5400# library that we build, but we do not want to link against it (we
5401# will find it with a -framework option). For this reason there is an
5402# extra variable BLDLIBRARY against which Python and the extension
5403# modules are linked, BLDLIBRARY. This is normally the same as
5404# LDLIBRARY, but empty for MacOSX framework builds.
5405if test "$enable_framework"
5406then
5407 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005408 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005409 BLDLIBRARY=''
5410else
5411 BLDLIBRARY='$(LDLIBRARY)'
5412fi
5413
5414# Other platforms follow
5415if test $enable_shared = "yes"; then
5416
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005417$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005418
5419 case $ac_sys_system in
5420 BeOS*)
5421 LDLIBRARY='libpython$(VERSION).so'
5422 ;;
5423 CYGWIN*)
5424 LDLIBRARY='libpython$(VERSION).dll.a'
5425 DLLLIBRARY='libpython$(VERSION).dll'
5426 ;;
5427 SunOS*)
5428 LDLIBRARY='libpython$(VERSION).so'
5429 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005430 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005431 INSTSONAME="$LDLIBRARY".$SOVERSION
5432 ;;
Charles-François Natali3de8c732011-07-24 22:33:35 +02005433 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005434 LDLIBRARY='libpython$(VERSION).so'
5435 BLDLIBRARY='-L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005436 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005437 case $ac_sys_system in
5438 FreeBSD*)
5439 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
5440 ;;
5441 esac
5442 INSTSONAME="$LDLIBRARY".$SOVERSION
5443 ;;
5444 hp*|HP*)
5445 case `uname -m` in
5446 ia64)
5447 LDLIBRARY='libpython$(VERSION).so'
5448 ;;
5449 *)
5450 LDLIBRARY='libpython$(VERSION).sl'
5451 ;;
5452 esac
5453 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005454 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005455 ;;
5456 OSF*)
5457 LDLIBRARY='libpython$(VERSION).so'
5458 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005459 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005460 ;;
5461 atheos*)
5462 LDLIBRARY='libpython$(VERSION).so'
5463 BLDLIBRARY='-L. -lpython$(VERSION)'
5464 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
5465 ;;
5466 Darwin*)
5467 LDLIBRARY='libpython$(VERSION).dylib'
5468 BLDLIBRARY='-L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005469 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005470 ;;
Antoine Pitrouaabdceb2010-09-10 20:03:17 +00005471 AIX*)
5472 LDLIBRARY='libpython$(VERSION).so'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005473 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrouaabdceb2010-09-10 20:03:17 +00005474 ;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005475
5476 esac
5477else # shared is disabled
5478 case $ac_sys_system in
5479 CYGWIN*)
5480 BLDLIBRARY='$(LIBRARY)'
5481 LDLIBRARY='libpython$(VERSION).dll.a'
5482 ;;
5483 esac
5484fi
5485
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005486if test "$cross_compiling" = yes; then
5487 RUNSHARED=
5488fi
5489
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005490{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5491$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005492
5493if test -n "$ac_tool_prefix"; then
5494 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5495set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5497$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005498if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005499 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005500else
5501 if test -n "$RANLIB"; then
5502 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5503else
5504as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5505for as_dir in $PATH
5506do
5507 IFS=$as_save_IFS
5508 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005509 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005510 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005511 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005512 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005513 break 2
5514 fi
5515done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005516 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005517IFS=$as_save_IFS
5518
5519fi
5520fi
5521RANLIB=$ac_cv_prog_RANLIB
5522if test -n "$RANLIB"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5524$as_echo "$RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005525else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5527$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005528fi
5529
5530
5531fi
5532if test -z "$ac_cv_prog_RANLIB"; then
5533 ac_ct_RANLIB=$RANLIB
5534 # Extract the first word of "ranlib", so it can be a program name with args.
5535set dummy ranlib; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5537$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005538if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005539 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005540else
5541 if test -n "$ac_ct_RANLIB"; then
5542 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5543else
5544as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5545for as_dir in $PATH
5546do
5547 IFS=$as_save_IFS
5548 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005549 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005550 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005551 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005552 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005553 break 2
5554 fi
5555done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005556 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005557IFS=$as_save_IFS
5558
5559fi
5560fi
5561ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5562if test -n "$ac_ct_RANLIB"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5564$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005565else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5567$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005568fi
5569
5570 if test "x$ac_ct_RANLIB" = x; then
5571 RANLIB=":"
5572 else
5573 case $cross_compiling:$ac_tool_warned in
5574yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005575{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5576$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005577ac_tool_warned=yes ;;
5578esac
5579 RANLIB=$ac_ct_RANLIB
5580 fi
5581else
5582 RANLIB="$ac_cv_prog_RANLIB"
5583fi
5584
5585
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005586if test -n "$ac_tool_prefix"; then
5587 for ac_prog in ar aal
5588 do
5589 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5590set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5592$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005593if ${ac_cv_prog_AR+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005594 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005595else
5596 if test -n "$AR"; then
5597 ac_cv_prog_AR="$AR" # Let the user override the test.
5598else
5599as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5600for as_dir in $PATH
5601do
5602 IFS=$as_save_IFS
5603 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005604 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005605 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005606 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005607 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005608 break 2
5609 fi
5610done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005611 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005612IFS=$as_save_IFS
5613
5614fi
5615fi
5616AR=$ac_cv_prog_AR
5617if test -n "$AR"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005618 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5619$as_echo "$AR" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005620else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5622$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005623fi
5624
5625
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005626 test -n "$AR" && break
5627 done
5628fi
5629if test -z "$AR"; then
5630 ac_ct_AR=$AR
5631 for ac_prog in ar aal
5632do
5633 # Extract the first word of "$ac_prog", so it can be a program name with args.
5634set dummy $ac_prog; ac_word=$2
5635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5636$as_echo_n "checking for $ac_word... " >&6; }
5637if ${ac_cv_prog_ac_ct_AR+:} false; then :
5638 $as_echo_n "(cached) " >&6
5639else
5640 if test -n "$ac_ct_AR"; then
5641 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5642else
5643as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5644for as_dir in $PATH
5645do
5646 IFS=$as_save_IFS
5647 test -z "$as_dir" && as_dir=.
5648 for ac_exec_ext in '' $ac_executable_extensions; do
5649 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5650 ac_cv_prog_ac_ct_AR="$ac_prog"
5651 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5652 break 2
5653 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005654done
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005655 done
5656IFS=$as_save_IFS
5657
5658fi
5659fi
5660ac_ct_AR=$ac_cv_prog_ac_ct_AR
5661if test -n "$ac_ct_AR"; then
5662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5663$as_echo "$ac_ct_AR" >&6; }
5664else
5665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5666$as_echo "no" >&6; }
5667fi
5668
5669
5670 test -n "$ac_ct_AR" && break
5671done
5672
5673 if test "x$ac_ct_AR" = x; then
5674 AR="ar"
5675 else
5676 case $cross_compiling:$ac_tool_warned in
5677yes:)
5678{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5679$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5680ac_tool_warned=yes ;;
5681esac
5682 AR=$ac_ct_AR
5683 fi
5684fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005685
5686
5687# tweak ARFLAGS only if the user didn't set it on the command line
5688
5689if test -z "$ARFLAGS"
5690then
5691 ARFLAGS="rc"
5692fi
5693
5694
5695# Extract the first word of "svnversion", so it can be a program name with args.
5696set dummy svnversion; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5698$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005699if ${ac_cv_prog_SVNVERSION+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005700 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005701else
5702 if test -n "$SVNVERSION"; then
5703 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
5704else
5705as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5706for as_dir in $PATH
5707do
5708 IFS=$as_save_IFS
5709 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005710 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005711 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005712 ac_cv_prog_SVNVERSION="found"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005713 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005714 break 2
5715 fi
5716done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005717 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005718IFS=$as_save_IFS
5719
5720 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
5721fi
5722fi
5723SVNVERSION=$ac_cv_prog_SVNVERSION
5724if test -n "$SVNVERSION"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SVNVERSION" >&5
5726$as_echo "$SVNVERSION" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005727else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5729$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005730fi
5731
5732
5733if test $SVNVERSION = found
5734then
5735 SVNVERSION="svnversion \$(srcdir)"
5736else
5737 SVNVERSION="echo Unversioned directory"
5738fi
5739
Trent Nelsond86ceec2012-10-16 09:42:45 -04005740
Trent Nelsonabf20512012-10-17 04:32:49 -04005741if test "$abs_srcdir" != "$abs_builddir"; then
Trent Nelsond86ceec2012-10-16 09:42:45 -04005742 # If we're building out-of-tree make sure Include (in the current dir)
5743 # gets picked up before its $srcdir counterpart in order for Python-ast.h
5744 # and graminit.h to get picked up from the correct directory.
5745 # (A side effect of this is that these resources will automatically be
5746 # regenerated when building out-of-tree, regardless of whether or not
5747 # the $srcdir counterpart is up-to-date. This is an acceptable trade
5748 # off.)
5749 BASECPPFLAGS="-IInclude"
5750else
5751 BASECPPFLAGS=""
5752fi
5753
Georg Brandl3a5508e2011-03-06 10:42:21 +01005754
5755
5756
5757# Extract the first word of "hg", so it can be a program name with args.
5758set dummy hg; ac_word=$2
5759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5760$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005761if ${ac_cv_prog_HAS_HG+:} false; then :
Georg Brandl3a5508e2011-03-06 10:42:21 +01005762 $as_echo_n "(cached) " >&6
5763else
5764 if test -n "$HAS_HG"; then
5765 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
5766else
5767as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5768for as_dir in $PATH
5769do
5770 IFS=$as_save_IFS
5771 test -z "$as_dir" && as_dir=.
5772 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005773 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Georg Brandl3a5508e2011-03-06 10:42:21 +01005774 ac_cv_prog_HAS_HG="found"
5775 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5776 break 2
5777 fi
5778done
5779 done
5780IFS=$as_save_IFS
5781
5782 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
5783fi
5784fi
5785HAS_HG=$ac_cv_prog_HAS_HG
5786if test -n "$HAS_HG"; then
5787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
5788$as_echo "$HAS_HG" >&6; }
5789else
5790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5791$as_echo "no" >&6; }
5792fi
5793
5794
5795if test $HAS_HG = found
5796then
5797 HGVERSION="hg id -i \$(srcdir)"
5798 HGTAG="hg id -t \$(srcdir)"
5799 HGBRANCH="hg id -b \$(srcdir)"
5800else
5801 HGVERSION=""
5802 HGTAG=""
5803 HGBRANCH=""
5804fi
5805
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005806case $MACHDEP in
5807bsdos*|hp*|HP*)
5808 # install -d does not work on BSDI or HP-UX
5809 if test -z "$INSTALL"
5810 then
5811 INSTALL="${srcdir}/install-sh -c"
5812 fi
5813esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005814# Find a good install program. We prefer a C program (faster),
5815# so one script is as good as another. But avoid the broken or
5816# incompatible versions:
5817# SysV /etc/install, /usr/sbin/install
5818# SunOS /usr/etc/install
5819# IRIX /sbin/install
5820# AIX /bin/install
5821# AmigaOS /C/install, which installs bootblocks on floppy discs
5822# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5823# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5824# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5825# OS/2's system install, which has a completely different semantic
5826# ./install, which can be erroneously created by make from ./install.sh.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005827# Reject install programs that cannot install multiple files.
5828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5829$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005830if test -z "$INSTALL"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +01005831if ${ac_cv_path_install+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005832 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005833else
5834 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5835for as_dir in $PATH
5836do
5837 IFS=$as_save_IFS
5838 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005839 # Account for people who put trailing slashes in PATH elements.
5840case $as_dir/ in #((
5841 ./ | .// | /[cC]/* | \
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005842 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005843 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005844 /usr/ucb/* ) ;;
5845 *)
5846 # OSF1 and SCO ODT 3.0 have their own names for install.
5847 # Don't use installbsd from OSF since it installs stuff as root
5848 # by default.
5849 for ac_prog in ginstall scoinst install; do
5850 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005851 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005852 if test $ac_prog = install &&
5853 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5854 # AIX install. It has an incompatible calling convention.
5855 :
5856 elif test $ac_prog = install &&
5857 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5858 # program-specific install script used by HP pwplus--don't use.
5859 :
5860 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005861 rm -rf conftest.one conftest.two conftest.dir
5862 echo one > conftest.one
5863 echo two > conftest.two
5864 mkdir conftest.dir
5865 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5866 test -s conftest.one && test -s conftest.two &&
5867 test -s conftest.dir/conftest.one &&
5868 test -s conftest.dir/conftest.two
5869 then
5870 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5871 break 3
5872 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005873 fi
5874 fi
5875 done
5876 done
5877 ;;
5878esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005879
5880 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005881IFS=$as_save_IFS
5882
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005883rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005884
5885fi
5886 if test "${ac_cv_path_install+set}" = set; then
5887 INSTALL=$ac_cv_path_install
5888 else
5889 # As a last resort, use the slow shell script. Don't cache a
5890 # value for INSTALL within a source directory, because that will
5891 # break other packages using the cache if that directory is
5892 # removed, or if the value is a relative name.
5893 INSTALL=$ac_install_sh
5894 fi
5895fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005896{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5897$as_echo "$INSTALL" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005898
5899# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5900# It thinks the first close brace ends the variable substitution.
5901test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5902
5903test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5904
5905test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5906
Trent Nelsonf6407a12012-08-30 14:56:13 +00005907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
5908$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
5909if test -z "$MKDIR_P"; then
5910 if ${ac_cv_path_mkdir+:} false; then :
5911 $as_echo_n "(cached) " >&6
5912else
5913 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5914for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
5915do
5916 IFS=$as_save_IFS
5917 test -z "$as_dir" && as_dir=.
5918 for ac_prog in mkdir gmkdir; do
5919 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005920 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Trent Nelsonf6407a12012-08-30 14:56:13 +00005921 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
5922 'mkdir (GNU coreutils) '* | \
5923 'mkdir (coreutils) '* | \
5924 'mkdir (fileutils) '4.1*)
5925 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
5926 break 3;;
5927 esac
5928 done
5929 done
5930 done
5931IFS=$as_save_IFS
5932
5933fi
5934
5935 test -d ./--version && rmdir ./--version
5936 if test "${ac_cv_path_mkdir+set}" = set; then
5937 MKDIR_P="$ac_cv_path_mkdir -p"
5938 else
5939 # As a last resort, use the slow shell script. Don't cache a
5940 # value for MKDIR_P within a source directory, because that will
5941 # break other packages using the cache if that directory is
5942 # removed, or if the value is a relative name.
5943 MKDIR_P="$ac_install_sh -d"
5944 fi
5945fi
5946{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
5947$as_echo "$MKDIR_P" >&6; }
5948
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005949
5950# Not every filesystem supports hard links
5951
5952if test -z "$LN" ; then
5953 case $ac_sys_system in
5954 BeOS*) LN="ln -s";;
5955 CYGWIN*) LN="ln -s";;
5956 atheos*) LN="ln -s";;
5957 *) LN=ln;;
5958 esac
5959fi
5960
5961# Check for --with-pydebug
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5963$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005964
5965# Check whether --with-pydebug was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005966if test "${with_pydebug+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005967 withval=$with_pydebug;
5968if test "$withval" != no
5969then
5970
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005971$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005972
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5974$as_echo "yes" >&6; };
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005975 Py_DEBUG='true'
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005976else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5977$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005978fi
5979else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5981$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005982fi
5983
5984
5985# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5986# merged with this chunk of code?
5987
5988# Optimizer/debugger flags
5989# ------------------------
5990# (The following bit of code is complicated enough - please keep things
5991# indented properly. Just pretend you're editing Python code. ;-)
5992
5993# There are two parallel sets of case statements below, one that checks to
5994# see if OPT was set and one that does BASECFLAGS setting based upon
5995# compiler and platform. BASECFLAGS tweaks need to be made even if the
5996# user set OPT.
5997
5998# tweak OPT based on compiler and platform, only if the user didn't set
5999# it on the command line
6000
Benjamin Petersond4b721b2010-03-23 20:58:37 +00006001if test "${OPT-unset}" = "unset"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006002then
6003 case $GCC in
6004 yes)
6005 if test "$CC" != 'g++' ; then
6006 STRICT_PROTO="-Wstrict-prototypes"
6007 fi
6008 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6009 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6010 WRAP="-fwrapv"
6011 fi
Stefan Krah503e5e12011-09-14 15:19:42 +02006012
6013 # Clang also needs -fwrapv
Stefan Krah2bc1e8f2011-12-08 22:26:06 +01006014 case $CC in
6015 *clang*) WRAP="-fwrapv"
6016 ;;
6017 esac
Stefan Krah503e5e12011-09-14 15:19:42 +02006018
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006019 case $ac_cv_prog_cc_g in
6020 yes)
6021 if test "$Py_DEBUG" = 'true' ; then
6022 # Optimization messes up debuggers, so turn it off for
6023 # debug builds.
Mark Dickinsond2f3e3f2010-05-05 22:23:58 +00006024 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006025 else
6026 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
6027 fi
6028 ;;
6029 *)
6030 OPT="-O3 -Wall $STRICT_PROTO"
6031 ;;
6032 esac
6033 case $ac_sys_system in
6034 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6035 ;;
6036 esac
6037 ;;
6038
6039 *)
6040 OPT="-O"
6041 ;;
6042 esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006043fi
6044
6045
6046
6047# The -arch flags for universal builds on OSX
6048UNIVERSAL_ARCH_FLAGS=
6049
6050
6051# tweak BASECFLAGS based on compiler and platform
6052case $GCC in
6053yes)
6054 # Python violates C99 rules, by casting between incompatible
6055 # pointer types. GCC may generate bad code as a result of that,
6056 # so use -fno-strict-aliasing if supported.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006057 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -fno-strict-aliasing" >&5
6058$as_echo_n "checking whether $CC accepts -fno-strict-aliasing... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006059 ac_save_cc="$CC"
6060 CC="$CC -fno-strict-aliasing"
Matthias Klose3cef2a92012-03-14 23:39:33 +01006061 if ${ac_cv_no_strict_aliasing_ok+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006062 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00006063else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006064 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006065/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00006066
6067int
6068main ()
6069{
Mark Dickinson5e13e292010-05-11 08:55:06 +00006070
Gregory P. Smith373469a2009-11-01 21:03:38 +00006071 ;
6072 return 0;
6073}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006074_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006075if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006076 ac_cv_no_strict_aliasing_ok=yes
6077else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006078 ac_cv_no_strict_aliasing_ok=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006079fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00006080rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00006081fi
6082
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006083 CC="$ac_save_cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing_ok" >&5
6085$as_echo "$ac_cv_no_strict_aliasing_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006086 if test $ac_cv_no_strict_aliasing_ok = yes
6087 then
6088 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6089 fi
6090
6091 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
6092 # support. Without this, treatment of subnormals doesn't follow
6093 # the standard.
doko@python.orgd65e2ba2013-01-31 23:52:03 +01006094 case $host in
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006095 alpha*)
6096 BASECFLAGS="$BASECFLAGS -mieee"
6097 ;;
6098 esac
6099
6100 case $ac_sys_system in
6101 SCO_SV*)
6102 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
6103 ;;
6104 # is there any other compiler on Darwin besides gcc?
6105 Darwin*)
6106 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
6107 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006108 if test "${CC}" = gcc
6109 then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006110 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
6111$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006112 case "${UNIVERSALSDK}" in
6113 */MacOSX10.4u.sdk)
6114 # Build using 10.4 SDK, force usage of gcc when the
6115 # compiler is gcc, otherwise the user will get very
6116 # confusing error messages when building on OSX 10.6
6117 CC=gcc-4.0
6118 CPP=cpp-4.0
6119 ;;
6120 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
6122$as_echo "$CC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006123 fi
6124
6125 # Calculate the right deployment target for this build.
6126 #
Ned Deilyc40b9032014-06-25 13:48:46 -07006127 cur_target_major=`sw_vers -productVersion | \
6128 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
6129 cur_target_minor=`sw_vers -productVersion | \
6130 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
6131 cur_target="${cur_target_major}.${cur_target_minor}"
6132 if test ${cur_target_major} -eq 10 && \
6133 test ${cur_target_minor} -ge 3
6134 then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006135 cur_target=10.3
Ronald Oussoren25967582009-09-06 10:00:26 +00006136 if test ${enable_universalsdk}; then
6137 if test "${UNIVERSAL_ARCHS}" = "all"; then
6138 # Ensure that the default platform for a
6139 # 4-way universal build is OSX 10.5,
6140 # that's the first OS release where
6141 # 4-way builds make sense.
6142 cur_target='10.5'
Ronald Oussoren23d92532009-09-07 06:12:00 +00006143
6144 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
6145 cur_target='10.5'
6146
6147 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
6148 cur_target='10.5'
6149
6150 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
6151 cur_target='10.5'
Ronald Oussoren25967582009-09-06 10:00:26 +00006152 fi
6153 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00006154 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren25967582009-09-06 10:00:26 +00006155 # On Intel macs default to a deployment
6156 # target of 10.4, that's the first OSX
6157 # release with Intel support.
6158 cur_target="10.4"
6159 fi
6160 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006161 fi
6162 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
6163
6164 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
6165 # environment with a value that is the same as what we'll use
6166 # in the Makefile to ensure that we'll get the same compiler
6167 # environment during configure and build time.
6168 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
6169 export MACOSX_DEPLOYMENT_TARGET
6170 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
6171
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006172 if test "${enable_universalsdk}"; then
6173 UNIVERSAL_ARCH_FLAGS=""
6174 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
6175 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
6176 ARCH_RUN_32BIT=""
Ronald Oussoren75912852010-04-08 08:13:31 +00006177 LIPO_32BIT_FLAGS=""
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006178
6179 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
6180 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
6181 LIPO_32BIT_FLAGS=""
6182 ARCH_RUN_32BIT="true"
6183
6184 elif test "$UNIVERSAL_ARCHS" = "all" ; then
6185 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
6186 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren92397ce2010-01-17 19:32:00 +00006187 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006188
6189 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
6190 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
6191 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren92397ce2010-01-17 19:32:00 +00006192 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006193
6194 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
6195 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
6196 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren9922f172010-02-11 13:19:34 +00006197 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006198
6199 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006200 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 +00006201
6202 fi
6203
6204
Ronald Oussoren974eb5e2010-04-18 17:59:37 +00006205 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
6206 if test "${UNIVERSALSDK}" != "/"
6207 then
6208 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
6209 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
6210 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006211 fi
6212
6213 fi
6214
6215
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006216 ;;
6217 OSF*)
6218 BASECFLAGS="$BASECFLAGS -mieee"
6219 ;;
6220 esac
6221 ;;
6222
6223*)
6224 case $ac_sys_system in
6225 OpenUNIX*|UnixWare*)
6226 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
6227 ;;
6228 OSF*)
6229 BASECFLAGS="$BASECFLAGS -ieee -std"
6230 ;;
6231 SCO_SV*)
6232 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
6233 ;;
6234 esac
6235 ;;
6236esac
6237
Zachary Ware6ed42ea2015-12-21 11:43:03 -06006238# ICC needs -fp-model strict or floats behave badly
6239case "$CC" in
6240*icc*)
6241 BASECFLAGS="$BASECFLAGS -fp-model strict"
6242 ;;
6243esac
6244
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006245if test "$Py_DEBUG" = 'true'; then
6246 :
6247else
6248 OPT="-DNDEBUG $OPT"
6249fi
6250
6251if test "$ac_arch_flags"
6252then
6253 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
6254fi
6255
6256# disable check for icc since it seems to pass, but generates a warning
6257if test "$CC" = icc
6258then
6259 ac_cv_opt_olimit_ok=no
6260fi
6261
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -OPT:Olimit=0" >&5
6263$as_echo_n "checking whether $CC accepts -OPT:Olimit=0... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006264if ${ac_cv_opt_olimit_ok+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006265 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006266else
6267 ac_save_cc="$CC"
6268CC="$CC -OPT:Olimit=0"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006269cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006270/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00006271
6272int
6273main ()
6274{
Mark Dickinson5e13e292010-05-11 08:55:06 +00006275
Gregory P. Smith373469a2009-11-01 21:03:38 +00006276 ;
6277 return 0;
6278}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006279_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006280if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006281 ac_cv_opt_olimit_ok=yes
6282else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006283 ac_cv_opt_olimit_ok=no
Matthias Klosec511b472010-05-08 11:01:39 +00006284
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006285fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00006286rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006287CC="$ac_save_cc"
6288fi
6289
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006290{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_opt_olimit_ok" >&5
6291$as_echo "$ac_cv_opt_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006292if test $ac_cv_opt_olimit_ok = yes; then
6293 case $ac_sys_system in
6294 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
6295 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
6296 # environment?
6297 Darwin*)
6298 ;;
Trent Nelson34562e12012-10-17 18:01:12 -04006299 # XXX thankfully this useless troublemaker of a flag has been
6300 # eradicated in the 3.x line. For now, make sure it isn't picked
6301 # up by any of our other platforms that use CC.
6302 AIX*|SunOS*|HP-UX*|IRIX*)
6303 ;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006304 *)
6305 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
6306 ;;
6307 esac
6308else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006309 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Olimit 1500" >&5
6310$as_echo_n "checking whether $CC accepts -Olimit 1500... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006311 if ${ac_cv_olimit_ok+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006312 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006313else
6314 ac_save_cc="$CC"
6315 CC="$CC -Olimit 1500"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006316 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006317/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00006318
6319int
6320main ()
6321{
Mark Dickinson5e13e292010-05-11 08:55:06 +00006322
Gregory P. Smith373469a2009-11-01 21:03:38 +00006323 ;
6324 return 0;
6325}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006326_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006327if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006328 ac_cv_olimit_ok=yes
6329else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006330 ac_cv_olimit_ok=no
Matthias Klosec511b472010-05-08 11:01:39 +00006331
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006332fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00006333rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006334 CC="$ac_save_cc"
6335fi
6336
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_olimit_ok" >&5
6338$as_echo "$ac_cv_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006339 if test $ac_cv_olimit_ok = yes; then
Stefan Krah67473262012-11-29 00:17:05 +01006340 case $ac_sys_system in
6341 # Issue #16534: On HP-UX ac_cv_olimit_ok=yes is a false positive.
6342 HP-UX*)
6343 ;;
6344 *)
6345 BASECFLAGS="$BASECFLAGS -Olimit 1500"
6346 ;;
6347 esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006348 fi
6349fi
6350
6351# Check whether GCC supports PyArg_ParseTuple format
6352if test "$GCC" = "yes"
6353then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006354 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
6355$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006356 save_CFLAGS=$CFLAGS
Benjamin Petersonc8759662013-05-11 13:00:05 -05006357 CFLAGS="$CFLAGS -Werror -Wformat"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006358 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006359/* end confdefs.h. */
6360
6361 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006362int
6363main ()
6364{
6365
6366 ;
6367 return 0;
6368}
Matthias Klosec511b472010-05-08 11:01:39 +00006369
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006370_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006371if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006372
Matthias Klosec511b472010-05-08 11:01:39 +00006373
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006374$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006375
Matthias Klosec511b472010-05-08 11:01:39 +00006376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006377$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00006378
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006379else
Matthias Klosec511b472010-05-08 11:01:39 +00006380
6381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006382$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006383
6384fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006385rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6386 CFLAGS=$save_CFLAGS
6387fi
6388
Brett Cannon4ff151a2015-09-18 15:09:42 -07006389
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)c543a0f2016-06-02 23:44:40 +00006390# Enable LTO flags
6391
6392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6393$as_echo_n "checking for --with-lto... " >&6; }
6394
6395# Check whether --with-lto was given.
6396if test "${with_lto+set}" = set; then :
6397 withval=$with_lto;
6398if test "$withval" != no
6399then
6400 Py_LTO='true'
6401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6402$as_echo "yes" >&6; };
6403else
6404 Py_LTO='false'
6405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6406$as_echo "no" >&6; };
6407fi
6408else
6409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6410$as_echo "no" >&6; }
6411fi
6412
6413if test "$Py_LTO" = 'true' ; then
6414 case $CC in
6415 *clang*)
6416 # Any changes made here should be reflected in the GCC+Darwin case below
6417 LTOFLAGS="-flto"
6418 ;;
6419 *gcc*)
6420 case $ac_sys_system in
6421 Darwin*)
6422 LTOFLAGS="-flto"
6423 ;;
6424 *)
6425 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6426 ;;
6427 esac
6428 ;;
6429 esac
6430fi
6431
6432
Brett Cannon4ff151a2015-09-18 15:09:42 -07006433# Enable PGO flags.
Zachary Ware6ed42ea2015-12-21 11:43:03 -06006434
6435
6436
6437
6438
6439
Brett Cannon4ff151a2015-09-18 15:09:42 -07006440# Extract the first word of "llvm-profdata", so it can be a program name with args.
6441set dummy llvm-profdata; ac_word=$2
6442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6443$as_echo_n "checking for $ac_word... " >&6; }
6444if ${ac_cv_prog_LLVM_PROF_FOUND+:} false; then :
6445 $as_echo_n "(cached) " >&6
6446else
6447 if test -n "$LLVM_PROF_FOUND"; then
6448 ac_cv_prog_LLVM_PROF_FOUND="$LLVM_PROF_FOUND" # Let the user override the test.
6449else
6450as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6451for as_dir in $PATH
6452do
6453 IFS=$as_save_IFS
6454 test -z "$as_dir" && as_dir=.
6455 for ac_exec_ext in '' $ac_executable_extensions; do
6456 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6457 ac_cv_prog_LLVM_PROF_FOUND="found"
6458 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6459 break 2
6460 fi
6461done
6462 done
6463IFS=$as_save_IFS
6464
6465 test -z "$ac_cv_prog_LLVM_PROF_FOUND" && ac_cv_prog_LLVM_PROF_FOUND="not-found"
6466fi
6467fi
6468LLVM_PROF_FOUND=$ac_cv_prog_LLVM_PROF_FOUND
6469if test -n "$LLVM_PROF_FOUND"; then
6470 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROF_FOUND" >&5
6471$as_echo "$LLVM_PROF_FOUND" >&6; }
6472else
6473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6474$as_echo "no" >&6; }
6475fi
6476
6477
6478LLVM_PROF_ERR=no
6479case $CC in
6480 *clang*)
6481 # Any changes made here should be reflected in the GCC+Darwin case below
6482 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6483 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
6484 LLVM_PROF_MERGER="llvm-profdata merge -output=code.profclangd *.profclangr"
6485 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6486 if test $LLVM_PROF_FOUND = not-found
6487 then
6488 LLVM_PROF_ERR=yes
6489 fi
6490 ;;
6491 *gcc*)
6492 case $ac_sys_system in
6493 Darwin*)
6494 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6495 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
6496 LLVM_PROF_MERGER="llvm-profdata merge -output=code.profclangd *.profclangr"
6497 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6498 if test $LLVM_PROF_FOUND = not-found
6499 then
6500 LLVM_PROF_ERR=yes
6501 fi
6502 ;;
6503 *)
6504 PGO_PROF_GEN_FLAG="-fprofile-generate"
6505 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6506 LLVM_PROF_MERGER="true"
6507 LLVM_PROF_FILE=""
6508 ;;
6509 esac
6510 ;;
Zachary Ware6ed42ea2015-12-21 11:43:03 -06006511 *icc*)
6512 PGO_PROF_GEN_FLAG="-prof-gen"
6513 PGO_PROF_USE_FLAG="-prof-use"
6514 LLVM_PROF_MERGER="true"
6515 LLVM_PROF_FILE=""
6516 ;;
Brett Cannon4ff151a2015-09-18 15:09:42 -07006517esac
6518
6519
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006520# On some compilers, pthreads are available without further options
6521# (e.g. MacOS X). On some of these systems, the compiler will not
6522# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
6523# So we have to see first whether pthreads are available without
6524# options before we can check whether -Kpthread improves anything.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006525{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
6526$as_echo_n "checking whether pthreads are available without options... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006527if ${ac_cv_pthread_is_default+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006528 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006529else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006530 if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006531 ac_cv_pthread_is_default=no
6532else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006533 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006534/* end confdefs.h. */
6535
Stefan Krahae66ca62012-11-22 22:36:57 +01006536#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006537#include <pthread.h>
6538
6539void* routine(void* p){return NULL;}
6540
6541int main(){
6542 pthread_t p;
6543 if(pthread_create(&p,NULL,routine,NULL)!=0)
6544 return 1;
6545 (void)pthread_detach(p);
6546 return 0;
6547}
6548
6549_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006550if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006551
6552 ac_cv_pthread_is_default=yes
6553 ac_cv_kthread=no
6554 ac_cv_pthread=no
6555
6556else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006557 ac_cv_pthread_is_default=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006558fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006559rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6560 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006561fi
6562
6563
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006564fi
6565
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006566{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
6567$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006568
6569
6570if test $ac_cv_pthread_is_default = yes
6571then
6572 ac_cv_kpthread=no
6573else
6574# -Kpthread, if available, provides the right #defines
6575# and linker options to make pthread_create available
6576# Some compilers won't report that they do not support -Kpthread,
6577# so we need to run a program to see whether it really made the
6578# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
6580$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006581if ${ac_cv_kpthread+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006582 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006583else
6584 ac_save_cc="$CC"
6585CC="$CC -Kpthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006586if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006587 ac_cv_kpthread=no
6588else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006589 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006590/* end confdefs.h. */
6591
Stefan Krahae66ca62012-11-22 22:36:57 +01006592#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006593#include <pthread.h>
6594
6595void* routine(void* p){return NULL;}
6596
6597int main(){
6598 pthread_t p;
6599 if(pthread_create(&p,NULL,routine,NULL)!=0)
6600 return 1;
6601 (void)pthread_detach(p);
6602 return 0;
6603}
6604
6605_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006606if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006607 ac_cv_kpthread=yes
6608else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006609 ac_cv_kpthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006610fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006611rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6612 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006613fi
6614
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006615CC="$ac_save_cc"
6616fi
6617
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006618{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
6619$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006620fi
6621
6622if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
6623then
6624# -Kthread, if available, provides the right #defines
6625# and linker options to make pthread_create available
6626# Some compilers won't report that they do not support -Kthread,
6627# so we need to run a program to see whether it really made the
6628# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
6630$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006631if ${ac_cv_kthread+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006632 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006633else
6634 ac_save_cc="$CC"
6635CC="$CC -Kthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006636if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006637 ac_cv_kthread=no
6638else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006639 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006640/* end confdefs.h. */
6641
Stefan Krahae66ca62012-11-22 22:36:57 +01006642#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006643#include <pthread.h>
6644
6645void* routine(void* p){return NULL;}
6646
6647int main(){
6648 pthread_t p;
6649 if(pthread_create(&p,NULL,routine,NULL)!=0)
6650 return 1;
6651 (void)pthread_detach(p);
6652 return 0;
6653}
6654
6655_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006656if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006657 ac_cv_kthread=yes
6658else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006659 ac_cv_kthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006660fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006661rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6662 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006663fi
6664
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006665CC="$ac_save_cc"
6666fi
6667
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006668{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
6669$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006670fi
6671
6672if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
6673then
6674# -pthread, if available, provides the right #defines
6675# and linker options to make pthread_create available
6676# Some compilers won't report that they do not support -pthread,
6677# so we need to run a program to see whether it really made the
6678# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
6680$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.orgfa3f9a32013-01-25 15:32:31 +01006681if ${ac_cv_pthread+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006682 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006683else
6684 ac_save_cc="$CC"
6685CC="$CC -pthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006686if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006687 ac_cv_pthread=no
6688else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006689 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006690/* end confdefs.h. */
6691
Stefan Krahae66ca62012-11-22 22:36:57 +01006692#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006693#include <pthread.h>
6694
6695void* routine(void* p){return NULL;}
6696
6697int main(){
6698 pthread_t p;
6699 if(pthread_create(&p,NULL,routine,NULL)!=0)
6700 return 1;
6701 (void)pthread_detach(p);
6702 return 0;
6703}
6704
6705_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006706if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006707 ac_cv_pthread=yes
6708else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006709 ac_cv_pthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006710fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006711rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6712 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006713fi
6714
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006715CC="$ac_save_cc"
6716fi
6717
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006718{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
6719$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006720fi
6721
6722# If we have set a CC compiler flag for thread support then
6723# check if it works for CXX, too.
6724ac_cv_cxx_thread=no
6725if test ! -z "$CXX"
6726then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
6728$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006729ac_save_cxx="$CXX"
6730
6731if test "$ac_cv_kpthread" = "yes"
6732then
6733 CXX="$CXX -Kpthread"
6734 ac_cv_cxx_thread=yes
6735elif test "$ac_cv_kthread" = "yes"
6736then
6737 CXX="$CXX -Kthread"
6738 ac_cv_cxx_thread=yes
6739elif test "$ac_cv_pthread" = "yes"
6740then
6741 CXX="$CXX -pthread"
6742 ac_cv_cxx_thread=yes
6743fi
6744
6745if test $ac_cv_cxx_thread = yes
6746then
6747 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
6748 $CXX -c conftest.$ac_ext 2>&5
6749 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
6750 && test -s conftest$ac_exeext && ./conftest$ac_exeext
6751 then
6752 ac_cv_cxx_thread=yes
6753 else
6754 ac_cv_cxx_thread=no
6755 fi
6756 rm -fr conftest*
6757fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006758{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
6759$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006760fi
6761CXX="$ac_save_cxx"
6762
6763
6764# checks for header files
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6766$as_echo_n "checking for ANSI C header files... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006767if ${ac_cv_header_stdc+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006768 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006769else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006770 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006771/* end confdefs.h. */
6772#include <stdlib.h>
6773#include <stdarg.h>
6774#include <string.h>
6775#include <float.h>
6776
6777int
6778main ()
6779{
6780
6781 ;
6782 return 0;
6783}
6784_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006785if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006786 ac_cv_header_stdc=yes
6787else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006788 ac_cv_header_stdc=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006789fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006790rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6791
6792if test $ac_cv_header_stdc = yes; then
6793 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006794 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006795/* end confdefs.h. */
6796#include <string.h>
6797
6798_ACEOF
6799if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006800 $EGREP "memchr" >/dev/null 2>&1; then :
6801
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006802else
6803 ac_cv_header_stdc=no
6804fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006805rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006806
6807fi
6808
6809if test $ac_cv_header_stdc = yes; then
6810 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006811 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006812/* end confdefs.h. */
6813#include <stdlib.h>
6814
6815_ACEOF
6816if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006817 $EGREP "free" >/dev/null 2>&1; then :
6818
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006819else
6820 ac_cv_header_stdc=no
6821fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006822rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006823
6824fi
6825
6826if test $ac_cv_header_stdc = yes; then
6827 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006828 if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006829 :
6830else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006832/* end confdefs.h. */
6833#include <ctype.h>
6834#include <stdlib.h>
6835#if ((' ' & 0x0FF) == 0x020)
6836# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6837# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6838#else
6839# define ISLOWER(c) \
6840 (('a' <= (c) && (c) <= 'i') \
6841 || ('j' <= (c) && (c) <= 'r') \
6842 || ('s' <= (c) && (c) <= 'z'))
6843# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6844#endif
6845
6846#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6847int
6848main ()
6849{
6850 int i;
6851 for (i = 0; i < 256; i++)
6852 if (XOR (islower (i), ISLOWER (i))
6853 || toupper (i) != TOUPPER (i))
6854 return 2;
6855 return 0;
6856}
6857_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006858if ac_fn_c_try_run "$LINENO"; then :
6859
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006860else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006861 ac_cv_header_stdc=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006862fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006863rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6864 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006865fi
6866
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006867fi
6868fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006869{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6870$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006871if test $ac_cv_header_stdc = yes; then
6872
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006873$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006874
6875fi
6876
doko@ubuntu.comf27ec3e2014-04-17 20:11:19 +02006877for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00006878fcntl.h grp.h \
doko@ubuntu.comf27ec3e2014-04-17 20:11:19 +02006879ieeefp.h io.h langinfo.h libintl.h poll.h process.h pthread.h \
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00006880shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006881unistd.h utime.h \
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00006882sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
6883sys/lock.h sys/mkdev.h sys/modem.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00006884sys/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 +00006885sys/termio.h sys/time.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00006886sys/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 +00006887sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimes3aa138f2013-06-18 13:25:24 +02006888bluetooth/bluetooth.h linux/tipc.h spawn.h util.h alloca.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006889do :
6890 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6891ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006892if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006893 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006894#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006895_ACEOF
6896
6897fi
6898
Guido van Rossum627b2d71993-12-24 10:39:16 +00006899done
6900
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006901ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006902for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006903 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6905$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006906if eval \${$as_ac_Header+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006907 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006908else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006909 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006910/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006911#include <sys/types.h>
6912#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006913
Martin v. Löwis11437992002-04-12 09:54:03 +00006914int
6915main ()
6916{
6917if ((DIR *) 0)
6918return 0;
6919 ;
6920 return 0;
6921}
6922_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006923if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006924 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006925else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006926 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006927fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006928rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006929fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006930eval ac_res=\$$as_ac_Header
6931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6932$as_echo "$ac_res" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006933if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006934 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006935#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006936_ACEOF
6937
6938ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006939fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006940
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006941done
6942# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6943if test $ac_header_dirent = dirent.h; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006944 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6945$as_echo_n "checking for library containing opendir... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006946if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006947 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006948else
Martin v. Löwis11437992002-04-12 09:54:03 +00006949 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006950cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006951/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006952
Martin v. Löwiseba40652007-08-30 20:10:57 +00006953/* Override any GCC internal prototype to avoid an error.
6954 Use char because int might match the return type of a GCC
6955 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006956#ifdef __cplusplus
6957extern "C"
6958#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006959char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006960int
6961main ()
6962{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006963return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006964 ;
6965 return 0;
6966}
6967_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006968for ac_lib in '' dir; do
6969 if test -z "$ac_lib"; then
6970 ac_res="none required"
6971 else
6972 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00006973 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00006974 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006975 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006976 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00006977fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006978rm -f core conftest.err conftest.$ac_objext \
6979 conftest$ac_exeext
Matthias Klose3cef2a92012-03-14 23:39:33 +01006980 if ${ac_cv_search_opendir+:} false; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006981 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00006982fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006983done
Matthias Klose3cef2a92012-03-14 23:39:33 +01006984if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006985
Martin v. Löwiseba40652007-08-30 20:10:57 +00006986else
6987 ac_cv_search_opendir=no
6988fi
6989rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006990LIBS=$ac_func_search_save_LIBS
6991fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006992{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
6993$as_echo "$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006994ac_res=$ac_cv_search_opendir
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006995if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00006996 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006997
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006998fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006999
Michael W. Hudson54241132001-12-07 15:38:26 +00007000else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007001 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7002$as_echo_n "checking for library containing opendir... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007003if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007004 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007005else
7006 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007007cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007008/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007009
Martin v. Löwiseba40652007-08-30 20:10:57 +00007010/* Override any GCC internal prototype to avoid an error.
7011 Use char because int might match the return type of a GCC
7012 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007013#ifdef __cplusplus
7014extern "C"
7015#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007016char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007017int
7018main ()
7019{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007020return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007021 ;
7022 return 0;
7023}
7024_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007025for ac_lib in '' x; do
7026 if test -z "$ac_lib"; then
7027 ac_res="none required"
7028 else
7029 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00007030 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00007031 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007032 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007033 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00007034fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007035rm -f core conftest.err conftest.$ac_objext \
7036 conftest$ac_exeext
Matthias Klose3cef2a92012-03-14 23:39:33 +01007037 if ${ac_cv_search_opendir+:} false; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007038 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00007039fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007040done
Matthias Klose3cef2a92012-03-14 23:39:33 +01007041if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007042
Martin v. Löwiseba40652007-08-30 20:10:57 +00007043else
7044 ac_cv_search_opendir=no
7045fi
7046rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007047LIBS=$ac_func_search_save_LIBS
7048fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007049{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7050$as_echo "$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007051ac_res=$ac_cv_search_opendir
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007052if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007053 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007054
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007055fi
7056
7057fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007058
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7060$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007061if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007062 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007063else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007064 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007065/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007066#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007067int
7068main ()
7069{
7070return makedev(0, 0);
7071 ;
7072 return 0;
7073}
7074_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007075if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007076 ac_cv_header_sys_types_h_makedev=yes
7077else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007078 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007079fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007080rm -f core conftest.err conftest.$ac_objext \
7081 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007082
7083fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007084{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7085$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007086
7087if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007088ac_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 +01007089if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007090
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007091$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007092
7093fi
7094
7095
7096
7097 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007098 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 +01007099if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007100
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007101$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007102
7103fi
7104
7105
7106 fi
7107fi
7108
Michael W. Hudson54241132001-12-07 15:38:26 +00007109
Martin v. Löwis11017b12006-01-14 18:12:57 +00007110# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007111for ac_header in linux/netlink.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007112do :
7113 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 +00007114#ifdef HAVE_ASM_TYPES_H
7115#include <asm/types.h>
7116#endif
7117#ifdef HAVE_SYS_SOCKET_H
7118#include <sys/socket.h>
7119#endif
7120
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007121"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007122if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007123 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007124#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007125_ACEOF
7126
7127fi
7128
7129done
7130
7131
Guido van Rossum627b2d71993-12-24 10:39:16 +00007132# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00007133was_it_defined=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
7135$as_echo_n "checking for clock_t in time.h... " >&6; }
7136cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007137/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007138#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007139
7140_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007141if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007142 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00007143 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007144else
Martin v. Löwis11437992002-04-12 09:54:03 +00007145
7146
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007147$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00007148
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007149
Guido van Rossum627b2d71993-12-24 10:39:16 +00007150fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00007151rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007152
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007153{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
7154$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00007155
Neal Norwitz11690112002-07-30 01:08:28 +00007156# Check whether using makedev requires defining _OSF_SOURCE
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
7158$as_echo_n "checking for makedev... " >&6; }
7159cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007160/* end confdefs.h. */
Jesus Cea616de772010-04-28 10:32:30 +00007161
7162#if defined(MAJOR_IN_MKDEV)
7163#include <sys/mkdev.h>
7164#elif defined(MAJOR_IN_SYSMACROS)
7165#include <sys/sysmacros.h>
7166#else
Neal Norwitz6eb37f02003-02-23 23:28:15 +00007167#include <sys/types.h>
Jesus Cea616de772010-04-28 10:32:30 +00007168#endif
Neal Norwitz11690112002-07-30 01:08:28 +00007169int
7170main ()
7171{
7172 makedev(0, 0)
7173 ;
7174 return 0;
7175}
7176_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007177if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007178 ac_cv_has_makedev=yes
7179else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007180 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007181fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007182rm -f core conftest.err conftest.$ac_objext \
7183 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00007184if test "$ac_cv_has_makedev" = "no"; then
7185 # we didn't link, try if _OSF_SOURCE will allow us to link
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007186 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007187/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00007188
Neal Norwitz6eb37f02003-02-23 23:28:15 +00007189#define _OSF_SOURCE 1
7190#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00007191
Neal Norwitz11690112002-07-30 01:08:28 +00007192int
7193main ()
7194{
7195 makedev(0, 0)
7196 ;
7197 return 0;
7198}
7199_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007200if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007201 ac_cv_has_makedev=yes
7202else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007203 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007204fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007205rm -f core conftest.err conftest.$ac_objext \
7206 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00007207 if test "$ac_cv_has_makedev" = "yes"; then
7208
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007209$as_echo "#define _OSF_SOURCE 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007210
7211 fi
7212fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007213{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
7214$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007215if test "$ac_cv_has_makedev" = "yes"; then
7216
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007217$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007218
7219fi
7220
Martin v. Löwis399a6892002-10-04 10:22:02 +00007221# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7222# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7223# defined, but the compiler does not support pragma redefine_extname,
7224# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7225# structures (such as rlimit64) without declaring them. As a
7226# work-around, disable LFS on such configurations
7227
7228use_lfs=yes
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007229{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
7230$as_echo_n "checking Solaris LFS bug... " >&6; }
7231cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007232/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007233
7234#define _LARGEFILE_SOURCE 1
7235#define _FILE_OFFSET_BITS 64
7236#include <sys/resource.h>
7237
Martin v. Löwis399a6892002-10-04 10:22:02 +00007238int
7239main ()
7240{
7241struct rlimit foo;
7242 ;
7243 return 0;
7244}
7245_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007246if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00007247 sol_lfs_bug=no
7248else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007249 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00007250fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007251rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007252{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
7253$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007254if test "$sol_lfs_bug" = "yes"; then
7255 use_lfs=no
7256fi
7257
7258if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00007259# Two defines needed to enable largefile support on various platforms
7260# These may affect some typedefs
Georg Brandl94800df2011-02-25 11:09:02 +00007261case $ac_sys_system/$ac_sys_release in
7262AIX*)
7263
7264$as_echo "#define _LARGE_FILES 1" >>confdefs.h
7265
7266 ;;
7267esac
Guido van Rossum810cc512001-09-09 23:51:39 +00007268
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007269$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007270
7271
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007272$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00007273
Martin v. Löwis399a6892002-10-04 10:22:02 +00007274fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007275
Guido van Rossum84e7b241996-08-19 21:59:00 +00007276# Add some code to confdefs.h so that the test for off_t works on SCO
7277cat >> confdefs.h <<\EOF
7278#if defined(SCO_DS)
7279#undef _OFF_T
7280#endif
7281EOF
7282
Guido van Rossumef2255b2000-03-10 22:30:29 +00007283# Type availability checks
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007284ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007285if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007286
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007287else
Martin v. Löwis11437992002-04-12 09:54:03 +00007288
7289cat >>confdefs.h <<_ACEOF
7290#define mode_t int
7291_ACEOF
7292
7293fi
7294
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007295ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007296if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007297
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007298else
Martin v. Löwis11437992002-04-12 09:54:03 +00007299
7300cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007301#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00007302_ACEOF
7303
7304fi
7305
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007306ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007307if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007308
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007309else
Martin v. Löwis11437992002-04-12 09:54:03 +00007310
7311cat >>confdefs.h <<_ACEOF
7312#define pid_t int
7313_ACEOF
7314
7315fi
7316
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007317
Martin v. Löwis11437992002-04-12 09:54:03 +00007318cat >>confdefs.h <<_ACEOF
Matthias Klosecbf54b12010-05-08 11:04:18 +00007319#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00007320_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007321
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007322ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007323if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007324
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007325else
Martin v. Löwis11437992002-04-12 09:54:03 +00007326
7327cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007328#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007329_ACEOF
7330
7331fi
7332
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
7334$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007335if ${ac_cv_type_uid_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007336 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007337else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007338 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007339/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007340#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007341
7342_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007343if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007344 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007345 ac_cv_type_uid_t=yes
7346else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007347 ac_cv_type_uid_t=no
7348fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00007349rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007350
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007351fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007352{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
7353$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007354if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007355
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007356$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007357
7358
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007359$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007360
7361fi
7362
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007363
7364# There are two separate checks for each of the exact-width integer types we
7365# need. First we check whether the type is available using the usual
7366# AC_CHECK_TYPE macro with the default includes (which includes <inttypes.h>
7367# and <stdint.h> where available). We then also use the special type checks of
7368# the form AC_TYPE_UINT32_T, which in the case that uint32_t is not available
7369# directly, #define's uint32_t to be a suitable type.
7370
7371ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
7372if test "x$ac_cv_type_uint32_t" = xyes; then :
7373
7374$as_echo "#define HAVE_UINT32_T 1" >>confdefs.h
7375
7376fi
7377
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007378ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
7379case $ac_cv_c_uint32_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007380 no|yes) ;; #(
7381 *)
7382
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007383$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007384
7385
7386cat >>confdefs.h <<_ACEOF
7387#define uint32_t $ac_cv_c_uint32_t
7388_ACEOF
7389;;
7390 esac
7391
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007392
7393ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
7394if test "x$ac_cv_type_uint64_t" = xyes; then :
7395
7396$as_echo "#define HAVE_UINT64_T 1" >>confdefs.h
7397
7398fi
7399
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007400ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
7401case $ac_cv_c_uint64_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007402 no|yes) ;; #(
7403 *)
7404
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007405$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007406
7407
7408cat >>confdefs.h <<_ACEOF
7409#define uint64_t $ac_cv_c_uint64_t
7410_ACEOF
7411;;
7412 esac
7413
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007414
7415ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
7416if test "x$ac_cv_type_int32_t" = xyes; then :
7417
7418$as_echo "#define HAVE_INT32_T 1" >>confdefs.h
7419
7420fi
7421
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007422ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
7423case $ac_cv_c_int32_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007424 no|yes) ;; #(
7425 *)
7426
7427cat >>confdefs.h <<_ACEOF
7428#define int32_t $ac_cv_c_int32_t
7429_ACEOF
7430;;
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007431esac
7432
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007433
7434ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
7435if test "x$ac_cv_type_int64_t" = xyes; then :
7436
7437$as_echo "#define HAVE_INT64_T 1" >>confdefs.h
7438
7439fi
7440
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007441ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
7442case $ac_cv_c_int64_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007443 no|yes) ;; #(
7444 *)
7445
7446cat >>confdefs.h <<_ACEOF
7447#define int64_t $ac_cv_c_int64_t
7448_ACEOF
7449;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007450esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00007451
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007452
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007453ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007454if test "x$ac_cv_type_ssize_t" = xyes; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007455
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007456$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00007457
7458fi
7459
Jack Jansendd19cf82001-12-06 22:36:17 +00007460
Michael W. Hudson54241132001-12-07 15:38:26 +00007461# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007462# ANSI C requires sizeof(char) == 1, so no need to check it
Martin v. Löwiseba40652007-08-30 20:10:57 +00007463# The cast to long int works around a bug in the HP C Compiler
7464# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7465# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7466# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007467{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
7468$as_echo_n "checking size of int... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007469if ${ac_cv_sizeof_int+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007470 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007471else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007472 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 +00007473
Martin v. Löwis11437992002-04-12 09:54:03 +00007474else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007475 if test "$ac_cv_type_int" = yes; then
7476 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7477$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007478as_fn_error 77 "cannot compute sizeof (int)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007479See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007480 else
7481 ac_cv_sizeof_int=0
7482 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007483fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007484
Martin v. Löwis11437992002-04-12 09:54:03 +00007485fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007486{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
7487$as_echo "$ac_cv_sizeof_int" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007488
7489
7490
Martin v. Löwis11437992002-04-12 09:54:03 +00007491cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007492#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007493_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007494
7495
Martin v. Löwiseba40652007-08-30 20:10:57 +00007496# The cast to long int works around a bug in the HP C Compiler
7497# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7498# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7499# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
7501$as_echo_n "checking size of long... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007502if ${ac_cv_sizeof_long+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007503 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007504else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007505 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 +00007506
Martin v. Löwis11437992002-04-12 09:54:03 +00007507else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007508 if test "$ac_cv_type_long" = yes; then
7509 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7510$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007511as_fn_error 77 "cannot compute sizeof (long)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007512See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007513 else
7514 ac_cv_sizeof_long=0
7515 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007516fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007517
Martin v. Löwis11437992002-04-12 09:54:03 +00007518fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007519{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
7520$as_echo "$ac_cv_sizeof_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007521
7522
7523
Martin v. Löwis11437992002-04-12 09:54:03 +00007524cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007525#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007526_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007527
7528
Martin v. Löwiseba40652007-08-30 20:10:57 +00007529# The cast to long int works around a bug in the HP C Compiler
7530# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7531# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7532# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
7534$as_echo_n "checking size of void *... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007535if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007536 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007537else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007538 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 +00007539
Martin v. Löwis11437992002-04-12 09:54:03 +00007540else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007541 if test "$ac_cv_type_void_p" = yes; then
7542 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7543$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007544as_fn_error 77 "cannot compute sizeof (void *)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007545See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007546 else
7547 ac_cv_sizeof_void_p=0
7548 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007549fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007550
Martin v. Löwis11437992002-04-12 09:54:03 +00007551fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007552{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
7553$as_echo "$ac_cv_sizeof_void_p" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007554
7555
7556
Martin v. Löwis11437992002-04-12 09:54:03 +00007557cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007558#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00007559_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007560
7561
Martin v. Löwiseba40652007-08-30 20:10:57 +00007562# The cast to long int works around a bug in the HP C Compiler
7563# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7564# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7565# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
7567$as_echo_n "checking size of short... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007568if ${ac_cv_sizeof_short+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007569 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007570else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007571 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 +00007572
Martin v. Löwis11437992002-04-12 09:54:03 +00007573else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007574 if test "$ac_cv_type_short" = yes; then
7575 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7576$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007577as_fn_error 77 "cannot compute sizeof (short)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007578See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007579 else
7580 ac_cv_sizeof_short=0
7581 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007582fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007583
Martin v. Löwis11437992002-04-12 09:54:03 +00007584fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007585{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
7586$as_echo "$ac_cv_sizeof_short" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007587
7588
7589
Martin v. Löwis11437992002-04-12 09:54:03 +00007590cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007591#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007592_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007593
7594
Martin v. Löwiseba40652007-08-30 20:10:57 +00007595# The cast to long int works around a bug in the HP C Compiler
7596# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7597# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7598# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
7600$as_echo_n "checking size of float... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007601if ${ac_cv_sizeof_float+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007602 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007603else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007604 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 +00007605
Martin v. Löwis11437992002-04-12 09:54:03 +00007606else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007607 if test "$ac_cv_type_float" = yes; then
7608 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7609$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007610as_fn_error 77 "cannot compute sizeof (float)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007611See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007612 else
7613 ac_cv_sizeof_float=0
7614 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007615fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007616
Martin v. Löwis11437992002-04-12 09:54:03 +00007617fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007618{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
7619$as_echo "$ac_cv_sizeof_float" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007620
7621
7622
Martin v. Löwis11437992002-04-12 09:54:03 +00007623cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007624#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007625_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007626
7627
Martin v. Löwiseba40652007-08-30 20:10:57 +00007628# The cast to long int works around a bug in the HP C Compiler
7629# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7630# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7631# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
7633$as_echo_n "checking size of double... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007634if ${ac_cv_sizeof_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007635 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007636else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007637 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 +00007638
Martin v. Löwis11437992002-04-12 09:54:03 +00007639else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007640 if test "$ac_cv_type_double" = yes; then
7641 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7642$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007643as_fn_error 77 "cannot compute sizeof (double)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007644See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007645 else
7646 ac_cv_sizeof_double=0
7647 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007648fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007649
Martin v. Löwis11437992002-04-12 09:54:03 +00007650fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007651{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
7652$as_echo "$ac_cv_sizeof_double" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007653
7654
7655
Martin v. Löwis11437992002-04-12 09:54:03 +00007656cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007657#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007658_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007659
7660
Martin v. Löwiseba40652007-08-30 20:10:57 +00007661# The cast to long int works around a bug in the HP C Compiler
7662# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7663# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7664# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
7666$as_echo_n "checking size of fpos_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007667if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007668 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007669else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007670 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 +00007671
Martin v. Löwis11437992002-04-12 09:54:03 +00007672else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007673 if test "$ac_cv_type_fpos_t" = yes; then
7674 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7675$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007676as_fn_error 77 "cannot compute sizeof (fpos_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007677See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007678 else
7679 ac_cv_sizeof_fpos_t=0
7680 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007681fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007682
Martin v. Löwis11437992002-04-12 09:54:03 +00007683fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007684{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
7685$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007686
7687
7688
Martin v. Löwis11437992002-04-12 09:54:03 +00007689cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007690#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007691_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007692
Michael W. Hudson54241132001-12-07 15:38:26 +00007693
Martin v. Löwiseba40652007-08-30 20:10:57 +00007694# The cast to long int works around a bug in the HP C Compiler
7695# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7696# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7697# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
7699$as_echo_n "checking size of size_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007700if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007701 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007702else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007703 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 +00007704
Martin v. Löwis18e16552006-02-15 17:27:45 +00007705else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007706 if test "$ac_cv_type_size_t" = yes; then
7707 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7708$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007709as_fn_error 77 "cannot compute sizeof (size_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007710See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007711 else
7712 ac_cv_sizeof_size_t=0
7713 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00007714fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007715
Martin v. Löwis18e16552006-02-15 17:27:45 +00007716fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007717{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
7718$as_echo "$ac_cv_sizeof_size_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007719
7720
7721
Martin v. Löwis18e16552006-02-15 17:27:45 +00007722cat >>confdefs.h <<_ACEOF
7723#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
7724_ACEOF
7725
7726
Christian Heimes951cc0f2008-01-31 23:08:23 +00007727# The cast to long int works around a bug in the HP C Compiler
7728# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7729# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7730# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
7732$as_echo_n "checking size of pid_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007733if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007734 $as_echo_n "(cached) " >&6
Christian Heimes951cc0f2008-01-31 23:08:23 +00007735else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007736 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 +00007737
Christian Heimes951cc0f2008-01-31 23:08:23 +00007738else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007739 if test "$ac_cv_type_pid_t" = yes; then
7740 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7741$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007742as_fn_error 77 "cannot compute sizeof (pid_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007743See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes951cc0f2008-01-31 23:08:23 +00007744 else
7745 ac_cv_sizeof_pid_t=0
7746 fi
7747fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007748
Christian Heimes951cc0f2008-01-31 23:08:23 +00007749fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007750{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
7751$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes951cc0f2008-01-31 23:08:23 +00007752
7753
7754
7755cat >>confdefs.h <<_ACEOF
7756#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
7757_ACEOF
7758
7759
Michael W. Hudson54241132001-12-07 15:38:26 +00007760
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
7762$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007763have_long_long=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007764cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007765/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007766
Martin v. Löwis11437992002-04-12 09:54:03 +00007767int
7768main ()
7769{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007770long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007771 ;
7772 return 0;
7773}
7774_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007775if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007776
7777
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007778$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007779
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007780 have_long_long=yes
7781
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007782fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007783rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007784{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
7785$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007786if test "$have_long_long" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00007787# The cast to long int works around a bug in the HP C Compiler
7788# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7789# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7790# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
7792$as_echo_n "checking size of long long... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007793if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007794 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007795else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007796 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 +00007797
Martin v. Löwis11437992002-04-12 09:54:03 +00007798else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007799 if test "$ac_cv_type_long_long" = yes; then
7800 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7801$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007802as_fn_error 77 "cannot compute sizeof (long long)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007803See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007804 else
7805 ac_cv_sizeof_long_long=0
7806 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007807fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007808
Martin v. Löwis11437992002-04-12 09:54:03 +00007809fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007810{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
7811$as_echo "$ac_cv_sizeof_long_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007812
7813
7814
Martin v. Löwis11437992002-04-12 09:54:03 +00007815cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007816#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007817_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007818
Michael W. Hudson54241132001-12-07 15:38:26 +00007819
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007820fi
7821
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
7823$as_echo_n "checking for long double support... " >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007824have_long_double=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007825cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007826/* end confdefs.h. */
7827
7828int
7829main ()
7830{
Matthias Klosec511b472010-05-08 11:01:39 +00007831long double x; x = (long double)0;
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007832 ;
7833 return 0;
7834}
7835_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007836if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007837
7838
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007839$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007840
7841 have_long_double=yes
7842
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007843fi
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007844rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007845{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
7846$as_echo "$have_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007847if test "$have_long_double" = yes ; then
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007848# The cast to long int works around a bug in the HP C Compiler
7849# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7850# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7851# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
7853$as_echo_n "checking size of long double... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007854if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007855 $as_echo_n "(cached) " >&6
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007856else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007857 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 +00007858
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007859else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007860 if test "$ac_cv_type_long_double" = yes; then
7861 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7862$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007863as_fn_error 77 "cannot compute sizeof (long double)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007864See \`config.log' for more details" "$LINENO" 5; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007865 else
7866 ac_cv_sizeof_long_double=0
7867 fi
7868fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007869
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007870fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007871{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
7872$as_echo "$ac_cv_sizeof_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007873
7874
7875
7876cat >>confdefs.h <<_ACEOF
7877#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7878_ACEOF
7879
7880
7881fi
7882
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7884$as_echo_n "checking for _Bool support... " >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007885have_c99_bool=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007886cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007887/* end confdefs.h. */
7888
7889int
7890main ()
7891{
7892_Bool x; x = (_Bool)0;
7893 ;
7894 return 0;
7895}
7896_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007897if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007898
7899
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007900$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007901
7902 have_c99_bool=yes
7903
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007904fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007905rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007906{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7907$as_echo "$have_c99_bool" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007908if test "$have_c99_bool" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00007909# The cast to long int works around a bug in the HP C Compiler
7910# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7911# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7912# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7914$as_echo_n "checking size of _Bool... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007915if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007916 $as_echo_n "(cached) " >&6
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007917else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007918 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 +00007919
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007920else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007921 if test "$ac_cv_type__Bool" = yes; then
7922 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7923$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007924as_fn_error 77 "cannot compute sizeof (_Bool)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007925See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007926 else
7927 ac_cv_sizeof__Bool=0
7928 fi
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007929fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007930
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007931fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007932{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7933$as_echo "$ac_cv_sizeof__Bool" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007934
7935
7936
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007937cat >>confdefs.h <<_ACEOF
7938#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7939_ACEOF
7940
7941
7942fi
7943
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007944ac_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 +00007945 #include <stdint.h>
7946 #endif
Antoine Pitrou7be5a652010-10-10 08:14:41 +00007947 #ifdef HAVE_INTTYPES_H
7948 #include <inttypes.h>
7949 #endif
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007950"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007951if test "x$ac_cv_type_uintptr_t" = xyes; then :
Martin v. Löwisebe26702006-10-02 14:55:51 +00007952
7953cat >>confdefs.h <<_ACEOF
7954#define HAVE_UINTPTR_T 1
7955_ACEOF
7956
Martin v. Löwiseba40652007-08-30 20:10:57 +00007957# The cast to long int works around a bug in the HP C Compiler
7958# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7959# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7960# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
7962$as_echo_n "checking size of uintptr_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007963if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007964 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007965else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007966 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 +00007967
Martin v. Löwis11437992002-04-12 09:54:03 +00007968else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007969 if test "$ac_cv_type_uintptr_t" = yes; then
7970 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7971$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007972as_fn_error 77 "cannot compute sizeof (uintptr_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007973See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007974 else
7975 ac_cv_sizeof_uintptr_t=0
7976 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007977fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007978
Martin v. Löwis11437992002-04-12 09:54:03 +00007979fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007980{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
7981$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007982
7983
7984
Martin v. Löwis11437992002-04-12 09:54:03 +00007985cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007986#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007987_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007988
Michael W. Hudson54241132001-12-07 15:38:26 +00007989
Barry Warsawbc7c7f92000-08-18 04:53:33 +00007990fi
7991
Martin v. Löwisebe26702006-10-02 14:55:51 +00007992
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00007993# The cast to long int works around a bug in the HP C Compiler
7994# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7995# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7996# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
7998$as_echo_n "checking size of off_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007999if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008000 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008001else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008002 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008003#ifdef HAVE_SYS_TYPES_H
8004#include <sys/types.h>
8005#endif
8006
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008007"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008008
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008009else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008010 if test "$ac_cv_type_off_t" = yes; then
8011 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8012$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008013as_fn_error 77 "cannot compute sizeof (off_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01008014See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008015 else
8016 ac_cv_sizeof_off_t=0
8017 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008018fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008019
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008020fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008021{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8022$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008023
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008024
8025
Martin v. Löwis11437992002-04-12 09:54:03 +00008026cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008027#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008028_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008029
Michael W. Hudson54241132001-12-07 15:38:26 +00008030
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008031
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8033$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson0ef0b912009-12-31 21:11:48 +00008034if test "$have_long_long" = yes
8035then
8036if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008037 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008038
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008039$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008040
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8042$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008043else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8045$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008046fi
Mark Dickinson0ef0b912009-12-31 21:11:48 +00008047else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8049$as_echo "no" >&6; }
Mark Dickinson0ef0b912009-12-31 21:11:48 +00008050fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008051
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008052# The cast to long int works around a bug in the HP C Compiler
8053# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8054# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8055# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8057$as_echo_n "checking size of time_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008058if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008059 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008060else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008061 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008062#ifdef HAVE_SYS_TYPES_H
8063#include <sys/types.h>
8064#endif
8065#ifdef HAVE_TIME_H
8066#include <time.h>
8067#endif
8068
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008069"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008070
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008071else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008072 if test "$ac_cv_type_time_t" = yes; then
8073 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8074$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008075as_fn_error 77 "cannot compute sizeof (time_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01008076See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008077 else
8078 ac_cv_sizeof_time_t=0
8079 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008080fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008081
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008082fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008083{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8084$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008085
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008086
8087
Martin v. Löwis11437992002-04-12 09:54:03 +00008088cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008089#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008090_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008091
Michael W. Hudson54241132001-12-07 15:38:26 +00008092
8093
Trent Mick635f6fb2000-08-23 21:33:05 +00008094# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008095ac_save_cc="$CC"
8096if test "$ac_cv_kpthread" = "yes"
8097then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008098elif test "$ac_cv_kthread" = "yes"
8099then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008100elif test "$ac_cv_pthread" = "yes"
8101then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008102fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8104$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008105have_pthread_t=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008106cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008107/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00008108
8109 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008110int
8111main ()
8112{
Guido van Rossum12580492000-09-24 16:47:19 +00008113pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008114 ;
8115 return 0;
8116}
Matthias Klosec511b472010-05-08 11:01:39 +00008117
Martin v. Löwis11437992002-04-12 09:54:03 +00008118_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008119if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008120 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008121fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008122rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008123{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8124$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008125if test "$have_pthread_t" = yes ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008126 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008127# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8128# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8129# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8131$as_echo_n "checking size of pthread_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008132if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008133 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008134else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008135 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008136#ifdef HAVE_PTHREAD_H
8137#include <pthread.h>
8138#endif
8139
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008140"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008141
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008142else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008143 if test "$ac_cv_type_pthread_t" = yes; then
8144 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8145$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008146as_fn_error 77 "cannot compute sizeof (pthread_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01008147See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008148 else
8149 ac_cv_sizeof_pthread_t=0
8150 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008151fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008152
Trent Mick635f6fb2000-08-23 21:33:05 +00008153fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008154{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8155$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008156
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008157
8158
Martin v. Löwis11437992002-04-12 09:54:03 +00008159cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008160#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008161_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008162
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008163
Trent Mick635f6fb2000-08-23 21:33:05 +00008164fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008165CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008166
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-toolbox-glue" >&5
8168$as_echo_n "checking for --enable-toolbox-glue... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008169# Check whether --enable-toolbox-glue was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008170if test "${enable_toolbox_glue+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008171 enableval=$enable_toolbox_glue;
8172fi
Jack Jansene578a632001-08-15 01:27:14 +00008173
8174
8175if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +00008176then
Jack Jansene578a632001-08-15 01:27:14 +00008177 case $ac_sys_system/$ac_sys_release in
8178 Darwin/*)
8179 enable_toolbox_glue="yes";;
8180 *)
8181 enable_toolbox_glue="no";;
8182 esac
8183fi
8184case "$enable_toolbox_glue" in
8185yes)
Jack Jansene578a632001-08-15 01:27:14 +00008186 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008187 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +00008188
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008189$as_echo "#define USE_TOOLBOX_OBJECT_GLUE 1" >>confdefs.h
Jack Jansene578a632001-08-15 01:27:14 +00008190
8191 ;;
8192*)
Jack Jansene578a632001-08-15 01:27:14 +00008193 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00008194 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00008195 ;;
8196esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008197{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_toolbox_glue" >&5
8198$as_echo "$enable_toolbox_glue" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008199
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008200
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00008201
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008202case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +00008203 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008204 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8205 ;;
8206 Darwin/*)
8207 OTHER_LIBTOOL_OPT=""
8208 ;;
8209esac
8210
8211
Ronald Oussoren25967582009-09-06 10:00:26 +00008212
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008213case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +00008214 Darwin/[01567]\..*)
Ronald Oussoren988117f2006-04-29 11:31:35 +00008215 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8216 if test "${enable_universalsdk}"; then
8217 :
8218 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00008219 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Ronald Oussoren988117f2006-04-29 11:31:35 +00008220 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008221 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008222 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008223 Darwin/*)
Ronald Oussorena55af9a2010-01-17 16:25:57 +00008224 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008225 if test ${gcc_version} '<' 4.0
8226 then
8227 LIBTOOL_CRUFT="-lcc_dynamic"
8228 else
8229 LIBTOOL_CRUFT=""
8230 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008231 if test "$cross_compiling" = yes; then :
Ronald Oussoren23d92532009-09-07 06:12:00 +00008232 ac_osx_32bit=yes
Ronald Oussoren25967582009-09-06 10:00:26 +00008233else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008234 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren25967582009-09-06 10:00:26 +00008235/* end confdefs.h. */
Ronald Oussoren23d92532009-09-07 06:12:00 +00008236
Ronald Oussoren25967582009-09-06 10:00:26 +00008237 #include <unistd.h>
8238 int main(int argc, char*argv[])
8239 {
8240 if (sizeof(long) == 4) {
8241 return 0;
8242 } else {
8243 return 1;
8244 }
Ronald Oussoren84ddd722009-09-08 07:17:10 +00008245 }
Ronald Oussoren23d92532009-09-07 06:12:00 +00008246
Ronald Oussoren25967582009-09-06 10:00:26 +00008247_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008248if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren25967582009-09-06 10:00:26 +00008249 ac_osx_32bit=yes
8250else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008251 ac_osx_32bit=no
Ronald Oussoren25967582009-09-06 10:00:26 +00008252fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008253rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8254 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren25967582009-09-06 10:00:26 +00008255fi
8256
8257
Ronald Oussoren25967582009-09-06 10:00:26 +00008258 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00008259 case `/usr/bin/arch` in
Ronald Oussoren25967582009-09-06 10:00:26 +00008260 i386)
8261 MACOSX_DEFAULT_ARCH="i386"
8262 ;;
8263 ppc)
8264 MACOSX_DEFAULT_ARCH="ppc"
8265 ;;
8266 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008267 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren25967582009-09-06 10:00:26 +00008268 ;;
8269 esac
8270 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00008271 case `/usr/bin/arch` in
Ronald Oussoren25967582009-09-06 10:00:26 +00008272 i386)
8273 MACOSX_DEFAULT_ARCH="x86_64"
8274 ;;
8275 ppc)
8276 MACOSX_DEFAULT_ARCH="ppc64"
8277 ;;
8278 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008279 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren25967582009-09-06 10:00:26 +00008280 ;;
8281 esac
8282
8283 #ARCH_RUN_32BIT="true"
8284 fi
8285
8286 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00008287 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008288 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008289esac
8290
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
8292$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008293if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008294then
Skip Montanarodecc6a42003-01-01 20:07:49 +00008295 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00008296 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008297 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008298
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008299$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008300
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8302$as_echo "yes" >&6; }
Ronald Oussoren450d5612009-06-08 21:12:41 +00008303 if test $enable_shared = "yes"
8304 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008305 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 +00008306 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008307else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8309$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008310fi
8311
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
8313$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008314case $ac_sys_system/$ac_sys_release in
8315 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008316
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008317$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008318
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
8320$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008321 ;;
8322 *)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8324$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008325 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008326esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008327
Guido van Rossum0a516c91994-09-12 10:58:40 +00008328# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008329
Michael W. Hudson54241132001-12-07 15:38:26 +00008330
8331
8332
8333
Ronald Oussoren75912852010-04-08 08:13:31 +00008334
Guido van Rossum0a516c91994-09-12 10:58:40 +00008335# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00008336# -- usually .so, .sl on HP-UX, .dll on Cygwin
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
8338$as_echo_n "checking SO... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008339if test -z "$SO"
8340then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008341 case $ac_sys_system in
Neal Norwitz58e28882006-05-19 07:00:58 +00008342 hp*|HP*)
8343 case `uname -m` in
8344 ia64) SO=.so;;
8345 *) SO=.sl;;
8346 esac
8347 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00008348 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00008349 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008350 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +00008351else
8352 # this might also be a termcap variable, see #610332
8353 echo
8354 echo '====================================================================='
8355 echo '+ +'
8356 echo '+ WARNING: You have set SO in your environment. +'
8357 echo '+ Do you really mean to change the extension for shared libraries? +'
8358 echo '+ Continuing in 10 seconds to let you to ponder. +'
8359 echo '+ +'
8360 echo '====================================================================='
8361 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +00008362fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008363{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
8364$as_echo "$SO" >&6; }
Neal Norwitz58e28882006-05-19 07:00:58 +00008365
Ronald Oussoren79f90492009-01-02 10:44:46 +00008366
Neal Norwitz58e28882006-05-19 07:00:58 +00008367cat >>confdefs.h <<_ACEOF
8368#define SHLIB_EXT "$SO"
8369_ACEOF
8370
Guido van Rossum0a516c91994-09-12 10:58:40 +00008371# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00008372# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008373# (Shared libraries in this instance are shared modules to be loaded into
8374# Python, as opposed to building Python itself as a shared library.)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
8376$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008377if test -z "$LDSHARED"
8378then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008379 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008380 AIX*)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008381 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00008382 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008383 ;;
8384 BeOS*)
8385 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00008386 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008387 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008388 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008389 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008390 SunOS/5*)
Ronald Oussoren75912852010-04-08 08:13:31 +00008391 if test "$GCC" = "yes" ; then
8392 LDSHARED='$(CC) -shared'
8393 LDCXXSHARED='$(CXX) -shared'
8394 else
8395 LDSHARED='$(CC) -G'
8396 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a662000-05-26 12:22:54 +00008397 fi ;;
Thomas Hellerdc96a772008-04-04 10:07:55 +00008398 hp*|HP*)
Ronald Oussoren75912852010-04-08 08:13:31 +00008399 if test "$GCC" = "yes" ; then
8400 LDSHARED='$(CC) -shared'
8401 LDCXXSHARED='$(CXX) -shared'
8402 else
8403 LDSHARED='ld -b'
Thomas Hellerdc96a772008-04-04 10:07:55 +00008404 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +00008405 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +00008406 Darwin/1.3*)
Stefan Krah3a3e2032010-11-28 15:30:05 +00008407 LDSHARED='$(CC) -bundle'
8408 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00008409 if test "$enable_framework" ; then
8410 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008411 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8412 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008413 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008414 else
8415 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008416 LDSHARED="$LDSHARED -undefined suppress"
Ronald Oussoren75912852010-04-08 08:13:31 +00008417 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008418 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008419 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Stefan Krah3a3e2032010-11-28 15:30:05 +00008420 LDSHARED='$(CC) -bundle'
8421 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00008422 if test "$enable_framework" ; then
8423 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008424 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8425 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008426 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008427 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008428 # No framework, use the Python app as bundle-loader
8429 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00008430 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008431 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008432 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008433 Darwin/*)
8434 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
8435 # This allows an extension to be used in any Python
Ronald Oussoren38f1b982007-09-02 09:46:07 +00008436
Ned Deilyc40b9032014-06-25 13:48:46 -07008437 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
8438 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
8439 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
8440 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
8441 if test ${dep_target_major} -eq 10 && \
8442 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00008443 then
Ned Deilyc40b9032014-06-25 13:48:46 -07008444 # building for OS X 10.0 through 10.2
Stefan Krah3a3e2032010-11-28 15:30:05 +00008445 LDSHARED='$(CC) -bundle'
8446 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00008447 if test "$enable_framework" ; then
8448 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008449 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8450 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008451 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008452 else
8453 # No framework, use the Python app as bundle-loader
8454 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8455 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008456 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008457 fi
Ned Deilyc40b9032014-06-25 13:48:46 -07008458 else
8459 # building for OS X 10.3 and later
8460 if test "${enable_universalsdk}"; then
8461 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
8462 fi
8463 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
8464 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
8465 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00008466 fi
8467 ;;
Ronald Oussoren75912852010-04-08 08:13:31 +00008468 Linux*|GNU*|QNX*)
8469 LDSHARED='$(CC) -shared'
8470 LDCXXSHARED='$(CXX) -shared';;
8471 BSD/OS*/4*)
8472 LDSHARED="gcc -shared"
8473 LDCXXSHARED="g++ -shared";;
Martin v. Löwis222c5152006-06-03 07:37:13 +00008474 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008475 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008476 then
Stefan Krah3a3e2032010-11-28 15:30:05 +00008477 LDSHARED='$(CC) -shared'
8478 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00008479 else
Stefan Krah3a3e2032010-11-28 15:30:05 +00008480 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00008481 fi;;
Martin v. Löwis222c5152006-06-03 07:37:13 +00008482 OpenBSD*)
8483 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8484 then
Stefan Krah3a3e2032010-11-28 15:30:05 +00008485 LDSHARED='$(CC) -shared $(CCSHARED)'
8486 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Martin v. Löwis222c5152006-06-03 07:37:13 +00008487 else
8488 case `uname -r` in
8489 [01].* | 2.[0-7] | 2.[0-7].*)
8490 LDSHARED="ld -Bshareable ${LDFLAGS}"
8491 ;;
8492 *)
Stefan Krah3a3e2032010-11-28 15:30:05 +00008493 LDSHARED='$(CC) -shared $(CCSHARED)'
8494 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Martin v. Löwis222c5152006-06-03 07:37:13 +00008495 ;;
8496 esac
8497 fi;;
Ronald Oussoren75912852010-04-08 08:13:31 +00008498 NetBSD*|DragonFly*)
Antoine Pitroucb402772011-01-02 20:51:34 +00008499 LDSHARED='$(CC) -shared'
8500 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008501 OpenUNIX*|UnixWare*)
Ronald Oussoren75912852010-04-08 08:13:31 +00008502 if test "$GCC" = "yes" ; then
8503 LDSHARED='$(CC) -shared'
8504 LDCXXSHARED='$(CXX) -shared'
8505 else
8506 LDSHARED='$(CC) -G'
8507 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00008508 fi;;
Ronald Oussoren75912852010-04-08 08:13:31 +00008509 SCO_SV*)
8510 LDSHARED='$(CC) -Wl,-G,-Bexport'
8511 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
8512 CYGWIN*)
8513 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
8514 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
8515 atheos*)
8516 LDSHARED="gcc -shared"
8517 LDCXXSHARED="g++ -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008518 *) LDSHARED="ld";;
8519 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008520fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008521{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
8522$as_echo "$LDSHARED" >&6; }
Ronald Oussoren75912852010-04-08 08:13:31 +00008523LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008524BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008525# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008526# library (module) -- this is only needed for a few systems
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
8528$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008529if test -z "$CCSHARED"
8530then
Guido van Rossum07397971997-04-29 21:49:50 +00008531 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008532 SunOS*) if test "$GCC" = yes;
Martin v. Löwiseb623572007-03-12 10:50:39 +00008533 then CCSHARED="-fPIC";
8534 elif test `uname -p` = sparc;
8535 then CCSHARED="-xcode=pic32";
8536 else CCSHARED="-Kpic";
8537 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00008538 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00008539 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00008540 else CCSHARED="+z";
8541 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008542 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008543 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008544 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008545 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008546 if test "$GCC" = "yes"
8547 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008548 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008549 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008550 SCO_SV*)
8551 if test "$GCC" = "yes"
8552 then CCSHARED="-fPIC"
8553 else CCSHARED="-Kpic -belf"
8554 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008555 IRIX*/6*) case $CC in
8556 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00008557 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008558 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008559 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008560 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008561fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008562{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
8563$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008564# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008565# the python executable -- this is only needed for a few systems
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
8567$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008568if test -z "$LINKFORSHARED"
8569then
Guido van Rossum07397971997-04-29 21:49:50 +00008570 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008571 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008572 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00008573 LINKFORSHARED="-Wl,-E -Wl,+s";;
8574# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008575 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008576 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008577 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00008578 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008579 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
8580 # which is
Jack Jansene578a632001-08-15 01:27:14 +00008581 # not used by the core itself but which needs to be in the core so
8582 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +00008583 # -prebind is no longer used, because it actually seems to give a
8584 # slowdown in stead of a speedup, maybe due to the large number of
8585 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008586
8587 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +00008588 if test "$enable_framework"
8589 then
Jack Jansenda49e192005-01-07 13:08:22 +00008590 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008591 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008592 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008593 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008594 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00008595 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008596 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00008597 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8598 then
8599 LINKFORSHARED="-Wl,--export-dynamic"
8600 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008601 SunOS/5*) case $CC in
8602 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00008603 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00008604 then
8605 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008606 fi;;
8607 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00008608 CYGWIN*)
8609 if test $enable_shared = "no"
8610 then
8611 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
8612 fi;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00008613 QNX*)
8614 # -Wl,-E causes the symbols to be added to the dynamic
8615 # symbol table so that they can be found when a module
8616 # is loaded. -N 2048K causes the stack size to be set
8617 # to 2048 kilobytes so that the stack doesn't overflow
8618 # when running test_compile.py.
8619 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008620 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008621fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008622{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
8623$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008624
Michael W. Hudson54241132001-12-07 15:38:26 +00008625
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00008626
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
8628$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008629if test ! "$LIBRARY" = "$LDLIBRARY"
8630then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00008631 case $ac_sys_system in
8632 CYGWIN*)
8633 # Cygwin needs CCSHARED when building extension DLLs
8634 # but not when building the interpreter DLL.
8635 CFLAGSFORSHARED='';;
8636 *)
8637 CFLAGSFORSHARED='$(CCSHARED)'
8638 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008639fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008640{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
8641$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008642
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008643# SHLIBS are libraries (except -lc and -lm) to link to the python shared
8644# library (with --enable-shared).
8645# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008646# symbols, this must be set to $(LIBS) (expanded by make). We do this even
8647# if it is not required, since it creates a dependency of the shared library
8648# to LIBS. This, in turn, means that applications linking the shared libpython
8649# don't need to link LIBS explicitly. The default should be only changed
8650# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008651
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
8653$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008654case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008655 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008656 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008657esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008658{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
8659$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008660
8661
Guido van Rossum627b2d71993-12-24 10:39:16 +00008662# checks for libraries
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
8664$as_echo_n "checking for dlopen in -ldl... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008665if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008666 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008667else
Martin v. Löwis11437992002-04-12 09:54:03 +00008668 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008669LIBS="-ldl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008670cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008671/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008672
Martin v. Löwiseba40652007-08-30 20:10:57 +00008673/* Override any GCC internal prototype to avoid an error.
8674 Use char because int might match the return type of a GCC
8675 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008676#ifdef __cplusplus
8677extern "C"
8678#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008679char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008680int
8681main ()
8682{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008683return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008684 ;
8685 return 0;
8686}
8687_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008688if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008689 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008690else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008691 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008692fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008693rm -f core conftest.err conftest.$ac_objext \
8694 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008695LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008696fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008697{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
8698$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008699if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008700 cat >>confdefs.h <<_ACEOF
8701#define HAVE_LIBDL 1
8702_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008703
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008704 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00008705
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008706fi
8707 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
8709$as_echo_n "checking for shl_load in -ldld... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008710if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008711 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008712else
Martin v. Löwis11437992002-04-12 09:54:03 +00008713 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008714LIBS="-ldld $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008715cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008716/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008717
Martin v. Löwiseba40652007-08-30 20:10:57 +00008718/* Override any GCC internal prototype to avoid an error.
8719 Use char because int might match the return type of a GCC
8720 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008721#ifdef __cplusplus
8722extern "C"
8723#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008724char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008725int
8726main ()
8727{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008728return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008729 ;
8730 return 0;
8731}
8732_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008733if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008734 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008735else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008736 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008737fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008738rm -f core conftest.err conftest.$ac_objext \
8739 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008740LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008741fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008742{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
8743$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008744if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008745 cat >>confdefs.h <<_ACEOF
8746#define HAVE_LIBDLD 1
8747_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008748
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008749 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008750
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008751fi
8752 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00008753
Ronald Oussoren79f90492009-01-02 10:44:46 +00008754# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00008755if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008756 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
8757$as_echo_n "checking for library containing sem_init... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008758if ${ac_cv_search_sem_init+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008759 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008760else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008761 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008762cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008763/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008764
Martin v. Löwiseba40652007-08-30 20:10:57 +00008765/* Override any GCC internal prototype to avoid an error.
8766 Use char because int might match the return type of a GCC
8767 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008768#ifdef __cplusplus
8769extern "C"
8770#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008771char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008772int
8773main ()
8774{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008775return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008776 ;
8777 return 0;
8778}
8779_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00008780for ac_lib in '' pthread rt posix4; do
8781 if test -z "$ac_lib"; then
8782 ac_res="none required"
8783 else
8784 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00008785 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00008786 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008787 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008788 ac_cv_search_sem_init=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00008789fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008790rm -f core conftest.err conftest.$ac_objext \
8791 conftest$ac_exeext
Matthias Klose3cef2a92012-03-14 23:39:33 +01008792 if ${ac_cv_search_sem_init+:} false; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008793 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00008794fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008795done
Matthias Klose3cef2a92012-03-14 23:39:33 +01008796if ${ac_cv_search_sem_init+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008797
Martin v. Löwiseba40652007-08-30 20:10:57 +00008798else
8799 ac_cv_search_sem_init=no
8800fi
8801rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008802LIBS=$ac_func_search_save_LIBS
8803fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008804{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
8805$as_echo "$ac_cv_search_sem_init" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008806ac_res=$ac_cv_search_sem_init
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008807if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008808 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008809
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008810fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00008811 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00008812 # posix4 on Solaris 2.6
8813 # pthread (first!) on Linux
8814fi
8815
Martin v. Löwis19d17342003-06-14 21:03:05 +00008816# check if we need libintl for locale functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
8818$as_echo_n "checking for textdomain in -lintl... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008819if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008820 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00008821else
8822 ac_check_lib_save_LIBS=$LIBS
8823LIBS="-lintl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008824cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008825/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008826
Martin v. Löwiseba40652007-08-30 20:10:57 +00008827/* Override any GCC internal prototype to avoid an error.
8828 Use char because int might match the return type of a GCC
8829 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008830#ifdef __cplusplus
8831extern "C"
8832#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00008833char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008834int
8835main ()
8836{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008837return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008838 ;
8839 return 0;
8840}
8841_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008842if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008843 ac_cv_lib_intl_textdomain=yes
8844else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008845 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00008846fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008847rm -f core conftest.err conftest.$ac_objext \
8848 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00008849LIBS=$ac_check_lib_save_LIBS
8850fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008851{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
8852$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008853if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008854
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008855$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00008856
8857fi
8858
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008859
8860# checks for system dependent C++ extensions support
8861case "$ac_sys_system" in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008862 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
8863$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
8864 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008865/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00008866
Georg Brandl94800df2011-02-25 11:09:02 +00008867 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008868int
8869main ()
8870{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008871loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00008872 ;
8873 return 0;
8874}
Matthias Klosec511b472010-05-08 11:01:39 +00008875
Martin v. Löwis11437992002-04-12 09:54:03 +00008876_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008877if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008878
Matthias Klosec511b472010-05-08 11:01:39 +00008879
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008880$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008881
Matthias Klosec511b472010-05-08 11:01:39 +00008882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008883$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00008884
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008885else
Matthias Klosec511b472010-05-08 11:01:39 +00008886
8887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008888$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00008889
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008890fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008891rm -f core conftest.err conftest.$ac_objext \
8892 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008893 *) ;;
8894esac
8895
Guido van Rossum70c7f481998-03-26 18:44:10 +00008896# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008897# BeOS' sockets are stashed in libnet.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
8899$as_echo_n "checking for t_open in -lnsl... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008900if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008901 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008902else
Martin v. Löwis11437992002-04-12 09:54:03 +00008903 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008904LIBS="-lnsl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008905cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008906/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008907
Martin v. Löwiseba40652007-08-30 20:10:57 +00008908/* Override any GCC internal prototype to avoid an error.
8909 Use char because int might match the return type of a GCC
8910 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008911#ifdef __cplusplus
8912extern "C"
8913#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008914char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008915int
8916main ()
8917{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008918return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008919 ;
8920 return 0;
8921}
8922_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008923if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008924 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008925else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008926 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008927fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008928rm -f core conftest.err conftest.$ac_objext \
8929 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008930LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008931fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008932{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
8933$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008934if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008935 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008936fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00008937 # SVR4
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8939$as_echo_n "checking for socket in -lsocket... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008940if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008941 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008942else
Martin v. Löwis11437992002-04-12 09:54:03 +00008943 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008944LIBS="-lsocket $LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008945cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008946/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008947
Martin v. Löwiseba40652007-08-30 20:10:57 +00008948/* Override any GCC internal prototype to avoid an error.
8949 Use char because int might match the return type of a GCC
8950 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008951#ifdef __cplusplus
8952extern "C"
8953#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008954char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008955int
8956main ()
8957{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008958return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008959 ;
8960 return 0;
8961}
8962_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008963if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008964 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008965else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008966 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008967fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008968rm -f core conftest.err conftest.$ac_objext \
8969 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008970LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008971fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008972{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
8973$as_echo "$ac_cv_lib_socket_socket" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008974if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00008975 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00008976fi
8977 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00008978
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00008979case "$ac_sys_system" in
8980BeOS*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lnet" >&5
8982$as_echo_n "checking for socket in -lnet... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008983if ${ac_cv_lib_net_socket+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008984 $as_echo_n "(cached) " >&6
Guido van Rossumad678af1998-10-02 14:42:15 +00008985else
Martin v. Löwis11437992002-04-12 09:54:03 +00008986 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00008987LIBS="-lnet $LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008988cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008989/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008990
Martin v. Löwiseba40652007-08-30 20:10:57 +00008991/* Override any GCC internal prototype to avoid an error.
8992 Use char because int might match the return type of a GCC
8993 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008994#ifdef __cplusplus
8995extern "C"
8996#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008997char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008998int
8999main ()
9000{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009001return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009002 ;
9003 return 0;
9004}
9005_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009006if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009007 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +00009008else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009009 ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +00009010fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009011rm -f core conftest.err conftest.$ac_objext \
9012 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009013LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00009014fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009015{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_net_socket" >&5
9016$as_echo "$ac_cv_lib_net_socket" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009017if test "x$ac_cv_lib_net_socket" = xyes; then :
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009018 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009019fi
9020 # BeOS
9021;;
9022esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00009023
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9025$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009026
Martin v. Löwiseba40652007-08-30 20:10:57 +00009027# Check whether --with-libs was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009028if test "${with_libs+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009029 withval=$with_libs;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009030{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9031$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009032LIBS="$withval $LIBS"
9033
9034else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9036$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009037fi
9038
Guido van Rossum7f43da71994-08-01 12:15:30 +00009039
Benjamin Peterson64e8f6e2014-12-15 00:00:23 -05009040
9041
9042
9043
9044
9045
9046
9047if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9048 if test -n "$ac_tool_prefix"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009049 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9050set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9052$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009053if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009054 $as_echo_n "(cached) " >&6
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009055else
9056 case $PKG_CONFIG in
9057 [\\/]* | ?:[\\/]*)
9058 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9059 ;;
9060 *)
9061 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9062for as_dir in $PATH
9063do
9064 IFS=$as_save_IFS
9065 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009066 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009067 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009068 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009069 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009070 break 2
9071 fi
9072done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009073 done
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009074IFS=$as_save_IFS
9075
9076 ;;
9077esac
9078fi
9079PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9080if test -n "$PKG_CONFIG"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9082$as_echo "$PKG_CONFIG" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009083else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9085$as_echo "no" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009086fi
9087
9088
9089fi
9090if test -z "$ac_cv_path_PKG_CONFIG"; then
9091 ac_pt_PKG_CONFIG=$PKG_CONFIG
9092 # Extract the first word of "pkg-config", so it can be a program name with args.
9093set dummy pkg-config; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9095$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009096if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009097 $as_echo_n "(cached) " >&6
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009098else
9099 case $ac_pt_PKG_CONFIG in
9100 [\\/]* | ?:[\\/]*)
9101 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9102 ;;
9103 *)
9104 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9105for as_dir in $PATH
9106do
9107 IFS=$as_save_IFS
9108 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009109 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009110 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009111 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009112 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009113 break 2
9114 fi
9115done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009116 done
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009117IFS=$as_save_IFS
9118
9119 ;;
9120esac
9121fi
9122ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9123if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9125$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009126else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9128$as_echo "no" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009129fi
9130
9131 if test "x$ac_pt_PKG_CONFIG" = x; then
9132 PKG_CONFIG=""
9133 else
9134 case $cross_compiling:$ac_tool_warned in
9135yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009136{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9137$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009138ac_tool_warned=yes ;;
9139esac
9140 PKG_CONFIG=$ac_pt_PKG_CONFIG
9141 fi
9142else
9143 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9144fi
9145
Benjamin Peterson64e8f6e2014-12-15 00:00:23 -05009146fi
9147if test -n "$PKG_CONFIG"; then
9148 _pkg_min_version=0.9.0
9149 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
9150$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
9151 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9153$as_echo "yes" >&6; }
9154 else
9155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9156$as_echo "no" >&6; }
9157 PKG_CONFIG=""
9158 fi
9159fi
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009160
9161# Check for use of the system expat library
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
9163$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009164
9165# Check whether --with-system_expat was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009166if test "${with_system_expat+set}" = set; then :
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009167 withval=$with_system_expat;
Benjamin Petersonf2d1b2a2010-10-31 16:53:53 +00009168else
9169 with_system_expat="no"
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009170fi
9171
9172
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009173{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
9174$as_echo "$with_system_expat" >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009175
9176# Check for use of the system libffi library
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
9178$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009179
9180# Check whether --with-system_ffi was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009181if test "${with_system_ffi+set}" = set; then :
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009182 withval=$with_system_ffi;
Benjamin Petersonf2d1b2a2010-10-31 16:53:53 +00009183else
9184 with_system_ffi="no"
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009185fi
9186
9187
9188if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009189 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
9190else
9191 LIBFFI_INCLUDEDIR=""
9192fi
9193
9194
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009195{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
9196$as_echo "$with_system_ffi" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +00009197
Ned Deilya2a9f572013-10-25 00:30:10 -07009198# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
9199
9200
9201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
9202$as_echo_n "checking for --with-tcltk-includes... " >&6; }
9203
9204# Check whether --with-tcltk-includes was given.
9205if test "${with_tcltk_includes+set}" = set; then :
9206 withval=$with_tcltk_includes;
9207else
9208 with_tcltk_includes="default"
9209fi
9210
9211{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
9212$as_echo "$with_tcltk_includes" >&6; }
9213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
9214$as_echo_n "checking for --with-tcltk-libs... " >&6; }
9215
9216# Check whether --with-tcltk-libs was given.
9217if test "${with_tcltk_libs+set}" = set; then :
9218 withval=$with_tcltk_libs;
9219else
9220 with_tcltk_libs="default"
9221fi
9222
9223{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
9224$as_echo "$with_tcltk_libs" >&6; }
9225if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
9226then
9227 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
9228 then
9229 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
9230 fi
9231 TCLTK_INCLUDES=""
9232 TCLTK_LIBS=""
9233else
9234 TCLTK_INCLUDES="$with_tcltk_includes"
9235 TCLTK_LIBS="$with_tcltk_libs"
9236fi
9237
Benjamin Peterson867475c2009-04-29 20:36:25 +00009238# Check for --with-dbmliborder
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
9240$as_echo_n "checking for --with-dbmliborder... " >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +00009241
9242# Check whether --with-dbmliborder was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009243if test "${with_dbmliborder+set}" = set; then :
Benjamin Peterson867475c2009-04-29 20:36:25 +00009244 withval=$with_dbmliborder;
9245if test x$with_dbmliborder = xyes
9246then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009247as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Benjamin Peterson867475c2009-04-29 20:36:25 +00009248else
9249 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
9250 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
9251 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009252 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Benjamin Peterson867475c2009-04-29 20:36:25 +00009253 fi
9254 done
9255fi
9256fi
9257
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009258{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
9259$as_echo "$with_dbmliborder" >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +00009260
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009261# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009262
9263
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
9265$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009266
Martin v. Löwiseba40652007-08-30 20:10:57 +00009267# Check whether --with-signal-module was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009268if test "${with_signal_module+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009269 withval=$with_signal_module;
9270fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009271
9272
9273if test -z "$with_signal_module"
9274then with_signal_module="yes"
9275fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009276{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
9277$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009278
9279if test "${with_signal_module}" = "yes"; then
9280 USE_SIGNAL_MODULE=""
9281 SIGNAL_OBJS=""
9282else
9283 USE_SIGNAL_MODULE="#"
9284 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9285fi
9286
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009287# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009288
Barry Warsawc0d24d82000-06-29 16:12:00 +00009289USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009290
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dec-threads" >&5
9292$as_echo_n "checking for --with-dec-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009293
Guido van Rossumec2f0731997-01-22 20:54:01 +00009294
Martin v. Löwiseba40652007-08-30 20:10:57 +00009295# Check whether --with-dec-threads was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009296if test "${with_dec_threads+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009297 withval=$with_dec_threads;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009298{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9299$as_echo "$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +00009300LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00009301if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00009302 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00009303fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009304else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9306$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009307fi
9308
Martin v. Löwis11437992002-04-12 09:54:03 +00009309
9310# Templates for things AC_DEFINEd more than once.
9311# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009312
9313
Martin v. Löwis11437992002-04-12 09:54:03 +00009314
9315
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
9317$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009318
Martin v. Löwiseba40652007-08-30 20:10:57 +00009319# Check whether --with-threads was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009320if test "${with_threads+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009321 withval=$with_threads;
9322fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009323
9324
Barry Warsawc0d24d82000-06-29 16:12:00 +00009325# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009326
Martin v. Löwiseba40652007-08-30 20:10:57 +00009327# Check whether --with-thread was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009328if test "${with_thread+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009329 withval=$with_thread; with_threads=$with_thread
9330fi
9331
Barry Warsawc0d24d82000-06-29 16:12:00 +00009332
9333if test -z "$with_threads"
9334then with_threads="yes"
9335fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009336{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
9337$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d82000-06-29 16:12:00 +00009338
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009339
Barry Warsawc0d24d82000-06-29 16:12:00 +00009340if test "$with_threads" = "no"
9341then
9342 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009343elif test "$ac_cv_pthread_is_default" = yes
9344then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009345 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009346
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009347 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009348 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009349
9350 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009351 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009352elif test "$ac_cv_kpthread" = "yes"
9353then
9354 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009355 if test "$ac_cv_cxx_thread" = "yes"; then
9356 CXX="$CXX -Kpthread"
9357 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009358 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009359
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009360 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009361 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009362elif test "$ac_cv_kthread" = "yes"
9363then
9364 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009365 if test "$ac_cv_cxx_thread" = "yes"; then
9366 CXX="$CXX -Kthread"
9367 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009368 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009369
9370 posix_threads=yes
9371 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009372elif test "$ac_cv_pthread" = "yes"
9373then
9374 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009375 if test "$ac_cv_cxx_thread" = "yes"; then
9376 CXX="$CXX -pthread"
9377 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009378 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009379
9380 posix_threads=yes
9381 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009382else
9383 if test ! -z "$with_threads" -a -d "$with_threads"
9384 then LDFLAGS="$LDFLAGS -L$with_threads"
9385 fi
9386 if test ! -z "$withval" -a -d "$withval"
9387 then LDFLAGS="$LDFLAGS -L$withval"
9388 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009389
9390 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00009391 # define _POSIX_THREADS in unistd.h. Some apparently don't
9392 # (e.g. gnu pth with pthread emulation)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009393 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
9394$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
9395 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009396/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009397
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009398#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009399#ifdef _POSIX_THREADS
9400yes
9401#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009402
9403_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009404if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009405 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009406 unistd_defines_pthreads=yes
9407else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009408 unistd_defines_pthreads=no
9409fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009410rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009411
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
9413$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009414
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009415 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009416
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009417 ac_fn_c_check_header_mongrel "$LINENO" "cthreads.h" "ac_cv_header_cthreads_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01009418if test "x$ac_cv_header_cthreads_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009419 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00009420
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009421 $as_echo "#define C_THREADS 1" >>confdefs.h
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009422
Martin v. Löwis11437992002-04-12 09:54:03 +00009423
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009424$as_echo "#define HURD_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009425
9426 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009427 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009428else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009429
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009430 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 +01009431if test "x$ac_cv_header_mach_cthreads_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009432 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00009433
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009434 $as_echo "#define C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009435
Martin v. Löwis11437992002-04-12 09:54:03 +00009436
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009437$as_echo "#define MACH_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009438
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009439 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009440else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009441
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009442 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pth" >&5
9443$as_echo_n "checking for --with-pth... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009444
Martin v. Löwiseba40652007-08-30 20:10:57 +00009445# Check whether --with-pth was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009446if test "${with_pth+set}" = set; then :
9447 withval=$with_pth; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9448$as_echo "$withval" >&6; }
9449 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009450
9451
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009452$as_echo "#define HAVE_PTH 1" >>confdefs.h
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009453
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009454 LIBS="-lpth $LIBS"
9455 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009456else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9458$as_echo "no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009459
9460 # Just looking for pthread_create in libpthread is not enough:
9461 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
9462 # So we really have to include pthread.h, and then link.
9463 _libs=$LIBS
9464 LIBS="$LIBS -lpthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009465 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
9466$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
9467 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009468/* end confdefs.h. */
Stefan Krahae66ca62012-11-22 22:36:57 +01009469
9470#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009471#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00009472
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009473void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00009474int
9475main ()
9476{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009477
9478pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00009479 ;
9480 return 0;
9481}
9482_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009483if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009484
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9486$as_echo "yes" >&6; }
9487 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00009488
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009489 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009490 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009491else
Martin v. Löwis11437992002-04-12 09:54:03 +00009492
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009493 LIBS=$_libs
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009494 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Matthias Klose3cef2a92012-03-14 23:39:33 +01009495if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009496 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00009497
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009498 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009499 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00009500else
Guido van Rossumad678af1998-10-02 14:42:15 +00009501
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009502 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 +01009503if test "x$ac_cv_header_atheos_threads_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009504 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009505
9506
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009507$as_echo "#define ATHEOS_THREADS 1" >>confdefs.h
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009508
9509 THREADOBJ="Python/thread.o"
9510else
9511
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009512 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 +01009513if test "x$ac_cv_header_kernel_OS_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009514 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009515
9516
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009517$as_echo "#define BEOS_THREADS 1" >>confdefs.h
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009518
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009519 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009520else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009521
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009522 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
9523$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009524if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009525 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009526else
Martin v. Löwis11437992002-04-12 09:54:03 +00009527 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009528LIBS="-lpthreads $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009529cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009530/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009531
Martin v. Löwiseba40652007-08-30 20:10:57 +00009532/* Override any GCC internal prototype to avoid an error.
9533 Use char because int might match the return type of a GCC
9534 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009535#ifdef __cplusplus
9536extern "C"
9537#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009538char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009539int
9540main ()
9541{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009542return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009543 ;
9544 return 0;
9545}
9546_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009547if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009548 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00009549else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009550 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00009551fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009552rm -f core conftest.err conftest.$ac_objext \
9553 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009554LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009555fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009556{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
9557$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009558if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009559 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00009560
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009561 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009562 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009563 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00009564else
Greg Steinadf63d62000-07-05 10:38:09 +00009565
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009566 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
9567$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009568if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009569 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00009570else
Martin v. Löwis11437992002-04-12 09:54:03 +00009571 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009572LIBS="-lc_r $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009573cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009574/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009575
Martin v. Löwiseba40652007-08-30 20:10:57 +00009576/* Override any GCC internal prototype to avoid an error.
9577 Use char because int might match the return type of a GCC
9578 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009579#ifdef __cplusplus
9580extern "C"
9581#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009582char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009583int
9584main ()
9585{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009586return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009587 ;
9588 return 0;
9589}
9590_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009591if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009592 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00009593else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009594 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00009595fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009596rm -f core conftest.err conftest.$ac_objext \
9597 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009598LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00009599fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009600{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
9601$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009602if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009603 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00009604
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009605 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009606 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009607 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009608else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009609
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009610 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
9611$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009612if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009613 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009614else
Martin v. Löwis11437992002-04-12 09:54:03 +00009615 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009616LIBS="-lpthread $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009617cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009618/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009619
Martin v. Löwiseba40652007-08-30 20:10:57 +00009620/* Override any GCC internal prototype to avoid an error.
9621 Use char because int might match the return type of a GCC
9622 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009623#ifdef __cplusplus
9624extern "C"
9625#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009626char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009627int
9628main ()
9629{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009630return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009631 ;
9632 return 0;
9633}
9634_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009635if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009636 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009637else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009638 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009639fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009640rm -f core conftest.err conftest.$ac_objext \
9641 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009642LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009643fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009644{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
9645$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009646if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009647 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009648
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009649 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009650 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009651 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009652else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009653
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009654 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
9655$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009656if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009657 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00009658else
Martin v. Löwis11437992002-04-12 09:54:03 +00009659 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009660LIBS="-lcma $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009661cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009662/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009663
Martin v. Löwiseba40652007-08-30 20:10:57 +00009664/* Override any GCC internal prototype to avoid an error.
9665 Use char because int might match the return type of a GCC
9666 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009667#ifdef __cplusplus
9668extern "C"
9669#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009670char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009671int
9672main ()
9673{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009674return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009675 ;
9676 return 0;
9677}
9678_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009679if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009680 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00009681else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009682 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00009683fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009684rm -f core conftest.err conftest.$ac_objext \
9685 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009686LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009687fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009688{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
9689$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009690if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009691 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00009692
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009693 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009694 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009695 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00009696else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00009697
Martin v. Löwis130fb172001-07-19 11:00:41 +00009698 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00009699fi
9700
Guido van Rossum627b2d71993-12-24 10:39:16 +00009701
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009702fi
9703
Guido van Rossum0be3e491997-05-22 20:33:33 +00009704fi
9705
Guido van Rossum49545951997-12-02 19:28:29 +00009706fi
9707
Guido van Rossumb93a8621998-05-07 13:27:32 +00009708fi
9709
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009710
Michael W. Hudson54241132001-12-07 15:38:26 +00009711fi
9712
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009713
9714fi
9715
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009716fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009717rm -f core conftest.err conftest.$ac_objext \
9718 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009719fi
9720
Martin v. Löwis11437992002-04-12 09:54:03 +00009721fi
9722
9723
9724fi
9725
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009726
Michael W. Hudson54241132001-12-07 15:38:26 +00009727
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009728 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
9729$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009730if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009731 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009732else
Martin v. Löwis11437992002-04-12 09:54:03 +00009733 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009734LIBS="-lmpc $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009735cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009736/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009737
Martin v. Löwiseba40652007-08-30 20:10:57 +00009738/* Override any GCC internal prototype to avoid an error.
9739 Use char because int might match the return type of a GCC
9740 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009741#ifdef __cplusplus
9742extern "C"
9743#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009744char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009745int
9746main ()
9747{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009748return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009749 ;
9750 return 0;
9751}
9752_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009753if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009754 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009755else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009756 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009757fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009758rm -f core conftest.err conftest.$ac_objext \
9759 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009760LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009761fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009762{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
9763$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009764if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009765 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009766
Martin v. Löwis130fb172001-07-19 11:00:41 +00009767 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009768 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009769 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009770fi
9771
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009772
Neal Norwitza978ab02002-11-02 16:58:05 +00009773 if test "$posix_threads" != "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009774 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
9775$as_echo_n "checking for thr_create in -lthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009776if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009777 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009778else
Martin v. Löwis11437992002-04-12 09:54:03 +00009779 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009780LIBS="-lthread $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009781cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009782/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009783
Martin v. Löwiseba40652007-08-30 20:10:57 +00009784/* Override any GCC internal prototype to avoid an error.
9785 Use char because int might match the return type of a GCC
9786 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009787#ifdef __cplusplus
9788extern "C"
9789#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009790char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009791int
9792main ()
9793{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009794return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009795 ;
9796 return 0;
9797}
9798_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009799if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009800 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009801else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009802 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009803fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009804rm -f core conftest.err conftest.$ac_objext \
9805 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009806LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009807fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009808{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
9809$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009810if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009811 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009812
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009813 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009814 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009815 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009816fi
9817
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009818 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009819
Martin v. Löwis130fb172001-07-19 11:00:41 +00009820 if test "$USE_THREAD_MODULE" != "#"
9821 then
9822 # If the above checks didn't disable threads, (at least) OSF1
9823 # needs this '-threads' argument during linking.
9824 case $ac_sys_system in
9825 OSF1) LDLAST=-threads;;
9826 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00009827 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009828fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009829
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009830if test "$posix_threads" = "yes"; then
9831 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009832
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009833$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009834
9835 fi
9836
9837 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
9838 case $ac_sys_system/$ac_sys_release in
Charles-François Natali4929eb92011-07-21 19:41:04 +02009839 SunOS/5.6)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009840$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009841
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009842 ;;
9843 SunOS/5.8)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009844$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009845
9846 ;;
Charles-François Natali4929eb92011-07-21 19:41:04 +02009847 AIX/*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009848$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimescba36bb2008-01-30 22:54:18 +00009849
9850 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009851 esac
9852
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009853 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
9854$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009855 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009856 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009857else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009858 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009859 ac_cv_pthread_system_supported=no
9860else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009861 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009862/* end confdefs.h. */
Stefan Krahae66ca62012-11-22 22:36:57 +01009863
9864 #include <stdio.h>
9865 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009866 void *foo(void *parm) {
9867 return NULL;
9868 }
9869 main() {
9870 pthread_attr_t attr;
9871 pthread_t id;
9872 if (pthread_attr_init(&attr)) exit(-1);
9873 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
9874 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
9875 exit(0);
9876 }
9877_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009878if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009879 ac_cv_pthread_system_supported=yes
9880else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009881 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009882fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009883rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9884 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009885fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009886
Martin v. Löwiseba40652007-08-30 20:10:57 +00009887
Guido van Rossum627b2d71993-12-24 10:39:16 +00009888fi
9889
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
9891$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009892 if test "$ac_cv_pthread_system_supported" = "yes"; then
9893
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009894$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009895
9896 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009897 for ac_func in pthread_sigmask
9898do :
9899 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Matthias Klose3cef2a92012-03-14 23:39:33 +01009900if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009901 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009902#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009903_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00009904 case $ac_sys_system in
9905 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009906
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009907$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00009908
9909 ;;
9910 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009911fi
9912done
9913
Christian Heimes0d604cf2013-08-21 13:26:05 +02009914 for ac_func in pthread_atfork
9915do :
9916 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
9917if test "x$ac_cv_func_pthread_atfork" = xyes; then :
9918 cat >>confdefs.h <<_ACEOF
9919#define HAVE_PTHREAD_ATFORK 1
9920_ACEOF
9921
9922fi
9923done
9924
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009925fi
9926
9927
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009928# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00009929
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
9931$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009932# Check whether --enable-ipv6 was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009933if test "${enable_ipv6+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009934 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009935 no)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9937$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009938 ipv6=no
9939 ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009940 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9941$as_echo "yes" >&6; }
9942 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009943
9944 ipv6=yes
9945 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009946 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009947else
Martin v. Löwis11437992002-04-12 09:54:03 +00009948
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009949 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009950/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009951 /* AF_INET6 available check */
9952#include <sys/types.h>
9953#include <sys/socket.h>
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009954int
9955main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009956{
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009957int domain = AF_INET6;
9958 ;
9959 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009960}
Martin v. Löwis11437992002-04-12 09:54:03 +00009961_ACEOF
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009962if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +00009963
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9965$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009966 ipv6=yes
Matthias Klosec511b472010-05-08 11:01:39 +00009967
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009968else
Matthias Klosec511b472010-05-08 11:01:39 +00009969
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9971$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009972 ipv6=no
Matthias Klosec511b472010-05-08 11:01:39 +00009973
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009974fi
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009975rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009976
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009977if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009978 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
9979$as_echo_n "checking if RFC2553 API is available... " >&6; }
9980 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009981/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00009982
9983 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009984#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009985int
9986main ()
9987{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009988struct sockaddr_in6 x;
Matthias Klosec511b472010-05-08 11:01:39 +00009989 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00009990 ;
9991 return 0;
9992}
Matthias Klosec511b472010-05-08 11:01:39 +00009993
Martin v. Löwis11437992002-04-12 09:54:03 +00009994_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009995if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +00009996
9997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009998$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00009999 ipv6=yes
10000
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010001else
Matthias Klosec511b472010-05-08 11:01:39 +000010002
10003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010004$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000010005 ipv6=no
10006
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010007fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010008rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010009fi
10010
10011if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010012 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010013
10014fi
10015
Martin v. Löwiseba40652007-08-30 20:10:57 +000010016fi
10017
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010018
10019ipv6type=unknown
10020ipv6lib=none
10021ipv6trylibc=no
10022
10023if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010024 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10025$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010026 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10027 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010028 case $i in
10029 inria)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010030 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010031/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010032
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010033#include <netinet/in.h>
10034#ifdef IPV6_INRIA_VERSION
10035yes
10036#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010037_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010038if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010039 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010040 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010041fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000010042rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010043
10044 ;;
10045 kame)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010046 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010047/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010048
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010049#include <netinet/in.h>
10050#ifdef __KAME__
10051yes
10052#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010053_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010054if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010055 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010056 ipv6type=$i;
10057 ipv6lib=inet6
10058 ipv6libdir=/usr/local/v6/lib
10059 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010060fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000010061rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010062
10063 ;;
10064 linux-glibc)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010065 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010066/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010067
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010068#include <features.h>
10069#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10070yes
10071#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010072_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010073if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010074 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010075 ipv6type=$i;
10076 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010077fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000010078rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010079
10080 ;;
10081 linux-inet6)
10082 if test -d /usr/inet6; then
10083 ipv6type=$i
10084 ipv6lib=inet6
10085 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010086 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010087 fi
10088 ;;
10089 solaris)
10090 if test -f /etc/netconfig; then
Antoine Pitrou31e85952011-01-03 18:57:14 +000010091 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010092 ipv6type=$i
10093 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010094 fi
10095 fi
10096 ;;
10097 toshiba)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010098 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010099/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010100
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010101#include <sys/param.h>
10102#ifdef _TOSHIBA_INET6
10103yes
10104#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010105_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010106if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010107 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010108 ipv6type=$i;
10109 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010110 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010111fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000010112rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010113
10114 ;;
10115 v6d)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010116 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010117/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010118
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010119#include </usr/local/v6/include/sys/v6config.h>
10120#ifdef __V6D__
10121yes
10122#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010123_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010124if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010125 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010126 ipv6type=$i;
10127 ipv6lib=v6;
10128 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010129 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010130fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000010131rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010132
10133 ;;
10134 zeta)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010135 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010136/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010137
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010138#include <sys/param.h>
10139#ifdef _ZETA_MINAMI_INET6
10140yes
10141#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010142_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010143if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010144 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010145 ipv6type=$i;
10146 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010147 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010148fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000010149rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010150
10151 ;;
10152 esac
10153 if test "$ipv6type" != "unknown"; then
10154 break
10155 fi
10156 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10158$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010159fi
10160
10161if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10162 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10163 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10164 echo "using lib$ipv6lib"
10165 else
10166 if test $ipv6trylibc = "yes"; then
10167 echo "using libc"
10168 else
10169 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10170 echo "You need to fetch lib$ipv6lib.a from appropriate"
10171 echo 'ipv6 kit and compile beforehand.'
10172 exit 1
10173 fi
10174 fi
10175fi
10176
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
10178$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
10179cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010180/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +000010181
10182 #include <Carbon/Carbon.h>
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010183int
10184main ()
10185{
10186FSIORefNum fRef = 0
10187 ;
10188 return 0;
10189}
Mark Dickinson0712b562010-05-08 19:13:21 +000010190
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010191_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010192if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +000010193
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010194
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010195$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010196
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10198$as_echo "yes" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010199
Mark Dickinson0712b562010-05-08 19:13:21 +000010200else
10201
10202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10203$as_echo "no" >&6; }
10204
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010205fi
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010206rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10207
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010208# Check for --with-doc-strings
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10210$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010211
Martin v. Löwiseba40652007-08-30 20:10:57 +000010212# Check whether --with-doc-strings was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010213if test "${with_doc_strings+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010214 withval=$with_doc_strings;
10215fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010216
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010217
10218if test -z "$with_doc_strings"
10219then with_doc_strings="yes"
10220fi
10221if test "$with_doc_strings" != "no"
10222then
10223
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010224$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010225
10226fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010227{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10228$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010229
Neil Schemenauera35c6882001-02-27 04:45:05 +000010230# Check for Python-specific malloc support
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010231{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
10232$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010233
Martin v. Löwiseba40652007-08-30 20:10:57 +000010234# Check whether --with-tsc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010235if test "${with_tsc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010236 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010237if test "$withval" != no
10238then
10239
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010240$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010241
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10243$as_echo "yes" >&6; }
10244else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10245$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010246fi
10247else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10249$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010250fi
10251
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010252
10253# Check for Python-specific malloc support
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10255$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010256
Martin v. Löwiseba40652007-08-30 20:10:57 +000010257# Check whether --with-pymalloc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010258if test "${with_pymalloc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010259 withval=$with_pymalloc;
10260fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010261
Neil Schemenauera35c6882001-02-27 04:45:05 +000010262
Neil Schemenauer16c22972002-03-22 15:34:49 +000010263if test -z "$with_pymalloc"
10264then with_pymalloc="yes"
10265fi
10266if test "$with_pymalloc" != "no"
10267then
Martin v. Löwis11437992002-04-12 09:54:03 +000010268
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010269$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010270
10271fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010272{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10273$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010274
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010275# Check for Valgrind support
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
10277$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010278
10279# Check whether --with-valgrind was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010280if test "${with_valgrind+set}" = set; then :
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010281 withval=$with_valgrind;
10282else
10283 with_valgrind=no
10284fi
10285
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010286{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
10287$as_echo "$with_valgrind" >&6; }
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010288if test "$with_valgrind" != no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010289 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 +010010290if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010291
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010292$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010293
10294else
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010295 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010296
10297fi
10298
10299
10300fi
10301
Barry Warsawef82cd72000-06-30 16:21:01 +000010302# Check for --with-wctype-functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010303{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-wctype-functions" >&5
10304$as_echo_n "checking for --with-wctype-functions... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010305
Martin v. Löwiseba40652007-08-30 20:10:57 +000010306# Check whether --with-wctype-functions was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010307if test "${with_wctype_functions+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010308 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000010309if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000010310then
10311
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010312$as_echo "#define WANT_WCTYPE_FUNCTIONS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010313
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10315$as_echo "yes" >&6; }
10316else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10317$as_echo "no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000010318fi
10319else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10321$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010322fi
10323
Barry Warsawef82cd72000-06-30 16:21:01 +000010324
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010325# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000010326
Guido van Rossum98935bf2001-09-05 19:13:16 +000010327DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000010328
Guido van Rossume97ee181999-12-20 21:27:22 +000010329# the dlopen() function means we might want to use dynload_shlib.o. some
10330# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000010331for ac_func in dlopen
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010332do :
10333 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010334if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010335 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010336#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010337_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000010338
Guido van Rossume97ee181999-12-20 21:27:22 +000010339fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010340done
Guido van Rossume97ee181999-12-20 21:27:22 +000010341
Michael W. Hudson54241132001-12-07 15:38:26 +000010342
Guido van Rossume97ee181999-12-20 21:27:22 +000010343# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
10344# loading of modules.
10345
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
10347$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010348if test -z "$DYNLOADFILE"
10349then
10350 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000010351 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
10352 if test "$ac_cv_func_dlopen" = yes
10353 then DYNLOADFILE="dynload_shlib.o"
10354 else DYNLOADFILE="dynload_aix.o"
10355 fi
10356 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000010357 BeOS*) DYNLOADFILE="dynload_beos.o";;
10358 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Anthony Baxter82201742006-04-09 15:07:40 +000010359 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
10360 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010361 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000010362 *)
10363 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
10364 # out any dynamic loading
10365 if test "$ac_cv_func_dlopen" = yes
10366 then DYNLOADFILE="dynload_shlib.o"
10367 else DYNLOADFILE="dynload_stub.o"
10368 fi
10369 ;;
10370 esac
10371fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010372{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
10373$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010374if test "$DYNLOADFILE" != "dynload_stub.o"
10375then
Martin v. Löwis11437992002-04-12 09:54:03 +000010376
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010377$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000010378
10379fi
10380
Neil Schemenauer4e425612001-06-19 15:44:15 +000010381# MACHDEP_OBJS can be set to platform-specific object files needed by Python
10382
Michael W. Hudson54241132001-12-07 15:38:26 +000010383
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
10385$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010386if test -z "$MACHDEP_OBJS"
10387then
Jack Jansene578a632001-08-15 01:27:14 +000010388 MACHDEP_OBJS=$extra_machdep_objs
10389else
10390 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000010391fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010392{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
10393$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010394
Guido van Rossum627b2d71993-12-24 10:39:16 +000010395# checks for library functions
Martin v. Löwisaef18b12008-03-24 13:31:16 +000010396for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
10397 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
doko@ubuntu.coma50b0de2015-04-13 21:55:59 +020010398 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
10399 getentropy \
Martin v. Löwis50ea4562009-11-27 13:56:01 +000010400 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Benjamin Petersond16e01c2014-02-04 10:20:26 -050010401 initgroups kill killpg lchmod lchown lstat mkfifo mknod mktime mmap \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000010402 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000010403 putenv readlink realpath \
Jesse Noller355b1262009-04-02 00:03:28 +000010404 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
10405 setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000010406 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Martin v. Löwis50ea4562009-11-27 13:56:01 +000010407 setlocale setregid setreuid setresuid setresgid \
10408 setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +000010409 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000010410 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Neal Norwitz05a45592006-03-20 06:30:08 +000010411 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010412do :
10413 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10414ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010415if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010416 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010417#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010418_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010419
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010420fi
10421done
10422
Michael W. Hudson54241132001-12-07 15:38:26 +000010423
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010424# For some functions, having a definition is not sufficient, since
10425# we want to take their address.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
10427$as_echo_n "checking for chroot... " >&6; }
10428cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010429/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010430#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010431int
10432main ()
10433{
10434void *x=chroot
10435 ;
10436 return 0;
10437}
10438_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010439if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010440
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010441$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010442
Matthias Klosec511b472010-05-08 11:01:39 +000010443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010444$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010445else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10447$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010448
10449fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010450rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
10452$as_echo_n "checking for link... " >&6; }
10453cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010454/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010455#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010456int
10457main ()
10458{
10459void *x=link
10460 ;
10461 return 0;
10462}
10463_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010464if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010465
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010466$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010467
Matthias Klosec511b472010-05-08 11:01:39 +000010468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010469$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010470else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10472$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010473
10474fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010475rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
10477$as_echo_n "checking for symlink... " >&6; }
10478cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010479/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010480#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010481int
10482main ()
10483{
10484void *x=symlink
10485 ;
10486 return 0;
10487}
10488_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010489if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010490
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010491$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010492
Matthias Klosec511b472010-05-08 11:01:39 +000010493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010494$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010495else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10497$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010498
10499fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010500rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
10502$as_echo_n "checking for fchdir... " >&6; }
10503cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010504/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010505#include <unistd.h>
10506int
10507main ()
10508{
10509void *x=fchdir
10510 ;
10511 return 0;
10512}
10513_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010514if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010515
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010516$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010517
Matthias Klosec511b472010-05-08 11:01:39 +000010518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010519$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010520else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10522$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010523
10524fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010525rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
10527$as_echo_n "checking for fsync... " >&6; }
10528cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010529/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010530#include <unistd.h>
10531int
10532main ()
10533{
10534void *x=fsync
10535 ;
10536 return 0;
10537}
10538_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010539if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010540
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010541$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010542
Matthias Klosec511b472010-05-08 11:01:39 +000010543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010544$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010545else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10547$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010548
10549fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010550rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
10552$as_echo_n "checking for fdatasync... " >&6; }
10553cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010554/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010555#include <unistd.h>
10556int
10557main ()
10558{
10559void *x=fdatasync
10560 ;
10561 return 0;
10562}
10563_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010564if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010565
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010566$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010567
Matthias Klosec511b472010-05-08 11:01:39 +000010568 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010569$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010570else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10572$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010573
10574fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010575rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
10577$as_echo_n "checking for epoll... " >&6; }
10578cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010579/* end confdefs.h. */
10580#include <sys/epoll.h>
10581int
10582main ()
10583{
10584void *x=epoll_create
10585 ;
10586 return 0;
10587}
10588_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010589if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010590
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010591$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010592
Matthias Klosec511b472010-05-08 11:01:39 +000010593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010594$as_echo "yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010595else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10597$as_echo "no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010598
10599fi
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010600rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
10602$as_echo_n "checking for kqueue... " >&6; }
10603cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010604/* end confdefs.h. */
10605
10606#include <sys/types.h>
10607#include <sys/event.h>
10608
10609int
10610main ()
10611{
10612int x=kqueue()
10613 ;
10614 return 0;
10615}
10616_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010617if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010618
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010619$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010620
Matthias Klosec511b472010-05-08 11:01:39 +000010621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010622$as_echo "yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010623else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10625$as_echo "no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010626
10627fi
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010628rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010629# On some systems (eg. FreeBSD 5), we would find a definition of the
10630# functions ctermid_r, setgroups in the library, but no prototype
10631# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
10632# address to avoid compiler warnings and potential miscompilations
10633# because of the missing prototypes.
10634
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
10636$as_echo_n "checking for ctermid_r... " >&6; }
10637cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010638/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010639
Martin v. Löwisd5843682002-11-21 20:41:28 +000010640#include <stdio.h>
10641
Martin v. Löwisd5843682002-11-21 20:41:28 +000010642int
10643main ()
10644{
10645void* p = ctermid_r
10646 ;
10647 return 0;
10648}
10649_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010650if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010651
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010652$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010653
Matthias Klosec511b472010-05-08 11:01:39 +000010654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010655$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010656else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10658$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010659
10660fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010661rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10662
Antoine Pitroub170f172010-09-10 18:47:36 +000010663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
10664$as_echo_n "checking for flock declaration... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010665if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010666 $as_echo_n "(cached) " >&6
10667else
10668 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010669/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010670#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010671int
10672main ()
10673{
10674void* p = flock
Antoine Pitroub170f172010-09-10 18:47:36 +000010675
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010676 ;
10677 return 0;
10678}
10679_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010680if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010681 ac_cv_flock_decl=yes
10682else
10683 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010684
10685fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010686rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitrou85729812010-09-07 14:55:24 +000010687
Antoine Pitroub170f172010-09-10 18:47:36 +000010688fi
10689{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
10690$as_echo "$ac_cv_flock_decl" >&6; }
10691if test "x${ac_cv_flock_decl}" = xyes; then
10692 for ac_func in flock
10693do :
10694 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010695if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010696 cat >>confdefs.h <<_ACEOF
10697#define HAVE_FLOCK 1
Antoine Pitrou85729812010-09-07 14:55:24 +000010698_ACEOF
Antoine Pitroub170f172010-09-10 18:47:36 +000010699
Antoine Pitrou85729812010-09-07 14:55:24 +000010700else
Antoine Pitroub170f172010-09-10 18:47:36 +000010701 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitrou85729812010-09-07 14:55:24 +000010702$as_echo_n "checking for flock in -lbsd... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010703if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitrou85729812010-09-07 14:55:24 +000010704 $as_echo_n "(cached) " >&6
10705else
10706 ac_check_lib_save_LIBS=$LIBS
10707LIBS="-lbsd $LIBS"
10708cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10709/* end confdefs.h. */
10710
10711/* Override any GCC internal prototype to avoid an error.
10712 Use char because int might match the return type of a GCC
10713 builtin and then its argument prototype would still apply. */
10714#ifdef __cplusplus
10715extern "C"
10716#endif
10717char flock ();
10718int
10719main ()
10720{
10721return flock ();
10722 ;
10723 return 0;
10724}
10725_ACEOF
10726if ac_fn_c_try_link "$LINENO"; then :
10727 ac_cv_lib_bsd_flock=yes
10728else
10729 ac_cv_lib_bsd_flock=no
10730fi
10731rm -f core conftest.err conftest.$ac_objext \
10732 conftest$ac_exeext conftest.$ac_ext
10733LIBS=$ac_check_lib_save_LIBS
10734fi
10735{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
10736$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010737if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010738 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitrou85729812010-09-07 14:55:24 +000010739
10740
10741$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
10742
10743
10744fi
10745
10746
10747fi
Antoine Pitroub170f172010-09-10 18:47:36 +000010748done
10749
Antoine Pitrou85729812010-09-07 14:55:24 +000010750fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010751
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
10753$as_echo_n "checking for getpagesize... " >&6; }
10754cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010755/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010756
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010757#include <unistd.h>
10758
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010759int
10760main ()
10761{
10762void* p = getpagesize
10763 ;
10764 return 0;
10765}
10766_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010767if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010768
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010769$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010770
Matthias Klosec511b472010-05-08 11:01:39 +000010771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010772$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010773else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010774 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10775$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010776
10777fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010778rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010779
Charles-François Natali93a11752011-11-27 13:01:35 +010010780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
10781$as_echo_n "checking for broken unsetenv... " >&6; }
10782cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10783/* end confdefs.h. */
10784
10785#include <stdlib.h>
10786
10787int
10788main ()
10789{
10790int res = unsetenv("DUMMY")
10791 ;
10792 return 0;
10793}
10794_ACEOF
10795if ac_fn_c_try_compile "$LINENO"; then :
10796 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10797$as_echo "no" >&6; }
10798else
10799
10800$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
10801
10802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10803$as_echo "yes" >&6; }
10804
10805fi
10806rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10807
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010808for ac_prog in true
10809do
10810 # Extract the first word of "$ac_prog", so it can be a program name with args.
10811set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10813$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010814if ${ac_cv_prog_TRUE+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010815 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010816else
10817 if test -n "$TRUE"; then
10818 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
10819else
10820as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10821for as_dir in $PATH
10822do
10823 IFS=$as_save_IFS
10824 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010825 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +010010826 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010827 ac_cv_prog_TRUE="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010828 $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 +000010829 break 2
10830 fi
10831done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010832 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000010833IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010834
10835fi
10836fi
10837TRUE=$ac_cv_prog_TRUE
10838if test -n "$TRUE"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
10840$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010841else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10843$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010844fi
10845
Martin v. Löwiseba40652007-08-30 20:10:57 +000010846
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010847 test -n "$TRUE" && break
10848done
10849test -n "$TRUE" || TRUE="/bin/true"
10850
10851
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
10853$as_echo_n "checking for inet_aton in -lc... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010854if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010855 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010856else
10857 ac_check_lib_save_LIBS=$LIBS
10858LIBS="-lc $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010859cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010860/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010861
Martin v. Löwiseba40652007-08-30 20:10:57 +000010862/* Override any GCC internal prototype to avoid an error.
10863 Use char because int might match the return type of a GCC
10864 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010865#ifdef __cplusplus
10866extern "C"
10867#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010868char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010869int
10870main ()
10871{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010872return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010873 ;
10874 return 0;
10875}
10876_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010877if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010878 ac_cv_lib_c_inet_aton=yes
10879else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010880 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010881fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010882rm -f core conftest.err conftest.$ac_objext \
10883 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010884LIBS=$ac_check_lib_save_LIBS
10885fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010886{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
10887$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010888if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010889 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010890else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010891 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
10892$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010893if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010894 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010895else
10896 ac_check_lib_save_LIBS=$LIBS
10897LIBS="-lresolv $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010898cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010899/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010900
Martin v. Löwiseba40652007-08-30 20:10:57 +000010901/* Override any GCC internal prototype to avoid an error.
10902 Use char because int might match the return type of a GCC
10903 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010904#ifdef __cplusplus
10905extern "C"
10906#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010907char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010908int
10909main ()
10910{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010911return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010912 ;
10913 return 0;
10914}
10915_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010916if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010917 ac_cv_lib_resolv_inet_aton=yes
10918else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010919 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010920fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010921rm -f core conftest.err conftest.$ac_objext \
10922 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010923LIBS=$ac_check_lib_save_LIBS
10924fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010925{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
10926$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010927if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010928 cat >>confdefs.h <<_ACEOF
10929#define HAVE_LIBRESOLV 1
10930_ACEOF
10931
10932 LIBS="-lresolv $LIBS"
10933
10934fi
10935
10936
10937fi
10938
10939
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010940# On Tru64, chflags seems to be present, but calling it will
10941# exit Python
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
10943$as_echo_n "checking for chflags... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010944if ${ac_cv_have_chflags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010945 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010946else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010947 if test "$cross_compiling" = yes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010948 ac_cv_have_chflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010949else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010950 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010951/* end confdefs.h. */
Ned Deily43e10542011-06-27 23:41:53 -070010952
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010953#include <sys/stat.h>
10954#include <unistd.h>
10955int main(int argc, char*argv[])
10956{
10957 if(chflags(argv[0], 0) != 0)
10958 return 1;
10959 return 0;
10960}
Ned Deily43e10542011-06-27 23:41:53 -070010961
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010962_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010963if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010964 ac_cv_have_chflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010965else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010966 ac_cv_have_chflags=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010967fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010968rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10969 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000010970fi
10971
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010972
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010973fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010974{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
10975$as_echo "$ac_cv_have_chflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000010976if test "$ac_cv_have_chflags" = cross ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010977 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010978if test "x$ac_cv_func_chflags" = xyes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010979 ac_cv_have_chflags="yes"
10980else
10981 ac_cv_have_chflags="no"
10982fi
10983
10984fi
10985if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010986
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010987$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010988
10989fi
10990
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
10992$as_echo_n "checking for lchflags... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010993if ${ac_cv_have_lchflags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010994 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010995else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010996 if test "$cross_compiling" = yes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010997 ac_cv_have_lchflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010998else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010999 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011000/* end confdefs.h. */
Ned Deily43e10542011-06-27 23:41:53 -070011001
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011002#include <sys/stat.h>
11003#include <unistd.h>
11004int main(int argc, char*argv[])
11005{
11006 if(lchflags(argv[0], 0) != 0)
11007 return 1;
11008 return 0;
11009}
Ned Deily43e10542011-06-27 23:41:53 -070011010
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011011_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011012if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011013 ac_cv_have_lchflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011014else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011015 ac_cv_have_lchflags=no
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011016fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011017rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11018 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011019fi
11020
11021
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011022fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011023{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11024$as_echo "$ac_cv_have_lchflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000011025if test "$ac_cv_have_lchflags" = cross ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011026 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011027if test "x$ac_cv_func_lchflags" = xyes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000011028 ac_cv_have_lchflags="yes"
11029else
11030 ac_cv_have_lchflags="no"
11031fi
11032
11033fi
11034if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011035
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011036$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011037
11038fi
11039
Ronald Oussorenf8752642006-07-06 10:13:35 +000011040case $ac_sys_system/$ac_sys_release in
11041Darwin/*)
11042 _CUR_CFLAGS="${CFLAGS}"
11043 _CUR_LDFLAGS="${LDFLAGS}"
11044 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11045 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11046 ;;
11047esac
11048
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11050$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011051if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011052 $as_echo_n "(cached) " >&6
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011053else
11054 ac_check_lib_save_LIBS=$LIBS
11055LIBS="-lz $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011056cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011057/* end confdefs.h. */
11058
Martin v. Löwiseba40652007-08-30 20:10:57 +000011059/* Override any GCC internal prototype to avoid an error.
11060 Use char because int might match the return type of a GCC
11061 builtin and then its argument prototype would still apply. */
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011062#ifdef __cplusplus
11063extern "C"
11064#endif
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011065char inflateCopy ();
11066int
11067main ()
11068{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011069return inflateCopy ();
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011070 ;
11071 return 0;
11072}
11073_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011074if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011075 ac_cv_lib_z_inflateCopy=yes
11076else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011077 ac_cv_lib_z_inflateCopy=no
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011078fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011079rm -f core conftest.err conftest.$ac_objext \
11080 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011081LIBS=$ac_check_lib_save_LIBS
11082fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011083{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
11084$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011085if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011086
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011087$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011088
11089fi
11090
11091
Ronald Oussorenf8752642006-07-06 10:13:35 +000011092case $ac_sys_system/$ac_sys_release in
11093Darwin/*)
11094 CFLAGS="${_CUR_CFLAGS}"
11095 LDFLAGS="${_CUR_LDFLAGS}"
11096 ;;
11097esac
11098
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
11100$as_echo_n "checking for hstrerror... " >&6; }
11101cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011102/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011103
Martin v. Löwise9416172003-05-03 10:12:45 +000011104#include <netdb.h>
11105
Martin v. Löwise9416172003-05-03 10:12:45 +000011106int
11107main ()
11108{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011109void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011110 ;
11111 return 0;
11112}
11113_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011114if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011115
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011116$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011117
Matthias Klosec511b472010-05-08 11:01:39 +000011118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011119$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011120else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11122$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011123
11124fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011125rm -f core conftest.err conftest.$ac_objext \
11126 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011127
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
11129$as_echo_n "checking for inet_aton... " >&6; }
11130cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011131/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011132
Martin v. Löwis86d66262006-02-17 08:40:11 +000011133#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011134#include <sys/socket.h>
11135#include <netinet/in.h>
11136#include <arpa/inet.h>
11137
Martin v. Löwise9416172003-05-03 10:12:45 +000011138int
11139main ()
11140{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011141void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011142 ;
11143 return 0;
11144}
11145_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011146if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011147
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011148$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011149
Matthias Klosec511b472010-05-08 11:01:39 +000011150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011151$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011152else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11154$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011155
11156fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011157rm -f core conftest.err conftest.$ac_objext \
11158 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011159
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
11161$as_echo_n "checking for inet_pton... " >&6; }
11162cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011163/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011164
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011165#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011166#include <sys/socket.h>
11167#include <netinet/in.h>
11168#include <arpa/inet.h>
11169
Martin v. Löwise9416172003-05-03 10:12:45 +000011170int
11171main ()
11172{
11173void* p = inet_pton
11174 ;
11175 return 0;
11176}
11177_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011178if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011179
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011180$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011181
Matthias Klosec511b472010-05-08 11:01:39 +000011182 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011183$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011184else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011185 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11186$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011187
11188fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011189rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000011190
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011191# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
11193$as_echo_n "checking for setgroups... " >&6; }
11194cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011195/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011196
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011197#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011198#ifdef HAVE_GRP_H
11199#include <grp.h>
11200#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000011201
Martin v. Löwisd5843682002-11-21 20:41:28 +000011202int
11203main ()
11204{
11205void* p = setgroups
11206 ;
11207 return 0;
11208}
11209_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011210if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011211
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011212$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011213
Matthias Klosec511b472010-05-08 11:01:39 +000011214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011215$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011216else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11218$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011219
11220fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011221rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000011222
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011223# check for openpty and forkpty
11224
11225for ac_func in openpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011226do :
11227 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011228if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011229 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011230#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011231_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011232
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011233else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011234 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
11235$as_echo_n "checking for openpty in -lutil... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011236if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011237 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011238else
Martin v. Löwis11437992002-04-12 09:54:03 +000011239 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011240LIBS="-lutil $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011241cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011242/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011243
Martin v. Löwiseba40652007-08-30 20:10:57 +000011244/* Override any GCC internal prototype to avoid an error.
11245 Use char because int might match the return type of a GCC
11246 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011247#ifdef __cplusplus
11248extern "C"
11249#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011250char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011251int
11252main ()
11253{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011254return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011255 ;
11256 return 0;
11257}
11258_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011259if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011260 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011261else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011262 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011263fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011264rm -f core conftest.err conftest.$ac_objext \
11265 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011266LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011267fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011268{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
11269$as_echo "$ac_cv_lib_util_openpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011270if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011271 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011272 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011273else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011274 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
11275$as_echo_n "checking for openpty in -lbsd... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011276if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011277 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011278else
11279 ac_check_lib_save_LIBS=$LIBS
11280LIBS="-lbsd $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011281cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011282/* end confdefs.h. */
11283
Martin v. Löwiseba40652007-08-30 20:10:57 +000011284/* Override any GCC internal prototype to avoid an error.
11285 Use char because int might match the return type of a GCC
11286 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011287#ifdef __cplusplus
11288extern "C"
11289#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011290char openpty ();
11291int
11292main ()
11293{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011294return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011295 ;
11296 return 0;
11297}
11298_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011299if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011300 ac_cv_lib_bsd_openpty=yes
11301else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011302 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011303fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011304rm -f core conftest.err conftest.$ac_objext \
11305 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011306LIBS=$ac_check_lib_save_LIBS
11307fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011308{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
11309$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011310if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011311 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011312 LIBS="$LIBS -lbsd"
11313fi
11314
11315
11316fi
11317
Fred Drake8cef4cf2000-06-28 16:40:38 +000011318
11319fi
11320done
11321
11322for ac_func in forkpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011323do :
11324 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011325if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011326 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011327#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011328_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011329
Fred Drake8cef4cf2000-06-28 16:40:38 +000011330else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011331 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
11332$as_echo_n "checking for forkpty in -lutil... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011333if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011334 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011335else
Martin v. Löwis11437992002-04-12 09:54:03 +000011336 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011337LIBS="-lutil $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011338cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011339/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011340
Martin v. Löwiseba40652007-08-30 20:10:57 +000011341/* Override any GCC internal prototype to avoid an error.
11342 Use char because int might match the return type of a GCC
11343 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011344#ifdef __cplusplus
11345extern "C"
11346#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011347char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011348int
11349main ()
11350{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011351return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011352 ;
11353 return 0;
11354}
11355_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011356if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011357 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011358else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011359 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011360fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011361rm -f core conftest.err conftest.$ac_objext \
11362 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011363LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011364fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011365{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
11366$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011367if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011368 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011369 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011370else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011371 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
11372$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011373if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011374 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011375else
11376 ac_check_lib_save_LIBS=$LIBS
11377LIBS="-lbsd $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011378cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011379/* end confdefs.h. */
11380
Martin v. Löwiseba40652007-08-30 20:10:57 +000011381/* Override any GCC internal prototype to avoid an error.
11382 Use char because int might match the return type of a GCC
11383 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011384#ifdef __cplusplus
11385extern "C"
11386#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011387char forkpty ();
11388int
11389main ()
11390{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011391return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011392 ;
11393 return 0;
11394}
11395_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011396if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011397 ac_cv_lib_bsd_forkpty=yes
11398else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011399 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011400fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011401rm -f core conftest.err conftest.$ac_objext \
11402 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011403LIBS=$ac_check_lib_save_LIBS
11404fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011405{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
11406$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011407if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011408 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011409 LIBS="$LIBS -lbsd"
11410fi
11411
11412
11413fi
11414
Fred Drake8cef4cf2000-06-28 16:40:38 +000011415
11416fi
11417done
11418
Jack Jansendd19cf82001-12-06 22:36:17 +000011419
Brett Cannonaa5778d2008-03-18 04:09:00 +000011420# Stuff for expat.
Brett Cannonaa5778d2008-03-18 04:09:00 +000011421for ac_func in memmove
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011422do :
11423 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011424if test "x$ac_cv_func_memmove" = xyes; then :
Brett Cannonaa5778d2008-03-18 04:09:00 +000011425 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011426#define HAVE_MEMMOVE 1
Brett Cannonaa5778d2008-03-18 04:09:00 +000011427_ACEOF
11428
11429fi
11430done
11431
11432
Michael W. Hudson54241132001-12-07 15:38:26 +000011433# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000011434for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011435do :
11436 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11437ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011438if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011439 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011440#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011441_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000011442
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011443fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000011444done
11445
Michael W. Hudson54241132001-12-07 15:38:26 +000011446
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011447ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011448if test "x$ac_cv_func_dup2" = xyes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011449 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000011450
Martin v. Löwis1142de32002-03-29 16:28:31 +000011451else
Martin v. Löwiseba40652007-08-30 20:10:57 +000011452 case " $LIBOBJS " in
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011453 *" dup2.$ac_objext "* ) ;;
11454 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Martin v. Löwiseba40652007-08-30 20:10:57 +000011455 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011456esac
11457
Martin v. Löwis1142de32002-03-29 16:28:31 +000011458fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011459
11460ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011461if test "x$ac_cv_func_getcwd" = xyes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011462 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
11463
11464else
11465 case " $LIBOBJS " in
11466 *" getcwd.$ac_objext "* ) ;;
11467 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
11468 ;;
11469esac
11470
11471fi
11472
11473ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011474if test "x$ac_cv_func_strdup" = xyes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011475 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
11476
11477else
11478 case " $LIBOBJS " in
11479 *" strdup.$ac_objext "* ) ;;
11480 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
11481 ;;
11482esac
11483
11484fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000011485
11486
11487for ac_func in getpgrp
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011488do :
11489 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011490if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011491 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011492#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011493_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011494 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011495/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011496#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011497int
11498main ()
11499{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011500getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011501 ;
11502 return 0;
11503}
11504_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011505if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011506
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011507$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011508
Guido van Rossum627b2d71993-12-24 10:39:16 +000011509fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011510rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011511
Guido van Rossum627b2d71993-12-24 10:39:16 +000011512fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011513done
Guido van Rossum627b2d71993-12-24 10:39:16 +000011514
Jack Jansen150753c2003-03-29 22:07:47 +000011515for ac_func in setpgrp
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011516do :
11517 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011518if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000011519 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011520#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000011521_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011522 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011523/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000011524#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000011525int
11526main ()
11527{
11528setpgrp(0,0);
11529 ;
11530 return 0;
11531}
11532_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011533if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011534
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011535$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011536
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011537fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011538rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000011539
11540fi
11541done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011542
Thomas Wouters3a584202000-08-05 23:28:51 +000011543for ac_func in gettimeofday
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011544do :
11545 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011546if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011547 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011548#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011549_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011550 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011551/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011552#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011553int
11554main ()
11555{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011556gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011557 ;
11558 return 0;
11559}
11560_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011561if ac_fn_c_try_compile "$LINENO"; then :
11562
Guido van Rossum627b2d71993-12-24 10:39:16 +000011563else
Skip Montanaro6dead952003-09-25 14:50:04 +000011564
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011565$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011566
Martin v. Löwis11437992002-04-12 09:54:03 +000011567
Guido van Rossum627b2d71993-12-24 10:39:16 +000011568fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011569rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011570
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011571fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011572done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011573
Michael W. Hudson54241132001-12-07 15:38:26 +000011574
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
11576$as_echo_n "checking for major... " >&6; }
11577cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011578/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011579
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011580#if defined(MAJOR_IN_MKDEV)
11581#include <sys/mkdev.h>
11582#elif defined(MAJOR_IN_SYSMACROS)
11583#include <sys/sysmacros.h>
11584#else
11585#include <sys/types.h>
11586#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011587
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011588int
11589main ()
11590{
11591
11592 makedev(major(0),minor(0));
11593
11594 ;
11595 return 0;
11596}
11597_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011598if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011599
11600
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011601$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011602
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11604$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011605
11606else
Skip Montanaro6dead952003-09-25 14:50:04 +000011607
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11609$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011610
11611fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011612rm -f core conftest.err conftest.$ac_objext \
11613 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011614
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011615# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000011616# for [no]getaddrinfo in netdb.h.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
11618$as_echo_n "checking for getaddrinfo... " >&6; }
11619cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011620/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011621
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011622#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011623#include <sys/socket.h>
11624#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011625#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011626
Martin v. Löwis11437992002-04-12 09:54:03 +000011627int
11628main ()
11629{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011630getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000011631 ;
11632 return 0;
11633}
11634_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011635if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011636 have_getaddrinfo=yes
11637else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011638 have_getaddrinfo=no
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011639fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011640rm -f core conftest.err conftest.$ac_objext \
11641 conftest$ac_exeext conftest.$ac_ext
11642{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
11643$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011644if test $have_getaddrinfo = yes
11645then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011646 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
11647$as_echo_n "checking getaddrinfo bug... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011648 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011649 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011650else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011651 if test "$cross_compiling" = yes; then :
doko@python.orgd65e2ba2013-01-31 23:52:03 +010011652
11653if test "${enable_ipv6+set}" = set; then
11654 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
11655else
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011656 ac_cv_buggy_getaddrinfo=yes
doko@python.orgd65e2ba2013-01-31 23:52:03 +010011657fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011658else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011659 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011660/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011661
Stefan Krah0afe4e42012-11-22 23:56:51 +010011662#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011663#include <sys/types.h>
11664#include <netdb.h>
11665#include <string.h>
11666#include <sys/socket.h>
11667#include <netinet/in.h>
11668
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011669int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011670{
11671 int passive, gaierr, inet4 = 0, inet6 = 0;
11672 struct addrinfo hints, *ai, *aitop;
11673 char straddr[INET6_ADDRSTRLEN], strport[16];
11674
11675 for (passive = 0; passive <= 1; passive++) {
11676 memset(&hints, 0, sizeof(hints));
11677 hints.ai_family = AF_UNSPEC;
11678 hints.ai_flags = passive ? AI_PASSIVE : 0;
11679 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000011680 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011681 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
11682 (void)gai_strerror(gaierr);
11683 goto bad;
11684 }
11685 for (ai = aitop; ai; ai = ai->ai_next) {
11686 if (ai->ai_addr == NULL ||
11687 ai->ai_addrlen == 0 ||
11688 getnameinfo(ai->ai_addr, ai->ai_addrlen,
11689 straddr, sizeof(straddr), strport, sizeof(strport),
11690 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
11691 goto bad;
11692 }
11693 switch (ai->ai_family) {
11694 case AF_INET:
11695 if (strcmp(strport, "54321") != 0) {
11696 goto bad;
11697 }
11698 if (passive) {
11699 if (strcmp(straddr, "0.0.0.0") != 0) {
11700 goto bad;
11701 }
11702 } else {
11703 if (strcmp(straddr, "127.0.0.1") != 0) {
11704 goto bad;
11705 }
11706 }
11707 inet4++;
11708 break;
11709 case AF_INET6:
11710 if (strcmp(strport, "54321") != 0) {
11711 goto bad;
11712 }
11713 if (passive) {
11714 if (strcmp(straddr, "::") != 0) {
11715 goto bad;
11716 }
11717 } else {
11718 if (strcmp(straddr, "::1") != 0) {
11719 goto bad;
11720 }
11721 }
11722 inet6++;
11723 break;
11724 case AF_UNSPEC:
11725 goto bad;
11726 break;
11727 default:
11728 /* another family support? */
11729 break;
11730 }
11731 }
11732 }
11733
11734 if (!(inet4 == 0 || inet4 == 2))
11735 goto bad;
11736 if (!(inet6 == 0 || inet6 == 2))
11737 goto bad;
11738
11739 if (aitop)
11740 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011741 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011742
11743 bad:
11744 if (aitop)
11745 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011746 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011747}
11748
Martin v. Löwis11437992002-04-12 09:54:03 +000011749_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011750if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011751 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011752else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011753 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011754fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011755rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11756 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011757fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011758
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011759fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011760
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011761fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011762
Benjamin Peterson75fed812010-11-01 01:47:19 +000011763{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
11764$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
11765
Mark Dickinson0ef0b912009-12-31 21:11:48 +000011766if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011767then
11768 if test $ipv6 = yes
11769 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011770 echo 'Fatal: You must get working getaddrinfo() function.'
11771 echo ' or you can specify "--disable-ipv6"'.
11772 exit 1
11773 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011774else
Martin v. Löwis11437992002-04-12 09:54:03 +000011775
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011776$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011777
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011778fi
Benjamin Peterson75fed812010-11-01 01:47:19 +000011779
Jack Jansen9a66b6d2001-08-08 13:56:14 +000011780for ac_func in getnameinfo
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011781do :
11782 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011783if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011784 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011785#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011786_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011787
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011788fi
11789done
11790
Michael W. Hudson54241132001-12-07 15:38:26 +000011791
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011792# checks for structures
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
11794$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011795if ${ac_cv_header_time+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011796 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011797else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011798 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011799/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011800#include <sys/types.h>
11801#include <sys/time.h>
11802#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011803
Martin v. Löwis11437992002-04-12 09:54:03 +000011804int
11805main ()
11806{
11807if ((struct tm *) 0)
11808return 0;
11809 ;
11810 return 0;
11811}
11812_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011813if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011814 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011815else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011816 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011817fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011818rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011819fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011820{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
11821$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011822if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011823
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011824$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011825
11826fi
11827
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
11829$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011830if ${ac_cv_struct_tm+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011831 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011832else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011833 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011834/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011835#include <sys/types.h>
11836#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011837
Martin v. Löwis11437992002-04-12 09:54:03 +000011838int
11839main ()
11840{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011841struct tm tm;
11842 int *p = &tm.tm_sec;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011843 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000011844 ;
11845 return 0;
11846}
11847_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011848if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011849 ac_cv_struct_tm=time.h
11850else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011851 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011852fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011853rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011854fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011855{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
11856$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011857if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011858
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011859$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011860
11861fi
11862
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011863ac_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 +000011864#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000011865
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011866"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011867if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011868
11869cat >>confdefs.h <<_ACEOF
11870#define HAVE_STRUCT_TM_TM_ZONE 1
11871_ACEOF
11872
11873
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011874fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011875
Martin v. Löwis11437992002-04-12 09:54:03 +000011876if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
11877
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011878$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011879
11880else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011881 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
11882"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011883if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011884 ac_have_decl=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000011885else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011886 ac_have_decl=0
Martin v. Löwiseba40652007-08-30 20:10:57 +000011887fi
11888
Martin v. Löwiseba40652007-08-30 20:10:57 +000011889cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011890#define HAVE_DECL_TZNAME $ac_have_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +000011891_ACEOF
11892
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011893 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
11894$as_echo_n "checking for tzname... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011895if ${ac_cv_var_tzname+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011896 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000011897else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011898 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011899/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011900#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000011901#if !HAVE_DECL_TZNAME
11902extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000011903#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011904
Martin v. Löwis11437992002-04-12 09:54:03 +000011905int
11906main ()
11907{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011908return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000011909 ;
11910 return 0;
11911}
11912_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011913if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011914 ac_cv_var_tzname=yes
11915else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011916 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011917fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011918rm -f core conftest.err conftest.$ac_objext \
11919 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000011920fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011921{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
11922$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011923 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011924
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011925$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011926
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011927 fi
11928fi
11929
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011930ac_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 +010011931if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011932
11933cat >>confdefs.h <<_ACEOF
11934#define HAVE_STRUCT_STAT_ST_RDEV 1
11935_ACEOF
11936
11937
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011938fi
11939
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011940ac_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 +010011941if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011942
Martin v. Löwis11437992002-04-12 09:54:03 +000011943cat >>confdefs.h <<_ACEOF
11944#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
11945_ACEOF
11946
11947
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011948fi
11949
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011950ac_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 +010011951if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000011952
11953cat >>confdefs.h <<_ACEOF
11954#define HAVE_STRUCT_STAT_ST_FLAGS 1
11955_ACEOF
11956
11957
11958fi
11959
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011960ac_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 +010011961if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011962
11963cat >>confdefs.h <<_ACEOF
11964#define HAVE_STRUCT_STAT_ST_GEN 1
11965_ACEOF
11966
11967
11968fi
11969
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011970ac_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 +010011971if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011972
11973cat >>confdefs.h <<_ACEOF
11974#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
11975_ACEOF
11976
11977
11978fi
11979
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011980ac_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 +010011981if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011982
Martin v. Löwis11437992002-04-12 09:54:03 +000011983cat >>confdefs.h <<_ACEOF
11984#define HAVE_STRUCT_STAT_ST_BLOCKS 1
11985_ACEOF
11986
11987
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011988fi
11989
Michael W. Hudson54241132001-12-07 15:38:26 +000011990
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
11992$as_echo_n "checking for time.h that defines altzone... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011993if ${ac_cv_header_time_altzone+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011994 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011995else
Matthias Klosec511b472010-05-08 11:01:39 +000011996
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011997 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011998/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000011999#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012000int
12001main ()
12002{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012003return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000012004 ;
12005 return 0;
12006}
12007_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012008if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012009 ac_cv_header_time_altzone=yes
12010else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012011 ac_cv_header_time_altzone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012012fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012013rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosec511b472010-05-08 11:01:39 +000012014
Martin v. Löwiseba40652007-08-30 20:10:57 +000012015fi
12016
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012017{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
12018$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012019if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012020
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012021$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012022
12023fi
12024
Guido van Rossumda88dad1995-01-26 00:46:29 +000012025was_it_defined=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
12027$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
12028cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012029/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012030
12031#include <sys/types.h>
12032#include <sys/select.h>
12033#include <sys/time.h>
12034
Martin v. Löwis11437992002-04-12 09:54:03 +000012035int
12036main ()
12037{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012038;
Martin v. Löwis11437992002-04-12 09:54:03 +000012039 ;
12040 return 0;
12041}
12042_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012043if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012044
12045
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012046$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012047
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012048 was_it_defined=yes
12049
Martin v. Löwiseba40652007-08-30 20:10:57 +000012050fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012051rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012052{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
12053$as_echo "$was_it_defined" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012054
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
12056$as_echo_n "checking for addrinfo... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012057if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012058 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012059else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012060 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012061/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +000012062#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012063int
12064main ()
12065{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012066struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000012067 ;
12068 return 0;
12069}
12070_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012071if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012072 ac_cv_struct_addrinfo=yes
12073else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012074 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012075fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012076rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12077fi
12078
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012079{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
12080$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012081if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012082
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012083$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012084
12085fi
12086
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
12088$as_echo_n "checking for sockaddr_storage... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012089if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012090 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012091else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012092 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012093/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012094
12095# include <sys/types.h>
12096# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012097int
12098main ()
12099{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012100struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000012101 ;
12102 return 0;
12103}
12104_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012105if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012106 ac_cv_struct_sockaddr_storage=yes
12107else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012108 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012109fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012110rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12111fi
12112
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012113{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
12114$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012115if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012116
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012117$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012118
12119fi
12120
Guido van Rossum627b2d71993-12-24 10:39:16 +000012121# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000012122
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
12124$as_echo_n "checking whether char is unsigned... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012125if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012126 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000012127else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012128 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012129/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012130$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012131int
12132main ()
12133{
12134static int test_array [1 - 2 * !(((char) -1) < 0)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012135test_array [0] = 0;
12136return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012137
12138 ;
12139 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000012140}
Martin v. Löwis11437992002-04-12 09:54:03 +000012141_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012142if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012143 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012144else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012145 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012146fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012147rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012148fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012149{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
12150$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012151if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012152 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012153
12154fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000012155
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12157$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012158if ${ac_cv_c_const+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012159 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012160else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012161 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012162/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012163
Martin v. Löwis11437992002-04-12 09:54:03 +000012164int
12165main ()
12166{
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012167
Martin v. Löwis11437992002-04-12 09:54:03 +000012168#ifndef __cplusplus
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012169 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012170 typedef int charset[2];
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012171 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000012172 /* SunOS 4.1.1 cc rejects this. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000012173 char const *const *pcpcc;
12174 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000012175 /* NEC SVR4.0.2 mips cc rejects this. */
12176 struct point {int x, y;};
12177 static struct point const zero = {0,0};
12178 /* AIX XL C 1.02.0.0 rejects this.
12179 It does not let you subtract one const X* pointer from another in
12180 an arm of an if-expression whose if-part is not a constant
12181 expression */
12182 const char *g = "string";
Martin v. Löwiseba40652007-08-30 20:10:57 +000012183 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012184 /* HPUX 7.0 cc rejects these. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000012185 ++pcpcc;
12186 ppc = (char**) pcpcc;
12187 pcpcc = (char const *const *) ppc;
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012188 { /* SCO 3.2v4 cc rejects this sort of thing. */
12189 char tx;
12190 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000012191 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012192
Martin v. Löwis11437992002-04-12 09:54:03 +000012193 *t++ = 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012194 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012195 }
12196 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12197 int x[] = {25, 17};
12198 const int *foo = &x[0];
12199 ++foo;
12200 }
12201 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12202 typedef const int *iptr;
12203 iptr p = 0;
12204 ++p;
12205 }
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012206 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000012207 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012208 struct s { int j; const int *ap[3]; } bx;
12209 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000012210 }
12211 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12212 const int foo = 10;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012213 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012214 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012215 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000012216#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000012217
Martin v. Löwis11437992002-04-12 09:54:03 +000012218 ;
12219 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012220}
Martin v. Löwis11437992002-04-12 09:54:03 +000012221_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012222if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012223 ac_cv_c_const=yes
12224else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012225 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012226fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012227rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012228fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012229{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12230$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012231if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012232
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012233$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012234
12235fi
12236
Michael W. Hudson54241132001-12-07 15:38:26 +000012237
Guido van Rossumda88dad1995-01-26 00:46:29 +000012238works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
12240$as_echo_n "checking for working volatile... " >&6; }
12241cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012242/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012243
Martin v. Löwis11437992002-04-12 09:54:03 +000012244int
12245main ()
12246{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012247volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012248 ;
12249 return 0;
12250}
12251_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012252if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012253 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012254else
Skip Montanaro6dead952003-09-25 14:50:04 +000012255
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012256$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012257
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012258
Guido van Rossum627b2d71993-12-24 10:39:16 +000012259fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012260rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012261{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12262$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012263
Guido van Rossumda88dad1995-01-26 00:46:29 +000012264works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
12266$as_echo_n "checking for working signed char... " >&6; }
12267cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012268/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012269
Martin v. Löwis11437992002-04-12 09:54:03 +000012270int
12271main ()
12272{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012273signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000012274 ;
12275 return 0;
12276}
12277_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012278if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012279 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012280else
Skip Montanaro6dead952003-09-25 14:50:04 +000012281
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012282$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000012283
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012284
Guido van Rossum7f43da71994-08-01 12:15:30 +000012285fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012286rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012287{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12288$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012289
Guido van Rossumda88dad1995-01-26 00:46:29 +000012290have_prototypes=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
12292$as_echo_n "checking for prototypes... " >&6; }
12293cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012294/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012295int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012296int
12297main ()
12298{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012299return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000012300 ;
12301 return 0;
12302}
12303_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012304if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012305
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012306$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012307
Matthias Klosec511b472010-05-08 11:01:39 +000012308 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012309fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012310rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012311{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
12312$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012313
Guido van Rossumda88dad1995-01-26 00:46:29 +000012314works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
12316$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
12317cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012318/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012319
12320#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000012321int foo(int x, ...) {
12322 va_list va;
12323 va_start(va, x);
12324 va_arg(va, int);
12325 va_arg(va, char *);
12326 va_arg(va, double);
12327 return 0;
12328}
Guido van Rossum7f43da71994-08-01 12:15:30 +000012329
Martin v. Löwis11437992002-04-12 09:54:03 +000012330int
12331main ()
12332{
Guido van Rossum90eea071996-08-30 20:58:57 +000012333return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000012334 ;
12335 return 0;
12336}
12337_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012338if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012339
12340
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012341$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012342
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012343 works=yes
12344
Guido van Rossum627b2d71993-12-24 10:39:16 +000012345fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012346rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012347{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12348$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012349
Martin v. Löwisd6320502004-08-12 13:45:08 +000012350# check for socketpair
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
12352$as_echo_n "checking for socketpair... " >&6; }
12353cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012354/* end confdefs.h. */
12355
12356#include <sys/types.h>
12357#include <sys/socket.h>
12358
12359int
12360main ()
12361{
12362void *x=socketpair
12363 ;
12364 return 0;
12365}
12366_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012367if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000012368
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012369$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000012370
Matthias Klosec511b472010-05-08 11:01:39 +000012371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012372$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012373else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12375$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012376
12377fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012378rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012379
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012380# check if sockaddr has sa_len member
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
12382$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
12383cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012384/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012385#include <sys/types.h>
12386#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012387int
12388main ()
12389{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012390struct sockaddr x;
12391x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012392 ;
12393 return 0;
12394}
12395_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012396if ac_fn_c_try_compile "$LINENO"; then :
12397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12398$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012399
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012400$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012401
12402else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12404$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000012405
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012406fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012407rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012408
Guido van Rossumda88dad1995-01-26 00:46:29 +000012409va_list_is_array=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
12411$as_echo_n "checking whether va_list is an array... " >&6; }
12412cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012413/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012414
12415#ifdef HAVE_STDARG_PROTOTYPES
12416#include <stdarg.h>
12417#else
12418#include <varargs.h>
12419#endif
12420
Martin v. Löwis11437992002-04-12 09:54:03 +000012421int
12422main ()
12423{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012424va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000012425 ;
12426 return 0;
12427}
12428_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012429if ac_fn_c_try_compile "$LINENO"; then :
12430
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012431else
Skip Montanaro6dead952003-09-25 14:50:04 +000012432
Martin v. Löwis11437992002-04-12 09:54:03 +000012433
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012434$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012435
Guido van Rossumda88dad1995-01-26 00:46:29 +000012436 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012437
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012438fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012439rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012440{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
12441$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012442
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012443# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000012444
12445
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012446ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012447if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012448
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012449 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000012450
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012451 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
12452$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012453 OLD_CFLAGS=$CFLAGS
12454 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012455 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012456/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012457
12458# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012459
Martin v. Löwis11437992002-04-12 09:54:03 +000012460int
12461main ()
12462{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012463
12464 char *name;
12465 struct hostent *he, *res;
12466 char buffer[2048];
12467 int buflen = 2048;
12468 int h_errnop;
12469
12470 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012471
12472 ;
12473 return 0;
12474}
12475_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012476if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012477
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012478 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012479
Martin v. Löwis11437992002-04-12 09:54:03 +000012480
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012481$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012482
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12484$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012485
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012486else
Skip Montanaro6dead952003-09-25 14:50:04 +000012487
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12489$as_echo "no" >&6; }
12490 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
12491$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
12492 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012493/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012494
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012495# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012496
Martin v. Löwis11437992002-04-12 09:54:03 +000012497int
12498main ()
12499{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012500
12501 char *name;
12502 struct hostent *he;
Matthias Klosec511b472010-05-08 11:01:39 +000012503 char buffer[2048];
12504 int buflen = 2048;
12505 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012506
Matthias Klosec511b472010-05-08 11:01:39 +000012507 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012508
12509 ;
12510 return 0;
12511}
12512_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012513if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012514
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012515 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012516
Martin v. Löwis11437992002-04-12 09:54:03 +000012517
Matthias Klosec511b472010-05-08 11:01:39 +000012518$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012519
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12521$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012522
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012523else
Skip Montanaro6dead952003-09-25 14:50:04 +000012524
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12526$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000012527 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
12528$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
12529 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12530/* end confdefs.h. */
12531
12532# include <netdb.h>
12533
12534int
12535main ()
12536{
12537
12538 char *name;
12539 struct hostent *he;
12540 struct hostent_data data;
12541
12542 (void) gethostbyname_r(name, he, &data);
12543
12544 ;
12545 return 0;
12546}
12547_ACEOF
12548if ac_fn_c_try_compile "$LINENO"; then :
12549
12550 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
12551
12552
12553$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
12554
12555 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12556$as_echo "yes" >&6; }
12557
12558else
12559
12560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12561$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012562
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012563fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012564rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012565
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012566fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012567rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012568
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012569fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012570rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012571 CFLAGS=$OLD_CFLAGS
12572
12573else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012574
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012575 for ac_func in gethostbyname
12576do :
12577 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012578if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012579 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012580#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012581_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012582
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012583fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012584done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012585
Michael W. Hudson54241132001-12-07 15:38:26 +000012586
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012587fi
12588
Michael W. Hudson54241132001-12-07 15:38:26 +000012589
12590
12591
12592
12593
12594
Guido van Rossum627b2d71993-12-24 10:39:16 +000012595# checks for system services
12596# (none yet)
12597
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012598# Linux requires this for correct f.p. operations
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012599ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012600if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012601
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012602else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012603 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
12604$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012605if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012606 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012607else
Martin v. Löwis11437992002-04-12 09:54:03 +000012608 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012609LIBS="-lieee $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012610cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012611/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012612
Martin v. Löwiseba40652007-08-30 20:10:57 +000012613/* Override any GCC internal prototype to avoid an error.
12614 Use char because int might match the return type of a GCC
12615 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012616#ifdef __cplusplus
12617extern "C"
12618#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012619char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012620int
12621main ()
12622{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012623return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012624 ;
12625 return 0;
12626}
12627_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012628if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012629 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012630else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012631 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012632fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012633rm -f core conftest.err conftest.$ac_objext \
12634 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012635LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012636fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012637{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
12638$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012639if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012640 cat >>confdefs.h <<_ACEOF
12641#define HAVE_LIBIEEE 1
12642_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012643
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012644 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012645
Guido van Rossum627b2d71993-12-24 10:39:16 +000012646fi
12647
Michael W. Hudson54241132001-12-07 15:38:26 +000012648
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012649fi
12650
Michael W. Hudson54241132001-12-07 15:38:26 +000012651
Guido van Rossum7f253911997-05-09 02:42:48 +000012652# Check for --with-fpectl
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
12654$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012655
Martin v. Löwiseba40652007-08-30 20:10:57 +000012656# Check whether --with-fpectl was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012657if test "${with_fpectl+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000012658 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000012659if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000012660then
12661
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012662$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012663
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12665$as_echo "yes" >&6; }
12666else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12667$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012668fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000012669else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12671$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012672fi
12673
Guido van Rossum7f253911997-05-09 02:42:48 +000012674
Guido van Rossum7f43da71994-08-01 12:15:30 +000012675# check for --with-libm=...
12676
Guido van Rossum563e7081996-09-10 18:20:48 +000012677case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000012678Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012679BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000012680*) LIBM=-lm
12681esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
12683$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012684
Martin v. Löwiseba40652007-08-30 20:10:57 +000012685# Check whether --with-libm was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012686if test "${with_libm+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000012687 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000012688if test "$withval" = no
12689then LIBM=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
12691$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012692elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012693then LIBM=$withval
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
12695$as_echo "set LIBM=\"$withval\"" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012696else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012697fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012698else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
12700$as_echo "default LIBM=\"$LIBM\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012701fi
12702
Guido van Rossum7f43da71994-08-01 12:15:30 +000012703
12704# check for --with-libc=...
12705
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
12707$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012708
Martin v. Löwiseba40652007-08-30 20:10:57 +000012709# Check whether --with-libc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012710if test "${with_libc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000012711 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000012712if test "$withval" = no
12713then LIBC=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
12715$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012716elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012717then LIBC=$withval
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
12719$as_echo "set LIBC=\"$withval\"" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012720else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012721fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012722else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
12724$as_echo "default LIBC=\"$LIBC\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012725fi
12726
Guido van Rossum7f43da71994-08-01 12:15:30 +000012727
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012728# **************************************************
12729# * Check for various properties of floating point *
12730# **************************************************
Mark Dickinson265d7382008-04-21 22:32:24 +000012731
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
12733$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012734if ${ac_cv_little_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012735 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012736else
12737
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012738if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012739 ac_cv_little_endian_double=no
12740else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012741 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012742/* end confdefs.h. */
12743
12744#include <string.h>
12745int main() {
12746 double x = 9006104071832581.0;
12747 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
12748 return 0;
12749 else
12750 return 1;
12751}
12752
12753_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012754if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012755 ac_cv_little_endian_double=yes
12756else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012757 ac_cv_little_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012758fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012759rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12760 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012761fi
12762
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012763fi
12764
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012765{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
12766$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012767if test "$ac_cv_little_endian_double" = yes
12768then
12769
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012770$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012771
12772fi
12773
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
12775$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012776if ${ac_cv_big_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012777 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012778else
12779
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012780if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012781 ac_cv_big_endian_double=no
12782else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012783 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012784/* end confdefs.h. */
12785
12786#include <string.h>
12787int main() {
12788 double x = 9006104071832581.0;
12789 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
12790 return 0;
12791 else
12792 return 1;
12793}
12794
12795_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012796if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012797 ac_cv_big_endian_double=yes
12798else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012799 ac_cv_big_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012800fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012801rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12802 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012803fi
12804
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012805fi
12806
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012807{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
12808$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012809if test "$ac_cv_big_endian_double" = yes
12810then
12811
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012812$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012813
12814fi
12815
12816# Some ARM platforms use a mixed-endian representation for doubles.
12817# While Python doesn't currently have full support for these platforms
12818# (see e.g., issue 1762561), we can at least make sure that float <-> string
12819# conversions work.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
12821$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012822if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012823 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012824else
12825
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012826if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012827 ac_cv_mixed_endian_double=no
12828else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012829 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012830/* end confdefs.h. */
12831
12832#include <string.h>
12833int main() {
12834 double x = 9006104071832581.0;
12835 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
12836 return 0;
12837 else
12838 return 1;
12839}
12840
12841_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012842if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012843 ac_cv_mixed_endian_double=yes
12844else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012845 ac_cv_mixed_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012846fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012847rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12848 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012849fi
12850
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012851fi
12852
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012853{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
12854$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012855if test "$ac_cv_mixed_endian_double" = yes
12856then
12857
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012858$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012859
12860fi
12861
12862# The short float repr introduced in Python 3.1 requires the
12863# correctly-rounded string <-> double conversion functions from
12864# Python/dtoa.c, which in turn require that the FPU uses 53-bit
12865# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsona548dee2009-11-15 13:12:43 +000012866# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012867# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsona548dee2009-11-15 13:12:43 +000012868
12869# This inline assembler syntax may also work for suncc and icc,
12870# so we try it on all platforms.
12871
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
12873$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
12874cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012875/* end confdefs.h. */
12876
12877int
12878main ()
12879{
12880
Mark Dickinsona548dee2009-11-15 13:12:43 +000012881 unsigned short cw;
12882 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
12883 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012884
12885 ;
12886 return 0;
12887}
12888_ACEOF
Stefan Krah99e36b92015-07-03 15:30:54 +020012889if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012890 have_gcc_asm_for_x87=yes
12891else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012892 have_gcc_asm_for_x87=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012893fi
Stefan Krah99e36b92015-07-03 15:30:54 +020012894rm -f core conftest.err conftest.$ac_objext \
12895 conftest$ac_exeext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012896{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
12897$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsona548dee2009-11-15 13:12:43 +000012898if test "$have_gcc_asm_for_x87" = yes
12899then
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012900
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012901$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012902
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012903fi
Mark Dickinson7a3d8642008-04-22 00:54:27 +000012904
Mark Dickinson04b27232009-01-04 12:29:36 +000012905# Detect whether system arithmetic is subject to x87-style double
12906# rounding issues. The result of this test has little meaning on non
12907# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
12908# mode is round-to-nearest and double rounding issues are present, and
12909# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
12911$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinson99abd142009-10-24 13:44:16 +000012912# $BASECFLAGS may affect the result
12913ac_save_cc="$CC"
12914CC="$CC $BASECFLAGS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012915if test "$cross_compiling" = yes; then :
Mark Dickinson04b27232009-01-04 12:29:36 +000012916 ac_cv_x87_double_rounding=no
12917else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012918 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson04b27232009-01-04 12:29:36 +000012919/* end confdefs.h. */
12920
12921#include <stdlib.h>
12922#include <math.h>
12923int main() {
12924 volatile double x, y, z;
12925 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
12926 x = 0.99999999999999989; /* 1-2**-53 */
12927 y = 1./x;
12928 if (y != 1.)
12929 exit(0);
12930 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
12931 x = 1e16;
12932 y = 2.99999;
12933 z = x + y;
12934 if (z != 1e16+4.)
12935 exit(0);
12936 /* both tests show evidence of double rounding */
12937 exit(1);
12938}
12939
12940_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012941if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson04b27232009-01-04 12:29:36 +000012942 ac_cv_x87_double_rounding=no
12943else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012944 ac_cv_x87_double_rounding=yes
Mark Dickinson04b27232009-01-04 12:29:36 +000012945fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012946rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12947 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson04b27232009-01-04 12:29:36 +000012948fi
12949
Mark Dickinson99abd142009-10-24 13:44:16 +000012950CC="$ac_save_cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012951{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
12952$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson04b27232009-01-04 12:29:36 +000012953if test "$ac_cv_x87_double_rounding" = yes
12954then
12955
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012956$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson04b27232009-01-04 12:29:36 +000012957
12958fi
12959
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012960# ************************************
12961# * Check for mathematical functions *
12962# ************************************
12963
12964LIBS_SAVE=$LIBS
12965LIBS="$LIBS $LIBM"
12966
Mark Dickinson265d7382008-04-21 22:32:24 +000012967# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
12968# -0. on some architectures.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
12970$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012971if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012972 $as_echo_n "(cached) " >&6
Mark Dickinson265d7382008-04-21 22:32:24 +000012973else
12974
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012975if test "$cross_compiling" = yes; then :
Mark Dickinson265d7382008-04-21 22:32:24 +000012976 ac_cv_tanh_preserves_zero_sign=no
12977else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012978 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson265d7382008-04-21 22:32:24 +000012979/* end confdefs.h. */
12980
12981#include <math.h>
Mark Dickinson7a3d8642008-04-22 00:54:27 +000012982#include <stdlib.h>
Mark Dickinson265d7382008-04-21 22:32:24 +000012983int main() {
12984 /* return 0 if either negative zeros don't exist
12985 on this platform or if negative zeros exist
12986 and tanh(-0.) == -0. */
12987 if (atan2(0., -1.) == atan2(-0., -1.) ||
12988 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
12989 else exit(1);
12990}
12991
12992_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012993if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson265d7382008-04-21 22:32:24 +000012994 ac_cv_tanh_preserves_zero_sign=yes
12995else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012996 ac_cv_tanh_preserves_zero_sign=no
Mark Dickinson265d7382008-04-21 22:32:24 +000012997fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012998rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12999 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson265d7382008-04-21 22:32:24 +000013000fi
13001
Mark Dickinson265d7382008-04-21 22:32:24 +000013002fi
13003
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013004{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
13005$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Mark Dickinson265d7382008-04-21 22:32:24 +000013006if test "$ac_cv_tanh_preserves_zero_sign" = yes
13007then
13008
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013009$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Mark Dickinson265d7382008-04-21 22:32:24 +000013010
13011fi
13012
Mark Dickinson65898e02009-09-05 10:27:00 +000013013for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013014do :
13015 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13016ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013017if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinson65898e02009-09-05 10:27:00 +000013018 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013019#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Mark Dickinson65898e02009-09-05 10:27:00 +000013020_ACEOF
13021
13022fi
13023done
13024
Mark Dickinson65898e02009-09-05 10:27:00 +000013025for ac_func in hypot lgamma log1p round tgamma
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013026do :
13027 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13028ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013029if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Christian Heimes0a8143f2007-12-18 23:22:54 +000013030 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013031#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes0a8143f2007-12-18 23:22:54 +000013032_ACEOF
13033
13034fi
13035done
13036
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013037ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
13038"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013039if test "x$ac_cv_have_decl_isinf" = 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
13044
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013045cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013046#define HAVE_DECL_ISINF $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013047_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013048ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
13049"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013050if test "x$ac_cv_have_decl_isnan" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013051 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013052else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013053 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013054fi
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013055
13056cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013057#define HAVE_DECL_ISNAN $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013058_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013059ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
13060"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013061if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013062 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013063else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013064 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013065fi
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013066
13067cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013068#define HAVE_DECL_ISFINITE $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013069_ACEOF
13070
13071
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000013072LIBS=$LIBS_SAVE
13073
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013074# For multiprocessing module, check that sem_open
13075# actually works. For FreeBSD versions <= 7.2,
13076# the kernel module that provides POSIX semaphores
13077# isn't loaded by default, so an attempt to call
13078# sem_open results in a 'Signal 12' error.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
13080$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013081if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013082 $as_echo_n "(cached) " >&6
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013083else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013084 if test "$cross_compiling" = yes; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013085 ac_cv_posix_semaphores_enabled=yes
13086else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013087 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013088/* end confdefs.h. */
13089
13090#include <unistd.h>
13091#include <fcntl.h>
13092#include <stdio.h>
13093#include <semaphore.h>
13094#include <sys/stat.h>
13095
13096int main(void) {
13097 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
13098 if (a == SEM_FAILED) {
13099 perror("sem_open");
13100 return 1;
13101 }
13102 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000013103 sem_unlink("/autoconf");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013104 return 0;
13105}
13106
13107_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013108if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013109 ac_cv_posix_semaphores_enabled=yes
13110else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013111 ac_cv_posix_semaphores_enabled=no
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013112fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013113rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13114 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013115fi
13116
13117
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013118fi
13119
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013120{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
13121$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013122if test $ac_cv_posix_semaphores_enabled = no
13123then
13124
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013125$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013126
13127fi
13128
13129# Multiprocessing check for broken sem_getvalue
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
13131$as_echo_n "checking for broken sem_getvalue... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013132if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013133 $as_echo_n "(cached) " >&6
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013134else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013135 if test "$cross_compiling" = yes; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013136 ac_cv_broken_sem_getvalue=yes
13137else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013138 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013139/* end confdefs.h. */
13140
13141#include <unistd.h>
13142#include <fcntl.h>
13143#include <stdio.h>
13144#include <semaphore.h>
13145#include <sys/stat.h>
13146
13147int main(void){
Mark Dickinson59dc89e2009-12-13 21:06:06 +000013148 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013149 int count;
13150 int res;
13151 if(a==SEM_FAILED){
13152 perror("sem_open");
13153 return 1;
13154
13155 }
13156 res = sem_getvalue(a, &count);
13157 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000013158 sem_unlink("/autocftw");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013159 return res==-1 ? 1 : 0;
13160}
13161
13162_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013163if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013164 ac_cv_broken_sem_getvalue=no
13165else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013166 ac_cv_broken_sem_getvalue=yes
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013167fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013168rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13169 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013170fi
13171
13172
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013173fi
13174
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013175{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
13176$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013177if test $ac_cv_broken_sem_getvalue = yes
13178then
13179
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013180$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013181
13182fi
13183
Mark Dickinsonefc82f72009-03-20 15:51:55 +000013184# determine what size digit to use for Python's longs
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
13186$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000013187# Check whether --enable-big-digits was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013188if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonefc82f72009-03-20 15:51:55 +000013189 enableval=$enable_big_digits; case $enable_big_digits in
13190yes)
13191 enable_big_digits=30 ;;
13192no)
13193 enable_big_digits=15 ;;
1319415|30)
13195 ;;
13196*)
Matthias Klose3cef2a92012-03-14 23:39:33 +010013197 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 +000013198esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013199{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
13200$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000013201
13202cat >>confdefs.h <<_ACEOF
13203#define PYLONG_BITS_IN_DIGIT $enable_big_digits
13204_ACEOF
13205
13206
13207else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013208 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13209$as_echo "no value specified" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000013210fi
13211
13212
Guido van Rossumef2255b2000-03-10 22:30:29 +000013213# check for wchar.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013214ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013215if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013216
13217
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013218$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013219
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013220 wchar_h="yes"
13221
Guido van Rossumef2255b2000-03-10 22:30:29 +000013222else
Martin v. Löwis11437992002-04-12 09:54:03 +000013223 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000013224
13225fi
13226
Michael W. Hudson54241132001-12-07 15:38:26 +000013227
Martin v. Löwis11437992002-04-12 09:54:03 +000013228
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013229# determine wchar_t size
13230if test "$wchar_h" = yes
13231then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013232 # The cast to long int works around a bug in the HP C Compiler
Martin v. Löwiseba40652007-08-30 20:10:57 +000013233# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13234# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13235# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
13237$as_echo_n "checking size of wchar_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013238if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013239 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013240else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013241 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
13242"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013243
Martin v. Löwis11437992002-04-12 09:54:03 +000013244else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013245 if test "$ac_cv_type_wchar_t" = yes; then
13246 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13247$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013248as_fn_error 77 "cannot compute sizeof (wchar_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +010013249See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013250 else
13251 ac_cv_sizeof_wchar_t=0
13252 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013253fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013254
Martin v. Löwis11437992002-04-12 09:54:03 +000013255fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013256{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
13257$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013258
13259
13260
Martin v. Löwis11437992002-04-12 09:54:03 +000013261cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013262#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013263_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013264
Michael W. Hudson54241132001-12-07 15:38:26 +000013265
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013266fi
13267
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
13269$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013270have_ucs4_tcl=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013271cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013272/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013273
13274#include <tcl.h>
13275#if TCL_UTF_MAX != 6
13276# error "NOT UCS4_TCL"
13277#endif
13278int
13279main ()
13280{
13281
13282 ;
13283 return 0;
13284}
13285_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013286if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013287
13288
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013289$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013290
13291 have_ucs4_tcl=yes
13292
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013293fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013294rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013295{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
13296$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013297
Skip Montanaro6dead952003-09-25 14:50:04 +000013298# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013299if test "$wchar_h" = yes
13300then
13301 # check whether wchar_t is signed or not
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013302 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
13303$as_echo_n "checking whether wchar_t is signed... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013304 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013305 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013306else
13307
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013308 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013309 ac_cv_wchar_t_signed=yes
13310else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013311 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013312/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013313
13314 #include <wchar.h>
13315 int main()
13316 {
Martin v. Löwis44fe0e42006-04-11 07:15:30 +000013317 /* Success: exit code 0 */
13318 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013319 }
13320
13321_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013322if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013323 ac_cv_wchar_t_signed=yes
13324else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013325 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013326fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013327rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13328 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013329fi
13330
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013331fi
13332
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
13334$as_echo "$ac_cv_wchar_t_signed" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013335fi
13336
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for unicode" >&5
13338$as_echo_n "checking what type to use for unicode... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013339# Check whether --enable-unicode was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013340if test "${enable_unicode+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000013341 enableval=$enable_unicode;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013342else
13343 enable_unicode=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +000013344fi
13345
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013346
13347if test $enable_unicode = yes
13348then
Martin v. Löwisfd917792001-06-27 20:22:04 +000013349 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013350 case "$have_ucs4_tcl" in
13351 yes) enable_unicode="ucs4"
13352 ;;
13353 *) enable_unicode="ucs2"
13354 ;;
13355 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013356fi
13357
Martin v. Löwis0036cba2002-04-12 09:58:45 +000013358
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013359case "$enable_unicode" in
13360ucs2) unicode_size="2"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013361 $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013362
13363 ;;
13364ucs4) unicode_size="4"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013365 $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013366
13367 ;;
Martin v. Löwised11a5d2012-05-20 10:42:17 +020013368no) ;; # To allow --disable-unicode
Matthias Klose3cef2a92012-03-14 23:39:33 +010013369*) 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 +000013370esac
13371
Michael W. Hudson54241132001-12-07 15:38:26 +000013372
Martin v. Löwis11437992002-04-12 09:54:03 +000013373
13374
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013375if test "$enable_unicode" = "no"
13376then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000013377 UNICODE_OBJS=""
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not used" >&5
13379$as_echo "not used" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013380else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000013381 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000013382
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013383$as_echo "#define Py_USING_UNICODE 1" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013384
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013385
13386 # wchar_t is only usable if it maps to an unsigned type
13387 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000013388 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013389 then
13390 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013391
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013392$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013393
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013394 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013395
13396 elif test "$ac_cv_sizeof_short" = "$unicode_size"
13397 then
13398 PY_UNICODE_TYPE="unsigned short"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013399 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013400
13401 elif test "$ac_cv_sizeof_long" = "$unicode_size"
13402 then
13403 PY_UNICODE_TYPE="unsigned long"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013404 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013405
13406 else
13407 PY_UNICODE_TYPE="no type found"
13408 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
13410$as_echo "$PY_UNICODE_TYPE" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013411fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000013412
13413# check for endianness
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013414 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13415$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013416if ${ac_cv_c_bigendian+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013417 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000013418else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013419 ac_cv_c_bigendian=unknown
13420 # See if we're dealing with a universal compiler.
13421 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13422/* end confdefs.h. */
13423#ifndef __APPLE_CC__
13424 not a universal capable compiler
13425 #endif
13426 typedef int dummy;
13427
Skip Montanaro6dead952003-09-25 14:50:04 +000013428_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013429if ac_fn_c_try_compile "$LINENO"; then :
13430
13431 # Check for potential -arch flags. It is not universal unless
13432 # there are at least two -arch flags with different values.
13433 ac_arch=
13434 ac_prev=
13435 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13436 if test -n "$ac_prev"; then
13437 case $ac_word in
13438 i?86 | x86_64 | ppc | ppc64)
13439 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13440 ac_arch=$ac_word
13441 else
13442 ac_cv_c_bigendian=universal
13443 break
13444 fi
13445 ;;
13446 esac
13447 ac_prev=
13448 elif test "x$ac_word" = "x-arch"; then
13449 ac_prev=arch
13450 fi
13451 done
13452fi
13453rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13454 if test $ac_cv_c_bigendian = unknown; then
13455 # See if sys/param.h defines the BYTE_ORDER macro.
13456 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013457/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013458#include <sys/types.h>
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013459 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013460
Martin v. Löwis11437992002-04-12 09:54:03 +000013461int
13462main ()
13463{
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013464#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13465 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13466 && LITTLE_ENDIAN)
13467 bogus endian macros
13468 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013469
13470 ;
13471 return 0;
13472}
13473_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013474if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013475 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013476 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013477/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013478#include <sys/types.h>
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013479 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013480
Martin v. Löwis11437992002-04-12 09:54:03 +000013481int
13482main ()
13483{
Guido van Rossumef2255b2000-03-10 22:30:29 +000013484#if BYTE_ORDER != BIG_ENDIAN
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013485 not big endian
13486 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013487
13488 ;
13489 return 0;
13490}
13491_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013492if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013493 ac_cv_c_bigendian=yes
13494else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013495 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000013496fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013497rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013498fi
13499rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13500 fi
13501 if test $ac_cv_c_bigendian = unknown; then
13502 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13503 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013504/* end confdefs.h. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013505#include <limits.h>
13506
Martin v. Löwis11437992002-04-12 09:54:03 +000013507int
13508main ()
13509{
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013510#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13511 bogus endian macros
13512 #endif
13513
Martin v. Löwis11437992002-04-12 09:54:03 +000013514 ;
13515 return 0;
13516}
13517_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013518if ac_fn_c_try_compile "$LINENO"; then :
13519 # It does; now see whether it defined to _BIG_ENDIAN or not.
13520 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13521/* end confdefs.h. */
13522#include <limits.h>
13523
13524int
13525main ()
13526{
13527#ifndef _BIG_ENDIAN
13528 not big endian
13529 #endif
13530
13531 ;
13532 return 0;
13533}
13534_ACEOF
13535if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013536 ac_cv_c_bigendian=yes
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000013537else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013538 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013539fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013540rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13541fi
13542rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13543 fi
13544 if test $ac_cv_c_bigendian = unknown; then
13545 # Compile a test program.
13546 if test "$cross_compiling" = yes; then :
13547 # Try to guess by grepping values from an object file.
13548 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13549/* end confdefs.h. */
13550short int ascii_mm[] =
13551 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13552 short int ascii_ii[] =
13553 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13554 int use_ascii (int i) {
13555 return ascii_mm[i] + ascii_ii[i];
13556 }
13557 short int ebcdic_ii[] =
13558 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13559 short int ebcdic_mm[] =
13560 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13561 int use_ebcdic (int i) {
13562 return ebcdic_mm[i] + ebcdic_ii[i];
13563 }
13564 extern int foo;
Martin v. Löwiseba40652007-08-30 20:10:57 +000013565
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013566int
13567main ()
13568{
13569return use_ascii (foo) == use_ebcdic (foo);
13570 ;
13571 return 0;
13572}
13573_ACEOF
13574if ac_fn_c_try_compile "$LINENO"; then :
13575 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13576 ac_cv_c_bigendian=yes
13577 fi
13578 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13579 if test "$ac_cv_c_bigendian" = unknown; then
13580 ac_cv_c_bigendian=no
13581 else
13582 # finding both strings is unlikely to happen, but who knows?
13583 ac_cv_c_bigendian=unknown
13584 fi
13585 fi
13586fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013587rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013588else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013589 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013590/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000013591$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013592int
13593main ()
13594{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013595
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013596 /* Are we little or big endian? From Harbison&Steele. */
13597 union
13598 {
13599 long int l;
13600 char c[sizeof (long int)];
13601 } u;
13602 u.l = 1;
13603 return u.c[sizeof (long int) - 1] == 1;
Martin v. Löwiseba40652007-08-30 20:10:57 +000013604
13605 ;
13606 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000013607}
Martin v. Löwis11437992002-04-12 09:54:03 +000013608_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013609if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013610 ac_cv_c_bigendian=no
13611else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013612 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000013613fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013614rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13615 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000013616fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013617
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013618 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013619fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013620{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
13621$as_echo "$ac_cv_c_bigendian" >&6; }
13622 case $ac_cv_c_bigendian in #(
13623 yes)
13624 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
13625;; #(
13626 no)
13627 ;; #(
13628 universal)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013629
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013630$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000013631
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013632 ;; #(
13633 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013634 as_fn_error $? "unknown endianness
Matthias Klose3cef2a92012-03-14 23:39:33 +010013635 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013636 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000013637
Michael W. Hudson54241132001-12-07 15:38:26 +000013638
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013639# Check whether right shifting a negative integer extends the sign bit
13640# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
13642$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013643if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013644 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000013645else
Martin v. Löwis11437992002-04-12 09:54:03 +000013646
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013647if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013648 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013649else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013650 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013651/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013652
13653int main()
13654{
Vladimir Marangozova6180282000-07-12 05:05:06 +000013655 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013656}
13657
Martin v. Löwis11437992002-04-12 09:54:03 +000013658_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013659if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000013660 ac_cv_rshift_extends_sign=yes
13661else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013662 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000013663fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013664rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13665 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000013666fi
13667
Martin v. Löwiseba40652007-08-30 20:10:57 +000013668fi
13669
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013670{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
13671$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000013672if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013673then
Martin v. Löwis11437992002-04-12 09:54:03 +000013674
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013675$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013676
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013677fi
13678
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013679# check for getc_unlocked and related locking functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
13681$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013682if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013683 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013684else
Martin v. Löwis11437992002-04-12 09:54:03 +000013685
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013686cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013687/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013688#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013689int
13690main ()
13691{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013692
13693 FILE *f = fopen("/dev/null", "r");
13694 flockfile(f);
13695 getc_unlocked(f);
13696 funlockfile(f);
13697
Martin v. Löwis11437992002-04-12 09:54:03 +000013698 ;
13699 return 0;
13700}
13701_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013702if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013703 ac_cv_have_getc_unlocked=yes
13704else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013705 ac_cv_have_getc_unlocked=no
13706fi
13707rm -f core conftest.err conftest.$ac_objext \
13708 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013709fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013710
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013711{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
13712$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013713if test "$ac_cv_have_getc_unlocked" = yes
13714then
Martin v. Löwis11437992002-04-12 09:54:03 +000013715
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013716$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013717
13718fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013719
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013720# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000013721# save the value of LIBS so we don't actually link Python with readline
13722LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013723
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013724# On some systems we need to link readline to a termcap compatible
13725# library. NOTE: Keep the precedence of listed libraries synchronised
13726# with setup.py.
13727py_cv_lib_readline=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
13729$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013730for py_libtermcap in "" ncursesw ncurses curses termcap; do
13731 if test -z "$py_libtermcap"; then
13732 READLINE_LIBS="-lreadline"
13733 else
13734 READLINE_LIBS="-lreadline -l$py_libtermcap"
13735 fi
13736 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013737 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013738/* end confdefs.h. */
13739
Martin v. Löwiseba40652007-08-30 20:10:57 +000013740/* Override any GCC internal prototype to avoid an error.
13741 Use char because int might match the return type of a GCC
13742 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013743#ifdef __cplusplus
13744extern "C"
13745#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013746char readline ();
13747int
13748main ()
13749{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013750return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013751 ;
13752 return 0;
13753}
13754_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013755if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013756 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013757fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013758rm -f core conftest.err conftest.$ac_objext \
13759 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013760 if test $py_cv_lib_readline = yes; then
13761 break
13762 fi
13763done
13764# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
13765#AC_SUBST([READLINE_LIBS])
Gregory P. Smithe080cdf2008-09-07 19:19:04 +000013766if test $py_cv_lib_readline = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
13768$as_echo "none" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013769else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
13771$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013772
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013773$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013774
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013775fi
13776
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013777# check for readline 2.1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
13779$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013780if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013781 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013782else
13783 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013784LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013785cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013786/* end confdefs.h. */
13787
Martin v. Löwiseba40652007-08-30 20:10:57 +000013788/* Override any GCC internal prototype to avoid an error.
13789 Use char because int might match the return type of a GCC
13790 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013791#ifdef __cplusplus
13792extern "C"
13793#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013794char rl_callback_handler_install ();
13795int
13796main ()
13797{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013798return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013799 ;
13800 return 0;
13801}
13802_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013803if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013804 ac_cv_lib_readline_rl_callback_handler_install=yes
13805else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013806 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013807fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013808rm -f core conftest.err conftest.$ac_objext \
13809 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013810LIBS=$ac_check_lib_save_LIBS
13811fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013812{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
13813$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013814if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013815
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013816$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013817
13818fi
13819
13820
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013821# check for readline 2.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013822cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013823/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013824#include <readline/readline.h>
13825_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013826if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013827 have_readline=yes
13828else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013829 have_readline=no
Matthias Klosec511b472010-05-08 11:01:39 +000013830
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013831fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013832rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013833if test $have_readline = yes
13834then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013835 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013836/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013837#include <readline/readline.h>
13838
13839_ACEOF
13840if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013841 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013842
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013843$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013844
13845fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000013846rm -f conftest*
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000013847
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000013849/* end confdefs.h. */
13850#include <readline/readline.h>
13851
13852_ACEOF
13853if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013854 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000013855
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013856$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000013857
13858fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000013859rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013860
13861fi
13862
Martin v. Löwis0daad592001-09-30 21:09:59 +000013863# check for readline 4.0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
13865$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013866if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013867 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000013868else
Martin v. Löwis11437992002-04-12 09:54:03 +000013869 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013870LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013871cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013872/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013873
Martin v. Löwiseba40652007-08-30 20:10:57 +000013874/* Override any GCC internal prototype to avoid an error.
13875 Use char because int might match the return type of a GCC
13876 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013877#ifdef __cplusplus
13878extern "C"
13879#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013880char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013881int
13882main ()
13883{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013884return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013885 ;
13886 return 0;
13887}
13888_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013889if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013890 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000013891else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013892 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000013893fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013894rm -f core conftest.err conftest.$ac_objext \
13895 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013896LIBS=$ac_check_lib_save_LIBS
13897fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013898{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
13899$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013900if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013901
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013902$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000013903
Martin v. Löwis0daad592001-09-30 21:09:59 +000013904fi
13905
Michael W. Hudson54241132001-12-07 15:38:26 +000013906
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013907# also in 4.0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
13909$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013910if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013911 $as_echo_n "(cached) " >&6
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013912else
13913 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013914LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013915cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013916/* end confdefs.h. */
13917
13918/* Override any GCC internal prototype to avoid an error.
13919 Use char because int might match the return type of a GCC
13920 builtin and then its argument prototype would still apply. */
13921#ifdef __cplusplus
13922extern "C"
13923#endif
13924char rl_completion_display_matches_hook ();
13925int
13926main ()
13927{
13928return rl_completion_display_matches_hook ();
13929 ;
13930 return 0;
13931}
13932_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013933if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013934 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
13935else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013936 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013937fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013938rm -f core conftest.err conftest.$ac_objext \
13939 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013940LIBS=$ac_check_lib_save_LIBS
13941fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013942{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
13943$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013944if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013945
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013946$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013947
13948fi
13949
13950
Martin Pantera70c3232016-04-03 02:54:58 +000013951# also in 4.0, but not in editline
13952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
13953$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
13954if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
13955 $as_echo_n "(cached) " >&6
13956else
13957 ac_check_lib_save_LIBS=$LIBS
13958LIBS="-lreadline $READLINE_LIBS $LIBS"
13959cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13960/* end confdefs.h. */
13961
13962/* Override any GCC internal prototype to avoid an error.
13963 Use char because int might match the return type of a GCC
13964 builtin and then its argument prototype would still apply. */
13965#ifdef __cplusplus
13966extern "C"
13967#endif
13968char rl_resize_terminal ();
13969int
13970main ()
13971{
13972return rl_resize_terminal ();
13973 ;
13974 return 0;
13975}
13976_ACEOF
13977if ac_fn_c_try_link "$LINENO"; then :
13978 ac_cv_lib_readline_rl_resize_terminal=yes
13979else
13980 ac_cv_lib_readline_rl_resize_terminal=no
13981fi
13982rm -f core conftest.err conftest.$ac_objext \
13983 conftest$ac_exeext conftest.$ac_ext
13984LIBS=$ac_check_lib_save_LIBS
13985fi
13986{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
13987$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
13988if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
13989
13990$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
13991
13992fi
13993
13994
Martin v. Löwis0daad592001-09-30 21:09:59 +000013995# check for readline 4.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
13997$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013998if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013999 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000014000else
Martin v. Löwis11437992002-04-12 09:54:03 +000014001 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000014002LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014003cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014004/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014005
Martin v. Löwiseba40652007-08-30 20:10:57 +000014006/* Override any GCC internal prototype to avoid an error.
14007 Use char because int might match the return type of a GCC
14008 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014009#ifdef __cplusplus
14010extern "C"
14011#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014012char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014013int
14014main ()
14015{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014016return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014017 ;
14018 return 0;
14019}
14020_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014021if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014022 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000014023else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014024 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000014025fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014026rm -f core conftest.err conftest.$ac_objext \
14027 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014028LIBS=$ac_check_lib_save_LIBS
14029fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014030{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
14031$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014032if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014033
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014034$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000014035
Guido van Rossum353ae582001-07-10 16:45:32 +000014036fi
14037
Jack Jansendd19cf82001-12-06 22:36:17 +000014038
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014039# also in readline 4.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014040cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014041/* end confdefs.h. */
14042#include <readline/readline.h>
14043_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014044if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014045 have_readline=yes
14046else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014047 have_readline=no
Matthias Klosec511b472010-05-08 11:01:39 +000014048
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014049fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014050rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014051if test $have_readline = yes
14052then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014053 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014054/* end confdefs.h. */
14055#include <readline/readline.h>
14056
14057_ACEOF
14058if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014059 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014060
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014061$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014062
14063fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000014064rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014065
14066fi
14067
Martin v. Löwis82bca632006-02-10 20:49:30 +000014068# End of readline checks: restore LIBS
14069LIBS=$LIBS_no_readline
14070
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
14072$as_echo_n "checking for broken nice()... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014073if ${ac_cv_broken_nice+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014074 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014075else
Martin v. Löwis11437992002-04-12 09:54:03 +000014076
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014077if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014078 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014079else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014080 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014081/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014082
14083int main()
14084{
14085 int val1 = nice(1);
14086 if (val1 != -1 && val1 == nice(2))
14087 exit(0);
14088 exit(1);
14089}
14090
Martin v. Löwis11437992002-04-12 09:54:03 +000014091_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014092if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014093 ac_cv_broken_nice=yes
14094else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014095 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014096fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014097rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14098 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014099fi
14100
Martin v. Löwiseba40652007-08-30 20:10:57 +000014101fi
14102
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014103{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
14104$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014105if test "$ac_cv_broken_nice" = yes
14106then
Martin v. Löwis11437992002-04-12 09:54:03 +000014107
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014108$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014109
14110fi
14111
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
14113$as_echo_n "checking for broken poll()... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014114if ${ac_cv_broken_poll+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014115 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014116else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014117 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014118 ac_cv_broken_poll=no
14119else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014120 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014121/* end confdefs.h. */
14122
14123#include <poll.h>
14124
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014125int main()
14126{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014127 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014128 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014129
14130 close (42);
14131
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014132 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014133 if (poll_test < 0)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014134 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014135 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014136 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014137 else
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014138 return 1;
14139}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014140
14141_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014142if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014143 ac_cv_broken_poll=yes
14144else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014145 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014146fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014147rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14148 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014149fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014150
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014151fi
14152
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014153{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
14154$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014155if test "$ac_cv_broken_poll" = yes
14156then
14157
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014158$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014159
14160fi
14161
Brett Cannon43802422005-02-10 20:48:03 +000014162# 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 +000014163# (which is not required by ISO C or UNIX spec) and/or if we support
14164# tzname[]
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014165ac_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 +000014166#include <$ac_cv_struct_tm>
14167
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014168"
Matthias Klose3cef2a92012-03-14 23:39:33 +010014169if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000014170
14171cat >>confdefs.h <<_ACEOF
14172#define HAVE_STRUCT_TM_TM_ZONE 1
14173_ACEOF
14174
14175
14176fi
14177
14178if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14179
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014180$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014181
14182else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014183 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
14184"
Matthias Klose3cef2a92012-03-14 23:39:33 +010014185if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014186 ac_have_decl=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000014187else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014188 ac_have_decl=0
Martin v. Löwiseba40652007-08-30 20:10:57 +000014189fi
14190
Martin v. Löwiseba40652007-08-30 20:10:57 +000014191cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014192#define HAVE_DECL_TZNAME $ac_have_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +000014193_ACEOF
14194
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014195 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
14196$as_echo_n "checking for tzname... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014197if ${ac_cv_var_tzname+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014198 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000014199else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014200 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014201/* end confdefs.h. */
14202#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000014203#if !HAVE_DECL_TZNAME
14204extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000014205#endif
14206
14207int
14208main ()
14209{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014210return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000014211 ;
14212 return 0;
14213}
14214_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014215if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000014216 ac_cv_var_tzname=yes
14217else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014218 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000014219fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014220rm -f core conftest.err conftest.$ac_objext \
14221 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014222fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014223{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
14224$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000014225 if test $ac_cv_var_tzname = yes; then
14226
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014227$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014228
14229 fi
14230fi
14231
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014232
Martin v. Löwis1d459062005-03-14 21:23:33 +000014233# check tzset(3) exists and works like we expect it to
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014234{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
14235$as_echo_n "checking for working tzset()... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014236if ${ac_cv_working_tzset+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014237 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014238else
14239
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014240if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014241 ac_cv_working_tzset=no
14242else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014243 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014244/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014245
14246#include <stdlib.h>
14247#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000014248#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000014249
14250#if HAVE_TZNAME
14251extern char *tzname[];
14252#endif
14253
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014254int main()
14255{
Brett Cannon18367812003-09-19 00:59:16 +000014256 /* Note that we need to ensure that not only does tzset(3)
14257 do 'something' with localtime, but it works as documented
14258 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000014259 This includes making sure that tzname is set properly if
14260 tm->tm_zone does not exist since it is the alternative way
14261 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000014262
14263 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000014264 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000014265 */
14266
Martin v. Löwis1d459062005-03-14 21:23:33 +000014267 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000014268 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
14269
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014270 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014271 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014272 if (localtime(&groundhogday)->tm_hour != 0)
14273 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014274#if HAVE_TZNAME
14275 /* For UTC, tzname[1] is sometimes "", sometimes " " */
14276 if (strcmp(tzname[0], "UTC") ||
14277 (tzname[1][0] != 0 && tzname[1][0] != ' '))
14278 exit(1);
14279#endif
Brett Cannon18367812003-09-19 00:59:16 +000014280
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014281 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014282 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014283 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014284 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014285#if HAVE_TZNAME
14286 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
14287 exit(1);
14288#endif
Brett Cannon18367812003-09-19 00:59:16 +000014289
14290 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
14291 tzset();
14292 if (localtime(&groundhogday)->tm_hour != 11)
14293 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014294#if HAVE_TZNAME
14295 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
14296 exit(1);
14297#endif
14298
14299#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000014300 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
14301 exit(1);
14302 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
14303 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014304#endif
Brett Cannon18367812003-09-19 00:59:16 +000014305
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014306 exit(0);
14307}
14308
14309_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014310if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014311 ac_cv_working_tzset=yes
14312else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014313 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014314fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014315rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14316 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014317fi
14318
Martin v. Löwiseba40652007-08-30 20:10:57 +000014319fi
14320
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014321{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
14322$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014323if test "$ac_cv_working_tzset" = yes
14324then
14325
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014326$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014327
14328fi
14329
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014330# Look for subsecond timestamps in struct stat
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
14332$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014333if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014334 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014335else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014336 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014337/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014338#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014339int
14340main ()
14341{
14342
14343struct stat st;
14344st.st_mtim.tv_nsec = 1;
14345
14346 ;
14347 return 0;
14348}
14349_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014350if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000014351 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014352else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014353 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014354fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014355rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14356fi
14357
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014358{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
14359$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014360if test "$ac_cv_stat_tv_nsec" = yes
14361then
14362
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014363$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014364
14365fi
14366
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014367# Look for BSD style subsecond timestamps in struct stat
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
14369$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014370if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014371 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014372else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014373 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014374/* end confdefs.h. */
14375#include <sys/stat.h>
14376int
14377main ()
14378{
14379
14380struct stat st;
14381st.st_mtimespec.tv_nsec = 1;
14382
14383 ;
14384 return 0;
14385}
14386_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014387if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014388 ac_cv_stat_tv_nsec2=yes
14389else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014390 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014391fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014392rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14393fi
14394
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014395{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
14396$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014397if test "$ac_cv_stat_tv_nsec2" = yes
14398then
14399
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014400$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014401
14402fi
14403
doko@ubuntu.comf27ec3e2014-04-17 20:11:19 +020014404# first curses configure check
14405ac_save_cppflags="$CPPFLAGS"
14406CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
14407
14408for ac_header in curses.h ncurses.h
14409do :
14410 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14411ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14412if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14413 cat >>confdefs.h <<_ACEOF
14414#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14415_ACEOF
14416
14417fi
14418
14419done
14420
14421
14422# On Solaris, term.h requires curses.h
14423for ac_header in term.h
14424do :
14425 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
14426#ifdef HAVE_CURSES_H
14427#include <curses.h>
14428#endif
14429
14430"
14431if test "x$ac_cv_header_term_h" = xyes; then :
14432 cat >>confdefs.h <<_ACEOF
14433#define HAVE_TERM_H 1
14434_ACEOF
14435
14436fi
14437
14438done
14439
14440
Jack Jansen666b1e72001-10-31 12:11:48 +000014441# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
14443$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014444if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014445 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014446else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014447 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014448/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014449#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014450int
14451main ()
14452{
Jack Jansen666b1e72001-10-31 12:11:48 +000014453
14454 int rtn;
14455 rtn = mvwdelch(0,0,0);
14456
Martin v. Löwis11437992002-04-12 09:54:03 +000014457 ;
14458 return 0;
14459}
14460_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014461if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014462 ac_cv_mvwdelch_is_expression=yes
14463else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014464 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014465fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014466rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14467fi
14468
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014469{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
14470$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000014471
14472if test "$ac_cv_mvwdelch_is_expression" = yes
14473then
Martin v. Löwis11437992002-04-12 09:54:03 +000014474
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014475$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014476
14477fi
14478
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014479{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
14480$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014481if ${ac_cv_window_has_flags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014482 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014483else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014484 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014485/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014486#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014487int
14488main ()
14489{
Jack Jansen666b1e72001-10-31 12:11:48 +000014490
14491 WINDOW *w;
14492 w->_flags = 0;
14493
Martin v. Löwis11437992002-04-12 09:54:03 +000014494 ;
14495 return 0;
14496}
14497_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014498if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014499 ac_cv_window_has_flags=yes
14500else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014501 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014502fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014503rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14504fi
14505
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014506{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
14507$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000014508
Jack Jansen666b1e72001-10-31 12:11:48 +000014509
14510if test "$ac_cv_window_has_flags" = yes
14511then
Martin v. Löwis11437992002-04-12 09:54:03 +000014512
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014513$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014514
14515fi
14516
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
14518$as_echo_n "checking for is_term_resized... " >&6; }
14519cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000014520/* end confdefs.h. */
14521#include <curses.h>
14522int
14523main ()
14524{
14525void *x=is_term_resized
14526 ;
14527 return 0;
14528}
14529_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014530if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000014531
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014532$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000014533
Matthias Klosec511b472010-05-08 11:01:39 +000014534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014535$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014536else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14538$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014539
14540fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014541rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14542
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
14544$as_echo_n "checking for resize_term... " >&6; }
14545cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000014546/* end confdefs.h. */
14547#include <curses.h>
14548int
14549main ()
14550{
14551void *x=resize_term
14552 ;
14553 return 0;
14554}
14555_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014556if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000014557
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014558$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000014559
Matthias Klosec511b472010-05-08 11:01:39 +000014560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014561$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014562else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14564$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014565
14566fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014567rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14568
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
14570$as_echo_n "checking for resizeterm... " >&6; }
14571cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000014572/* end confdefs.h. */
14573#include <curses.h>
14574int
14575main ()
14576{
14577void *x=resizeterm
14578 ;
14579 return 0;
14580}
14581_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014582if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000014583
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014584$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000014585
Matthias Klosec511b472010-05-08 11:01:39 +000014586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014587$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014588else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14590$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014591
14592fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014593rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.comf27ec3e2014-04-17 20:11:19 +020014594# last curses configure check
14595CPPFLAGS=$ac_save_cppflags
Martin v. Löwiseba40652007-08-30 20:10:57 +000014596
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
14598$as_echo "$as_me: checking for device files" >&6;}
14599
14600if test "x$cross_compiling" = xyes; then
14601 if test "${ac_cv_file__dev_ptmx+set}" != set; then
14602 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14603$as_echo_n "checking for /dev/ptmx... " >&6; }
14604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14605$as_echo "not set" >&6; }
14606 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14607 fi
14608 if test "${ac_cv_file__dev_ptc+set}" != set; then
14609 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14610$as_echo_n "checking for /dev/ptc... " >&6; }
14611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14612$as_echo "not set" >&6; }
14613 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14614 fi
14615fi
14616
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14618$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014619if ${ac_cv_file__dev_ptmx+:} false; then :
14620 $as_echo_n "(cached) " >&6
14621else
14622 test "$cross_compiling" = yes &&
14623 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14624if test -r "/dev/ptmx"; then
14625 ac_cv_file__dev_ptmx=yes
14626else
14627 ac_cv_file__dev_ptmx=no
14628fi
14629fi
14630{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
14631$as_echo "$ac_cv_file__dev_ptmx" >&6; }
14632if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Martin v. Löwisfefbc202006-10-17 18:59:23 +000014633
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014634fi
14635
14636if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014637
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014638$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014639
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014640fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14642$as_echo_n "checking for /dev/ptc... " >&6; }
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014643if ${ac_cv_file__dev_ptc+:} false; then :
14644 $as_echo_n "(cached) " >&6
14645else
14646 test "$cross_compiling" = yes &&
14647 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14648if test -r "/dev/ptc"; then
14649 ac_cv_file__dev_ptc=yes
14650else
14651 ac_cv_file__dev_ptc=no
14652fi
14653fi
14654{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
14655$as_echo "$ac_cv_file__dev_ptc" >&6; }
14656if test "x$ac_cv_file__dev_ptc" = xyes; then :
Martin v. Löwisfefbc202006-10-17 18:59:23 +000014657
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014658fi
14659
14660if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000014661
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014662$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000014663
Neal Norwitz865400f2003-03-21 01:42:58 +000014664fi
14665
Mark Dickinson82864d12009-11-15 16:18:58 +000014666if test "$have_long_long" = yes
14667then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014668 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
14669$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014670 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014671 $as_echo_n "(cached) " >&6
Mark Dickinson82864d12009-11-15 16:18:58 +000014672else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014673 if test "$cross_compiling" = yes; then :
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014674 ac_cv_have_long_long_format="cross -- assuming no"
14675 if test x$GCC = xyes; then
14676 save_CFLAGS=$CFLAGS
14677 CFLAGS="$CFLAGS -Werror -Wformat"
14678 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14679/* end confdefs.h. */
14680
14681 #include <stdio.h>
14682 #include <stddef.h>
14683
14684int
14685main ()
14686{
14687
14688 char *buffer;
14689 sprintf(buffer, "%lld", (long long)123);
14690 sprintf(buffer, "%lld", (long long)-123);
14691 sprintf(buffer, "%llu", (unsigned long long)123);
14692
14693 ;
14694 return 0;
14695}
14696_ACEOF
14697if ac_fn_c_try_compile "$LINENO"; then :
14698 ac_cv_have_long_long_format=yes
14699
14700fi
14701rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14702 CFLAGS=$save_CFLAGS
14703 fi
Mark Dickinson82864d12009-11-15 16:18:58 +000014704else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014705 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson82864d12009-11-15 16:18:58 +000014706/* end confdefs.h. */
14707
14708 #include <stdio.h>
14709 #include <stddef.h>
14710 #include <string.h>
14711
14712 #ifdef HAVE_SYS_TYPES_H
14713 #include <sys/types.h>
14714 #endif
14715
14716 int main()
14717 {
14718 char buffer[256];
14719
14720 if (sprintf(buffer, "%lld", (long long)123) < 0)
14721 return 1;
14722 if (strcmp(buffer, "123"))
14723 return 1;
14724
14725 if (sprintf(buffer, "%lld", (long long)-123) < 0)
14726 return 1;
14727 if (strcmp(buffer, "-123"))
14728 return 1;
14729
14730 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
14731 return 1;
14732 if (strcmp(buffer, "123"))
14733 return 1;
14734
14735 return 0;
14736 }
14737
14738_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014739if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson82864d12009-11-15 16:18:58 +000014740 ac_cv_have_long_long_format=yes
14741else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014742 ac_cv_have_long_long_format=no
Mark Dickinson82864d12009-11-15 16:18:58 +000014743fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014744rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14745 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson82864d12009-11-15 16:18:58 +000014746fi
14747
14748
Mark Dickinson82864d12009-11-15 16:18:58 +000014749fi
14750
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
14752$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson82864d12009-11-15 16:18:58 +000014753fi
14754
Mark Dickinson5ce84742009-12-31 20:48:04 +000014755if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson82864d12009-11-15 16:18:58 +000014756then
14757
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014758$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson82864d12009-11-15 16:18:58 +000014759
14760fi
14761
Ronald Oussoren315cd0c2009-11-19 16:25:21 +000014762if test $ac_sys_system = Darwin
14763then
14764 LIBS="$LIBS -framework CoreFoundation"
14765fi
14766
Mark Dickinson82864d12009-11-15 16:18:58 +000014767
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
14769$as_echo_n "checking for %zd printf() format support... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014770if ${ac_cv_have_size_t_format+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014771 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014772else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014773 if test "$cross_compiling" = yes; then :
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000014774 ac_cv_have_size_t_format="cross -- assuming yes"
14775
Brett Cannon09d12362006-05-11 05:11:33 +000014776else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014777 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon09d12362006-05-11 05:11:33 +000014778/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014779
Brett Cannon09d12362006-05-11 05:11:33 +000014780#include <stdio.h>
14781#include <stddef.h>
14782#include <string.h>
14783
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000014784#ifdef HAVE_SYS_TYPES_H
14785#include <sys/types.h>
14786#endif
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000014787
14788#ifdef HAVE_SSIZE_T
14789typedef ssize_t Py_ssize_t;
14790#elif SIZEOF_VOID_P == SIZEOF_LONG
14791typedef long Py_ssize_t;
14792#else
14793typedef int Py_ssize_t;
14794#endif
Brett Cannon09d12362006-05-11 05:11:33 +000014795
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000014796int main()
14797{
14798 char buffer[256];
14799
Brett Cannon09d12362006-05-11 05:11:33 +000014800 if(sprintf(buffer, "%zd", (size_t)123) < 0)
14801 return 1;
14802
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000014803 if (strcmp(buffer, "123"))
14804 return 1;
14805
14806 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
14807 return 1;
14808
14809 if (strcmp(buffer, "-123"))
Brett Cannon09d12362006-05-11 05:11:33 +000014810 return 1;
14811
14812 return 0;
14813}
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014814
Brett Cannon09d12362006-05-11 05:11:33 +000014815_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014816if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014817 ac_cv_have_size_t_format=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014818else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014819 ac_cv_have_size_t_format=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014820fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014821rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14822 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000014823fi
14824
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014825fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014826{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
14827$as_echo "$ac_cv_have_size_t_format" >&6; }
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000014828if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014829
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014830$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014831
14832fi
14833
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014834ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000014835#ifdef HAVE_SYS_TYPES_H
14836#include <sys/types.h>
14837#endif
14838#ifdef HAVE_SYS_SOCKET_H
14839#include <sys/socket.h>
14840#endif
14841
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014842"
Matthias Klose3cef2a92012-03-14 23:39:33 +010014843if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000014844
Martin v. Löwis11437992002-04-12 09:54:03 +000014845else
Guido van Rossum95713eb2000-05-18 20:53:31 +000014846
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014847$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000014848
14849fi
14850
Michael W. Hudson54241132001-12-07 15:38:26 +000014851
Benjamin Peterson7497e912010-10-16 00:53:39 +000014852case $ac_sys_system in
14853AIX*)
14854
14855$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
14856 ;;
14857esac
14858
14859
Michael W. Hudson54241132001-12-07 15:38:26 +000014860
14861
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000014862for h in `(cd $srcdir;echo Python/thread_*.h)`
14863do
14864 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
14865done
14866
Michael W. Hudson54241132001-12-07 15:38:26 +000014867
Neal Norwitzd24499d2005-12-18 21:36:39 +000014868SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
14870$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014871for dir in $SRCDIRS; do
14872 if test ! -d $dir; then
14873 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000014874 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014875done
Benjamin Peterson2c992a02015-05-28 12:45:31 -050014876
14877# BEGIN_COMPUTED_GOTO
14878# Check for --with-computed-gotos
14879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
14880$as_echo_n "checking for --with-computed-gotos... " >&6; }
14881
14882# Check whether --with-computed-gotos was given.
14883if test "${with_computed_gotos+set}" = set; then :
14884 withval=$with_computed_gotos;
14885if test "$withval" = yes
14886then
14887
14888$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
14889
14890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14891$as_echo "yes" >&6; }
14892fi
14893if test "$withval" = no
14894then
14895
14896$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
14897
14898 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14899$as_echo "no" >&6; }
14900fi
14901
14902else
14903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14904$as_echo "no value specified" >&6; }
14905fi
14906
14907
14908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
14909$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
14910if ${ac_cv_computed_gotos+:} false; then :
14911 $as_echo_n "(cached) " >&6
14912else
14913 if test "$cross_compiling" = yes; then :
14914 if test "${with_computed_gotos+set}" = set; then
14915 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
14916 else
14917 ac_cv_computed_gotos=no
14918 fi
14919else
14920 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14921/* end confdefs.h. */
14922
14923int main(int argc, char **argv)
14924{
14925 static void *targets[1] = { &&LABEL1 };
14926 goto LABEL2;
14927LABEL1:
14928 return 0;
14929LABEL2:
14930 goto *targets[0];
14931 return 1;
14932}
14933
14934_ACEOF
14935if ac_fn_c_try_run "$LINENO"; then :
14936 ac_cv_computed_gotos=yes
14937else
14938 ac_cv_computed_gotos=no
14939fi
14940rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14941 conftest.$ac_objext conftest.beam conftest.$ac_ext
14942fi
14943
14944fi
14945
14946{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
14947$as_echo "$ac_cv_computed_gotos" >&6; }
14948case "$ac_cv_computed_gotos" in yes*)
14949
14950$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
14951
14952esac
14953# END_COMPUTED_GOTO
14954
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014955{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
14956$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000014957
Ned Deily3f1d0b32014-11-20 02:11:03 -080014958# ensurepip option
14959{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
14960$as_echo_n "checking for ensurepip... " >&6; }
14961
14962# Check whether --with-ensurepip was given.
14963if test "${with_ensurepip+set}" = set; then :
14964 withval=$with_ensurepip;
14965else
14966 with_ensurepip=no
14967fi
14968
14969case $with_ensurepip in #(
14970 yes|upgrade) :
14971 ENSUREPIP=upgrade ;; #(
14972 install) :
14973 ENSUREPIP=install ;; #(
14974 no) :
14975 ENSUREPIP=no ;; #(
14976 *) :
14977 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
14978esac
14979{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
14980$as_echo "$ENSUREPIP" >&6; }
14981
14982
Guido van Rossum627b2d71993-12-24 10:39:16 +000014983# generate output files
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000014984ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000014985
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000014986ac_config_files="$ac_config_files Modules/ld_so_aix"
14987
Martin v. Löwis11437992002-04-12 09:54:03 +000014988cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014989# This file is a shell script that caches the results of configure
14990# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000014991# scripts and configure runs, see configure's option --config-cache.
14992# It is not useful on other systems. If it contains results you don't
14993# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014994#
Martin v. Löwis11437992002-04-12 09:54:03 +000014995# config.status only pays attention to the cache file if you give it
14996# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014997#
Skip Montanaro6dead952003-09-25 14:50:04 +000014998# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000014999# loading this file, other *unset* `ac_cv_foo' will be assigned the
15000# following values.
15001
15002_ACEOF
15003
Guido van Rossumf78abae1997-01-21 22:02:36 +000015004# The following way of writing the cache mishandles newlines in values,
15005# but we know of no workaround that is simple, portable, and efficient.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015006# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015007# Ultrix sh set writes to stderr and can't be redirected directly,
15008# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015009(
15010 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
15011 eval ac_val=\$$ac_var
15012 case $ac_val in #(
15013 *${as_nl}*)
15014 case $ac_var in #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015015 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
15016$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015017 esac
15018 case $ac_var in #(
15019 _ | IFS | as_nl) ;; #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015020 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
15021 *) { eval $ac_var=; unset $ac_var;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015022 esac ;;
15023 esac
15024 done
15025
Martin v. Löwis11437992002-04-12 09:54:03 +000015026 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +000015027 case $as_nl`(ac_space=' '; set) 2>&1` in #(
15028 *${as_nl}ac_space=\ *)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015029 # `set' does not quote correctly, so add quotes: double-quote
15030 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000015031 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015032 "s/'/'\\\\''/g;
15033 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwiseba40652007-08-30 20:10:57 +000015034 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000015035 *)
15036 # `set' quotes correctly as required by POSIX, so do not add quotes.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015037 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000015038 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015039 esac |
15040 sort
15041) |
Martin v. Löwis11437992002-04-12 09:54:03 +000015042 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000015043 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000015044 t clear
Martin v. Löwiseba40652007-08-30 20:10:57 +000015045 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000015046 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15047 t end
Martin v. Löwiseba40652007-08-30 20:10:57 +000015048 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15049 :end' >>confcache
15050if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
15051 if test -w "$cache_file"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +010015052 if test "x$cache_file" != "x/dev/null"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015053 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
15054$as_echo "$as_me: updating cache $cache_file" >&6;}
Matthias Klose3cef2a92012-03-14 23:39:33 +010015055 if test ! -f "$cache_file" || test -h "$cache_file"; then
15056 cat confcache >"$cache_file"
15057 else
15058 case $cache_file in #(
15059 */* | ?:*)
15060 mv -f confcache "$cache_file"$$ &&
15061 mv -f "$cache_file"$$ "$cache_file" ;; #(
15062 *)
15063 mv -f confcache "$cache_file" ;;
15064 esac
15065 fi
15066 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015067 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015068 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
15069$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015070 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015071fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015072rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000015073
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015074test "x$prefix" = xNONE && prefix=$ac_default_prefix
15075# Let make expand exec_prefix.
15076test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000015077
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015078DEFS=-DHAVE_CONFIG_H
15079
Skip Montanaro6dead952003-09-25 14:50:04 +000015080ac_libobjs=
15081ac_ltlibobjs=
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015082U=
Skip Montanaro6dead952003-09-25 14:50:04 +000015083for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
15084 # 1. Remove the extension, and $U if already installed.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015085 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015086 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015087 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
15088 # will be set to the directory where LIBOBJS objects are built.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015089 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
15090 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000015091done
15092LIBOBJS=$ac_libobjs
15093
15094LTLIBOBJS=$ac_ltlibobjs
15095
15096
Martin v. Löwis11437992002-04-12 09:54:03 +000015097
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015098
Matthias Klose3cef2a92012-03-14 23:39:33 +010015099: "${CONFIG_STATUS=./config.status}"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015100ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000015101ac_clean_files_save=$ac_clean_files
15102ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015103{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
15104$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
15105as_write_fail=0
15106cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015107#! $SHELL
15108# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015109# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015110# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000015111# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015112
Martin v. Löwis11437992002-04-12 09:54:03 +000015113debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000015114ac_cs_recheck=false
15115ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000015116
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015117SHELL=\${CONFIG_SHELL-$SHELL}
15118export SHELL
15119_ASEOF
15120cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
15121## -------------------- ##
15122## M4sh Initialization. ##
15123## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000015124
Martin v. Löwiseba40652007-08-30 20:10:57 +000015125# Be more Bourne compatible
15126DUALCASE=1; export DUALCASE # for MKS sh
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015127if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015128 emulate sh
15129 NULLCMD=:
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015130 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000015131 # is contrary to our usage. Disable this feature.
15132 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000015133 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000015134else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015135 case `(set -o) 2>/dev/null` in #(
15136 *posix*) :
15137 set -o posix ;; #(
15138 *) :
15139 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015140esac
Martin v. Löwis11437992002-04-12 09:54:03 +000015141fi
Michael W. Hudson54241132001-12-07 15:38:26 +000015142
Skip Montanaro6dead952003-09-25 14:50:04 +000015143
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015144as_nl='
15145'
15146export as_nl
15147# Printing a long string crashes Solaris 7 /usr/bin/printf.
15148as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
15149as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
15150as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
15151# Prefer a ksh shell builtin over an external printf program on Solaris,
15152# but without wasting forks for bash or zsh.
15153if test -z "$BASH_VERSION$ZSH_VERSION" \
15154 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
15155 as_echo='print -r --'
15156 as_echo_n='print -rn --'
15157elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
15158 as_echo='printf %s\n'
15159 as_echo_n='printf %s'
15160else
15161 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
15162 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
15163 as_echo_n='/usr/ucb/echo -n'
15164 else
15165 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
15166 as_echo_n_body='eval
15167 arg=$1;
15168 case $arg in #(
15169 *"$as_nl"*)
15170 expr "X$arg" : "X\\(.*\\)$as_nl";
15171 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
15172 esac;
15173 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
15174 '
15175 export as_echo_n_body
15176 as_echo_n='sh -c $as_echo_n_body as_echo'
15177 fi
15178 export as_echo_body
15179 as_echo='sh -c $as_echo_body as_echo'
15180fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015181
15182# The user is always right.
15183if test "${PATH_SEPARATOR+set}" != set; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015184 PATH_SEPARATOR=:
15185 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
15186 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
15187 PATH_SEPARATOR=';'
15188 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000015189fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015190
Martin v. Löwiseba40652007-08-30 20:10:57 +000015191
15192# IFS
15193# We need space, tab and new line, in precisely that order. Quoting is
15194# there to prevent editors from complaining about space-tab.
15195# (If _AS_PATH_WALK were called with IFS unset, it would disable word
15196# splitting by setting IFS to empty value.)
Martin v. Löwiseba40652007-08-30 20:10:57 +000015197IFS=" "" $as_nl"
15198
15199# Find who we are. Look in the path if we contain no directory separator.
Matthias Klose3cef2a92012-03-14 23:39:33 +010015200as_myself=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015201case $0 in #((
Martin v. Löwiseba40652007-08-30 20:10:57 +000015202 *[\\/]* ) as_myself=$0 ;;
15203 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000015204for as_dir in $PATH
15205do
15206 IFS=$as_save_IFS
15207 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015208 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15209 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000015210IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000015211
Martin v. Löwiseba40652007-08-30 20:10:57 +000015212 ;;
15213esac
15214# We did not find ourselves, most probably we were run as `sh COMMAND'
15215# in which case we are not to be found in the path.
15216if test "x$as_myself" = x; then
15217 as_myself=$0
15218fi
15219if test ! -f "$as_myself"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015220 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
15221 exit 1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015222fi
15223
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015224# Unset variables that we do not need and which cause bugs (e.g. in
15225# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
15226# suppresses any "Segmentation fault" message there. '((' could
15227# trigger a bug in pdksh 5.2.14.
15228for as_var in BASH_ENV ENV MAIL MAILPATH
15229do eval test x\${$as_var+set} = xset \
15230 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Martin v. Löwiseba40652007-08-30 20:10:57 +000015231done
15232PS1='$ '
15233PS2='> '
15234PS4='+ '
15235
15236# NLS nuisances.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015237LC_ALL=C
15238export LC_ALL
15239LANGUAGE=C
15240export LANGUAGE
Martin v. Löwiseba40652007-08-30 20:10:57 +000015241
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015242# CDPATH.
15243(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
15244
15245
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015246# as_fn_error STATUS ERROR [LINENO LOG_FD]
15247# ----------------------------------------
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015248# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
15249# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015250# script with STATUS, using 1 if that was 0.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015251as_fn_error ()
15252{
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015253 as_status=$1; test $as_status -eq 0 && as_status=1
15254 if test "$4"; then
15255 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
15256 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015257 fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015258 $as_echo "$as_me: error: $2" >&2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015259 as_fn_exit $as_status
15260} # as_fn_error
15261
15262
15263# as_fn_set_status STATUS
15264# -----------------------
15265# Set $? to STATUS, without forking.
15266as_fn_set_status ()
15267{
15268 return $1
15269} # as_fn_set_status
15270
15271# as_fn_exit STATUS
15272# -----------------
15273# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
15274as_fn_exit ()
15275{
15276 set +e
15277 as_fn_set_status $1
15278 exit $1
15279} # as_fn_exit
15280
15281# as_fn_unset VAR
15282# ---------------
15283# Portably unset VAR.
15284as_fn_unset ()
15285{
15286 { eval $1=; unset $1;}
15287}
15288as_unset=as_fn_unset
15289# as_fn_append VAR VALUE
15290# ----------------------
15291# Append the text in VALUE to the end of the definition contained in VAR. Take
15292# advantage of any shell optimizations that allow amortized linear growth over
15293# repeated appends, instead of the typical quadratic growth present in naive
15294# implementations.
15295if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
15296 eval 'as_fn_append ()
15297 {
15298 eval $1+=\$2
15299 }'
15300else
15301 as_fn_append ()
15302 {
15303 eval $1=\$$1\$2
15304 }
15305fi # as_fn_append
15306
15307# as_fn_arith ARG...
15308# ------------------
15309# Perform arithmetic evaluation on the ARGs, and store the result in the
15310# global $as_val. Take advantage of shells that can avoid forks. The arguments
15311# must be portable across $(()) and expr.
15312if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
15313 eval 'as_fn_arith ()
15314 {
15315 as_val=$(( $* ))
15316 }'
15317else
15318 as_fn_arith ()
15319 {
15320 as_val=`expr "$@" || test $? -eq 1`
15321 }
15322fi # as_fn_arith
15323
15324
Martin v. Löwiseba40652007-08-30 20:10:57 +000015325if expr a : '\(a\)' >/dev/null 2>&1 &&
15326 test "X`expr 00001 : '.*\(...\)'`" = X001; then
15327 as_expr=expr
15328else
15329 as_expr=false
15330fi
15331
15332if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
15333 as_basename=basename
15334else
15335 as_basename=false
15336fi
15337
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015338if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
15339 as_dirname=dirname
15340else
15341 as_dirname=false
15342fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015343
Martin v. Löwiseba40652007-08-30 20:10:57 +000015344as_me=`$as_basename -- "$0" ||
15345$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15346 X"$0" : 'X\(//\)$' \| \
15347 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015348$as_echo X/"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000015349 sed '/^.*\/\([^/][^/]*\)\/*$/{
15350 s//\1/
15351 q
15352 }
15353 /^X\/\(\/\/\)$/{
15354 s//\1/
15355 q
15356 }
15357 /^X\/\(\/\).*/{
15358 s//\1/
15359 q
15360 }
15361 s/.*/./; q'`
15362
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015363# Avoid depending upon Character Ranges.
15364as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15365as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15366as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15367as_cr_digits='0123456789'
15368as_cr_alnum=$as_cr_Letters$as_cr_digits
Martin v. Löwiseba40652007-08-30 20:10:57 +000015369
15370ECHO_C= ECHO_N= ECHO_T=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015371case `echo -n x` in #(((((
Martin v. Löwiseba40652007-08-30 20:10:57 +000015372-n*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015373 case `echo 'xy\c'` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000015374 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015375 xy) ECHO_C='\c';;
15376 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
15377 ECHO_T=' ';;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015378 esac;;
15379*)
15380 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000015381esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015382
Martin v. Löwis11437992002-04-12 09:54:03 +000015383rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +000015384if test -d conf$$.dir; then
15385 rm -f conf$$.dir/conf$$.file
15386else
15387 rm -f conf$$.dir
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015388 mkdir conf$$.dir 2>/dev/null
Martin v. Löwiseba40652007-08-30 20:10:57 +000015389fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015390if (echo >conf$$.file) 2>/dev/null; then
15391 if ln -s conf$$.file conf$$ 2>/dev/null; then
15392 as_ln_s='ln -s'
15393 # ... but there are two gotchas:
15394 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
15395 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015396 # In both cases, we have to default to `cp -pR'.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015397 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015398 as_ln_s='cp -pR'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015399 elif ln conf$$.file conf$$ 2>/dev/null; then
15400 as_ln_s=ln
15401 else
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015402 as_ln_s='cp -pR'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015403 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015404else
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015405 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000015406fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015407rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
15408rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000015409
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015410
15411# as_fn_mkdir_p
15412# -------------
15413# Create "$as_dir" as a directory, including parents if necessary.
15414as_fn_mkdir_p ()
15415{
15416
15417 case $as_dir in #(
15418 -*) as_dir=./$as_dir;;
15419 esac
15420 test -d "$as_dir" || eval $as_mkdir_p || {
15421 as_dirs=
15422 while :; do
15423 case $as_dir in #(
15424 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
15425 *) as_qdir=$as_dir;;
15426 esac
15427 as_dirs="'$as_qdir' $as_dirs"
15428 as_dir=`$as_dirname -- "$as_dir" ||
15429$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15430 X"$as_dir" : 'X\(//\)[^/]' \| \
15431 X"$as_dir" : 'X\(//\)$' \| \
15432 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
15433$as_echo X"$as_dir" |
15434 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15435 s//\1/
15436 q
15437 }
15438 /^X\(\/\/\)[^/].*/{
15439 s//\1/
15440 q
15441 }
15442 /^X\(\/\/\)$/{
15443 s//\1/
15444 q
15445 }
15446 /^X\(\/\).*/{
15447 s//\1/
15448 q
15449 }
15450 s/.*/./; q'`
15451 test -d "$as_dir" && break
15452 done
15453 test -z "$as_dirs" || eval "mkdir $as_dirs"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015454 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015455
15456
15457} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000015458if mkdir -p . 2>/dev/null; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015459 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000015460else
Skip Montanarof0d5f792004-08-15 14:08:23 +000015461 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000015462 as_mkdir_p=false
15463fi
15464
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015465
15466# as_fn_executable_p FILE
15467# -----------------------
15468# Test if FILE is an executable regular file.
15469as_fn_executable_p ()
15470{
15471 test -f "$1" && test -x "$1"
15472} # as_fn_executable_p
15473as_test_x='test -x'
15474as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015475
15476# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015477as_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 +000015478
15479# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015480as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015481
15482
Martin v. Löwis11437992002-04-12 09:54:03 +000015483exec 6>&1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015484## ----------------------------------- ##
15485## Main body of $CONFIG_STATUS script. ##
15486## ----------------------------------- ##
15487_ASEOF
15488test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015489
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015490cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15491# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000015492# report actual input values of CONFIG_FILES etc. instead of their
Martin v. Löwiseba40652007-08-30 20:10:57 +000015493# values after options handling.
15494ac_log="
Martin v. Löwis174440b2008-10-03 08:59:41 +000015495This file was extended by python $as_me 2.7, which was
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015496generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000015497
15498 CONFIG_FILES = $CONFIG_FILES
15499 CONFIG_HEADERS = $CONFIG_HEADERS
15500 CONFIG_LINKS = $CONFIG_LINKS
15501 CONFIG_COMMANDS = $CONFIG_COMMANDS
15502 $ $0 $@
15503
Martin v. Löwiseba40652007-08-30 20:10:57 +000015504on `(hostname || uname -n) 2>/dev/null | sed 1q`
15505"
15506
Martin v. Löwis11437992002-04-12 09:54:03 +000015507_ACEOF
15508
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015509case $ac_config_files in *"
15510"*) set x $ac_config_files; shift; ac_config_files=$*;;
15511esac
15512
15513case $ac_config_headers in *"
15514"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
15515esac
15516
15517
15518cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015519# Files that config.status was made for.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015520config_files="$ac_config_files"
15521config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000015522
Martin v. Löwiseba40652007-08-30 20:10:57 +000015523_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015524
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015525cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015526ac_cs_usage="\
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015527\`$as_me' instantiates files and other configuration actions
15528from templates according to the current configuration. Unless the files
15529and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000015530
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015531Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000015532
15533 -h, --help print this help, then exit
Martin v. Löwiseba40652007-08-30 20:10:57 +000015534 -V, --version print version number and configuration settings, then exit
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015535 --config print configuration, then exit
15536 -q, --quiet, --silent
15537 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000015538 -d, --debug don't remove temporary files
15539 --recheck update $as_me by reconfiguring in the same conditions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015540 --file=FILE[:TEMPLATE]
15541 instantiate the configuration file FILE
15542 --header=FILE[:TEMPLATE]
15543 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000015544
15545Configuration files:
15546$config_files
15547
15548Configuration headers:
15549$config_headers
15550
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015551Report bugs to <http://bugs.python.org/>."
Skip Montanaro89e975f2007-08-22 19:05:21 +000015552
Martin v. Löwiseba40652007-08-30 20:10:57 +000015553_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015554cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15555ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000015556ac_cs_version="\\
Martin v. Löwis174440b2008-10-03 08:59:41 +000015557python config.status 2.7
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015558configured by $0, generated by GNU Autoconf 2.69,
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015559 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000015560
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015561Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000015562This config.status script is free software; the Free Software Foundation
15563gives unlimited permission to copy, distribute and modify it."
Martin v. Löwiseba40652007-08-30 20:10:57 +000015564
15565ac_pwd='$ac_pwd'
15566srcdir='$srcdir'
15567INSTALL='$INSTALL'
Trent Nelsonf6407a12012-08-30 14:56:13 +000015568MKDIR_P='$MKDIR_P'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015569test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000015570_ACEOF
15571
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015572cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15573# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000015574ac_need_defaults=:
15575while test $# != 0
15576do
15577 case $1 in
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015578 --*=?*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000015579 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15580 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000015581 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000015582 ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015583 --*=)
15584 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15585 ac_optarg=
15586 ac_shift=:
15587 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015588 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000015589 ac_option=$1
15590 ac_optarg=$2
15591 ac_shift=shift
15592 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015593 esac
15594
Skip Montanaro6dead952003-09-25 14:50:04 +000015595 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000015596 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000015597 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15598 ac_cs_recheck=: ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015599 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015600 $as_echo "$ac_cs_version"; exit ;;
15601 --config | --confi | --conf | --con | --co | --c )
15602 $as_echo "$ac_cs_config"; exit ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015603 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000015604 debug=: ;;
15605 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000015606 $ac_shift
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015607 case $ac_optarg in
15608 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015609 '') as_fn_error $? "missing file argument" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015610 esac
15611 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015612 ac_need_defaults=false;;
15613 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000015614 $ac_shift
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015615 case $ac_optarg in
15616 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15617 esac
15618 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015619 ac_need_defaults=false;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015620 --he | --h)
15621 # Conflict between --help and --header
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015622 as_fn_error $? "ambiguous option: \`$1'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015623Try \`$0 --help' for more information.";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015624 --help | --hel | -h )
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015625 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000015626 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
15627 | -silent | --silent | --silen | --sile | --sil | --si | --s)
15628 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015629
15630 # This is an error.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015631 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015632Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015633
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015634 *) as_fn_append ac_config_targets " $1"
Martin v. Löwiseba40652007-08-30 20:10:57 +000015635 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015636
15637 esac
15638 shift
15639done
15640
Skip Montanaro6dead952003-09-25 14:50:04 +000015641ac_configure_extra_args=
15642
15643if $ac_cs_silent; then
15644 exec 6>/dev/null
15645 ac_configure_extra_args="$ac_configure_extra_args --silent"
15646fi
15647
15648_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015649cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000015650if \$ac_cs_recheck; then
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015651 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015652 shift
15653 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
15654 CONFIG_SHELL='$SHELL'
Martin v. Löwiseba40652007-08-30 20:10:57 +000015655 export CONFIG_SHELL
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015656 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000015657fi
15658
Martin v. Löwis11437992002-04-12 09:54:03 +000015659_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015660cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015661exec 5>>config.log
15662{
15663 echo
15664 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
15665## Running $as_me. ##
15666_ASBOX
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015667 $as_echo "$ac_log"
Martin v. Löwiseba40652007-08-30 20:10:57 +000015668} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015669
Martin v. Löwiseba40652007-08-30 20:10:57 +000015670_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015671cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015672_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015673
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015674cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015675
15676# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000015677for ac_config_target in $ac_config_targets
15678do
Martin v. Löwiseba40652007-08-30 20:10:57 +000015679 case $ac_config_target in
15680 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
15681 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
15682 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
15683 "Mac/IDLE/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/IDLE/Makefile" ;;
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000015684 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
15685 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015686 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
15687 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000015688 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000015689 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015690
Matthias Klose3cef2a92012-03-14 23:39:33 +010015691 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015692 esac
15693done
15694
Martin v. Löwiseba40652007-08-30 20:10:57 +000015695
Martin v. Löwis11437992002-04-12 09:54:03 +000015696# If the user did not use the arguments to specify the items to instantiate,
15697# then the envvar interface is used. Set only those that are not.
15698# We use the long form for the default assignment because of an extremely
15699# bizarre bug on SunOS 4.1.3.
15700if $ac_need_defaults; then
15701 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15702 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15703fi
15704
Skip Montanaro6dead952003-09-25 14:50:04 +000015705# Have a temporary directory for convenience. Make it in the build tree
Martin v. Löwiseba40652007-08-30 20:10:57 +000015706# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000015707# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015708# Hook for its removal unless debugging.
15709# Note that there is a small window in which the directory will not be cleaned:
15710# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000015711$debug ||
15712{
Matthias Klose3cef2a92012-03-14 23:39:33 +010015713 tmp= ac_tmp=
Martin v. Löwiseba40652007-08-30 20:10:57 +000015714 trap 'exit_status=$?
Matthias Klose3cef2a92012-03-14 23:39:33 +010015715 : "${ac_tmp:=$tmp}"
15716 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +000015717' 0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015718 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000015719}
Martin v. Löwis11437992002-04-12 09:54:03 +000015720# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000015721
Martin v. Löwis11437992002-04-12 09:54:03 +000015722{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015723 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Matthias Klose3cef2a92012-03-14 23:39:33 +010015724 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000015725} ||
15726{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015727 tmp=./conf$$-$RANDOM
15728 (umask 077 && mkdir "$tmp")
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015729} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Matthias Klose3cef2a92012-03-14 23:39:33 +010015730ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000015731
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015732# Set up the scripts for CONFIG_FILES section.
15733# No need to generate them if there are no CONFIG_FILES.
15734# This happens for instance with `./config.status config.h'.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015735if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015736
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015737
15738ac_cr=`echo X | tr X '\015'`
15739# On cygwin, bash can eat \r inside `` if the user requested igncr.
15740# But we know of no other shell where ac_cr would be empty at this
15741# point, so we can use a bashism as a fallback.
15742if test "x$ac_cr" = x; then
15743 eval ac_cr=\$\'\\r\'
15744fi
15745ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
15746if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015747 ac_cs_awk_cr='\\r'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015748else
15749 ac_cs_awk_cr=$ac_cr
15750fi
15751
Matthias Klose3cef2a92012-03-14 23:39:33 +010015752echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000015753_ACEOF
15754
Martin v. Löwiseba40652007-08-30 20:10:57 +000015755
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015756{
15757 echo "cat >conf$$subs.awk <<_ACEOF" &&
15758 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
15759 echo "_ACEOF"
15760} >conf$$subs.sh ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015761 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15762ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015763ac_delim='%!_!# '
15764for ac_last_try in false false false false false :; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015765 . ./conf$$subs.sh ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015766 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015767
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015768 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
15769 if test $ac_delim_n = $ac_delim_num; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015770 break
15771 elif $ac_last_try; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015772 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015773 else
15774 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000015775 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015776done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015777rm -f conf$$subs.sh
Martin v. Löwiseba40652007-08-30 20:10:57 +000015778
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015779cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Matthias Klose3cef2a92012-03-14 23:39:33 +010015780cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000015781_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015782sed -n '
15783h
15784s/^/S["/; s/!.*/"]=/
15785p
15786g
15787s/^[^!]*!//
15788:repl
15789t repl
15790s/'"$ac_delim"'$//
15791t delim
15792:nl
15793h
15794s/\(.\{148\}\)..*/\1/
15795t more1
15796s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
15797p
15798n
15799b repl
15800:more1
15801s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15802p
15803g
15804s/.\{148\}//
15805t nl
15806:delim
15807h
15808s/\(.\{148\}\)..*/\1/
15809t more2
15810s/["\\]/\\&/g; s/^/"/; s/$/"/
15811p
15812b
15813:more2
15814s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15815p
15816g
15817s/.\{148\}//
15818t delim
15819' <conf$$subs.awk | sed '
15820/^[^""]/{
15821 N
15822 s/\n//
15823}
15824' >>$CONFIG_STATUS || ac_write_fail=1
15825rm -f conf$$subs.awk
15826cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15827_ACAWK
Matthias Klose3cef2a92012-03-14 23:39:33 +010015828cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015829 for (key in S) S_is_set[key] = 1
15830 FS = ""
15831
15832}
15833{
15834 line = $ 0
15835 nfields = split(line, field, "@")
15836 substed = 0
15837 len = length(field[1])
15838 for (i = 2; i < nfields; i++) {
15839 key = field[i]
15840 keylen = length(key)
15841 if (S_is_set[key]) {
15842 value = S[key]
15843 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
15844 len += length(value) + length(field[++i])
15845 substed = 1
15846 } else
15847 len += 1 + keylen
15848 }
15849
15850 print line
15851}
15852
15853_ACAWK
Martin v. Löwiseba40652007-08-30 20:10:57 +000015854_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015855cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15856if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
15857 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
15858else
15859 cat
Matthias Klose3cef2a92012-03-14 23:39:33 +010015860fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015861 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015862_ACEOF
15863
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015864# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
15865# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Martin v. Löwiseba40652007-08-30 20:10:57 +000015866# trailing colons and then remove the whole line if VPATH becomes empty
15867# (actually we leave an empty line to preserve line numbers).
15868if test "x$srcdir" = x.; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015869 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
15870h
15871s///
15872s/^/:/
15873s/[ ]*$/:/
15874s/:\$(srcdir):/:/g
15875s/:\${srcdir}:/:/g
15876s/:@srcdir@:/:/g
15877s/^:*//
Martin v. Löwiseba40652007-08-30 20:10:57 +000015878s/:*$//
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015879x
15880s/\(=[ ]*\).*/\1/
15881G
15882s/\n//
Martin v. Löwiseba40652007-08-30 20:10:57 +000015883s/^[^=]*=[ ]*$//
15884}'
15885fi
15886
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015887cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015888fi # test -n "$CONFIG_FILES"
15889
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015890# Set up the scripts for CONFIG_HEADERS section.
15891# No need to generate them if there are no CONFIG_HEADERS.
15892# This happens for instance with `./config.status Makefile'.
15893if test -n "$CONFIG_HEADERS"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +010015894cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015895BEGIN {
15896_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000015897
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015898# Transform confdefs.h into an awk script `defines.awk', embedded as
15899# here-document in config.status, that substitutes the proper values into
15900# config.h.in to produce config.h.
15901
15902# Create a delimiter string that does not exist in confdefs.h, to ease
15903# handling of long lines.
15904ac_delim='%!_!# '
15905for ac_last_try in false false :; do
Matthias Klose3cef2a92012-03-14 23:39:33 +010015906 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
15907 if test -z "$ac_tt"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015908 break
15909 elif $ac_last_try; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015910 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015911 else
15912 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
15913 fi
15914done
15915
15916# For the awk script, D is an array of macro values keyed by name,
15917# likewise P contains macro parameters if any. Preserve backslash
15918# newline sequences.
15919
15920ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
15921sed -n '
15922s/.\{148\}/&'"$ac_delim"'/g
15923t rset
15924:rset
15925s/^[ ]*#[ ]*define[ ][ ]*/ /
15926t def
15927d
15928:def
15929s/\\$//
15930t bsnl
15931s/["\\]/\\&/g
15932s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15933D["\1"]=" \3"/p
15934s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
15935d
15936:bsnl
15937s/["\\]/\\&/g
15938s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15939D["\1"]=" \3\\\\\\n"\\/p
15940t cont
15941s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
15942t cont
15943d
15944:cont
15945n
15946s/.\{148\}/&'"$ac_delim"'/g
15947t clear
15948:clear
15949s/\\$//
15950t bsnlc
15951s/["\\]/\\&/g; s/^/"/; s/$/"/p
15952d
15953:bsnlc
15954s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
15955b cont
15956' <confdefs.h | sed '
15957s/'"$ac_delim"'/"\\\
15958"/g' >>$CONFIG_STATUS || ac_write_fail=1
15959
15960cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15961 for (key in D) D_is_set[key] = 1
15962 FS = ""
15963}
15964/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
15965 line = \$ 0
15966 split(line, arg, " ")
15967 if (arg[1] == "#") {
15968 defundef = arg[2]
15969 mac1 = arg[3]
15970 } else {
15971 defundef = substr(arg[1], 2)
15972 mac1 = arg[2]
15973 }
15974 split(mac1, mac2, "(") #)
15975 macro = mac2[1]
15976 prefix = substr(line, 1, index(line, defundef) - 1)
15977 if (D_is_set[macro]) {
15978 # Preserve the white space surrounding the "#".
15979 print prefix "define", macro P[macro] D[macro]
15980 next
15981 } else {
15982 # Replace #undef with comments. This is necessary, for example,
15983 # in the case of _POSIX_SOURCE, which is predefined and required
15984 # on some systems where configure will not decide to define it.
15985 if (defundef == "undef") {
15986 print "/*", prefix defundef, macro, "*/"
15987 next
15988 }
15989 }
15990}
15991{ print }
15992_ACAWK
15993_ACEOF
15994cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015995 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015996fi # test -n "$CONFIG_HEADERS"
15997
15998
15999eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
16000shift
16001for ac_tag
Martin v. Löwiseba40652007-08-30 20:10:57 +000016002do
16003 case $ac_tag in
16004 :[FHLC]) ac_mode=$ac_tag; continue;;
16005 esac
16006 case $ac_mode$ac_tag in
16007 :[FHL]*:*);;
Matthias Klose3cef2a92012-03-14 23:39:33 +010016008 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016009 :[FH]-) ac_tag=-:-;;
16010 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
16011 esac
16012 ac_save_IFS=$IFS
16013 IFS=:
16014 set x $ac_tag
16015 IFS=$ac_save_IFS
16016 shift
16017 ac_file=$1
16018 shift
16019
16020 case $ac_mode in
16021 :L) ac_source=$1;;
16022 :[FH])
16023 ac_file_inputs=
16024 for ac_f
16025 do
16026 case $ac_f in
Matthias Klose3cef2a92012-03-14 23:39:33 +010016027 -) ac_f="$ac_tmp/stdin";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016028 *) # Look for the file first in the build tree, then in the source tree
16029 # (if the path is not absolute). The absolute path cannot be DOS-style,
16030 # because $ac_f cannot contain `:'.
16031 test -f "$ac_f" ||
16032 case $ac_f in
16033 [\\/$]*) false;;
16034 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
16035 esac ||
Matthias Klose3cef2a92012-03-14 23:39:33 +010016036 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016037 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016038 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
16039 as_fn_append ac_file_inputs " '$ac_f'"
Martin v. Löwiseba40652007-08-30 20:10:57 +000016040 done
16041
16042 # Let's still pretend it is `configure' which instantiates (i.e., don't
16043 # use $as_me), people would be surprised to read:
16044 # /* config.h. Generated by config.status. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016045 configure_input='Generated from '`
16046 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
16047 `' by configure.'
Martin v. Löwiseba40652007-08-30 20:10:57 +000016048 if test x"$ac_file" != x-; then
16049 configure_input="$ac_file. $configure_input"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016050 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
16051$as_echo "$as_me: creating $ac_file" >&6;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000016052 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016053 # Neutralize special characters interpreted by sed in replacement strings.
16054 case $configure_input in #(
16055 *\&* | *\|* | *\\* )
16056 ac_sed_conf_input=`$as_echo "$configure_input" |
16057 sed 's/[\\\\&|]/\\\\&/g'`;; #(
16058 *) ac_sed_conf_input=$configure_input;;
16059 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000016060
16061 case $ac_tag in
Matthias Klose3cef2a92012-03-14 23:39:33 +010016062 *:-:* | *:-) cat >"$ac_tmp/stdin" \
16063 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016064 esac
16065 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016066 esac
16067
Martin v. Löwiseba40652007-08-30 20:10:57 +000016068 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000016069$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016070 X"$ac_file" : 'X\(//\)[^/]' \| \
16071 X"$ac_file" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000016072 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016073$as_echo X"$ac_file" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000016074 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16075 s//\1/
16076 q
16077 }
16078 /^X\(\/\/\)[^/].*/{
16079 s//\1/
16080 q
16081 }
16082 /^X\(\/\/\)$/{
16083 s//\1/
16084 q
16085 }
16086 /^X\(\/\).*/{
16087 s//\1/
16088 q
16089 }
16090 s/.*/./; q'`
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016091 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000016092 ac_builddir=.
16093
Martin v. Löwiseba40652007-08-30 20:10:57 +000016094case "$ac_dir" in
16095.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
16096*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016097 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000016098 # A ".." for each directory in $ac_dir_suffix.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016099 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000016100 case $ac_top_builddir_sub in
16101 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
16102 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
16103 esac ;;
16104esac
16105ac_abs_top_builddir=$ac_pwd
16106ac_abs_builddir=$ac_pwd$ac_dir_suffix
16107# for backward compatibility:
16108ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000016109
16110case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +000016111 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000016112 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +000016113 ac_top_srcdir=$ac_top_builddir_sub
16114 ac_abs_top_srcdir=$ac_pwd ;;
16115 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000016116 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016117 ac_top_srcdir=$srcdir
16118 ac_abs_top_srcdir=$srcdir ;;
16119 *) # Relative name.
16120 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
16121 ac_top_srcdir=$ac_top_build_prefix$srcdir
16122 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016123esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000016124ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000016125
Martin v. Löwis11437992002-04-12 09:54:03 +000016126
Martin v. Löwiseba40652007-08-30 20:10:57 +000016127 case $ac_mode in
16128 :F)
16129 #
16130 # CONFIG_FILE
16131 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016132
16133 case $INSTALL in
16134 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016135 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016136 esac
Trent Nelsonf6407a12012-08-30 14:56:13 +000016137 ac_MKDIR_P=$MKDIR_P
16138 case $MKDIR_P in
16139 [\\/$]* | ?:[\\/]* ) ;;
16140 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
16141 esac
Brett Cannon19fab762007-06-02 03:02:29 +000016142_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000016143
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016144cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000016145# If the template does not know about datarootdir, expand it.
16146# FIXME: This hack should be removed a few years after 2.60.
16147ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016148ac_sed_dataroot='
16149/datarootdir/ {
Martin v. Löwiseba40652007-08-30 20:10:57 +000016150 p
16151 q
16152}
16153/@datadir@/p
16154/@docdir@/p
16155/@infodir@/p
16156/@localedir@/p
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016157/@mandir@/p'
16158case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000016159*datarootdir*) ac_datarootdir_seen=yes;;
16160*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016161 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
16162$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000016163_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016164cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000016165 ac_datarootdir_hack='
16166 s&@datadir@&$datadir&g
16167 s&@docdir@&$docdir&g
16168 s&@infodir@&$infodir&g
16169 s&@localedir@&$localedir&g
16170 s&@mandir@&$mandir&g
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016171 s&\\\${datarootdir}&$datarootdir&g' ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016172esac
16173_ACEOF
16174
16175# Neutralize VPATH when `$srcdir' = `.'.
16176# Shell code in configure.ac might set extrasub.
16177# FIXME: do we really want to maintain this feature?
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016178cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16179ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000016180$extrasub
16181_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016182cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016183:t
16184/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016185s|@configure_input@|$ac_sed_conf_input|;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000016186s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016187s&@top_build_prefix@&$ac_top_build_prefix&;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000016188s&@srcdir@&$ac_srcdir&;t t
16189s&@abs_srcdir@&$ac_abs_srcdir&;t t
16190s&@top_srcdir@&$ac_top_srcdir&;t t
16191s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
16192s&@builddir@&$ac_builddir&;t t
16193s&@abs_builddir@&$ac_abs_builddir&;t t
16194s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
16195s&@INSTALL@&$ac_INSTALL&;t t
Trent Nelsonf6407a12012-08-30 14:56:13 +000016196s&@MKDIR_P@&$ac_MKDIR_P&;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000016197$ac_datarootdir_hack
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016198"
Matthias Klose3cef2a92012-03-14 23:39:33 +010016199eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
16200 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016201
Martin v. Löwiseba40652007-08-30 20:10:57 +000016202test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Matthias Klose3cef2a92012-03-14 23:39:33 +010016203 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
16204 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
16205 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016206 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016207which seems to be undefined. Please make sure it is defined" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016208$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016209which seems to be undefined. Please make sure it is defined" >&2;}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016210
Matthias Klose3cef2a92012-03-14 23:39:33 +010016211 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000016212 case $ac_file in
Matthias Klose3cef2a92012-03-14 23:39:33 +010016213 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
16214 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016215 esac \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016216 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016217 ;;
16218 :H)
16219 #
16220 # CONFIG_HEADER
16221 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016222 if test x"$ac_file" != x-; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016223 {
16224 $as_echo "/* $configure_input */" \
Matthias Klose3cef2a92012-03-14 23:39:33 +010016225 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
16226 } >"$ac_tmp/config.h" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016227 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Matthias Klose3cef2a92012-03-14 23:39:33 +010016228 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016229 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
16230$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016231 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016232 rm -f "$ac_file"
Matthias Klose3cef2a92012-03-14 23:39:33 +010016233 mv "$ac_tmp/config.h" "$ac_file" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016234 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016235 fi
16236 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016237 $as_echo "/* $configure_input */" \
Matthias Klose3cef2a92012-03-14 23:39:33 +010016238 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016239 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016240 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016241 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000016242
Martin v. Löwiseba40652007-08-30 20:10:57 +000016243
16244 esac
16245
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000016246
16247 case $ac_file$ac_mode in
16248 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
16249
16250 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000016251done # for ac_tag
16252
Guido van Rossum627b2d71993-12-24 10:39:16 +000016253
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016254as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000016255_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016256ac_clean_files=$ac_clean_files_save
16257
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016258test $ac_write_fail = 0 ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016259 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016260
Martin v. Löwis11437992002-04-12 09:54:03 +000016261
16262# configure is writing to config.log, and then calls config.status.
16263# config.status does its own redirection, appending to config.log.
16264# Unfortunately, on DOS this fails, as config.log is still kept open
16265# by configure, so config.status won't be able to write to it; its
16266# output is simply discarded. So we exec the FD to /dev/null,
16267# effectively closing config.log, so it can be properly (re)opened and
16268# appended to by config.status. When coming back to configure, we
16269# need to make the FD available again.
16270if test "$no_create" != yes; then
16271 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000016272 ac_config_status_args=
16273 test "$silent" = yes &&
16274 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000016275 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000016276 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000016277 exec 5>>config.log
16278 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16279 # would make configure fail if this is the last instruction.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016280 $ac_cs_success || as_fn_exit 1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016281fi
16282if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
16283 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
16284$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016285fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000016286
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016287
Martin v. Löwisf7afe952006-04-14 15:16:15 +000016288echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016289if test ! -f Modules/Setup
16290then
16291 cp $srcdir/Modules/Setup.dist Modules/Setup
16292fi
16293
Martin v. Löwisf7afe952006-04-14 15:16:15 +000016294echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016295if test ! -f Modules/Setup.local
16296then
16297 echo "# Edit this file for local setup changes" >Modules/Setup.local
16298fi
16299
16300echo "creating Makefile"
16301$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
16302 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000016303 Modules/Setup.local Modules/Setup
Skip Montanaro89e975f2007-08-22 19:05:21 +000016304
16305case $ac_sys_system in
16306BeOS)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016307 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000016308
16309 Support for BeOS is deprecated as of Python 2.6.
16310 See PEP 11 for the gory details.
16311 " >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016312$as_echo "$as_me: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000016313
16314 Support for BeOS is deprecated as of Python 2.6.
16315 See PEP 11 for the gory details.
16316 " >&2;}
16317 ;;
16318*) ;;
16319esac
16320
Neil Schemenauerc761fc82001-02-19 04:50:49 +000016321mv config.c Modules