blob: 12a439dcbc990d3cb669d97209ff0267fefddad3 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Matthias Klose3cef2a92012-03-14 23:39:33 +01002# From configure.ac Revision.
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004# Generated by GNU Autoconf 2.69 for python 2.7.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Benjamin Petersoncc8929b2016-08-03 22:01:32 -07006# Report bugs to <https://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00007#
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008#
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010#
11#
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012# This configure script is free software; the Free Software Foundation
13# gives unlimited permission to copy, distribute and modify it.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014## -------------------- ##
15## M4sh Initialization. ##
16## -------------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +000017
Martin v. Löwiseba40652007-08-30 20:10:57 +000018# Be more Bourne compatible
19DUALCASE=1; export DUALCASE # for MKS sh
Matthias Klosea0bea5d2010-05-08 10:00:28 +000020if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000021 emulate sh
22 NULLCMD=:
Matthias Klosea0bea5d2010-05-08 10:00:28 +000023 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000024 # is contrary to our usage. Disable this feature.
25 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000026 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000027else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000028 case `(set -o) 2>/dev/null` in #(
29 *posix*) :
30 set -o posix ;; #(
31 *) :
32 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000033esac
Martin v. Löwis11437992002-04-12 09:54:03 +000034fi
35
Skip Montanaro6dead952003-09-25 14:50:04 +000036
Matthias Klosea0bea5d2010-05-08 10:00:28 +000037as_nl='
38'
39export as_nl
40# Printing a long string crashes Solaris 7 /usr/bin/printf.
41as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
42as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
43as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
44# Prefer a ksh shell builtin over an external printf program on Solaris,
45# but without wasting forks for bash or zsh.
46if test -z "$BASH_VERSION$ZSH_VERSION" \
47 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
48 as_echo='print -r --'
49 as_echo_n='print -rn --'
50elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
51 as_echo='printf %s\n'
52 as_echo_n='printf %s'
53else
54 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
55 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
56 as_echo_n='/usr/ucb/echo -n'
57 else
58 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
59 as_echo_n_body='eval
60 arg=$1;
61 case $arg in #(
62 *"$as_nl"*)
63 expr "X$arg" : "X\\(.*\\)$as_nl";
64 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
65 esac;
66 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
67 '
68 export as_echo_n_body
69 as_echo_n='sh -c $as_echo_n_body as_echo'
70 fi
71 export as_echo_body
72 as_echo='sh -c $as_echo_body as_echo'
73fi
Martin v. Löwis11437992002-04-12 09:54:03 +000074
75# The user is always right.
76if test "${PATH_SEPARATOR+set}" != set; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000077 PATH_SEPARATOR=:
78 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
79 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
80 PATH_SEPARATOR=';'
81 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000082fi
Martin v. Löwis11437992002-04-12 09:54:03 +000083
Martin v. Löwiseba40652007-08-30 20:10:57 +000084
85# IFS
86# We need space, tab and new line, in precisely that order. Quoting is
87# there to prevent editors from complaining about space-tab.
88# (If _AS_PATH_WALK were called with IFS unset, it would disable word
89# splitting by setting IFS to empty value.)
Martin v. Löwiseba40652007-08-30 20:10:57 +000090IFS=" "" $as_nl"
91
92# Find who we are. Look in the path if we contain no directory separator.
Matthias Klose3cef2a92012-03-14 23:39:33 +010093as_myself=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000094case $0 in #((
Martin v. Löwiseba40652007-08-30 20:10:57 +000095 *[\\/]* ) as_myself=$0 ;;
96 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000097for as_dir in $PATH
98do
99 IFS=$as_save_IFS
100 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000101 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
102 done
Martin v. Löwiseba40652007-08-30 20:10:57 +0000103IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +0000104
Martin v. Löwiseba40652007-08-30 20:10:57 +0000105 ;;
106esac
107# We did not find ourselves, most probably we were run as `sh COMMAND'
108# in which case we are not to be found in the path.
109if test "x$as_myself" = x; then
110 as_myself=$0
111fi
112if test ! -f "$as_myself"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000113 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
114 exit 1
Martin v. Löwiseba40652007-08-30 20:10:57 +0000115fi
116
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000117# Unset variables that we do not need and which cause bugs (e.g. in
118# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
119# suppresses any "Segmentation fault" message there. '((' could
120# trigger a bug in pdksh 5.2.14.
121for as_var in BASH_ENV ENV MAIL MAILPATH
122do eval test x\${$as_var+set} = xset \
123 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Martin v. Löwiseba40652007-08-30 20:10:57 +0000124done
125PS1='$ '
126PS2='> '
127PS4='+ '
128
129# NLS nuisances.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000130LC_ALL=C
131export LC_ALL
132LANGUAGE=C
133export LANGUAGE
Martin v. Löwiseba40652007-08-30 20:10:57 +0000134
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000135# CDPATH.
136(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
137
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100138# Use a proper internal environment variable to ensure we don't fall
139 # into an infinite loop, continuously re-executing ourselves.
140 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
141 _as_can_reexec=no; export _as_can_reexec;
142 # We cannot yet assume a decent shell, so we have to provide a
143# neutralization value for shells without unset; and this also
144# works around shells that cannot unset nonexistent variables.
145# Preserve -v and -x to the replacement shell.
146BASH_ENV=/dev/null
147ENV=/dev/null
148(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
149case $- in # ((((
150 *v*x* | *x*v* ) as_opts=-vx ;;
151 *v* ) as_opts=-v ;;
152 *x* ) as_opts=-x ;;
153 * ) as_opts= ;;
154esac
155exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
156# Admittedly, this is quite paranoid, since all the known shells bail
157# out after a failed `exec'.
158$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
159as_fn_exit 255
160 fi
161 # We don't want this to propagate to other subprocesses.
162 { _as_can_reexec=; unset _as_can_reexec;}
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000163if test "x$CONFIG_SHELL" = x; then
164 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
165 emulate sh
166 NULLCMD=:
167 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
168 # is contrary to our usage. Disable this feature.
169 alias -g '\${1+\"\$@\"}'='\"\$@\"'
170 setopt NO_GLOB_SUBST
171else
172 case \`(set -o) 2>/dev/null\` in #(
173 *posix*) :
174 set -o posix ;; #(
175 *) :
176 ;;
177esac
178fi
179"
180 as_required="as_fn_return () { (exit \$1); }
181as_fn_success () { as_fn_return 0; }
182as_fn_failure () { as_fn_return 1; }
183as_fn_ret_success () { return 0; }
184as_fn_ret_failure () { return 1; }
185
186exitcode=0
187as_fn_success || { exitcode=1; echo as_fn_success failed.; }
188as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
189as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
190as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
191if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
192
193else
194 exitcode=1; echo positional parameters were not saved.
195fi
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100196test x\$exitcode = x0 || exit 1
197test -x / || exit 1"
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000198 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
199 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
200 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
201 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
202test \$(( 1 + 1 )) = 2 || exit 1"
203 if (eval "$as_required") 2>/dev/null; then :
204 as_have_required=yes
205else
206 as_have_required=no
207fi
208 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
209
210else
211 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
212as_found=false
213for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
214do
215 IFS=$as_save_IFS
216 test -z "$as_dir" && as_dir=.
217 as_found=:
218 case $as_dir in #(
219 /*)
220 for as_base in sh bash ksh sh5; do
221 # Try only shells that exist, to save several forks.
222 as_shell=$as_dir/$as_base
223 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
224 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
225 CONFIG_SHELL=$as_shell as_have_required=yes
226 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
227 break 2
228fi
229fi
230 done;;
231 esac
232 as_found=false
233done
234$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
235 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
236 CONFIG_SHELL=$SHELL as_have_required=yes
237fi; }
238IFS=$as_save_IFS
239
240
241 if test "x$CONFIG_SHELL" != x; then :
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100242 export CONFIG_SHELL
243 # We cannot yet assume a decent shell, so we have to provide a
244# neutralization value for shells without unset; and this also
245# works around shells that cannot unset nonexistent variables.
246# Preserve -v and -x to the replacement shell.
247BASH_ENV=/dev/null
248ENV=/dev/null
249(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
250case $- in # ((((
251 *v*x* | *x*v* ) as_opts=-vx ;;
252 *v* ) as_opts=-v ;;
253 *x* ) as_opts=-x ;;
254 * ) as_opts= ;;
255esac
256exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
257# Admittedly, this is quite paranoid, since all the known shells bail
258# out after a failed `exec'.
259$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
260exit 255
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000261fi
262
263 if test x$as_have_required = xno; then :
264 $as_echo "$0: This script requires a shell more modern than all"
265 $as_echo "$0: the shells that I found on your system."
266 if test x${ZSH_VERSION+set} = xset ; then
267 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
268 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
269 else
270 $as_echo "$0: Please tell bug-autoconf@gnu.org and
Benjamin Petersoncc8929b2016-08-03 22:01:32 -0700271$0: https://bugs.python.org/ about your system, including
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000272$0: any error possibly output before this message. Then
273$0: install a modern shell, or manually run the script
274$0: under such a shell if you do have one."
275 fi
276 exit 1
277fi
278fi
279fi
280SHELL=${CONFIG_SHELL-/bin/sh}
281export SHELL
282# Unset more variables known to interfere with behavior of common tools.
283CLICOLOR_FORCE= GREP_OPTIONS=
284unset CLICOLOR_FORCE GREP_OPTIONS
285
286## --------------------- ##
287## M4sh Shell Functions. ##
288## --------------------- ##
289# as_fn_unset VAR
290# ---------------
291# Portably unset VAR.
292as_fn_unset ()
293{
294 { eval $1=; unset $1;}
295}
296as_unset=as_fn_unset
297
298# as_fn_set_status STATUS
299# -----------------------
300# Set $? to STATUS, without forking.
301as_fn_set_status ()
302{
303 return $1
304} # as_fn_set_status
305
306# as_fn_exit STATUS
307# -----------------
308# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
309as_fn_exit ()
310{
311 set +e
312 as_fn_set_status $1
313 exit $1
314} # as_fn_exit
315
316# as_fn_mkdir_p
317# -------------
318# Create "$as_dir" as a directory, including parents if necessary.
319as_fn_mkdir_p ()
320{
321
322 case $as_dir in #(
323 -*) as_dir=./$as_dir;;
324 esac
325 test -d "$as_dir" || eval $as_mkdir_p || {
326 as_dirs=
327 while :; do
328 case $as_dir in #(
329 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
330 *) as_qdir=$as_dir;;
331 esac
332 as_dirs="'$as_qdir' $as_dirs"
333 as_dir=`$as_dirname -- "$as_dir" ||
334$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
335 X"$as_dir" : 'X\(//\)[^/]' \| \
336 X"$as_dir" : 'X\(//\)$' \| \
337 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
338$as_echo X"$as_dir" |
339 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
340 s//\1/
341 q
342 }
343 /^X\(\/\/\)[^/].*/{
344 s//\1/
345 q
346 }
347 /^X\(\/\/\)$/{
348 s//\1/
349 q
350 }
351 /^X\(\/\).*/{
352 s//\1/
353 q
354 }
355 s/.*/./; q'`
356 test -d "$as_dir" && break
357 done
358 test -z "$as_dirs" || eval "mkdir $as_dirs"
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000359 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000360
361
362} # as_fn_mkdir_p
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100363
364# as_fn_executable_p FILE
365# -----------------------
366# Test if FILE is an executable regular file.
367as_fn_executable_p ()
368{
369 test -f "$1" && test -x "$1"
370} # as_fn_executable_p
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000371# as_fn_append VAR VALUE
372# ----------------------
373# Append the text in VALUE to the end of the definition contained in VAR. Take
374# advantage of any shell optimizations that allow amortized linear growth over
375# repeated appends, instead of the typical quadratic growth present in naive
376# implementations.
377if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
378 eval 'as_fn_append ()
379 {
380 eval $1+=\$2
381 }'
382else
383 as_fn_append ()
384 {
385 eval $1=\$$1\$2
386 }
387fi # as_fn_append
388
389# as_fn_arith ARG...
390# ------------------
391# Perform arithmetic evaluation on the ARGs, and store the result in the
392# global $as_val. Take advantage of shells that can avoid forks. The arguments
393# must be portable across $(()) and expr.
394if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
395 eval 'as_fn_arith ()
396 {
397 as_val=$(( $* ))
398 }'
399else
400 as_fn_arith ()
401 {
402 as_val=`expr "$@" || test $? -eq 1`
403 }
404fi # as_fn_arith
405
406
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000407# as_fn_error STATUS ERROR [LINENO LOG_FD]
408# ----------------------------------------
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000409# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
410# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000411# script with STATUS, using 1 if that was 0.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000412as_fn_error ()
413{
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000414 as_status=$1; test $as_status -eq 0 && as_status=1
415 if test "$4"; then
416 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
417 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000418 fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000419 $as_echo "$as_me: error: $2" >&2
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000420 as_fn_exit $as_status
421} # as_fn_error
422
Martin v. Löwiseba40652007-08-30 20:10:57 +0000423if expr a : '\(a\)' >/dev/null 2>&1 &&
424 test "X`expr 00001 : '.*\(...\)'`" = X001; then
425 as_expr=expr
426else
427 as_expr=false
428fi
429
430if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
431 as_basename=basename
432else
433 as_basename=false
434fi
435
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000436if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
437 as_dirname=dirname
438else
439 as_dirname=false
440fi
Martin v. Löwiseba40652007-08-30 20:10:57 +0000441
Martin v. Löwiseba40652007-08-30 20:10:57 +0000442as_me=`$as_basename -- "$0" ||
443$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
444 X"$0" : 'X\(//\)$' \| \
445 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000446$as_echo X/"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +0000447 sed '/^.*\/\([^/][^/]*\)\/*$/{
448 s//\1/
449 q
450 }
451 /^X\/\(\/\/\)$/{
452 s//\1/
453 q
454 }
455 /^X\/\(\/\).*/{
456 s//\1/
457 q
458 }
459 s/.*/./; q'`
460
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000461# Avoid depending upon Character Ranges.
462as_cr_letters='abcdefghijklmnopqrstuvwxyz'
463as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
464as_cr_Letters=$as_cr_letters$as_cr_LETTERS
465as_cr_digits='0123456789'
466as_cr_alnum=$as_cr_Letters$as_cr_digits
Martin v. Löwiseba40652007-08-30 20:10:57 +0000467
468
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000469 as_lineno_1=$LINENO as_lineno_1a=$LINENO
470 as_lineno_2=$LINENO as_lineno_2a=$LINENO
471 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
472 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
473 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
Martin v. Löwiseba40652007-08-30 20:10:57 +0000474 sed -n '
475 p
476 /[$]LINENO/=
477 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000478 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +0000479 s/[$]LINENO.*/&-/
480 t lineno
481 b
482 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000483 N
Martin v. Löwiseba40652007-08-30 20:10:57 +0000484 :loop
485 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000486 t loop
Martin v. Löwiseba40652007-08-30 20:10:57 +0000487 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000488 ' >$as_me.lineno &&
Martin v. Löwiseba40652007-08-30 20:10:57 +0000489 chmod +x "$as_me.lineno" ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000490 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
Martin v. Löwis11437992002-04-12 09:54:03 +0000491
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100492 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
493 # already done that, so ensure we don't try to do so again and fall
494 # in an infinite loop. This has already happened in practice.
495 _as_can_reexec=no; export _as_can_reexec
Martin v. Löwis11437992002-04-12 09:54:03 +0000496 # Don't try to exec as it changes $[0], causing all sort of problems
497 # (the dirname of $[0] is not the place where we might find the
Martin v. Löwiseba40652007-08-30 20:10:57 +0000498 # original and so on. Autoconf is especially sensitive to this).
499 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000500 # Exit status is that of the last command.
501 exit
502}
503
Martin v. Löwiseba40652007-08-30 20:10:57 +0000504ECHO_C= ECHO_N= ECHO_T=
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000505case `echo -n x` in #(((((
Martin v. Löwiseba40652007-08-30 20:10:57 +0000506-n*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000507 case `echo 'xy\c'` in
Martin v. Löwiseba40652007-08-30 20:10:57 +0000508 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000509 xy) ECHO_C='\c';;
510 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
511 ECHO_T=' ';;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000512 esac;;
513*)
514 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000515esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000516
Martin v. Löwis11437992002-04-12 09:54:03 +0000517rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +0000518if test -d conf$$.dir; then
519 rm -f conf$$.dir/conf$$.file
520else
521 rm -f conf$$.dir
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000522 mkdir conf$$.dir 2>/dev/null
Martin v. Löwiseba40652007-08-30 20:10:57 +0000523fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000524if (echo >conf$$.file) 2>/dev/null; then
525 if ln -s conf$$.file conf$$ 2>/dev/null; then
526 as_ln_s='ln -s'
527 # ... but there are two gotchas:
528 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
529 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100530 # In both cases, we have to default to `cp -pR'.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000531 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100532 as_ln_s='cp -pR'
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000533 elif ln conf$$.file conf$$ 2>/dev/null; then
534 as_ln_s=ln
535 else
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100536 as_ln_s='cp -pR'
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000537 fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000538else
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100539 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +0000540fi
Martin v. Löwiseba40652007-08-30 20:10:57 +0000541rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
542rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000543
Skip Montanaro6dead952003-09-25 14:50:04 +0000544if mkdir -p . 2>/dev/null; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000545 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +0000546else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000547 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000548 as_mkdir_p=false
549fi
550
Charles-François Natalibe2b9072013-01-08 19:47:00 +0100551as_test_x='test -x'
552as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +0000553
554# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000555as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000556
557# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000558as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000559
560
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000561test -n "$DJDIR" || exec 7<&0 </dev/null
562exec 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000563
564# Name of the host.
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000565# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
Martin v. Löwis11437992002-04-12 09:54:03 +0000566# so uname gets run too.
567ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
568
Martin v. Löwis11437992002-04-12 09:54:03 +0000569#
570# Initializations.
571#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000572ac_default_prefix=/usr/local
Martin v. Löwiseba40652007-08-30 20:10:57 +0000573ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000574ac_config_libobj_dir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000575LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000576cross_compiling=no
577subdirs=
578MFLAGS=
579MAKEFLAGS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000580
Martin v. Löwis11437992002-04-12 09:54:03 +0000581# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000582PACKAGE_NAME='python'
583PACKAGE_TARNAME='python'
Martin v. Löwis174440b2008-10-03 08:59:41 +0000584PACKAGE_VERSION='2.7'
585PACKAGE_STRING='python 2.7'
Benjamin Petersoncc8929b2016-08-03 22:01:32 -0700586PACKAGE_BUGREPORT='https://bugs.python.org/'
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000587PACKAGE_URL=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000588
589ac_unique_file="Include/object.h"
590# Factoring default headers for most tests.
591ac_includes_default="\
592#include <stdio.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +0000593#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000594# include <sys/types.h>
595#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000596#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000597# include <sys/stat.h>
598#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000599#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000600# include <stdlib.h>
601# include <stddef.h>
602#else
Martin v. Löwiseba40652007-08-30 20:10:57 +0000603# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000604# include <stdlib.h>
605# endif
606#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000607#ifdef HAVE_STRING_H
608# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000609# include <memory.h>
610# endif
611# include <string.h>
612#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000613#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000614# include <strings.h>
615#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000616#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000617# include <inttypes.h>
Martin v. Löwis11437992002-04-12 09:54:03 +0000618#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000619#ifdef HAVE_STDINT_H
620# include <stdint.h>
621#endif
622#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000623# include <unistd.h>
624#endif"
625
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000626ac_subst_vars='LTLIBOBJS
Ned Deily3f1d0b32014-11-20 02:11:03 -0800627ENSUREPIP
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +0000628SRCDIRS
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000629THREADHEADERS
630UNICODE_OBJS
631LIBC
632LIBM
633HAVE_GETHOSTBYNAME
634HAVE_GETHOSTBYNAME_R
635HAVE_GETHOSTBYNAME_R_3_ARG
636HAVE_GETHOSTBYNAME_R_5_ARG
637HAVE_GETHOSTBYNAME_R_6_ARG
638LIBOBJS
639TRUE
640MACHDEP_OBJS
641DYNLOADFILE
642DLINCLDIR
643THREADOBJ
644LDLAST
645USE_THREAD_MODULE
646SIGNAL_OBJS
647USE_SIGNAL_MODULE
Ned Deilya2a9f572013-10-25 00:30:10 -0700648TCLTK_LIBS
649TCLTK_INCLUDES
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000650LIBFFI_INCLUDEDIR
Benjamin Peterson64e8f6e2014-12-15 00:00:23 -0500651PKG_CONFIG_LIBDIR
652PKG_CONFIG_PATH
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000653PKG_CONFIG
654SHLIBS
655CFLAGSFORSHARED
656LINKFORSHARED
657CCSHARED
658BLDSHARED
659LDCXXSHARED
660LDSHARED
661SO
662LIBTOOL_CRUFT
663OTHER_LIBTOOL_OPT
Brett Cannon4ff151a2015-09-18 15:09:42 -0700664LLVM_PROF_FOUND
665LLVM_PROF_ERR
666LLVM_PROF_FILE
667LLVM_PROF_MERGER
668PGO_PROF_USE_FLAG
669PGO_PROF_GEN_FLAG
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)c543a0f2016-06-02 23:44:40 +0000670LTOFLAGS
Gregory P. Smith6d8fdfc2016-09-07 23:28:23 -0700671DEF_MAKE_RULE
672DEF_MAKE_ALL_RULE
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000673UNIVERSAL_ARCH_FLAGS
674BASECFLAGS
675OPT
676LN
Trent Nelsonf6407a12012-08-30 14:56:13 +0000677MKDIR_P
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000678INSTALL_DATA
679INSTALL_SCRIPT
680INSTALL_PROGRAM
Georg Brandl3a5508e2011-03-06 10:42:21 +0100681HAS_HG
682HGBRANCH
683HGTAG
684HGVERSION
Trent Nelsond86ceec2012-10-16 09:42:45 -0400685BASECPPFLAGS
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000686SVNVERSION
687ARFLAGS
doko@python.orgd65e2ba2013-01-31 23:52:03 +0100688ac_ct_AR
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000689AR
690RANLIB
691GNULD
692LINKCC
693RUNSHARED
694INSTSONAME
695LDLIBRARYDIR
696BLDLIBRARY
697DLLLIBRARY
698LDLIBRARY
699LIBRARY
700BUILDEXEEXT
701EGREP
702GREP
703CPP
doko@python.org4e63fbe2013-01-25 13:08:27 +0100704MULTIARCH
doko@python.orgd65e2ba2013-01-31 23:52:03 +0100705ac_ct_CXX
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000706MAINCC
707CXX
708OBJEXT
709EXEEXT
710ac_ct_CC
711CPPFLAGS
712LDFLAGS
713CFLAGS
714CC
715EXPORT_MACOSX_DEPLOYMENT_TARGET
716CONFIGURE_MACOSX_DEPLOYMENT_TARGET
717EXTRAMACHDEPPATH
718EXTRAPLATDIR
doko@ubuntu.coma50b0de2015-04-13 21:55:59 +0200719PLATDIR
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000720SGI_ABI
doko@python.orgd65e2ba2013-01-31 23:52:03 +0100721_PYTHON_HOST_PLATFORM
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000722MACHDEP
723FRAMEWORKINSTALLAPPSPREFIX
724FRAMEWORKUNIXTOOLSPREFIX
725FRAMEWORKALTINSTALLLAST
726FRAMEWORKALTINSTALLFIRST
727FRAMEWORKINSTALLLAST
728FRAMEWORKINSTALLFIRST
729PYTHONFRAMEWORKINSTALLDIR
730PYTHONFRAMEWORKPREFIX
731PYTHONFRAMEWORKDIR
732PYTHONFRAMEWORKIDENTIFIER
733PYTHONFRAMEWORK
734LIPO_32BIT_FLAGS
735ARCH_RUN_32BIT
736UNIVERSALSDK
737CONFIG_ARGS
738SOVERSION
739VERSION
Martin Panterbc82de02016-07-29 05:52:32 +0000740GENERATED_COMMENT
doko@python.orgd65e2ba2013-01-31 23:52:03 +0100741PYTHON_FOR_BUILD
742host_os
743host_vendor
744host_cpu
745host
746build_os
747build_vendor
748build_cpu
749build
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000750target_alias
751host_alias
752build_alias
753LIBS
754ECHO_T
755ECHO_N
756ECHO_C
757DEFS
758mandir
759localedir
760libdir
761psdir
762pdfdir
763dvidir
764htmldir
765infodir
766docdir
767oldincludedir
768includedir
Benjamin Peterson42e10292016-07-07 00:02:31 -0700769runstatedir
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000770localstatedir
771sharedstatedir
772sysconfdir
773datadir
774datarootdir
775libexecdir
776sbindir
777bindir
778program_transform_name
779prefix
780exec_prefix
781PACKAGE_URL
782PACKAGE_BUGREPORT
783PACKAGE_STRING
784PACKAGE_VERSION
785PACKAGE_TARNAME
786PACKAGE_NAME
787PATH_SEPARATOR
788SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000789ac_subst_files=''
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000790ac_user_opts='
791enable_option_checking
792enable_universalsdk
793with_universal_archs
794with_framework_name
795enable_framework
796with_gcc
Zachary Ware6ed42ea2015-12-21 11:43:03 -0600797with_icc
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000798with_cxx_main
799with_suffix
800enable_shared
801enable_profiling
802with_pydebug
Gregory P. Smith6d8fdfc2016-09-07 23:28:23 -0700803with_optimizations
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)c543a0f2016-06-02 23:44:40 +0000804with_lto
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000805enable_toolbox_glue
806with_libs
807with_system_expat
808with_system_ffi
Ned Deilya2a9f572013-10-25 00:30:10 -0700809with_tcltk_includes
810with_tcltk_libs
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000811with_dbmliborder
812with_signal_module
813with_dec_threads
814with_threads
815with_thread
816with_pth
817enable_ipv6
818with_doc_strings
819with_tsc
820with_pymalloc
821with_valgrind
822with_wctype_functions
823with_fpectl
824with_libm
825with_libc
826enable_big_digits
827enable_unicode
Benjamin Peterson2c992a02015-05-28 12:45:31 -0500828with_computed_gotos
Ned Deily3f1d0b32014-11-20 02:11:03 -0800829with_ensurepip
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000830'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000831 ac_precious_vars='build_alias
832host_alias
833target_alias
834CC
835CFLAGS
836LDFLAGS
837LIBS
838CPPFLAGS
Benjamin Peterson64e8f6e2014-12-15 00:00:23 -0500839CPP
840PKG_CONFIG
841PKG_CONFIG_PATH
842PKG_CONFIG_LIBDIR'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000843
Guido van Rossum627b2d71993-12-24 10:39:16 +0000844
Guido van Rossum7f43da71994-08-01 12:15:30 +0000845# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000846ac_init_help=
847ac_init_version=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000848ac_unrecognized_opts=
849ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000850# The variables have the same names as the options, with
851# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000852cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000853exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000854no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000855no_recursion=
856prefix=NONE
857program_prefix=NONE
858program_suffix=NONE
859program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000860silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000861site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000862srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000863verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000864x_includes=NONE
865x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000866
867# Installation directory options.
868# These are left unexpanded so users can "make install exec_prefix=/foo"
869# and all the variables that are supposed to be based on exec_prefix
870# by default will actually change.
871# Use braces instead of parens because sh, perl, etc. also accept them.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000872# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000873bindir='${exec_prefix}/bin'
874sbindir='${exec_prefix}/sbin'
875libexecdir='${exec_prefix}/libexec'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000876datarootdir='${prefix}/share'
877datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000878sysconfdir='${prefix}/etc'
879sharedstatedir='${prefix}/com'
880localstatedir='${prefix}/var'
Benjamin Peterson42e10292016-07-07 00:02:31 -0700881runstatedir='${localstatedir}/run'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000882includedir='${prefix}/include'
883oldincludedir='/usr/include'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000884docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
885infodir='${datarootdir}/info'
886htmldir='${docdir}'
887dvidir='${docdir}'
888pdfdir='${docdir}'
889psdir='${docdir}'
890libdir='${exec_prefix}/lib'
891localedir='${datarootdir}/locale'
892mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000893
Guido van Rossum7f43da71994-08-01 12:15:30 +0000894ac_prev=
Martin v. Löwiseba40652007-08-30 20:10:57 +0000895ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000896for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000897do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000898 # If the previous option needs an argument, assign it.
899 if test -n "$ac_prev"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +0000900 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000901 ac_prev=
902 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000903 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000904
Martin v. Löwiseba40652007-08-30 20:10:57 +0000905 case $ac_option in
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000906 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
907 *=) ac_optarg= ;;
908 *) ac_optarg=yes ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000909 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000910
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000911 # Accept the important Cygnus configure options, so we can diagnose typos.
912
Martin v. Löwiseba40652007-08-30 20:10:57 +0000913 case $ac_dashdash$ac_option in
914 --)
915 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000916
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000917 -bindir | --bindir | --bindi | --bind | --bin | --bi)
918 ac_prev=bindir ;;
919 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000920 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000921
922 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000923 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000924 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000925 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000926
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000927 -cache-file | --cache-file | --cache-fil | --cache-fi \
928 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
929 ac_prev=cache_file ;;
930 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
931 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000932 cache_file=$ac_optarg ;;
933
934 --config-cache | -C)
935 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000936
Martin v. Löwiseba40652007-08-30 20:10:57 +0000937 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000938 ac_prev=datadir ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000939 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000940 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000941
Martin v. Löwiseba40652007-08-30 20:10:57 +0000942 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
943 | --dataroo | --dataro | --datar)
944 ac_prev=datarootdir ;;
945 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
946 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
947 datarootdir=$ac_optarg ;;
948
Guido van Rossum7f43da71994-08-01 12:15:30 +0000949 -disable-* | --disable-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000950 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000951 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000952 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000953 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000954 ac_useropt_orig=$ac_useropt
955 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
956 case $ac_user_opts in
957 *"
958"enable_$ac_useropt"
959"*) ;;
960 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
961 ac_unrecognized_sep=', ';;
962 esac
963 eval enable_$ac_useropt=no ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000964
965 -docdir | --docdir | --docdi | --doc | --do)
966 ac_prev=docdir ;;
967 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
968 docdir=$ac_optarg ;;
969
970 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
971 ac_prev=dvidir ;;
972 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
973 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000974
975 -enable-* | --enable-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000976 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000977 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000978 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +0000979 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +0000980 ac_useropt_orig=$ac_useropt
981 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
982 case $ac_user_opts in
983 *"
984"enable_$ac_useropt"
985"*) ;;
986 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
987 ac_unrecognized_sep=', ';;
988 esac
989 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000990
Guido van Rossum7f43da71994-08-01 12:15:30 +0000991 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
992 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
993 | --exec | --exe | --ex)
994 ac_prev=exec_prefix ;;
995 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
996 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
997 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000998 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000999
1000 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001001 # Obsolete; use --with-gas.
1002 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001003
Martin v. Löwis11437992002-04-12 09:54:03 +00001004 -help | --help | --hel | --he | -h)
1005 ac_init_help=long ;;
1006 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1007 ac_init_help=recursive ;;
1008 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1009 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001010
1011 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +00001012 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001013 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001014 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001015
Martin v. Löwiseba40652007-08-30 20:10:57 +00001016 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1017 ac_prev=htmldir ;;
1018 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1019 | --ht=*)
1020 htmldir=$ac_optarg ;;
1021
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001022 -includedir | --includedir | --includedi | --included | --include \
1023 | --includ | --inclu | --incl | --inc)
1024 ac_prev=includedir ;;
1025 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1026 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001027 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001028
1029 -infodir | --infodir | --infodi | --infod | --info | --inf)
1030 ac_prev=infodir ;;
1031 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001032 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001033
1034 -libdir | --libdir | --libdi | --libd)
1035 ac_prev=libdir ;;
1036 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001037 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001038
1039 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1040 | --libexe | --libex | --libe)
1041 ac_prev=libexecdir ;;
1042 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1043 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001044 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001045
Martin v. Löwiseba40652007-08-30 20:10:57 +00001046 -localedir | --localedir | --localedi | --localed | --locale)
1047 ac_prev=localedir ;;
1048 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1049 localedir=$ac_optarg ;;
1050
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001051 -localstatedir | --localstatedir | --localstatedi | --localstated \
Martin v. Löwiseba40652007-08-30 20:10:57 +00001052 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001053 ac_prev=localstatedir ;;
1054 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Martin v. Löwiseba40652007-08-30 20:10:57 +00001055 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001056 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001057
1058 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1059 ac_prev=mandir ;;
1060 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001061 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001062
Guido van Rossum7f43da71994-08-01 12:15:30 +00001063 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001064 # Obsolete; use --without-fp.
1065 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001066
1067 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001068 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001069 no_create=yes ;;
1070
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001071 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1072 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1073 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001074
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001075 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1076 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1077 | --oldin | --oldi | --old | --ol | --o)
1078 ac_prev=oldincludedir ;;
1079 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1080 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1081 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001082 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001083
Guido van Rossum7f43da71994-08-01 12:15:30 +00001084 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1085 ac_prev=prefix ;;
1086 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001087 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001088
1089 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1090 | --program-pre | --program-pr | --program-p)
1091 ac_prev=program_prefix ;;
1092 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1093 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001094 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001095
1096 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1097 | --program-suf | --program-su | --program-s)
1098 ac_prev=program_suffix ;;
1099 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1100 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001101 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001102
1103 -program-transform-name | --program-transform-name \
1104 | --program-transform-nam | --program-transform-na \
1105 | --program-transform-n | --program-transform- \
1106 | --program-transform | --program-transfor \
1107 | --program-transfo | --program-transf \
1108 | --program-trans | --program-tran \
1109 | --progr-tra | --program-tr | --program-t)
1110 ac_prev=program_transform_name ;;
1111 -program-transform-name=* | --program-transform-name=* \
1112 | --program-transform-nam=* | --program-transform-na=* \
1113 | --program-transform-n=* | --program-transform-=* \
1114 | --program-transform=* | --program-transfor=* \
1115 | --program-transfo=* | --program-transf=* \
1116 | --program-trans=* | --program-tran=* \
1117 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001118 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001119
Martin v. Löwiseba40652007-08-30 20:10:57 +00001120 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1121 ac_prev=pdfdir ;;
1122 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1123 pdfdir=$ac_optarg ;;
1124
1125 -psdir | --psdir | --psdi | --psd | --ps)
1126 ac_prev=psdir ;;
1127 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1128 psdir=$ac_optarg ;;
1129
Guido van Rossum7f43da71994-08-01 12:15:30 +00001130 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1131 | -silent | --silent | --silen | --sile | --sil)
1132 silent=yes ;;
1133
Benjamin Peterson42e10292016-07-07 00:02:31 -07001134 -runstatedir | --runstatedir | --runstatedi | --runstated \
1135 | --runstate | --runstat | --runsta | --runst | --runs \
1136 | --run | --ru | --r)
1137 ac_prev=runstatedir ;;
1138 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1139 | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1140 | --run=* | --ru=* | --r=*)
1141 runstatedir=$ac_optarg ;;
1142
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001143 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1144 ac_prev=sbindir ;;
1145 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1146 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001147 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001148
1149 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1150 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1151 | --sharedst | --shareds | --shared | --share | --shar \
1152 | --sha | --sh)
1153 ac_prev=sharedstatedir ;;
1154 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1155 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1156 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1157 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001158 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001159
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001160 -site | --site | --sit)
1161 ac_prev=site ;;
1162 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001163 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001164
Guido van Rossum7f43da71994-08-01 12:15:30 +00001165 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1166 ac_prev=srcdir ;;
1167 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001168 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001169
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001170 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1171 | --syscon | --sysco | --sysc | --sys | --sy)
1172 ac_prev=sysconfdir ;;
1173 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1174 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001175 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001176
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 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001179 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001180 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001181
1182 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1183 verbose=yes ;;
1184
Martin v. Löwis11437992002-04-12 09:54:03 +00001185 -version | --version | --versio | --versi | --vers | -V)
1186 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001187
1188 -with-* | --with-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001189 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001190 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001191 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001192 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001193 ac_useropt_orig=$ac_useropt
1194 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1195 case $ac_user_opts in
1196 *"
1197"with_$ac_useropt"
1198"*) ;;
1199 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1200 ac_unrecognized_sep=', ';;
1201 esac
1202 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001203
1204 -without-* | --without-*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001205 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001206 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001207 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001208 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001209 ac_useropt_orig=$ac_useropt
1210 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1211 case $ac_user_opts in
1212 *"
1213"with_$ac_useropt"
1214"*) ;;
1215 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1216 ac_unrecognized_sep=', ';;
1217 esac
1218 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001219
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001220 --x)
1221 # Obsolete; use --with-x.
1222 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001223
1224 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1225 | --x-incl | --x-inc | --x-in | --x-i)
1226 ac_prev=x_includes ;;
1227 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1228 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001229 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001230
1231 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1232 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1233 ac_prev=x_libraries ;;
1234 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1235 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001236 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001237
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001238 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1239Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001240 ;;
1241
Martin v. Löwis11437992002-04-12 09:54:03 +00001242 *=*)
1243 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1244 # Reject names that are not valid shell variable names.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001245 case $ac_envvar in #(
1246 '' | [0-9]* | *[!_$as_cr_alnum]* )
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001247 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001248 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001249 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001250 export $ac_envvar ;;
1251
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001252 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001253 # FIXME: should be removed in autoconf 3.0.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001254 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001255 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001256 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Matthias Klose3cef2a92012-03-14 23:39:33 +01001257 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001258 ;;
1259
1260 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001261done
1262
Guido van Rossum7f43da71994-08-01 12:15:30 +00001263if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001264 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001265 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001266fi
1267
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001268if test -n "$ac_unrecognized_opts"; then
1269 case $enable_option_checking in
1270 no) ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001271 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001272 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1273 esac
1274fi
1275
1276# Check all directory arguments for consistency.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001277for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1278 datadir sysconfdir sharedstatedir localstatedir includedir \
1279 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
Benjamin Peterson42e10292016-07-07 00:02:31 -07001280 libdir localedir mandir runstatedir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001281do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001282 eval ac_val=\$$ac_var
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001283 # Remove trailing slashes.
1284 case $ac_val in
1285 */ )
1286 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1287 eval $ac_var=\$ac_val;;
1288 esac
1289 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001290 case $ac_val in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001291 [\\/$]* | ?:[\\/]* ) continue;;
1292 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001293 esac
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001294 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001295done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001296
Martin v. Löwis11437992002-04-12 09:54:03 +00001297# There might be people who depend on the old broken behavior: `$host'
1298# used to hold the argument of --host etc.
1299# FIXME: To remove some day.
1300build=$build_alias
1301host=$host_alias
1302target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001303
Martin v. Löwis11437992002-04-12 09:54:03 +00001304# FIXME: To remove some day.
1305if test "x$host_alias" != x; then
1306 if test "x$build_alias" = x; then
1307 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001308 elif test "x$build_alias" != "x$host_alias"; then
1309 cross_compiling=yes
1310 fi
1311fi
1312
1313ac_tool_prefix=
1314test -n "$host_alias" && ac_tool_prefix=$host_alias-
1315
1316test "$silent" = yes && exec 6>/dev/null
1317
Guido van Rossum627b2d71993-12-24 10:39:16 +00001318
Martin v. Löwiseba40652007-08-30 20:10:57 +00001319ac_pwd=`pwd` && test -n "$ac_pwd" &&
1320ac_ls_di=`ls -di .` &&
1321ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001322 as_fn_error $? "working directory cannot be determined"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001323test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001324 as_fn_error $? "pwd does not report name of working directory"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001325
1326
Guido van Rossum627b2d71993-12-24 10:39:16 +00001327# Find the source files, if location was not specified.
1328if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001329 ac_srcdir_defaulted=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +00001330 # Try the directory containing this script, then the parent directory.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001331 ac_confdir=`$as_dirname -- "$as_myself" ||
1332$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1333 X"$as_myself" : 'X\(//\)[^/]' \| \
1334 X"$as_myself" : 'X\(//\)$' \| \
1335 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1336$as_echo X"$as_myself" |
Martin v. Löwiseba40652007-08-30 20:10:57 +00001337 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1338 s//\1/
1339 q
1340 }
1341 /^X\(\/\/\)[^/].*/{
1342 s//\1/
1343 q
1344 }
1345 /^X\(\/\/\)$/{
1346 s//\1/
1347 q
1348 }
1349 /^X\(\/\).*/{
1350 s//\1/
1351 q
1352 }
1353 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001354 srcdir=$ac_confdir
Martin v. Löwiseba40652007-08-30 20:10:57 +00001355 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001356 srcdir=..
1357 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001358else
1359 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001360fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001361if test ! -r "$srcdir/$ac_unique_file"; then
1362 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001363 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Brett Cannon19fab762007-06-02 03:02:29 +00001364fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001365ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1366ac_abs_confdir=`(
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001367 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001368 pwd)`
1369# When building in place, set srcdir=.
1370if test "$ac_abs_confdir" = "$ac_pwd"; then
1371 srcdir=.
1372fi
1373# Remove unnecessary trailing slashes from srcdir.
1374# Double slashes in file names in object file debugging info
1375# mess up M-x gdb in Emacs.
1376case $srcdir in
1377*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1378esac
1379for ac_var in $ac_precious_vars; do
1380 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1381 eval ac_env_${ac_var}_value=\$${ac_var}
1382 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1383 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1384done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001385
Martin v. Löwis11437992002-04-12 09:54:03 +00001386#
1387# Report the --help message.
1388#
1389if test "$ac_init_help" = "long"; then
1390 # Omit some internal or obsolete options to make the list less imposing.
1391 # This message is too long to be a string in the A/UX 3.1 sh.
1392 cat <<_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001393\`configure' configures python 2.7 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001394
1395Usage: $0 [OPTION]... [VAR=VALUE]...
1396
1397To assign environment variables (e.g., CC, CFLAGS...), specify them as
1398VAR=VALUE. See below for descriptions of some of the useful variables.
1399
1400Defaults for the options are specified in brackets.
1401
1402Configuration:
1403 -h, --help display this help and exit
1404 --help=short display options specific to this package
1405 --help=recursive display the short help of all the included packages
1406 -V, --version display version information and exit
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001407 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001408 --cache-file=FILE cache test results in FILE [disabled]
1409 -C, --config-cache alias for \`--cache-file=config.cache'
1410 -n, --no-create do not create output files
1411 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1412
Martin v. Löwis11437992002-04-12 09:54:03 +00001413Installation directories:
1414 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001415 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001416 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001417 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001418
1419By default, \`make install' will install all the files in
1420\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1421an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1422for instance \`--prefix=\$HOME'.
1423
1424For better control, use the options below.
1425
1426Fine tuning of the installation directories:
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001427 --bindir=DIR user executables [EPREFIX/bin]
1428 --sbindir=DIR system admin executables [EPREFIX/sbin]
1429 --libexecdir=DIR program executables [EPREFIX/libexec]
1430 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1431 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1432 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
Benjamin Peterson42e10292016-07-07 00:02:31 -07001433 --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001434 --libdir=DIR object code libraries [EPREFIX/lib]
1435 --includedir=DIR C header files [PREFIX/include]
1436 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1437 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1438 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1439 --infodir=DIR info documentation [DATAROOTDIR/info]
1440 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1441 --mandir=DIR man documentation [DATAROOTDIR/man]
1442 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1443 --htmldir=DIR html documentation [DOCDIR]
1444 --dvidir=DIR dvi documentation [DOCDIR]
1445 --pdfdir=DIR pdf documentation [DOCDIR]
1446 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001447_ACEOF
1448
1449 cat <<\_ACEOF
doko@python.orgd65e2ba2013-01-31 23:52:03 +01001450
1451System types:
1452 --build=BUILD configure for building on BUILD [guessed]
1453 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001454_ACEOF
1455fi
1456
1457if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001458 case $ac_init_help in
Martin v. Löwis174440b2008-10-03 08:59:41 +00001459 short | recursive ) echo "Configuration of python 2.7:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001460 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001461 cat <<\_ACEOF
1462
1463Optional Features:
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001464 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001465 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1466 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Brett Cannon91a1dec2008-02-13 19:15:44 +00001467 --enable-universalsdk[=SDKDIR]
Brett Cannon9a8bb0e2008-02-03 02:07:55 +00001468 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001469 --enable-framework[=INSTALLDIR]
1470 Build (MacOSX|Darwin) framework
1471 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001472 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001473 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
1474 --enable-ipv6 Enable ipv6 (with ipv4) support
1475 --disable-ipv6 Disable ipv6 support
Mark Dickinsonefc82f72009-03-20 15:51:55 +00001476 --enable-big-digits[=BITS]
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001477 use big digits for Python longs [[BITS=30]]
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001478 --enable-unicode[=ucs[24]]
Benjamin Peterson66556b02010-05-25 02:23:32 +00001479 Enable Unicode strings (default is ucs2)
Martin v. Löwis11437992002-04-12 09:54:03 +00001480
1481Optional Packages:
1482 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1483 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001484 --with-universal-archs=ARCH
1485 select architectures for universal build ("32-bit",
Ronald Oussoren23d92532009-09-07 06:12:00 +00001486 "64-bit", "3-way", "intel" or "all")
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00001487 --with-framework-name=FRAMEWORK
1488 specify an alternate name of the framework built
1489 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001490 --without-gcc never use gcc
Zachary Ware6ed42ea2015-12-21 11:43:03 -06001491 --with-icc build with icc
Martin v. Löwis0f48d982006-04-14 14:34:26 +00001492 --with-cxx-main=<compiler>
1493 compile main() and link python executable with C++
1494 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001495 --with-suffix=.exe set executable suffix
1496 --with-pydebug build with Py_DEBUG defined
Gregory P. Smith6d8fdfc2016-09-07 23:28:23 -07001497 --with-optimizations Enable all optimizations when available (LTO, PGO,
1498 etc). Disabled by default.
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)c543a0f2016-06-02 23:44:40 +00001499 --with-lto Enable Link Time Optimization in PGO builds.
1500 Disabled by default.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001501 --with-libs='lib1 ...' link against additional libs
Benjamin Peterson2c196742009-12-31 03:17:18 +00001502 --with-system-expat build pyexpat module using an installed expat
1503 library
Martin v. Löwis9176fc12006-04-11 11:12:43 +00001504 --with-system-ffi build _ctypes module using an installed ffi library
Ned Deilya2a9f572013-10-25 00:30:10 -07001505 --with-tcltk-includes='-I...'
1506 override search for Tcl and Tk include files
1507 --with-tcltk-libs='-L...'
1508 override search for Tcl and Tk libs
Benjamin Peterson867475c2009-04-29 20:36:25 +00001509 --with-dbmliborder=db1:db2:...
1510 order to check db backends for dbm. Valid value is a
1511 colon separated string with the backend names
1512 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001513 --with-signal-module disable/enable signal module
1514 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1515 --with(out)-threads[=DIRECTORY]
1516 disable/enable thread support
1517 --with(out)-thread[=DIRECTORY]
1518 deprecated; use --with(out)-threads
1519 --with-pth use GNU pth threading libraries
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001520 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001521 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001522 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson91c12eb2009-12-03 02:52:39 +00001523 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001524 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001525 --with-fpectl enable SIGFPE catching
1526 --with-libm=STRING math library
1527 --with-libc=STRING C library
Benjamin Peterson2c992a02015-05-28 12:45:31 -05001528 --with(out)-computed-gotos
1529 Use computed gotos in evaluation loop (enabled by
1530 default on supported compilers)
Ned Deily3f1d0b32014-11-20 02:11:03 -08001531 --with(out)-ensurepip=[=OPTION]
1532 "install" or "upgrade" using bundled pip, default is
1533 "no"
Martin v. Löwis11437992002-04-12 09:54:03 +00001534
1535Some influential environment variables:
1536 CC C compiler command
1537 CFLAGS C compiler flags
1538 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1539 nonstandard directory <lib dir>
Martin v. Löwiseba40652007-08-30 20:10:57 +00001540 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001541 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Martin v. Löwiseba40652007-08-30 20:10:57 +00001542 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001543 CPP C preprocessor
Benjamin Peterson64e8f6e2014-12-15 00:00:23 -05001544 PKG_CONFIG path to pkg-config utility
1545 PKG_CONFIG_PATH
1546 directories to add to pkg-config's search path
1547 PKG_CONFIG_LIBDIR
1548 path overriding pkg-config's built-in search path
Martin v. Löwis11437992002-04-12 09:54:03 +00001549
1550Use these variables to override the choices made by `configure' or to help
1551it to find libraries and programs with nonstandard names/locations.
1552
Benjamin Petersoncc8929b2016-08-03 22:01:32 -07001553Report bugs to <https://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001554_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001555ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001556fi
1557
1558if test "$ac_init_help" = "recursive"; then
1559 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001560 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001561 test -d "$ac_dir" ||
1562 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1563 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001564 ac_builddir=.
1565
Martin v. Löwiseba40652007-08-30 20:10:57 +00001566case "$ac_dir" in
1567.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1568*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001569 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001570 # A ".." for each directory in $ac_dir_suffix.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001571 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001572 case $ac_top_builddir_sub in
1573 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1574 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1575 esac ;;
1576esac
1577ac_abs_top_builddir=$ac_pwd
1578ac_abs_builddir=$ac_pwd$ac_dir_suffix
1579# for backward compatibility:
1580ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001581
1582case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001583 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001584 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001585 ac_top_srcdir=$ac_top_builddir_sub
1586 ac_abs_top_srcdir=$ac_pwd ;;
1587 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001588 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001589 ac_top_srcdir=$srcdir
1590 ac_abs_top_srcdir=$srcdir ;;
1591 *) # Relative name.
1592 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1593 ac_top_srcdir=$ac_top_build_prefix$srcdir
1594 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001595esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001596ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001597
Martin v. Löwiseba40652007-08-30 20:10:57 +00001598 cd "$ac_dir" || { ac_status=$?; continue; }
1599 # Check for guested configure.
1600 if test -f "$ac_srcdir/configure.gnu"; then
1601 echo &&
1602 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1603 elif test -f "$ac_srcdir/configure"; then
1604 echo &&
1605 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001606 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001607 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001608 fi || ac_status=$?
1609 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001610 done
1611fi
1612
Martin v. Löwiseba40652007-08-30 20:10:57 +00001613test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001614if $ac_init_version; then
1615 cat <<\_ACEOF
Martin v. Löwis174440b2008-10-03 08:59:41 +00001616python configure 2.7
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001617generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001618
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001619Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001620This configure script is free software; the Free Software Foundation
1621gives unlimited permission to copy, distribute and modify it.
1622_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001623 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001624fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001625
1626## ------------------------ ##
1627## Autoconf initialization. ##
1628## ------------------------ ##
1629
1630# ac_fn_c_try_compile LINENO
1631# --------------------------
1632# Try to compile conftest.$ac_ext, and return whether this succeeded.
1633ac_fn_c_try_compile ()
1634{
1635 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1636 rm -f conftest.$ac_objext
1637 if { { ac_try="$ac_compile"
1638case "(($ac_try" in
1639 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1640 *) ac_try_echo=$ac_try;;
1641esac
1642eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1643$as_echo "$ac_try_echo"; } >&5
1644 (eval "$ac_compile") 2>conftest.err
1645 ac_status=$?
1646 if test -s conftest.err; then
1647 grep -v '^ *+' conftest.err >conftest.er1
1648 cat conftest.er1 >&5
1649 mv -f conftest.er1 conftest.err
1650 fi
1651 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1652 test $ac_status = 0; } && {
1653 test -z "$ac_c_werror_flag" ||
1654 test ! -s conftest.err
1655 } && test -s conftest.$ac_objext; then :
1656 ac_retval=0
1657else
1658 $as_echo "$as_me: failed program was:" >&5
1659sed 's/^/| /' conftest.$ac_ext >&5
1660
1661 ac_retval=1
1662fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01001663 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001664 as_fn_set_status $ac_retval
1665
1666} # ac_fn_c_try_compile
1667
1668# ac_fn_c_try_cpp LINENO
1669# ----------------------
1670# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1671ac_fn_c_try_cpp ()
1672{
1673 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1674 if { { ac_try="$ac_cpp conftest.$ac_ext"
1675case "(($ac_try" in
1676 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1677 *) ac_try_echo=$ac_try;;
1678esac
1679eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1680$as_echo "$ac_try_echo"; } >&5
1681 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1682 ac_status=$?
1683 if test -s conftest.err; then
1684 grep -v '^ *+' conftest.err >conftest.er1
1685 cat conftest.er1 >&5
1686 mv -f conftest.er1 conftest.err
1687 fi
1688 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001689 test $ac_status = 0; } > conftest.i && {
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001690 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1691 test ! -s conftest.err
1692 }; then :
1693 ac_retval=0
1694else
1695 $as_echo "$as_me: failed program was:" >&5
1696sed 's/^/| /' conftest.$ac_ext >&5
1697
1698 ac_retval=1
1699fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01001700 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001701 as_fn_set_status $ac_retval
1702
1703} # ac_fn_c_try_cpp
1704
1705# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1706# -------------------------------------------------------
1707# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1708# the include files in INCLUDES and setting the cache variable VAR
1709# accordingly.
1710ac_fn_c_check_header_mongrel ()
1711{
1712 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Matthias Klose3cef2a92012-03-14 23:39:33 +01001713 if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001714 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1715$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001716if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001717 $as_echo_n "(cached) " >&6
1718fi
1719eval ac_res=\$$3
1720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1721$as_echo "$ac_res" >&6; }
1722else
1723 # Is the header compilable?
1724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1725$as_echo_n "checking $2 usability... " >&6; }
1726cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1727/* end confdefs.h. */
1728$4
1729#include <$2>
1730_ACEOF
1731if ac_fn_c_try_compile "$LINENO"; then :
1732 ac_header_compiler=yes
1733else
1734 ac_header_compiler=no
1735fi
1736rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1737{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1738$as_echo "$ac_header_compiler" >&6; }
1739
1740# Is the header present?
1741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1742$as_echo_n "checking $2 presence... " >&6; }
1743cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1744/* end confdefs.h. */
1745#include <$2>
1746_ACEOF
1747if ac_fn_c_try_cpp "$LINENO"; then :
1748 ac_header_preproc=yes
1749else
1750 ac_header_preproc=no
1751fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00001752rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001753{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1754$as_echo "$ac_header_preproc" >&6; }
1755
1756# So? What about this header?
1757case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1758 yes:no: )
1759 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1760$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1761 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1762$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1763 ;;
1764 no:yes:* )
1765 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1766$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1767 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1768$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1769 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1770$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1771 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1772$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1773 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1774$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Benjamin Petersoncc8929b2016-08-03 22:01:32 -07001775( $as_echo "## --------------------------------------- ##
1776## Report this to https://bugs.python.org/ ##
1777## --------------------------------------- ##"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001778 ) | sed "s/^/$as_me: WARNING: /" >&2
1779 ;;
1780esac
1781 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1782$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001783if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001784 $as_echo_n "(cached) " >&6
1785else
1786 eval "$3=\$ac_header_compiler"
1787fi
1788eval ac_res=\$$3
1789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1790$as_echo "$ac_res" >&6; }
1791fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01001792 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001793
1794} # ac_fn_c_check_header_mongrel
1795
1796# ac_fn_c_try_run LINENO
1797# ----------------------
1798# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1799# that executables *can* be run.
1800ac_fn_c_try_run ()
1801{
1802 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1803 if { { ac_try="$ac_link"
1804case "(($ac_try" in
1805 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1806 *) ac_try_echo=$ac_try;;
1807esac
1808eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1809$as_echo "$ac_try_echo"; } >&5
1810 (eval "$ac_link") 2>&5
1811 ac_status=$?
1812 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1813 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1814 { { case "(($ac_try" in
1815 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1816 *) ac_try_echo=$ac_try;;
1817esac
1818eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1819$as_echo "$ac_try_echo"; } >&5
1820 (eval "$ac_try") 2>&5
1821 ac_status=$?
1822 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1823 test $ac_status = 0; }; }; then :
1824 ac_retval=0
1825else
1826 $as_echo "$as_me: program exited with status $ac_status" >&5
1827 $as_echo "$as_me: failed program was:" >&5
1828sed 's/^/| /' conftest.$ac_ext >&5
1829
1830 ac_retval=$ac_status
1831fi
1832 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Matthias Klose3cef2a92012-03-14 23:39:33 +01001833 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001834 as_fn_set_status $ac_retval
1835
1836} # ac_fn_c_try_run
1837
1838# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1839# -------------------------------------------------------
1840# Tests whether HEADER exists and can be compiled using the include files in
1841# INCLUDES, setting the cache variable VAR accordingly.
1842ac_fn_c_check_header_compile ()
1843{
1844 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1845 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1846$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001847if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001848 $as_echo_n "(cached) " >&6
1849else
1850 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1851/* end confdefs.h. */
1852$4
1853#include <$2>
1854_ACEOF
1855if ac_fn_c_try_compile "$LINENO"; then :
1856 eval "$3=yes"
1857else
1858 eval "$3=no"
1859fi
1860rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1861fi
1862eval ac_res=\$$3
1863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1864$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001865 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001866
1867} # ac_fn_c_check_header_compile
1868
1869# ac_fn_c_try_link LINENO
1870# -----------------------
1871# Try to link conftest.$ac_ext, and return whether this succeeded.
1872ac_fn_c_try_link ()
1873{
1874 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1875 rm -f conftest.$ac_objext conftest$ac_exeext
1876 if { { ac_try="$ac_link"
1877case "(($ac_try" in
1878 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1879 *) ac_try_echo=$ac_try;;
1880esac
1881eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1882$as_echo "$ac_try_echo"; } >&5
1883 (eval "$ac_link") 2>conftest.err
1884 ac_status=$?
1885 if test -s conftest.err; then
1886 grep -v '^ *+' conftest.err >conftest.er1
1887 cat conftest.er1 >&5
1888 mv -f conftest.er1 conftest.err
1889 fi
1890 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1891 test $ac_status = 0; } && {
1892 test -z "$ac_c_werror_flag" ||
1893 test ! -s conftest.err
1894 } && test -s conftest$ac_exeext && {
1895 test "$cross_compiling" = yes ||
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001896 test -x conftest$ac_exeext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001897 }; then :
1898 ac_retval=0
1899else
1900 $as_echo "$as_me: failed program was:" >&5
1901sed 's/^/| /' conftest.$ac_ext >&5
1902
1903 ac_retval=1
1904fi
1905 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1906 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1907 # interfere with the next link command; also delete a directory that is
1908 # left behind by Apple's compiler. We do this before executing the actions.
1909 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Matthias Klose3cef2a92012-03-14 23:39:33 +01001910 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001911 as_fn_set_status $ac_retval
1912
1913} # ac_fn_c_try_link
1914
1915# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1916# -------------------------------------------
1917# Tests whether TYPE exists after having included INCLUDES, setting cache
1918# variable VAR accordingly.
1919ac_fn_c_check_type ()
1920{
1921 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1922 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1923$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001924if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001925 $as_echo_n "(cached) " >&6
1926else
1927 eval "$3=no"
1928 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1929/* end confdefs.h. */
1930$4
1931int
1932main ()
1933{
1934if (sizeof ($2))
1935 return 0;
1936 ;
1937 return 0;
1938}
1939_ACEOF
1940if ac_fn_c_try_compile "$LINENO"; then :
1941 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1942/* end confdefs.h. */
1943$4
1944int
1945main ()
1946{
1947if (sizeof (($2)))
1948 return 0;
1949 ;
1950 return 0;
1951}
1952_ACEOF
1953if ac_fn_c_try_compile "$LINENO"; then :
1954
1955else
1956 eval "$3=yes"
1957fi
1958rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1959fi
1960rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1961fi
1962eval ac_res=\$$3
1963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1964$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001965 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001966
1967} # ac_fn_c_check_type
1968
1969# ac_fn_c_find_uintX_t LINENO BITS VAR
1970# ------------------------------------
1971# Finds an unsigned integer type with width BITS, setting cache variable VAR
1972# accordingly.
1973ac_fn_c_find_uintX_t ()
1974{
1975 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1976 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1977$as_echo_n "checking for uint$2_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01001978if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001979 $as_echo_n "(cached) " >&6
1980else
1981 eval "$3=no"
1982 # Order is important - never check a type that is potentially smaller
1983 # than half of the expected target width.
1984 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1985 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1986 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1987/* end confdefs.h. */
1988$ac_includes_default
1989int
1990main ()
1991{
1992static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01001993test_array [0] = 0;
1994return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00001995
1996 ;
1997 return 0;
1998}
1999_ACEOF
2000if ac_fn_c_try_compile "$LINENO"; then :
2001 case $ac_type in #(
2002 uint$2_t) :
2003 eval "$3=yes" ;; #(
2004 *) :
2005 eval "$3=\$ac_type" ;;
2006esac
2007fi
2008rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002009 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002010
2011else
2012 break
2013fi
2014 done
2015fi
2016eval ac_res=\$$3
2017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2018$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002019 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002020
2021} # ac_fn_c_find_uintX_t
2022
2023# ac_fn_c_find_intX_t LINENO BITS VAR
2024# -----------------------------------
2025# Finds a signed integer type with width BITS, setting cache variable VAR
2026# accordingly.
2027ac_fn_c_find_intX_t ()
2028{
2029 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2030 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
2031$as_echo_n "checking for int$2_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002032if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002033 $as_echo_n "(cached) " >&6
2034else
2035 eval "$3=no"
2036 # Order is important - never check a type that is potentially smaller
2037 # than half of the expected target width.
2038 for ac_type in int$2_t 'int' 'long int' \
2039 'long long int' 'short int' 'signed char'; do
2040 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2041/* end confdefs.h. */
2042$ac_includes_default
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002043 enum { N = $2 / 2 - 1 };
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002044int
2045main ()
2046{
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002047static 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 +01002048test_array [0] = 0;
2049return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002050
2051 ;
2052 return 0;
2053}
2054_ACEOF
2055if ac_fn_c_try_compile "$LINENO"; then :
2056 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2057/* end confdefs.h. */
2058$ac_includes_default
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002059 enum { N = $2 / 2 - 1 };
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002060int
2061main ()
2062{
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002063static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002064 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002065test_array [0] = 0;
2066return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002067
2068 ;
2069 return 0;
2070}
2071_ACEOF
2072if ac_fn_c_try_compile "$LINENO"; then :
2073
2074else
2075 case $ac_type in #(
2076 int$2_t) :
2077 eval "$3=yes" ;; #(
2078 *) :
2079 eval "$3=\$ac_type" ;;
2080esac
2081fi
2082rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2083fi
2084rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002085 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002086
2087else
2088 break
2089fi
2090 done
2091fi
2092eval ac_res=\$$3
2093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2094$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002095 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002096
2097} # ac_fn_c_find_intX_t
2098
2099# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2100# --------------------------------------------
2101# Tries to find the compile-time value of EXPR in a program that includes
2102# INCLUDES, setting VAR accordingly. Returns whether the value could be
2103# computed
2104ac_fn_c_compute_int ()
2105{
2106 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2107 if test "$cross_compiling" = yes; then
2108 # Depending upon the size, compute the lo and hi bounds.
2109cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2110/* end confdefs.h. */
2111$4
2112int
2113main ()
2114{
2115static int test_array [1 - 2 * !(($2) >= 0)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002116test_array [0] = 0;
2117return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002118
2119 ;
2120 return 0;
2121}
2122_ACEOF
2123if ac_fn_c_try_compile "$LINENO"; then :
2124 ac_lo=0 ac_mid=0
2125 while :; do
2126 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2127/* end confdefs.h. */
2128$4
2129int
2130main ()
2131{
2132static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002133test_array [0] = 0;
2134return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002135
2136 ;
2137 return 0;
2138}
2139_ACEOF
2140if ac_fn_c_try_compile "$LINENO"; then :
2141 ac_hi=$ac_mid; break
2142else
2143 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2144 if test $ac_lo -le $ac_mid; then
2145 ac_lo= ac_hi=
2146 break
2147 fi
2148 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2149fi
2150rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2151 done
2152else
2153 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2154/* end confdefs.h. */
2155$4
2156int
2157main ()
2158{
2159static int test_array [1 - 2 * !(($2) < 0)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002160test_array [0] = 0;
2161return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002162
2163 ;
2164 return 0;
2165}
2166_ACEOF
2167if ac_fn_c_try_compile "$LINENO"; then :
2168 ac_hi=-1 ac_mid=-1
2169 while :; do
2170 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2171/* end confdefs.h. */
2172$4
2173int
2174main ()
2175{
2176static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002177test_array [0] = 0;
2178return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002179
2180 ;
2181 return 0;
2182}
2183_ACEOF
2184if ac_fn_c_try_compile "$LINENO"; then :
2185 ac_lo=$ac_mid; break
2186else
2187 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2188 if test $ac_mid -le $ac_hi; then
2189 ac_lo= ac_hi=
2190 break
2191 fi
2192 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2193fi
2194rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2195 done
2196else
2197 ac_lo= ac_hi=
2198fi
2199rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2200fi
2201rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2202# Binary search between lo and hi bounds.
2203while test "x$ac_lo" != "x$ac_hi"; do
2204 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2205 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2206/* end confdefs.h. */
2207$4
2208int
2209main ()
2210{
2211static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002212test_array [0] = 0;
2213return test_array [0];
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002214
2215 ;
2216 return 0;
2217}
2218_ACEOF
2219if ac_fn_c_try_compile "$LINENO"; then :
2220 ac_hi=$ac_mid
2221else
2222 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2223fi
2224rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2225done
2226case $ac_lo in #((
2227?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2228'') ac_retval=1 ;;
2229esac
2230 else
2231 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2232/* end confdefs.h. */
2233$4
2234static long int longval () { return $2; }
2235static unsigned long int ulongval () { return $2; }
2236#include <stdio.h>
2237#include <stdlib.h>
2238int
2239main ()
2240{
2241
2242 FILE *f = fopen ("conftest.val", "w");
2243 if (! f)
2244 return 1;
2245 if (($2) < 0)
2246 {
2247 long int i = longval ();
2248 if (i != ($2))
2249 return 1;
2250 fprintf (f, "%ld", i);
2251 }
2252 else
2253 {
2254 unsigned long int i = ulongval ();
2255 if (i != ($2))
2256 return 1;
2257 fprintf (f, "%lu", i);
2258 }
2259 /* Do not output a trailing newline, as this causes \r\n confusion
2260 on some platforms. */
2261 return ferror (f) || fclose (f) != 0;
2262
2263 ;
2264 return 0;
2265}
2266_ACEOF
2267if ac_fn_c_try_run "$LINENO"; then :
2268 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2269else
2270 ac_retval=1
2271fi
2272rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2273 conftest.$ac_objext conftest.beam conftest.$ac_ext
2274rm -f conftest.val
2275
2276 fi
Matthias Klose3cef2a92012-03-14 23:39:33 +01002277 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002278 as_fn_set_status $ac_retval
2279
2280} # ac_fn_c_compute_int
2281
2282# ac_fn_c_check_func LINENO FUNC VAR
2283# ----------------------------------
2284# Tests whether FUNC exists, setting the cache variable VAR accordingly
2285ac_fn_c_check_func ()
2286{
2287 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2288 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2289$as_echo_n "checking for $2... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002290if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002291 $as_echo_n "(cached) " >&6
2292else
2293 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2294/* end confdefs.h. */
2295/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2296 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2297#define $2 innocuous_$2
2298
2299/* System header to define __stub macros and hopefully few prototypes,
2300 which can conflict with char $2 (); below.
2301 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2302 <limits.h> exists even on freestanding compilers. */
2303
2304#ifdef __STDC__
2305# include <limits.h>
2306#else
2307# include <assert.h>
2308#endif
2309
2310#undef $2
2311
2312/* Override any GCC internal prototype to avoid an error.
2313 Use char because int might match the return type of a GCC
2314 builtin and then its argument prototype would still apply. */
2315#ifdef __cplusplus
2316extern "C"
2317#endif
2318char $2 ();
2319/* The GNU C library defines this for functions which it implements
2320 to always fail with ENOSYS. Some functions are actually named
2321 something starting with __ and the normal name is an alias. */
2322#if defined __stub_$2 || defined __stub___$2
2323choke me
2324#endif
2325
2326int
2327main ()
2328{
2329return $2 ();
2330 ;
2331 return 0;
2332}
2333_ACEOF
2334if ac_fn_c_try_link "$LINENO"; then :
2335 eval "$3=yes"
2336else
2337 eval "$3=no"
2338fi
2339rm -f core conftest.err conftest.$ac_objext \
2340 conftest$ac_exeext conftest.$ac_ext
2341fi
2342eval ac_res=\$$3
2343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2344$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002345 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002346
2347} # ac_fn_c_check_func
2348
2349# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2350# ----------------------------------------------------
2351# Tries to find if the field MEMBER exists in type AGGR, after including
2352# INCLUDES, setting cache variable VAR accordingly.
2353ac_fn_c_check_member ()
2354{
2355 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2356 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2357$as_echo_n "checking for $2.$3... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002358if eval \${$4+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002359 $as_echo_n "(cached) " >&6
2360else
2361 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2362/* end confdefs.h. */
2363$5
2364int
2365main ()
2366{
2367static $2 ac_aggr;
2368if (ac_aggr.$3)
2369return 0;
2370 ;
2371 return 0;
2372}
2373_ACEOF
2374if ac_fn_c_try_compile "$LINENO"; then :
2375 eval "$4=yes"
2376else
2377 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2378/* end confdefs.h. */
2379$5
2380int
2381main ()
2382{
2383static $2 ac_aggr;
2384if (sizeof ac_aggr.$3)
2385return 0;
2386 ;
2387 return 0;
2388}
2389_ACEOF
2390if ac_fn_c_try_compile "$LINENO"; then :
2391 eval "$4=yes"
2392else
2393 eval "$4=no"
2394fi
2395rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2396fi
2397rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2398fi
2399eval ac_res=\$$4
2400 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2401$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002402 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002403
2404} # ac_fn_c_check_member
2405
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002406# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2407# ---------------------------------------------
2408# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2409# accordingly.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002410ac_fn_c_check_decl ()
2411{
2412 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002413 as_decl_name=`echo $2|sed 's/ *(.*//'`
2414 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2415 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2416$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002417if eval \${$3+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002418 $as_echo_n "(cached) " >&6
2419else
2420 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2421/* end confdefs.h. */
2422$4
2423int
2424main ()
2425{
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002426#ifndef $as_decl_name
2427#ifdef __cplusplus
2428 (void) $as_decl_use;
2429#else
2430 (void) $as_decl_name;
2431#endif
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002432#endif
2433
2434 ;
2435 return 0;
2436}
2437_ACEOF
2438if ac_fn_c_try_compile "$LINENO"; then :
2439 eval "$3=yes"
2440else
2441 eval "$3=no"
2442fi
2443rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2444fi
2445eval ac_res=\$$3
2446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2447$as_echo "$ac_res" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01002448 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002449
2450} # ac_fn_c_check_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +00002451cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002452This file contains any messages produced by compilers while
2453running configure, to aid debugging if configure makes a mistake.
2454
Martin v. Löwis174440b2008-10-03 08:59:41 +00002455It was created by python $as_me 2.7, which was
Charles-François Natalibe2b9072013-01-08 19:47:00 +01002456generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002457
2458 $ $0 $@
2459
2460_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00002461exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002462{
2463cat <<_ASUNAME
2464## --------- ##
2465## Platform. ##
2466## --------- ##
2467
2468hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2469uname -m = `(uname -m) 2>/dev/null || echo unknown`
2470uname -r = `(uname -r) 2>/dev/null || echo unknown`
2471uname -s = `(uname -s) 2>/dev/null || echo unknown`
2472uname -v = `(uname -v) 2>/dev/null || echo unknown`
2473
2474/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2475/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2476
2477/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2478/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2479/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Martin v. Löwiseba40652007-08-30 20:10:57 +00002480/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002481/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2482/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2483/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2484
2485_ASUNAME
2486
2487as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2488for as_dir in $PATH
2489do
2490 IFS=$as_save_IFS
2491 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002492 $as_echo "PATH: $as_dir"
2493 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002494IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002495
2496} >&5
2497
2498cat >&5 <<_ACEOF
2499
2500
2501## ----------- ##
2502## Core tests. ##
2503## ----------- ##
2504
2505_ACEOF
2506
2507
2508# Keep a trace of the command line.
2509# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002510# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002511# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002512# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002513ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002514ac_configure_args0=
2515ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002516ac_must_keep_next=false
2517for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002518do
Skip Montanaro6dead952003-09-25 14:50:04 +00002519 for ac_arg
2520 do
2521 case $ac_arg in
2522 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2523 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2524 | -silent | --silent | --silen | --sile | --sil)
2525 continue ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002526 *\'*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002527 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002528 esac
2529 case $ac_pass in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002530 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002531 2)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002532 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002533 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002534 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002535 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002536 case $ac_arg in
2537 *=* | --config-cache | -C | -disable-* | --disable-* \
2538 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2539 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2540 | -with-* | --with-* | -without-* | --without-* | --x)
2541 case "$ac_configure_args0 " in
2542 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2543 esac
2544 ;;
2545 -* ) ac_must_keep_next=true ;;
2546 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002547 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002548 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002549 ;;
2550 esac
2551 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002552done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002553{ ac_configure_args0=; unset ac_configure_args0;}
2554{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002555
2556# When interrupted or exit'd, cleanup temporary files, and complete
2557# config.log. We remove comments because anyway the quotes in there
2558# would cause problems or look ugly.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002559# WARNING: Use '\'' to represent an apostrophe within the trap.
2560# 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 +00002561trap 'exit_status=$?
2562 # Save into config.log some information that might help in debugging.
2563 {
2564 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002565
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002566 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002567## Cache variables. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002568## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002569 echo
2570 # The following way of writing the cache mishandles newlines in values,
Martin v. Löwiseba40652007-08-30 20:10:57 +00002571(
2572 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2573 eval ac_val=\$$ac_var
2574 case $ac_val in #(
2575 *${as_nl}*)
2576 case $ac_var in #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002577 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2578$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002579 esac
2580 case $ac_var in #(
2581 _ | IFS | as_nl) ;; #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002582 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2583 *) { eval $ac_var=; unset $ac_var;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002584 esac ;;
2585 esac
2586 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002587 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +00002588 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2589 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002590 sed -n \
Martin v. Löwiseba40652007-08-30 20:10:57 +00002591 "s/'\''/'\''\\\\'\'''\''/g;
2592 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2593 ;; #(
Skip Montanaro89e975f2007-08-22 19:05:21 +00002594 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00002595 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaro89e975f2007-08-22 19:05:21 +00002596 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002597 esac |
2598 sort
2599)
Martin v. Löwis11437992002-04-12 09:54:03 +00002600 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002601
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002602 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002603## Output variables. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002604## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002605 echo
2606 for ac_var in $ac_subst_vars
2607 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002608 eval ac_val=\$$ac_var
2609 case $ac_val in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002610 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002611 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002612 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002613 done | sort
2614 echo
2615
2616 if test -n "$ac_subst_files"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002617 $as_echo "## ------------------- ##
Martin v. Löwiseba40652007-08-30 20:10:57 +00002618## File substitutions. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002619## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002620 echo
2621 for ac_var in $ac_subst_files
2622 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002623 eval ac_val=\$$ac_var
2624 case $ac_val in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002625 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002626 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002627 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002628 done | sort
2629 echo
2630 fi
2631
Martin v. Löwis11437992002-04-12 09:54:03 +00002632 if test -s confdefs.h; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002633 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002634## confdefs.h. ##
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002635## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002636 echo
Martin v. Löwiseba40652007-08-30 20:10:57 +00002637 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002638 echo
2639 fi
2640 test "$ac_signal" != 0 &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002641 $as_echo "$as_me: caught signal $ac_signal"
2642 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002643 } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002644 rm -f core *.core core.conftest.* &&
2645 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002646 exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +00002647' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002648for ac_signal in 1 2 13 15; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002649 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002650done
2651ac_signal=0
2652
2653# confdefs.h avoids OS command line length limits that DEFS can exceed.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002654rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002655
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002656$as_echo "/* confdefs.h */" > confdefs.h
2657
Martin v. Löwis11437992002-04-12 09:54:03 +00002658# Predefined preprocessor variables.
2659
2660cat >>confdefs.h <<_ACEOF
2661#define PACKAGE_NAME "$PACKAGE_NAME"
2662_ACEOF
2663
Martin v. Löwis11437992002-04-12 09:54:03 +00002664cat >>confdefs.h <<_ACEOF
2665#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2666_ACEOF
2667
Martin v. Löwis11437992002-04-12 09:54:03 +00002668cat >>confdefs.h <<_ACEOF
2669#define PACKAGE_VERSION "$PACKAGE_VERSION"
2670_ACEOF
2671
Martin v. Löwis11437992002-04-12 09:54:03 +00002672cat >>confdefs.h <<_ACEOF
2673#define PACKAGE_STRING "$PACKAGE_STRING"
2674_ACEOF
2675
Martin v. Löwis11437992002-04-12 09:54:03 +00002676cat >>confdefs.h <<_ACEOF
2677#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2678_ACEOF
2679
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002680cat >>confdefs.h <<_ACEOF
2681#define PACKAGE_URL "$PACKAGE_URL"
2682_ACEOF
2683
Martin v. Löwis11437992002-04-12 09:54:03 +00002684
2685# Let the site file select an alternate cache file if it wants to.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002686# Prefer an explicitly selected file to automatically selected ones.
2687ac_site_file1=NONE
2688ac_site_file2=NONE
Martin v. Löwiseba40652007-08-30 20:10:57 +00002689if test -n "$CONFIG_SITE"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002690 # We do not want a PATH search for config.site.
2691 case $CONFIG_SITE in #((
2692 -*) ac_site_file1=./$CONFIG_SITE;;
2693 */*) ac_site_file1=$CONFIG_SITE;;
2694 *) ac_site_file1=./$CONFIG_SITE;;
2695 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00002696elif test "x$prefix" != xNONE; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002697 ac_site_file1=$prefix/share/config.site
2698 ac_site_file2=$prefix/etc/config.site
Martin v. Löwiseba40652007-08-30 20:10:57 +00002699else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002700 ac_site_file1=$ac_default_prefix/share/config.site
2701 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002702fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002703for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Martin v. Löwiseba40652007-08-30 20:10:57 +00002704do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002705 test "x$ac_site_file" = xNONE && continue
2706 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2707 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2708$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002709 sed 's/^/| /' "$ac_site_file" >&5
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002710 . "$ac_site_file" \
2711 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2712$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2713as_fn_error $? "failed to load site script $ac_site_file
Matthias Klose3cef2a92012-03-14 23:39:33 +01002714See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002715 fi
2716done
2717
2718if test -r "$cache_file"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002719 # Some versions of bash will fail to source /dev/null (special files
2720 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2721 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2722 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2723$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002724 case $cache_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00002725 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2726 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002727 esac
2728 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002729else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002730 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2731$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002732 >$cache_file
2733fi
2734
2735# Check that the precious variables saved in the cache have kept the same
2736# value.
2737ac_cache_corrupted=false
Martin v. Löwiseba40652007-08-30 20:10:57 +00002738for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002739 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2740 eval ac_new_set=\$ac_env_${ac_var}_set
Martin v. Löwiseba40652007-08-30 20:10:57 +00002741 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2742 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002743 case $ac_old_set,$ac_new_set in
2744 set,)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002745 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2746$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 +00002747 ac_cache_corrupted=: ;;
2748 ,set)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002749 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2750$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002751 ac_cache_corrupted=: ;;
2752 ,);;
2753 *)
2754 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002755 # differences in whitespace do not lead to failure.
2756 ac_old_val_w=`echo x $ac_old_val`
2757 ac_new_val_w=`echo x $ac_new_val`
2758 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2759 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2760$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2761 ac_cache_corrupted=:
2762 else
2763 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2764$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2765 eval $ac_var=\$ac_old_val
2766 fi
2767 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2768$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2769 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2770$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002771 fi;;
2772 esac
2773 # Pass precious variables to config.status.
2774 if test "$ac_new_set" = set; then
2775 case $ac_new_val in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002776 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002777 *) ac_arg=$ac_var=$ac_new_val ;;
2778 esac
2779 case " $ac_configure_args " in
2780 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002781 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002782 esac
2783 fi
2784done
2785if $ac_cache_corrupted; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002786 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2787$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2788 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2789$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00002790 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002791fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002792## -------------------- ##
2793## Main body of script. ##
2794## -------------------- ##
Martin v. Löwiseba40652007-08-30 20:10:57 +00002795
Guido van Rossum7f43da71994-08-01 12:15:30 +00002796ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002797ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002798ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2799ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2800ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002801
Guido van Rossum627b2d71993-12-24 10:39:16 +00002802
Michael W. Hudson54241132001-12-07 15:38:26 +00002803
Martin v. Löwiseba40652007-08-30 20:10:57 +00002804ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002805
2806
doko@python.orgd65e2ba2013-01-31 23:52:03 +01002807ac_aux_dir=
2808for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2809 if test -f "$ac_dir/install-sh"; then
2810 ac_aux_dir=$ac_dir
2811 ac_install_sh="$ac_aux_dir/install-sh -c"
2812 break
2813 elif test -f "$ac_dir/install.sh"; then
2814 ac_aux_dir=$ac_dir
2815 ac_install_sh="$ac_aux_dir/install.sh -c"
2816 break
2817 elif test -f "$ac_dir/shtool"; then
2818 ac_aux_dir=$ac_dir
2819 ac_install_sh="$ac_aux_dir/shtool install -c"
2820 break
2821 fi
2822done
2823if test -z "$ac_aux_dir"; then
2824 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2825fi
2826
2827# These three variables are undocumented and unsupported,
2828# and are intended to be withdrawn in a future Autoconf release.
2829# They can cause serious problems if a builder's source tree is in a directory
2830# whose full name contains unusual characters.
2831ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2832ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2833ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2834
2835
2836# Make sure we can run config.sub.
2837$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2838 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2839
2840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2841$as_echo_n "checking build system type... " >&6; }
2842if ${ac_cv_build+:} false; then :
2843 $as_echo_n "(cached) " >&6
2844else
2845 ac_build_alias=$build_alias
2846test "x$ac_build_alias" = x &&
2847 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2848test "x$ac_build_alias" = x &&
2849 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2850ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2851 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2852
2853fi
2854{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2855$as_echo "$ac_cv_build" >&6; }
2856case $ac_cv_build in
2857*-*-*) ;;
2858*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2859esac
2860build=$ac_cv_build
2861ac_save_IFS=$IFS; IFS='-'
2862set x $ac_cv_build
2863shift
2864build_cpu=$1
2865build_vendor=$2
2866shift; shift
2867# Remember, the first character of IFS is used to create $*,
2868# except with old shells:
2869build_os=$*
2870IFS=$ac_save_IFS
2871case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2872
2873
2874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2875$as_echo_n "checking host system type... " >&6; }
2876if ${ac_cv_host+:} false; then :
2877 $as_echo_n "(cached) " >&6
2878else
2879 if test "x$host_alias" = x; then
2880 ac_cv_host=$ac_cv_build
2881else
2882 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2883 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2884fi
2885
2886fi
2887{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2888$as_echo "$ac_cv_host" >&6; }
2889case $ac_cv_host in
2890*-*-*) ;;
2891*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2892esac
2893host=$ac_cv_host
2894ac_save_IFS=$IFS; IFS='-'
2895set x $ac_cv_host
2896shift
2897host_cpu=$1
2898host_vendor=$2
2899shift; shift
2900# Remember, the first character of IFS is used to create $*,
2901# except with old shells:
2902host_os=$*
2903IFS=$ac_save_IFS
2904case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2905
2906
2907
2908
2909
Ned Deily983df862014-08-22 13:30:59 -07002910# pybuilddir.txt will be created by --generate-posix-vars in the Makefile
2911rm -f pybuilddir.txt
2912
doko@python.orgd65e2ba2013-01-31 23:52:03 +01002913if test "$cross_compiling" = yes; then
2914 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2915$as_echo_n "checking for python interpreter for cross build... " >&6; }
2916 if test -z "$PYTHON_FOR_BUILD"; then
2917 for interp in python$PACKAGE_VERSION python2 python; do
2918 which $interp >/dev/null 2>&1 || continue
2919 if $interp -c 'import sys;sys.exit(not (sys.version_info[:2] >= (2,7) and sys.version_info[0] < 3))'; then
2920 break
2921 fi
2922 interp=
2923 done
2924 if test x$interp = x; then
2925 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2926 fi
2927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2928$as_echo "$interp" >&6; }
doko@ubuntu.coma50b0de2015-04-13 21:55:59 +02002929 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 +01002930 fi
Martin Panterbc82de02016-07-29 05:52:32 +00002931 # Used to comment out stuff for rebuilding generated files
2932 GENERATED_COMMENT='#'
doko@python.orgd65e2ba2013-01-31 23:52:03 +01002933elif test "$cross_compiling" = maybe; then
2934 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
2935else
2936 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
Martin Panterbc82de02016-07-29 05:52:32 +00002937 GENERATED_COMMENT=''
doko@python.orgd65e2ba2013-01-31 23:52:03 +01002938fi
2939
2940
Martin v. Löwis11437992002-04-12 09:54:03 +00002941
Martin Panter801110b2016-07-28 01:28:27 +00002942
Georg Brandlbcd64a32009-03-31 21:45:18 +00002943if test "$prefix" != "/"; then
2944 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2945fi
2946
2947
Martin v. Löwis11437992002-04-12 09:54:03 +00002948
2949
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002950# We don't use PACKAGE_ variables, and they cause conflicts
2951# with other autoconf-based packages that include Python.h
2952grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2953rm confdefs.h
2954mv confdefs.h.new confdefs.h
2955
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002956
Martin v. Löwis174440b2008-10-03 08:59:41 +00002957VERSION=2.7
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002958
Martin v. Löwis1142de32002-03-29 16:28:31 +00002959
2960SOVERSION=1.0
2961
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002962# The later defininition of _XOPEN_SOURCE disables certain features
2963# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2964
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002965$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002966
2967
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002968# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2969# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2970# them.
2971
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002972$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002973
2974
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002975# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2976# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2977# them.
2978
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002979$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002980
2981
Martin v. Löwisd6320502004-08-12 13:45:08 +00002982# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2983# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2984
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002985$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00002986
2987
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002988# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2989# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
2990# them.
2991
Matthias Klosea0bea5d2010-05-08 10:00:28 +00002992$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002993
2994
2995
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002996define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002997
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002998# Arguments passed to configure.
2999
3000CONFIG_ARGS="$ac_configure_args"
3001
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3003$as_echo_n "checking for --enable-universalsdk... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003004# Check whether --enable-universalsdk was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003005if test "${enable_universalsdk+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003006 enableval=$enable_universalsdk;
Ronald Oussoren988117f2006-04-29 11:31:35 +00003007 case $enableval in
3008 yes)
3009 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003010 if test ! -d "${enableval}"
3011 then
3012 enableval=/
3013 fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00003014 ;;
3015 esac
3016 case $enableval in
3017 no)
3018 UNIVERSALSDK=
3019 enable_universalsdk=
3020 ;;
3021 *)
3022 UNIVERSALSDK=$enableval
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003023 if test ! -d "${UNIVERSALSDK}"
3024 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003025 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003026 fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00003027 ;;
3028 esac
3029
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003030
Ronald Oussoren988117f2006-04-29 11:31:35 +00003031else
3032
3033 UNIVERSALSDK=
3034 enable_universalsdk=
3035
Martin v. Löwiseba40652007-08-30 20:10:57 +00003036fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00003037
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003038if test -n "${UNIVERSALSDK}"
3039then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3041$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003042else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3044$as_echo "no" >&6; }
Ronald Oussoren3c0a1262010-01-17 19:27:57 +00003045fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00003046
Martin v. Löwiseba40652007-08-30 20:10:57 +00003047
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +00003048
Ned Deily8e60f6e2013-05-30 00:14:29 -07003049ARCH_RUN_32BIT=""
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +00003050
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003051UNIVERSAL_ARCHS="32-bit"
Ronald Oussoren92919a62009-12-24 13:30:58 +00003052
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3054$as_echo_n "checking for --with-universal-archs... " >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003055
3056# Check whether --with-universal-archs was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003057if test "${with_universal_archs+set}" = set; then :
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003058 withval=$with_universal_archs;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
3060$as_echo "$withval" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003061 UNIVERSAL_ARCHS="$withval"
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00003062 if test "${enable_universalsdk}" ; then
3063 :
3064 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003065 as_fn_error $? "--with-universal-archs without --enable-universalsdk. See Mac/README" "$LINENO" 5
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00003066 fi
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003067
3068else
3069
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: 32-bit" >&5
3071$as_echo "32-bit" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003072
3073fi
3074
3075
3076
3077
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003078
3079# Check whether --with-framework-name was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003080if test "${with_framework_name+set}" = set; then :
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003081 withval=$with_framework_name;
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00003082 if test "${enable_framework}"; then
3083 :
3084 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003085 as_fn_error $? "--with-framework-name without --enable-framework. See Mac/README" "$LINENO" 5
Ronald Oussoren9ebd2422009-09-29 13:00:44 +00003086 fi
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003087 PYTHONFRAMEWORK=${withval}
3088 PYTHONFRAMEWORKDIR=${withval}.framework
3089 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3090
3091else
3092
3093 PYTHONFRAMEWORK=Python
3094 PYTHONFRAMEWORKDIR=Python.framework
3095 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3096
3097fi
3098
Martin v. Löwiseba40652007-08-30 20:10:57 +00003099# Check whether --enable-framework was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003100if test "${enable_framework+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003101 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003102 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003103 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003104 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003105 esac
3106 case $enableval in
3107 no)
3108 PYTHONFRAMEWORK=
3109 PYTHONFRAMEWORKDIR=no-framework
3110 PYTHONFRAMEWORKPREFIX=
3111 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003112 FRAMEWORKINSTALLFIRST=
3113 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00003114 FRAMEWORKALTINSTALLFIRST=
3115 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00003116 if test "x${prefix}" = "xNONE"; then
3117 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3118 else
3119 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3120 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003121 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003122 ;;
3123 *)
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003124 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003125 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003126 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003127 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure bininstall maninstall"
Ronald Oussoren92919a62009-12-24 13:30:58 +00003128 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3129 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003130 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003131
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00003132 if test "x${prefix}" = "xNONE" ; then
3133 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003134
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00003135 else
3136 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3137 fi
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003138
3139 case "${enableval}" in
3140 /System*)
3141 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3142 if test "${prefix}" = "NONE" ; then
3143 # See below
3144 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3145 fi
3146 ;;
3147
3148 /Library*)
3149 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3150 ;;
3151
3152 */Library/Frameworks)
3153 MDIR="`dirname "${enableval}"`"
3154 MDIR="`dirname "${MDIR}"`"
3155 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3156
3157 if test "${prefix}" = "NONE"; then
3158 # User hasn't specified the
3159 # --prefix option, but wants to install
3160 # the framework in a non-default location,
3161 # ensure that the compatibility links get
3162 # installed relative to that prefix as well
3163 # instead of in /usr/local.
3164 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3165 fi
3166 ;;
3167
3168 *)
3169 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3170 ;;
3171 esac
3172
Jack Jansen127e56e2001-09-11 14:41:54 +00003173 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Ronald Oussoren836b0392006-05-14 19:56:34 +00003174
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003175 # Add files for Mac specific code to the list of output
Ronald Oussoren836b0392006-05-14 19:56:34 +00003176 # files:
Martin v. Löwiseba40652007-08-30 20:10:57 +00003177 ac_config_files="$ac_config_files Mac/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00003178
Martin v. Löwiseba40652007-08-30 20:10:57 +00003179 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00003180
Martin v. Löwiseba40652007-08-30 20:10:57 +00003181 ac_config_files="$ac_config_files Mac/IDLE/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00003182
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003183 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3184
3185 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3186
Jack Jansene578a632001-08-15 01:27:14 +00003187 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003188
Guido van Rossum563e7081996-09-10 18:20:48 +00003189else
Martin v. Löwis11437992002-04-12 09:54:03 +00003190
Jack Jansene578a632001-08-15 01:27:14 +00003191 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003192 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003193 PYTHONFRAMEWORKPREFIX=
3194 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003195 FRAMEWORKINSTALLFIRST=
3196 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00003197 FRAMEWORKALTINSTALLFIRST=
3198 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00003199 if test "x${prefix}" = "xNONE" ; then
3200 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3201 else
3202 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3203 fi
Jack Jansene578a632001-08-15 01:27:14 +00003204 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003205
Ronald Oussoren5640ce22008-06-05 12:58:24 +00003206
Martin v. Löwiseba40652007-08-30 20:10:57 +00003207fi
3208
Michael W. Hudson54241132001-12-07 15:38:26 +00003209
3210
3211
3212
Jack Jansene578a632001-08-15 01:27:14 +00003213
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00003214
3215
Ronald Oussoren5b787322006-06-06 19:50:24 +00003216
3217
3218
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00003219
Ronald Oussoren01d149f2010-04-30 11:20:14 +00003220
Jack Jansene578a632001-08-15 01:27:14 +00003221##AC_ARG_WITH(dyld,
Matthias Klose22520ea2010-05-08 10:14:46 +00003222## AS_HELP_STRING([--with-dyld],
3223## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003224##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003225# Set name for machine-dependent library files
3226
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3228$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003229if test -z "$MACHDEP"
3230then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003231 # avoid using uname for cross builds
3232 if test "$cross_compiling" = yes; then
3233 # ac_sys_system and ac_sys_release are only used for setting
3234 # `define_xopen_source' in the case statement below. For the
3235 # current supported cross builds, this macro is not adjusted.
3236 case "$host" in
3237 *-*-linux*)
3238 ac_sys_system=Linux
3239 ;;
3240 *-*-cygwin*)
3241 ac_sys_system=Cygwin
3242 ;;
3243 *)
3244 # for now, limit cross builds to known configurations
3245 MACHDEP="unknown"
3246 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3247 esac
3248 ac_sys_release=
3249 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003250 ac_sys_system=`uname -s`
Georg Brandlfe18a112009-09-04 07:55:14 +00003251 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003252 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003253 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003254 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003255 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003256 fi
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003257 fi
3258 ac_md_system=`echo $ac_sys_system |
3259 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3260 ac_md_release=`echo $ac_sys_release |
3261 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3262 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003263
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003264 case $MACHDEP in
Victor Stinneracacbaa2011-08-20 14:02:38 +02003265 linux*) MACHDEP="linux2";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003266 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003267 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003268 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00003269 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003270 '') MACHDEP="unknown";;
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003271 esac
3272fi
3273
3274
3275if test "$cross_compiling" = yes; then
3276 case "$host" in
3277 *-*-linux*)
3278 case "$host_cpu" in
3279 arm*)
3280 _host_cpu=arm
3281 ;;
3282 *)
3283 _host_cpu=$host_cpu
3284 esac
3285 ;;
3286 *-*-cygwin*)
3287 _host_cpu=
3288 ;;
3289 *)
3290 # for now, limit cross builds to known configurations
3291 MACHDEP="unknown"
3292 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003293 esac
doko@python.orgd65e2ba2013-01-31 23:52:03 +01003294 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003295fi
Guido van Rossum91922671997-10-09 20:24:13 +00003296
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003297# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3298# disable features if it is defined, without any means to access these
3299# features as extensions. For these systems, we skip the definition of
3300# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3301# some feature, make sure there is no alternative way to access this
3302# feature. Also, when using wildcards, make sure you have verified the
3303# need for not defining _XOPEN_SOURCE on all systems matching the
3304# wildcard, and that the wildcard does not include future systems
3305# (which may remove their limitations).
3306case $ac_sys_system/$ac_sys_release in
3307 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3308 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003309 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis7875ef62010-02-15 21:41:12 +00003310 # In addition, Stefan Krah confirms that issue #1244610 exists through
3311 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali97781b02011-07-22 23:43:42 +02003312 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Martin v. Löwiscb78de62007-12-29 18:49:21 +00003313 define_xopen_source=no
3314 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3315 # also defined. This can be overridden by defining _BSD_SOURCE
3316 # As this has a different meaning on Linux, only define it on OpenBSD
3317
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003318$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwiscb78de62007-12-29 18:49:21 +00003319
3320 ;;
Charles-François Natali97781b02011-07-22 23:43:42 +02003321 OpenBSD/*)
Martin v. Löwis5e2dd862010-02-15 08:32:00 +00003322 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3323 # also defined. This can be overridden by defining _BSD_SOURCE
3324 # As this has a different meaning on Linux, only define it on OpenBSD
3325
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003326$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis5e2dd862010-02-15 08:32:00 +00003327
3328 ;;
Martin v. Löwis4d542ec2006-11-25 15:39:19 +00003329 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3330 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3331 # Marc Recht
Benjamin Petersoneac68f42008-11-16 17:54:55 +00003332 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 +00003333 define_xopen_source=no;;
Martin v. Löwisb41afb52010-05-28 15:28:47 +00003334 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3335 # request to enable features supported by the standard as a request
3336 # to disable features not supported by the standard. The best way
3337 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3338 # entirely and define __EXTENSIONS__ instead.
3339 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003340 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003341 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3342 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003343 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003344 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003345 define_xopen_source=no;;
3346 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003347 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003348 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003349 define_xopen_source=no;;
Martin v. Löwisbb86d832008-11-04 20:40:09 +00003350 # On FreeBSD 4, the math functions C89 does not cover are never defined
3351 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3352 FreeBSD/4.*)
3353 define_xopen_source=no;;
3354 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3355 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3356 # identifies itself as Darwin/7.*
3357 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3358 # disables platform specific features beyond repair.
3359 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3360 # has no effect, don't bother defining them
3361 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003362 define_xopen_source=no;;
Ronald Oussorena55af9a2010-01-17 16:25:57 +00003363 Darwin/1[0-9].*)
3364 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003365 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3366 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3367 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003368 AIX/4)
3369 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003370 AIX/5)
3371 if test `uname -r` -eq 1; then
3372 define_xopen_source=no
3373 fi
3374 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00003375 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3376 # defining NI_NUMERICHOST.
3377 QNX/6.3.2)
3378 define_xopen_source=no
3379 ;;
Martin v. Löwisa0588362006-04-04 06:03:50 +00003380
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003381esac
3382
3383if test $define_xopen_source = yes
3384then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003385
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003386$as_echo "#define _XOPEN_SOURCE 600" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003387
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003388
3389 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3390 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3391 # several APIs are not declared. Since this is also needed in some
3392 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003393
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003394$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003395
3396
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003397
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003398$as_echo "#define _POSIX_C_SOURCE 200112L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003399
3400
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003401fi
3402
Guido van Rossum91922671997-10-09 20:24:13 +00003403#
3404# SGI compilers allow the specification of the both the ABI and the
3405# ISA on the command line. Depending on the values of these switches,
Martin Panterb1d867f2016-05-26 05:28:50 +00003406# different and often incompatible code will be generated.
Guido van Rossum91922671997-10-09 20:24:13 +00003407#
3408# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3409# thus supply support for various ABI/ISA combinations. The MACHDEP
3410# variable is also adjusted.
3411#
3412
3413if test ! -z "$SGI_ABI"
3414then
3415 CC="cc $SGI_ABI"
3416 LDFLAGS="$SGI_ABI $LDFLAGS"
3417 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3418fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003419{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3420$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003421
doko@ubuntu.coma50b0de2015-04-13 21:55:59 +02003422
3423PLATDIR=plat-$MACHDEP
3424
Jack Jansen83f898c2002-12-30 22:23:40 +00003425# And add extra plat-mac for darwin
3426
Jack Jansen7b59b422003-03-17 15:44:10 +00003427
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking EXTRAPLATDIR" >&5
3429$as_echo_n "checking EXTRAPLATDIR... " >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00003430if test -z "$EXTRAPLATDIR"
3431then
3432 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00003433 darwin)
3434 EXTRAPLATDIR="\$(PLATMACDIRS)"
3435 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
3436 ;;
3437 *)
3438 EXTRAPLATDIR=""
3439 EXTRAMACHDEPPATH=""
3440 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00003441 esac
3442fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003443{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRAPLATDIR" >&5
3444$as_echo "$EXTRAPLATDIR" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00003445
Jack Jansen6b08a402004-06-03 12:41:45 +00003446# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3447# it may influence the way we can build extensions, so distutils
3448# needs to check it
3449
Ronald Oussoren988117f2006-04-29 11:31:35 +00003450
Jack Jansen6b08a402004-06-03 12:41:45 +00003451CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Ronald Oussoren988117f2006-04-29 11:31:35 +00003452EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003453
Guido van Rossum627b2d71993-12-24 10:39:16 +00003454# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003455
3456# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3457# for debug/optimization stuff. BASECFLAGS is for flags that are required
3458# just to get things to compile and link. Users are free to override OPT
3459# when running configure or make. The build should not break if they do.
3460# BASECFLAGS should generally not be messed with, however.
3461
3462# XXX shouldn't some/most/all of this code be merged with the stuff later
3463# on that fiddles with OPT and BASECFLAGS?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3465$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003466
Martin v. Löwiseba40652007-08-30 20:10:57 +00003467# Check whether --with-gcc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003468if test "${with_gcc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003469 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003470 case $withval in
Mark Dickinson04b27232009-01-04 12:29:36 +00003471 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003472 without_gcc=yes;;
3473 yes) CC=gcc
3474 without_gcc=no;;
3475 *) CC=$withval
3476 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003477 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003478else
Martin v. Löwis11437992002-04-12 09:54:03 +00003479
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003480 case $ac_sys_system in
Antoine Pitrou285cd162010-09-21 15:23:17 +00003481 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003482 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003483 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003484 case $BE_HOST_CPU in
3485 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00003486 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003487 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00003488 BASECFLAGS="$BASECFLAGS -export pragma"
3489 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003490 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003491 ;;
3492 x86)
Fred Drake5790be12000-10-09 17:06:13 +00003493 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003494 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00003495 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003496 ;;
3497 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003498 as_fn_error $? "Unknown BeOS platform \"$BE_HOST_CPU\"" "$LINENO" 5
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003499 ;;
3500 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003501 AR="\$(srcdir)/Modules/ar_beos"
3502 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00003503 ;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003504 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003505 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00003506fi
3507
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003508{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3509$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003510
Zachary Ware6ed42ea2015-12-21 11:43:03 -06003511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-icc" >&5
3512$as_echo_n "checking for --with-icc... " >&6; }
3513
3514# Check whether --with-icc was given.
3515if test "${with_icc+set}" = set; then :
3516 withval=$with_icc;
3517 case $withval in
3518 no) CC=${CC:-cc}
3519 with_icc=no;;
3520 yes) CC=icc
3521 CXX=icpc
3522 with_icc=yes;;
3523 *) CC=$withval
3524 with_icc=$withval;;
3525 esac
3526else
3527
3528 with_icc=no
3529fi
3530
3531{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_icc" >&5
3532$as_echo "$with_icc" >&6; }
3533
Guido van Rossum8b131c51995-03-09 14:10:13 +00003534# If the user switches compilers, we can't believe the cache
3535if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3536then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003537 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003538(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003539fi
3540
Trent Nelson15daa352012-12-13 06:46:39 +00003541if test "$MACHDEP" = "irix6" && test "$CC" != "gcc"; then
3542 # Normally, MIPSpro CC treats #error directives as warnings, which means
3543 # a successful exit code is returned (0). This is a problem because IRIX
3544 # has a bunch of system headers with this guard at the top:
3545 #
3546 # #ifndef __c99
3547 # #error This header file is to be used only for c99 mode compilations
3548 # #else
3549 #
3550 # When autoconf tests for such a header, like stdint.h, this happens:
3551 #
3552 # configure:4619: cc -c conftest.c >&5
3553 # cc-1035 cc: WARNING File = /usr/include/stdint.h, Line = 5
3554 # #error directive: This header file is to be used only for c99 mode
3555 # compilations
3556 #
3557 # #error This header file is to be used only for c99 mode compilations
3558 # ^
3559 #
3560 # configure:4619: $? = 0
3561 # configure:4619: result: yes
3562 #
3563 # Therefore, we use `-diag_error 1035` to have the compiler treat the
3564 # warning as an error, which causes cc to return a non-zero result,
3565 # which autoconf can interpret correctly.
3566 CFLAGS="$CFLAGS -diag_error 1035"
3567 # Whilst we're here, we might as well make sure CXX defaults to something
3568 # sensible if we're not using gcc.
3569 if test -z "$CXX"; then
3570 CXX="CC"
3571 fi
3572fi
3573
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00003574# If the user set CFLAGS, use this instead of the automatically
3575# determined setting
3576preset_cflags="$CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +00003577ac_ext=c
3578ac_cpp='$CPP $CPPFLAGS'
3579ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3580ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3581ac_compiler_gnu=$ac_cv_c_compiler_gnu
3582if test -n "$ac_tool_prefix"; then
3583 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3584set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3586$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003587if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003588 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003589else
3590 if test -n "$CC"; then
3591 ac_cv_prog_CC="$CC" # Let the user override the test.
3592else
Martin v. Löwis11437992002-04-12 09:54:03 +00003593as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3594for as_dir in $PATH
3595do
3596 IFS=$as_save_IFS
3597 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003598 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003599 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003600 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003601 $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 +00003602 break 2
3603 fi
3604done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003605 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003606IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003607
Jack Jansendd19cf82001-12-06 22:36:17 +00003608fi
3609fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003610CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003611if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3613$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003614else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3616$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003617fi
3618
Martin v. Löwiseba40652007-08-30 20:10:57 +00003619
Martin v. Löwis11437992002-04-12 09:54:03 +00003620fi
3621if test -z "$ac_cv_prog_CC"; then
3622 ac_ct_CC=$CC
3623 # Extract the first word of "gcc", so it can be a program name with args.
3624set dummy gcc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3626$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003627if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003628 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003629else
3630 if test -n "$ac_ct_CC"; then
3631 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3632else
3633as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3634for as_dir in $PATH
3635do
3636 IFS=$as_save_IFS
3637 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003638 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003639 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003640 ac_cv_prog_ac_ct_CC="gcc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003641 $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 +00003642 break 2
3643 fi
3644done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003645 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003646IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003647
3648fi
3649fi
3650ac_ct_CC=$ac_cv_prog_ac_ct_CC
3651if test -n "$ac_ct_CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3653$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003654else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3656$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003657fi
3658
Martin v. Löwiseba40652007-08-30 20:10:57 +00003659 if test "x$ac_ct_CC" = x; then
3660 CC=""
3661 else
3662 case $cross_compiling:$ac_tool_warned in
3663yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003664{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3665$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00003666ac_tool_warned=yes ;;
3667esac
3668 CC=$ac_ct_CC
3669 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003670else
3671 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003672fi
3673
Jack Jansendd19cf82001-12-06 22:36:17 +00003674if test -z "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003675 if test -n "$ac_tool_prefix"; then
3676 # 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 +00003677set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3679$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003680if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003681 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003682else
3683 if test -n "$CC"; then
3684 ac_cv_prog_CC="$CC" # Let the user override the test.
3685else
Martin v. Löwis11437992002-04-12 09:54:03 +00003686as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3687for as_dir in $PATH
3688do
3689 IFS=$as_save_IFS
3690 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003691 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003692 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003693 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003694 $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 +00003695 break 2
3696 fi
3697done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003698 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003699IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003700
3701fi
3702fi
3703CC=$ac_cv_prog_CC
3704if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3706$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003707else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3709$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003710fi
3711
Martin v. Löwiseba40652007-08-30 20:10:57 +00003712
Martin v. Löwis11437992002-04-12 09:54:03 +00003713 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003714fi
3715if test -z "$CC"; then
3716 # Extract the first word of "cc", so it can be a program name with args.
3717set dummy cc; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3719$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003720if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003721 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003722else
3723 if test -n "$CC"; then
3724 ac_cv_prog_CC="$CC" # Let the user override the test.
3725else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003726 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003727as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3728for as_dir in $PATH
3729do
3730 IFS=$as_save_IFS
3731 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003732 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003733 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003734 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3735 ac_prog_rejected=yes
3736 continue
3737 fi
3738 ac_cv_prog_CC="cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003739 $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 +00003740 break 2
3741 fi
3742done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003743 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003744IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003745
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003746if test $ac_prog_rejected = yes; then
3747 # We found a bogon in the path, so make sure we never use it.
3748 set dummy $ac_cv_prog_CC
3749 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003750 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003751 # We chose a different compiler from the bogus one.
3752 # However, it has the same basename, so the bogon will be chosen
3753 # first if we set CC to just the basename; use the full file name.
3754 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003755 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003756 fi
3757fi
3758fi
3759fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003760CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003761if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3763$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003764else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3766$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003767fi
3768
Martin v. Löwiseba40652007-08-30 20:10:57 +00003769
Martin v. Löwis11437992002-04-12 09:54:03 +00003770fi
3771if test -z "$CC"; then
3772 if test -n "$ac_tool_prefix"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003773 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003774 do
3775 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3776set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3778$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003779if ${ac_cv_prog_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003780 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003781else
3782 if test -n "$CC"; then
3783 ac_cv_prog_CC="$CC" # Let the user override the test.
3784else
Martin v. Löwis11437992002-04-12 09:54:03 +00003785as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3786for as_dir in $PATH
3787do
3788 IFS=$as_save_IFS
3789 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003790 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003791 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003792 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003793 $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 +00003794 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003795 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003796done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003797 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003798IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003799
3800fi
3801fi
3802CC=$ac_cv_prog_CC
3803if test -n "$CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3805$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003806else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3808$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003809fi
3810
Martin v. Löwiseba40652007-08-30 20:10:57 +00003811
Martin v. Löwis11437992002-04-12 09:54:03 +00003812 test -n "$CC" && break
3813 done
3814fi
3815if test -z "$CC"; then
3816 ac_ct_CC=$CC
Martin v. Löwiseba40652007-08-30 20:10:57 +00003817 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003818do
3819 # Extract the first word of "$ac_prog", so it can be a program name with args.
3820set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3822$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01003823if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003824 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003825else
3826 if test -n "$ac_ct_CC"; then
3827 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3828else
3829as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3830for as_dir in $PATH
3831do
3832 IFS=$as_save_IFS
3833 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003834 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01003835 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003836 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003837 $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 +00003838 break 2
3839 fi
3840done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003841 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003842IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003843
Martin v. Löwis11437992002-04-12 09:54:03 +00003844fi
3845fi
3846ac_ct_CC=$ac_cv_prog_ac_ct_CC
3847if test -n "$ac_ct_CC"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3849$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003850else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3852$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003853fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003854
Martin v. Löwiseba40652007-08-30 20:10:57 +00003855
Martin v. Löwis11437992002-04-12 09:54:03 +00003856 test -n "$ac_ct_CC" && break
3857done
Michael W. Hudson54241132001-12-07 15:38:26 +00003858
Martin v. Löwiseba40652007-08-30 20:10:57 +00003859 if test "x$ac_ct_CC" = x; then
3860 CC=""
3861 else
3862 case $cross_compiling:$ac_tool_warned in
3863yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003864{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3865$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00003866ac_tool_warned=yes ;;
3867esac
3868 CC=$ac_ct_CC
3869 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003870fi
3871
3872fi
3873
3874
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003875test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3876$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003877as_fn_error $? "no acceptable C compiler found in \$PATH
Matthias Klose3cef2a92012-03-14 23:39:33 +01003878See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003879
3880# Provide some information about the compiler.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003881$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3882set X $ac_compile
3883ac_compiler=$2
3884for ac_option in --version -v -V -qversion; do
3885 { { ac_try="$ac_compiler $ac_option >&5"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003886case "(($ac_try" in
3887 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3888 *) ac_try_echo=$ac_try;;
3889esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003890eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3891$as_echo "$ac_try_echo"; } >&5
3892 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003893 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003894 if test -s conftest.err; then
3895 sed '10a\
3896... rest of stderr output deleted ...
3897 10q' conftest.err >conftest.er1
3898 cat conftest.er1 >&5
3899 fi
3900 rm -f conftest.er1 conftest.err
3901 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3902 test $ac_status = 0; }
3903done
Martin v. Löwis11437992002-04-12 09:54:03 +00003904
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003905cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003906/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003907
Martin v. Löwis11437992002-04-12 09:54:03 +00003908int
3909main ()
3910{
3911
3912 ;
3913 return 0;
3914}
3915_ACEOF
3916ac_clean_files_save=$ac_clean_files
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003917ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003918# Try to create an executable without -o first, disregard a.out.
3919# It will help us diagnose broken compilers, and finding out an intuition
3920# of exeext.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3922$as_echo_n "checking whether the C compiler works... " >&6; }
3923ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3924
3925# The possible output files:
3926ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3927
Martin v. Löwiseba40652007-08-30 20:10:57 +00003928ac_rmfiles=
3929for ac_file in $ac_files
3930do
3931 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003932 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00003933 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3934 esac
3935done
3936rm -f $ac_rmfiles
3937
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003938if { { ac_try="$ac_link_default"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003939case "(($ac_try" in
3940 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3941 *) ac_try_echo=$ac_try;;
3942esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003943eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3944$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003945 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003946 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003947 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3948 test $ac_status = 0; }; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00003949 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3950# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3951# in a Makefile. We should not override ac_cv_exeext if it was cached,
3952# so that the user can short-circuit this test for compilers unknown to
3953# Autoconf.
3954for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003955do
3956 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003957 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003958 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003959 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003960 [ab].out )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003961 # We found the default executable, but exeext='' is most
3962 # certainly right.
3963 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003964 *.* )
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003965 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Martin v. Löwiseba40652007-08-30 20:10:57 +00003966 then :; else
3967 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3968 fi
3969 # We set ac_cv_exeext here because the later test for it is not
3970 # safe: cross compilers may not add the suffix if given an `-o'
3971 # argument, so we may need to know it at that point already.
3972 # Even if this section looks crufty: it has the advantage of
3973 # actually working.
Skip Montanarof0d5f792004-08-15 14:08:23 +00003974 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003975 * )
Skip Montanarof0d5f792004-08-15 14:08:23 +00003976 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003977 esac
3978done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003979test "$ac_cv_exeext" = no && ac_cv_exeext=
3980
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003981else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003982 ac_file=''
3983fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003984if test -z "$ac_file"; then :
3985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3986$as_echo "no" >&6; }
3987$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003988sed 's/^/| /' conftest.$ac_ext >&5
3989
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003990{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3991$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00003992as_fn_error 77 "C compiler cannot create executables
Matthias Klose3cef2a92012-03-14 23:39:33 +01003993See \`config.log' for more details" "$LINENO" 5; }
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003994else
3995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3996$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003997fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00003998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3999$as_echo_n "checking for C compiler default output file name... " >&6; }
4000{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4001$as_echo "$ac_file" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004002ac_exeext=$ac_cv_exeext
Michael W. Hudson54241132001-12-07 15:38:26 +00004003
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004004rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00004005ac_clean_files=$ac_clean_files_save
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4007$as_echo_n "checking for suffix of executables... " >&6; }
4008if { { ac_try="$ac_link"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004009case "(($ac_try" in
4010 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4011 *) ac_try_echo=$ac_try;;
4012esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004013eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4014$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00004015 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004016 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004017 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4018 test $ac_status = 0; }; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004019 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4020# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4021# work properly (i.e., refer to `conftest.exe'), while it won't with
4022# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00004023for ac_file in conftest.exe conftest conftest.*; do
4024 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00004025 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004026 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004027 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
Skip Montanarof0d5f792004-08-15 14:08:23 +00004028 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004029 * ) break;;
4030 esac
4031done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004032else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004033 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4034$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004035as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Matthias Klose3cef2a92012-03-14 23:39:33 +01004036See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004037fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004038rm -f conftest conftest$ac_cv_exeext
4039{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4040$as_echo "$ac_cv_exeext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004041
4042rm -f conftest.$ac_ext
4043EXEEXT=$ac_cv_exeext
4044ac_exeext=$EXEEXT
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004045cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4046/* end confdefs.h. */
4047#include <stdio.h>
4048int
4049main ()
4050{
4051FILE *f = fopen ("conftest.out", "w");
4052 return ferror (f) || fclose (f) != 0;
4053
4054 ;
4055 return 0;
4056}
Skip Montanaro6dead952003-09-25 14:50:04 +00004057_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004058ac_clean_files="$ac_clean_files conftest.out"
4059# Check that the compiler produces executables we can run. If not, either
4060# the compiler is broken, or we cross compile.
4061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4062$as_echo_n "checking whether we are cross compiling... " >&6; }
4063if test "$cross_compiling" != yes; then
4064 { { ac_try="$ac_link"
4065case "(($ac_try" in
4066 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4067 *) ac_try_echo=$ac_try;;
4068esac
4069eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4070$as_echo "$ac_try_echo"; } >&5
4071 (eval "$ac_link") 2>&5
4072 ac_status=$?
4073 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4074 test $ac_status = 0; }
4075 if { ac_try='./conftest$ac_cv_exeext'
4076 { { case "(($ac_try" in
4077 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4078 *) ac_try_echo=$ac_try;;
4079esac
4080eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4081$as_echo "$ac_try_echo"; } >&5
4082 (eval "$ac_try") 2>&5
4083 ac_status=$?
4084 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4085 test $ac_status = 0; }; }; then
4086 cross_compiling=no
4087 else
4088 if test "$cross_compiling" = maybe; then
4089 cross_compiling=yes
4090 else
4091 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4092$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004093as_fn_error $? "cannot run C compiled programs.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004094If you meant to cross compile, use \`--host'.
Matthias Klose3cef2a92012-03-14 23:39:33 +01004095See \`config.log' for more details" "$LINENO" 5; }
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004096 fi
4097 fi
4098fi
4099{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4100$as_echo "$cross_compiling" >&6; }
4101
4102rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4103ac_clean_files=$ac_clean_files_save
4104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4105$as_echo_n "checking for suffix of object files... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004106if ${ac_cv_objext+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004107 $as_echo_n "(cached) " >&6
4108else
4109 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004110/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004111
Martin v. Löwis11437992002-04-12 09:54:03 +00004112int
4113main ()
4114{
4115
4116 ;
4117 return 0;
4118}
4119_ACEOF
4120rm -f conftest.o conftest.obj
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004121if { { ac_try="$ac_compile"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004122case "(($ac_try" in
4123 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4124 *) ac_try_echo=$ac_try;;
4125esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004126eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4127$as_echo "$ac_try_echo"; } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00004128 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004129 ac_status=$?
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004130 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4131 test $ac_status = 0; }; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004132 for ac_file in conftest.o conftest.obj conftest.*; do
4133 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004134 case $ac_file in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004135 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004136 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4137 break;;
4138 esac
4139done
4140else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004141 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004142sed 's/^/| /' conftest.$ac_ext >&5
4143
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004144{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4145$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004146as_fn_error $? "cannot compute suffix of object files: cannot compile
Matthias Klose3cef2a92012-03-14 23:39:33 +01004147See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004148fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004149rm -f conftest.$ac_cv_objext conftest.$ac_ext
4150fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004151{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4152$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004153OBJEXT=$ac_cv_objext
4154ac_objext=$OBJEXT
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4156$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004157if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004158 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004159else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004160 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004161/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004162
Martin v. Löwis11437992002-04-12 09:54:03 +00004163int
4164main ()
4165{
4166#ifndef __GNUC__
4167 choke me
4168#endif
4169
4170 ;
4171 return 0;
4172}
4173_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004174if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004175 ac_compiler_gnu=yes
4176else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004177 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004178fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004179rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004180ac_cv_c_compiler_gnu=$ac_compiler_gnu
4181
4182fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004183{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4184$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4185if test $ac_compiler_gnu = yes; then
4186 GCC=yes
4187else
4188 GCC=
4189fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004190ac_test_CFLAGS=${CFLAGS+set}
4191ac_save_CFLAGS=$CFLAGS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4193$as_echo_n "checking whether $CC accepts -g... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004194if ${ac_cv_prog_cc_g+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004195 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004196else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004197 ac_save_c_werror_flag=$ac_c_werror_flag
4198 ac_c_werror_flag=yes
4199 ac_cv_prog_cc_g=no
4200 CFLAGS="-g"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004201 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004202/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004203
Martin v. Löwis11437992002-04-12 09:54:03 +00004204int
4205main ()
4206{
4207
4208 ;
4209 return 0;
4210}
4211_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004212if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004213 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004214else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004215 CFLAGS=""
4216 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004217/* end confdefs.h. */
4218
4219int
4220main ()
4221{
4222
4223 ;
4224 return 0;
4225}
4226_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004227if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004228
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004229else
4230 ac_c_werror_flag=$ac_save_c_werror_flag
Martin v. Löwiseba40652007-08-30 20:10:57 +00004231 CFLAGS="-g"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004232 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004233/* end confdefs.h. */
4234
4235int
4236main ()
4237{
4238
4239 ;
4240 return 0;
4241}
4242_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004243if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004244 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004245fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004246rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004247fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004248rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4249fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004250rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4251 ac_c_werror_flag=$ac_save_c_werror_flag
4252fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004253{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4254$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004255if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004256 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004257elif test $ac_cv_prog_cc_g = yes; then
4258 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004259 CFLAGS="-g -O2"
4260 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004261 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004262 fi
4263else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004264 if test "$GCC" = yes; then
4265 CFLAGS="-O2"
4266 else
4267 CFLAGS=
4268 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004269fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4271$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004272if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004273 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004274else
Martin v. Löwiseba40652007-08-30 20:10:57 +00004275 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004276ac_save_CC=$CC
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004277cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004278/* end confdefs.h. */
4279#include <stdarg.h>
4280#include <stdio.h>
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004281struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004282/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4283struct buf { int x; };
4284FILE * (*rcsopen) (struct buf *, struct stat *, int);
4285static char *e (p, i)
4286 char **p;
4287 int i;
4288{
4289 return p[i];
4290}
4291static char *f (char * (*g) (char **, int), char **p, ...)
4292{
4293 char *s;
4294 va_list v;
4295 va_start (v,p);
4296 s = g (p, va_arg (v,int));
4297 va_end (v);
4298 return s;
4299}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004300
4301/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4302 function prototypes and stuff, but not '\xHH' hex character constants.
4303 These don't provoke an error unfortunately, instead are silently treated
Martin v. Löwiseba40652007-08-30 20:10:57 +00004304 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004305 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4306 array size at least. It's necessary to write '\x00'==0 to get something
Martin v. Löwiseba40652007-08-30 20:10:57 +00004307 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004308int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4309
Martin v. Löwiseba40652007-08-30 20:10:57 +00004310/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4311 inside strings and character constants. */
4312#define FOO(x) 'x'
4313int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4314
Skip Montanaro6dead952003-09-25 14:50:04 +00004315int test (int i, double x);
4316struct s1 {int (*f) (int a);};
4317struct s2 {int (*f) (double a);};
4318int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4319int argc;
4320char **argv;
4321int
4322main ()
4323{
4324return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4325 ;
4326 return 0;
4327}
4328_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00004329for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4330 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004331do
4332 CC="$ac_save_CC $ac_arg"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004333 if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004334 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004335fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004336rm -f core conftest.err conftest.$ac_objext
4337 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004338done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004339rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004340CC=$ac_save_CC
4341
4342fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004343# AC_CACHE_VAL
4344case "x$ac_cv_prog_cc_c89" in
4345 x)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4347$as_echo "none needed" >&6; } ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00004348 xno)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4350$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004351 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00004352 CC="$CC $ac_cv_prog_cc_c89"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4354$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004355esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004356if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004357
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004358fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004359
Martin v. Löwis11437992002-04-12 09:54:03 +00004360ac_ext=c
4361ac_cpp='$CPP $CPPFLAGS'
4362ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4363ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4364ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004365
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00004366if test ! -z "$preset_cflags"
4367then
4368 CFLAGS=$preset_cflags
4369fi
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004370
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004371
4372
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4374$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004375
Martin v. Löwiseba40652007-08-30 20:10:57 +00004376# Check whether --with-cxx_main was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004377if test "${with_cxx_main+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00004378 withval=$with_cxx_main;
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004379
4380 case $withval in
4381 no) with_cxx_main=no
4382 MAINCC='$(CC)';;
4383 yes) with_cxx_main=yes
4384 MAINCC='$(CXX)';;
4385 *) with_cxx_main=yes
4386 MAINCC=$withval
4387 if test -z "$CXX"
4388 then
4389 CXX=$withval
4390 fi;;
4391 esac
4392else
4393
4394 with_cxx_main=no
4395 MAINCC='$(CC)'
4396
Martin v. Löwiseba40652007-08-30 20:10:57 +00004397fi
4398
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004399{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4400$as_echo "$with_cxx_main" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004401
4402preset_cxx="$CXX"
4403if test -z "$CXX"
4404then
4405 case "$CC" in
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004406 gcc) if test -n "$ac_tool_prefix"; then
4407 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4408set dummy ${ac_tool_prefix}g++; ac_word=$2
4409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4410$as_echo_n "checking for $ac_word... " >&6; }
4411if ${ac_cv_path_CXX+:} false; then :
4412 $as_echo_n "(cached) " >&6
4413else
4414 case $CXX in
4415 [\\/]* | ?:[\\/]*)
4416 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4417 ;;
4418 *)
4419 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4420for as_dir in notfound
4421do
4422 IFS=$as_save_IFS
4423 test -z "$as_dir" && as_dir=.
4424 for ac_exec_ext in '' $ac_executable_extensions; do
4425 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4426 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4427 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4428 break 2
4429 fi
4430done
4431 done
4432IFS=$as_save_IFS
4433
4434 ;;
4435esac
4436fi
4437CXX=$ac_cv_path_CXX
4438if test -n "$CXX"; then
4439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4440$as_echo "$CXX" >&6; }
4441else
4442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4443$as_echo "no" >&6; }
4444fi
4445
4446
4447fi
4448if test -z "$ac_cv_path_CXX"; then
4449 ac_pt_CXX=$CXX
4450 # Extract the first word of "g++", so it can be a program name with args.
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004451set dummy g++; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4453$as_echo_n "checking for $ac_word... " >&6; }
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004454if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004455 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004456else
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004457 case $ac_pt_CXX in
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004458 [\\/]* | ?:[\\/]*)
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004459 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 +00004460 ;;
4461 *)
4462 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4463for as_dir in notfound
4464do
4465 IFS=$as_save_IFS
4466 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004467 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004468 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004469 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004470 $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 +00004471 break 2
4472 fi
4473done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004474 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004475IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004476
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004477 ;;
4478esac
4479fi
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004480ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4481if test -n "$ac_pt_CXX"; then
4482 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4483$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004484else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4486$as_echo "no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004487fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004488
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004489 if test "x$ac_pt_CXX" = x; then
4490 CXX="g++"
4491 else
4492 case $cross_compiling:$ac_tool_warned in
4493yes:)
4494{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4495$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4496ac_tool_warned=yes ;;
4497esac
4498 CXX=$ac_pt_CXX
4499 fi
4500else
4501 CXX="$ac_cv_path_CXX"
4502fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004503 ;;
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004504 cc) if test -n "$ac_tool_prefix"; then
4505 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4506set dummy ${ac_tool_prefix}c++; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4508$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004509if ${ac_cv_path_CXX+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004510 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004511else
4512 case $CXX in
4513 [\\/]* | ?:[\\/]*)
4514 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4515 ;;
4516 *)
4517 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4518for as_dir in notfound
4519do
4520 IFS=$as_save_IFS
4521 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004522 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004523 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004524 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004525 $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 +00004526 break 2
4527 fi
4528done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004529 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004530IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004531
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004532 ;;
4533esac
4534fi
4535CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00004536if test -n "$CXX"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4538$as_echo "$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004539else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4541$as_echo "no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00004542fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004543
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004544
4545fi
4546if test -z "$ac_cv_path_CXX"; then
4547 ac_pt_CXX=$CXX
4548 # Extract the first word of "c++", so it can be a program name with args.
4549set dummy c++; ac_word=$2
4550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4551$as_echo_n "checking for $ac_word... " >&6; }
4552if ${ac_cv_path_ac_pt_CXX+:} false; then :
4553 $as_echo_n "(cached) " >&6
4554else
4555 case $ac_pt_CXX in
4556 [\\/]* | ?:[\\/]*)
4557 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4558 ;;
4559 *)
4560 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4561for as_dir in notfound
4562do
4563 IFS=$as_save_IFS
4564 test -z "$as_dir" && as_dir=.
4565 for ac_exec_ext in '' $ac_executable_extensions; do
4566 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4567 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4568 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4569 break 2
4570 fi
4571done
4572 done
4573IFS=$as_save_IFS
4574
4575 ;;
4576esac
4577fi
4578ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4579if test -n "$ac_pt_CXX"; then
4580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4581$as_echo "$ac_pt_CXX" >&6; }
4582else
4583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4584$as_echo "no" >&6; }
4585fi
4586
4587 if test "x$ac_pt_CXX" = x; then
4588 CXX="c++"
4589 else
4590 case $cross_compiling:$ac_tool_warned in
4591yes:)
4592{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4593$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4594ac_tool_warned=yes ;;
4595esac
4596 CXX=$ac_pt_CXX
4597 fi
4598else
4599 CXX="$ac_cv_path_CXX"
4600fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004601 ;;
4602 esac
4603 if test "$CXX" = "notfound"
4604 then
4605 CXX=""
4606 fi
4607fi
4608if test -z "$CXX"
4609then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004610 if test -n "$ac_tool_prefix"; then
4611 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4612 do
4613 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4614set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4616$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004617if ${ac_cv_prog_CXX+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004618 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004619else
4620 if test -n "$CXX"; then
4621 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4622else
4623as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4624for as_dir in $PATH
4625do
4626 IFS=$as_save_IFS
4627 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004628 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004629 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004630 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004631 $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 +00004632 break 2
4633 fi
4634done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004635 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004636IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004637
4638fi
4639fi
4640CXX=$ac_cv_prog_CXX
4641if test -n "$CXX"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4643$as_echo "$CXX" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004644else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4646$as_echo "no" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004647fi
4648
Martin v. Löwiseba40652007-08-30 20:10:57 +00004649
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004650 test -n "$CXX" && break
4651 done
4652fi
4653if test -z "$CXX"; then
4654 ac_ct_CXX=$CXX
4655 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4656do
4657 # Extract the first word of "$ac_prog", so it can be a program name with args.
4658set dummy $ac_prog; ac_word=$2
4659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4660$as_echo_n "checking for $ac_word... " >&6; }
4661if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4662 $as_echo_n "(cached) " >&6
4663else
4664 if test -n "$ac_ct_CXX"; then
4665 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4666else
4667as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4668for as_dir in $PATH
4669do
4670 IFS=$as_save_IFS
4671 test -z "$as_dir" && as_dir=.
4672 for ac_exec_ext in '' $ac_executable_extensions; do
4673 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4674 ac_cv_prog_ac_ct_CXX="$ac_prog"
4675 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4676 break 2
4677 fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004678done
doko@python.orgd65e2ba2013-01-31 23:52:03 +01004679 done
4680IFS=$as_save_IFS
4681
4682fi
4683fi
4684ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4685if test -n "$ac_ct_CXX"; then
4686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4687$as_echo "$ac_ct_CXX" >&6; }
4688else
4689 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4690$as_echo "no" >&6; }
4691fi
4692
4693
4694 test -n "$ac_ct_CXX" && break
4695done
4696
4697 if test "x$ac_ct_CXX" = x; then
4698 CXX="notfound"
4699 else
4700 case $cross_compiling:$ac_tool_warned in
4701yes:)
4702{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4703$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4704ac_tool_warned=yes ;;
4705esac
4706 CXX=$ac_ct_CXX
4707 fi
4708fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004709
4710 if test "$CXX" = "notfound"
4711 then
4712 CXX=""
4713 fi
4714fi
4715if test "$preset_cxx" != "$CXX"
4716then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004717 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004718
4719 By default, distutils will build C++ extension modules with \"$CXX\".
4720 If this is not intended, then set CXX on the configure command line.
4721 " >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004722$as_echo "$as_me: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004723
4724 By default, distutils will build C++ extension modules with \"$CXX\".
4725 If this is not intended, then set CXX on the configure command line.
4726 " >&2;}
4727fi
4728
doko@python.org4e63fbe2013-01-25 13:08:27 +01004729MULTIARCH=$($CC --print-multiarch 2>/dev/null)
4730
4731
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004732
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004733# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004734
4735ac_ext=c
4736ac_cpp='$CPP $CPPFLAGS'
4737ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4738ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4739ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4741$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004742# On Suns, sometimes $CPP names a directory.
4743if test -n "$CPP" && test -d "$CPP"; then
4744 CPP=
4745fi
4746if test -z "$CPP"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +01004747 if ${ac_cv_prog_CPP+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004748 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004749else
Martin v. Löwis11437992002-04-12 09:54:03 +00004750 # Double quotes because CPP needs to be expanded
4751 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4752 do
4753 ac_preproc_ok=false
4754for ac_c_preproc_warn_flag in '' yes
4755do
4756 # Use a header file that comes with gcc, so configuring glibc
4757 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004758 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4759 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004760 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004761 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004762 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004763/* end confdefs.h. */
4764#ifdef __STDC__
4765# include <limits.h>
4766#else
4767# include <assert.h>
4768#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004769 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004770_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004771if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004772
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004773else
Martin v. Löwis11437992002-04-12 09:54:03 +00004774 # Broken: fails on valid input.
4775continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004776fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004777rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004778
Martin v. Löwiseba40652007-08-30 20:10:57 +00004779 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004780 # can be detected and how.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004781 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004782/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004783#include <ac_nonexistent.h>
4784_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004785if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004786 # Broken: success on invalid input.
4787continue
4788else
Martin v. Löwis11437992002-04-12 09:54:03 +00004789 # Passes both tests.
4790ac_preproc_ok=:
4791break
4792fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004793rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004794
4795done
4796# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004797rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004798if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004799 break
4800fi
4801
4802 done
4803 ac_cv_prog_CPP=$CPP
4804
4805fi
4806 CPP=$ac_cv_prog_CPP
4807else
4808 ac_cv_prog_CPP=$CPP
4809fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004810{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4811$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004812ac_preproc_ok=false
4813for ac_c_preproc_warn_flag in '' yes
4814do
4815 # Use a header file that comes with gcc, so configuring glibc
4816 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004817 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4818 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004819 # On the NeXT, cc -E runs the code through the compiler's parser,
4820 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004821 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004822/* end confdefs.h. */
4823#ifdef __STDC__
4824# include <limits.h>
4825#else
4826# include <assert.h>
4827#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004828 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004829_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004830if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004831
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004832else
Martin v. Löwis11437992002-04-12 09:54:03 +00004833 # Broken: fails on valid input.
4834continue
4835fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004836rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004837
Martin v. Löwiseba40652007-08-30 20:10:57 +00004838 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004839 # can be detected and how.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004840 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004841/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004842#include <ac_nonexistent.h>
4843_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004844if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004845 # Broken: success on invalid input.
4846continue
4847else
Martin v. Löwis11437992002-04-12 09:54:03 +00004848 # Passes both tests.
4849ac_preproc_ok=:
4850break
4851fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004852rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004853
4854done
4855# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004856rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004857if $ac_preproc_ok; then :
4858
Martin v. Löwis11437992002-04-12 09:54:03 +00004859else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004860 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4861$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004862as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
Matthias Klose3cef2a92012-03-14 23:39:33 +01004863See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004864fi
4865
4866ac_ext=c
4867ac_cpp='$CPP $CPPFLAGS'
4868ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4869ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4870ac_compiler_gnu=$ac_cv_c_compiler_gnu
4871
4872
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4874$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004875if ${ac_cv_path_GREP+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004876 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004877else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004878 if test -z "$GREP"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004879 ac_path_GREP_found=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004880 # Loop through the user's path and test for each of PROGNAME-LIST
4881 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00004882for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4883do
4884 IFS=$as_save_IFS
4885 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004886 for ac_prog in grep ggrep; do
4887 for ac_exec_ext in '' $ac_executable_extensions; do
4888 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004889 as_fn_executable_p "$ac_path_GREP" || continue
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004890# Check for GNU ac_path_GREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004891 # Check for GNU $ac_path_GREP
4892case `"$ac_path_GREP" --version 2>&1` in
4893*GNU*)
4894 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4895*)
4896 ac_count=0
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004897 $as_echo_n 0123456789 >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004898 while :
4899 do
4900 cat "conftest.in" "conftest.in" >"conftest.tmp"
4901 mv "conftest.tmp" "conftest.in"
4902 cp "conftest.in" "conftest.nl"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004903 $as_echo 'GREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004904 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4905 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004906 as_fn_arith $ac_count + 1 && ac_count=$as_val
Martin v. Löwiseba40652007-08-30 20:10:57 +00004907 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4908 # Best one so far, save it but keep looking for a better one
4909 ac_cv_path_GREP="$ac_path_GREP"
4910 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00004911 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004912 # 10*(2^10) chars as input seems more than enough
4913 test $ac_count -gt 10 && break
4914 done
4915 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4916esac
4917
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004918 $ac_path_GREP_found && break 3
4919 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004920 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004921 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004922IFS=$as_save_IFS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004923 if test -z "$ac_cv_path_GREP"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004924 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 +00004925 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004926else
4927 ac_cv_path_GREP=$GREP
4928fi
4929
Martin v. Löwiseba40652007-08-30 20:10:57 +00004930fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004931{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4932$as_echo "$ac_cv_path_GREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00004933 GREP="$ac_cv_path_GREP"
4934
4935
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4937$as_echo_n "checking for egrep... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01004938if ${ac_cv_path_EGREP+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004939 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +00004940else
4941 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4942 then ac_cv_path_EGREP="$GREP -E"
4943 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004944 if test -z "$EGREP"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004945 ac_path_EGREP_found=false
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004946 # Loop through the user's path and test for each of PROGNAME-LIST
4947 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00004948for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4949do
4950 IFS=$as_save_IFS
4951 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004952 for ac_prog in egrep; do
4953 for ac_exec_ext in '' $ac_executable_extensions; do
4954 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Charles-François Natalibe2b9072013-01-08 19:47:00 +01004955 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004956# Check for GNU ac_path_EGREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00004957 # Check for GNU $ac_path_EGREP
4958case `"$ac_path_EGREP" --version 2>&1` in
4959*GNU*)
4960 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4961*)
4962 ac_count=0
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004963 $as_echo_n 0123456789 >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004964 while :
4965 do
4966 cat "conftest.in" "conftest.in" >"conftest.tmp"
4967 mv "conftest.tmp" "conftest.in"
4968 cp "conftest.in" "conftest.nl"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004969 $as_echo 'EGREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004970 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4971 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004972 as_fn_arith $ac_count + 1 && ac_count=$as_val
Martin v. Löwiseba40652007-08-30 20:10:57 +00004973 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4974 # Best one so far, save it but keep looking for a better one
4975 ac_cv_path_EGREP="$ac_path_EGREP"
4976 ac_path_EGREP_max=$ac_count
4977 fi
4978 # 10*(2^10) chars as input seems more than enough
4979 test $ac_count -gt 10 && break
4980 done
4981 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4982esac
4983
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004984 $ac_path_EGREP_found && break 3
4985 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004986 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004987 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004988IFS=$as_save_IFS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004989 if test -z "$ac_cv_path_EGREP"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00004990 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 +00004991 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004992else
4993 ac_cv_path_EGREP=$EGREP
4994fi
4995
Martin v. Löwiseba40652007-08-30 20:10:57 +00004996 fi
4997fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00004998{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4999$as_echo "$ac_cv_path_EGREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00005000 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005001
5002
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5004$as_echo_n "checking for ANSI C header files... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005005if ${ac_cv_header_stdc+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005006 $as_echo_n "(cached) " >&6
5007else
5008 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00005009/* end confdefs.h. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005010#include <stdlib.h>
5011#include <stdarg.h>
5012#include <string.h>
5013#include <float.h>
5014
5015int
5016main ()
5017{
5018
5019 ;
5020 return 0;
5021}
5022_ACEOF
5023if ac_fn_c_try_compile "$LINENO"; then :
5024 ac_cv_header_stdc=yes
5025else
5026 ac_cv_header_stdc=no
5027fi
5028rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5029
5030if test $ac_cv_header_stdc = yes; then
5031 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5032 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5033/* end confdefs.h. */
5034#include <string.h>
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00005035
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00005036_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005037if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005038 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005039
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005040else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005041 ac_cv_header_stdc=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005042fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00005043rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005044
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005045fi
5046
5047if test $ac_cv_header_stdc = yes; then
5048 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5049 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5050/* end confdefs.h. */
5051#include <stdlib.h>
5052
5053_ACEOF
5054if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5055 $EGREP "free" >/dev/null 2>&1; then :
5056
5057else
5058 ac_cv_header_stdc=no
5059fi
5060rm -f conftest*
5061
5062fi
5063
5064if test $ac_cv_header_stdc = yes; then
5065 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5066 if test "$cross_compiling" = yes; then :
5067 :
5068else
5069 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5070/* end confdefs.h. */
5071#include <ctype.h>
5072#include <stdlib.h>
5073#if ((' ' & 0x0FF) == 0x020)
5074# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5075# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5076#else
5077# define ISLOWER(c) \
5078 (('a' <= (c) && (c) <= 'i') \
5079 || ('j' <= (c) && (c) <= 'r') \
5080 || ('s' <= (c) && (c) <= 'z'))
5081# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5082#endif
5083
5084#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5085int
5086main ()
5087{
5088 int i;
5089 for (i = 0; i < 256; i++)
5090 if (XOR (islower (i), ISLOWER (i))
5091 || toupper (i) != TOUPPER (i))
5092 return 2;
5093 return 0;
5094}
5095_ACEOF
5096if ac_fn_c_try_run "$LINENO"; then :
5097
5098else
5099 ac_cv_header_stdc=no
5100fi
5101rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5102 conftest.$ac_objext conftest.beam conftest.$ac_ext
5103fi
5104
5105fi
5106fi
5107{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5108$as_echo "$ac_cv_header_stdc" >&6; }
5109if test $ac_cv_header_stdc = yes; then
5110
5111$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5112
5113fi
5114
5115# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5116for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5117 inttypes.h stdint.h unistd.h
5118do :
5119 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5120ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5121"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00005122if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005123 cat >>confdefs.h <<_ACEOF
5124#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5125_ACEOF
5126
5127fi
5128
5129done
5130
5131
5132
5133 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 +01005134if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005135 MINIX=yes
5136else
5137 MINIX=
5138fi
5139
5140
5141 if test "$MINIX" = yes; then
5142
5143$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5144
5145
5146$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5147
5148
5149$as_echo "#define _MINIX 1" >>confdefs.h
5150
5151 fi
5152
5153
5154 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5155$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005156if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005157 $as_echo_n "(cached) " >&6
5158else
5159 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5160/* end confdefs.h. */
5161
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005162# define __EXTENSIONS__ 1
5163 $ac_includes_default
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005164int
5165main ()
5166{
5167
5168 ;
5169 return 0;
5170}
5171_ACEOF
5172if ac_fn_c_try_compile "$LINENO"; then :
5173 ac_cv_safe_to_define___extensions__=yes
5174else
5175 ac_cv_safe_to_define___extensions__=no
5176fi
5177rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5178fi
5179{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5180$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5181 test $ac_cv_safe_to_define___extensions__ = yes &&
5182 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5183
5184 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5185
5186 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5187
5188 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5189
5190 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5191
5192
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005193
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005194# Check for unsupported systems
5195case $ac_sys_system/$ac_sys_release in
5196atheos*|Linux*/1*)
5197 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5198 echo See README for details.
5199 exit 1;;
5200esac
5201
5202
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5204$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005205
5206# Check whether --with-suffix was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005207if test "${with_suffix+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005208 withval=$with_suffix;
5209 case $withval in
5210 no) EXEEXT=;;
5211 yes) EXEEXT=.exe;;
5212 *) EXEEXT=$withval;;
5213 esac
5214fi
5215
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005216{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5217$as_echo "$EXEEXT" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005218
5219# Test whether we're running on a non-case-sensitive system, in which
5220# case we give a warning if no ext is given
5221
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5223$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005224if test ! -d CaseSensitiveTestDir; then
5225mkdir CaseSensitiveTestDir
5226fi
5227
5228if test -d casesensitivetestdir
5229then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5231$as_echo "yes" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005232 BUILDEXEEXT=.exe
5233else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5235$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005236 BUILDEXEEXT=$EXEEXT
5237fi
5238rmdir CaseSensitiveTestDir
5239
5240case $MACHDEP in
5241bsdos*)
5242 case $CC in
5243 gcc) CC="$CC -D_HAVE_BSDI";;
5244 esac;;
5245esac
5246
5247case $ac_sys_system in
5248hp*|HP*)
5249 case $CC in
5250 cc|*/cc) CC="$CC -Ae";;
5251 esac;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005252SunOS*)
5253 # Some functions have a prototype only with that define, e.g. confstr
5254
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005255$as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005256
5257 ;;
5258esac
5259
5260
5261
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5263$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005264if test -z "$LIBRARY"
5265then
5266 LIBRARY='libpython$(VERSION).a'
5267fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005268{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5269$as_echo "$LIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005270
5271# LDLIBRARY is the name of the library to link against (as opposed to the
5272# name of the library into which to insert object files). BLDLIBRARY is also
5273# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5274# is blank as the main program is not linked directly against LDLIBRARY.
5275# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5276# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5277# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5278# DLLLIBRARY is the shared (i.e., DLL) library.
5279#
5280# RUNSHARED is used to run shared python without installed libraries
5281#
5282# INSTSONAME is the name of the shared library that will be use to install
5283# on the system - some systems like version suffix, others don't
5284
5285
5286
5287
5288
5289
5290LDLIBRARY="$LIBRARY"
5291BLDLIBRARY='$(LDLIBRARY)'
5292INSTSONAME='$(LDLIBRARY)'
5293DLLLIBRARY=''
5294LDLIBRARYDIR=''
5295RUNSHARED=''
5296
5297# LINKCC is the command that links the python executable -- default is $(CC).
5298# If CXX is set, and if it is needed to link a main function that was
5299# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5300# python might then depend on the C++ runtime
5301# This is altered for AIX in order to build the export list before
5302# linking.
5303
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005304{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5305$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005306if test -z "$LINKCC"
5307then
5308 LINKCC='$(PURIFY) $(MAINCC)'
5309 case $ac_sys_system in
5310 AIX*)
5311 exp_extra="\"\""
5312 if test $ac_sys_release -ge 5 -o \
5313 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5314 exp_extra="."
5315 fi
5316 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005317 QNX*)
5318 # qcc must be used because the other compilers do not
5319 # support -N.
5320 LINKCC=qcc;;
5321 esac
5322fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005323{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5324$as_echo "$LINKCC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005325
5326# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5327# make sure we default having it set to "no": this is used by
5328# distutils.unixccompiler to know if it should add --enable-new-dtags
5329# to linker command lines, and failing to detect GNU ld simply results
5330# in the same bahaviour as before.
5331
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5333$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005334ac_prog=ld
5335if test "$GCC" = yes; then
5336 ac_prog=`$CC -print-prog-name=ld`
5337fi
5338case `"$ac_prog" -V 2>&1 < /dev/null` in
5339 *GNU*)
5340 GNULD=yes;;
5341 *)
5342 GNULD=no;;
5343esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005344{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5345$as_echo "$GNULD" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005346
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5348$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005349# Check whether --enable-shared was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005350if test "${enable_shared+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005351 enableval=$enable_shared;
5352fi
5353
5354
5355if test -z "$enable_shared"
5356then
5357 case $ac_sys_system in
5358 CYGWIN* | atheos*)
5359 enable_shared="yes";;
5360 *)
5361 enable_shared="no";;
5362 esac
5363fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005364{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5365$as_echo "$enable_shared" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005366
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5368$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005369# Check whether --enable-profiling was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005370if test "${enable_profiling+set}" = set; then :
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005371 enableval=$enable_profiling;
5372fi
5373
5374if test "x$enable_profiling" = xyes; then
5375 ac_save_cc="$CC"
Benjamin Petersonb9be7bb2013-03-26 08:55:37 -04005376 CC="$CC -pg"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005377 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005378/* end confdefs.h. */
5379int main() { return 0; }
5380_ACEOF
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005381if ac_fn_c_try_link "$LINENO"; then :
5382
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005383else
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005384 enable_profiling=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005385fi
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005386rm -f core conftest.err conftest.$ac_objext \
5387 conftest$ac_exeext conftest.$ac_ext
5388 CC="$ac_save_cc"
5389else
5390 enable_profiling=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005391fi
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005392{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5393$as_echo "$enable_profiling" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005394
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005395if test "x$enable_profiling" = xyes; then
5396 BASECFLAGS="-pg $BASECFLAGS"
5397 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005398fi
5399
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5401$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005402
5403# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5404# library that we build, but we do not want to link against it (we
5405# will find it with a -framework option). For this reason there is an
5406# extra variable BLDLIBRARY against which Python and the extension
5407# modules are linked, BLDLIBRARY. This is normally the same as
5408# LDLIBRARY, but empty for MacOSX framework builds.
5409if test "$enable_framework"
5410then
5411 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005412 RUNSHARED=DYLD_FRAMEWORK_PATH=`pwd`${DYLD_FRAMEWORK_PATH:+:${DYLD_FRAMEWORK_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005413 BLDLIBRARY=''
5414else
5415 BLDLIBRARY='$(LDLIBRARY)'
5416fi
5417
5418# Other platforms follow
5419if test $enable_shared = "yes"; then
5420
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005421$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005422
5423 case $ac_sys_system in
5424 BeOS*)
5425 LDLIBRARY='libpython$(VERSION).so'
5426 ;;
5427 CYGWIN*)
5428 LDLIBRARY='libpython$(VERSION).dll.a'
5429 DLLLIBRARY='libpython$(VERSION).dll'
5430 ;;
5431 SunOS*)
5432 LDLIBRARY='libpython$(VERSION).so'
5433 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005434 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005435 INSTSONAME="$LDLIBRARY".$SOVERSION
5436 ;;
Charles-François Natali3de8c732011-07-24 22:33:35 +02005437 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005438 LDLIBRARY='libpython$(VERSION).so'
5439 BLDLIBRARY='-L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005440 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005441 case $ac_sys_system in
5442 FreeBSD*)
5443 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
5444 ;;
5445 esac
5446 INSTSONAME="$LDLIBRARY".$SOVERSION
5447 ;;
5448 hp*|HP*)
5449 case `uname -m` in
5450 ia64)
5451 LDLIBRARY='libpython$(VERSION).so'
5452 ;;
5453 *)
5454 LDLIBRARY='libpython$(VERSION).sl'
5455 ;;
5456 esac
5457 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005458 RUNSHARED=SHLIB_PATH=`pwd`${SHLIB_PATH:+:${SHLIB_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005459 ;;
5460 OSF*)
5461 LDLIBRARY='libpython$(VERSION).so'
5462 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005463 RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005464 ;;
5465 atheos*)
5466 LDLIBRARY='libpython$(VERSION).so'
5467 BLDLIBRARY='-L. -lpython$(VERSION)'
5468 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
5469 ;;
5470 Darwin*)
5471 LDLIBRARY='libpython$(VERSION).dylib'
5472 BLDLIBRARY='-L. -lpython$(VERSION)'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005473 RUNSHARED=DYLD_LIBRARY_PATH=`pwd`${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005474 ;;
Antoine Pitrouaabdceb2010-09-10 20:03:17 +00005475 AIX*)
5476 LDLIBRARY='libpython$(VERSION).so'
doko@ubuntu.com9ba90c92014-05-07 04:41:26 +02005477 RUNSHARED=LIBPATH=`pwd`${LIBPATH:+:${LIBPATH}}
Antoine Pitrouaabdceb2010-09-10 20:03:17 +00005478 ;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005479
5480 esac
5481else # shared is disabled
5482 case $ac_sys_system in
5483 CYGWIN*)
5484 BLDLIBRARY='$(LIBRARY)'
5485 LDLIBRARY='libpython$(VERSION).dll.a'
5486 ;;
5487 esac
5488fi
5489
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005490if test "$cross_compiling" = yes; then
5491 RUNSHARED=
5492fi
5493
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005494{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5495$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005496
5497if test -n "$ac_tool_prefix"; then
5498 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5499set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5501$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005502if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005503 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005504else
5505 if test -n "$RANLIB"; then
5506 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5507else
5508as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5509for as_dir in $PATH
5510do
5511 IFS=$as_save_IFS
5512 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005513 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005514 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005515 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005516 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005517 break 2
5518 fi
5519done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005520 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005521IFS=$as_save_IFS
5522
5523fi
5524fi
5525RANLIB=$ac_cv_prog_RANLIB
5526if test -n "$RANLIB"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5528$as_echo "$RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005529else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005530 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5531$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005532fi
5533
5534
5535fi
5536if test -z "$ac_cv_prog_RANLIB"; then
5537 ac_ct_RANLIB=$RANLIB
5538 # Extract the first word of "ranlib", so it can be a program name with args.
5539set dummy ranlib; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5541$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005542if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005543 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005544else
5545 if test -n "$ac_ct_RANLIB"; then
5546 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5547else
5548as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5549for as_dir in $PATH
5550do
5551 IFS=$as_save_IFS
5552 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005553 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005554 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005555 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005556 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005557 break 2
5558 fi
5559done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005560 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005561IFS=$as_save_IFS
5562
5563fi
5564fi
5565ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5566if test -n "$ac_ct_RANLIB"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5568$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005569else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5571$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005572fi
5573
5574 if test "x$ac_ct_RANLIB" = x; then
5575 RANLIB=":"
5576 else
5577 case $cross_compiling:$ac_tool_warned in
5578yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005579{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5580$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005581ac_tool_warned=yes ;;
5582esac
5583 RANLIB=$ac_ct_RANLIB
5584 fi
5585else
5586 RANLIB="$ac_cv_prog_RANLIB"
5587fi
5588
5589
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005590if test -n "$ac_tool_prefix"; then
5591 for ac_prog in ar aal
5592 do
5593 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5594set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5596$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005597if ${ac_cv_prog_AR+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005598 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005599else
5600 if test -n "$AR"; then
5601 ac_cv_prog_AR="$AR" # Let the user override the test.
5602else
5603as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5604for as_dir in $PATH
5605do
5606 IFS=$as_save_IFS
5607 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005608 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005609 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005610 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005611 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005612 break 2
5613 fi
5614done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005615 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005616IFS=$as_save_IFS
5617
5618fi
5619fi
5620AR=$ac_cv_prog_AR
5621if test -n "$AR"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005622 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5623$as_echo "$AR" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005624else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005625 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5626$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005627fi
5628
5629
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005630 test -n "$AR" && break
5631 done
5632fi
5633if test -z "$AR"; then
5634 ac_ct_AR=$AR
5635 for ac_prog in ar aal
5636do
5637 # Extract the first word of "$ac_prog", so it can be a program name with args.
5638set dummy $ac_prog; ac_word=$2
5639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5640$as_echo_n "checking for $ac_word... " >&6; }
5641if ${ac_cv_prog_ac_ct_AR+:} false; then :
5642 $as_echo_n "(cached) " >&6
5643else
5644 if test -n "$ac_ct_AR"; then
5645 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5646else
5647as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5648for as_dir in $PATH
5649do
5650 IFS=$as_save_IFS
5651 test -z "$as_dir" && as_dir=.
5652 for ac_exec_ext in '' $ac_executable_extensions; do
5653 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5654 ac_cv_prog_ac_ct_AR="$ac_prog"
5655 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5656 break 2
5657 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005658done
doko@python.orgd65e2ba2013-01-31 23:52:03 +01005659 done
5660IFS=$as_save_IFS
5661
5662fi
5663fi
5664ac_ct_AR=$ac_cv_prog_ac_ct_AR
5665if test -n "$ac_ct_AR"; then
5666 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5667$as_echo "$ac_ct_AR" >&6; }
5668else
5669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5670$as_echo "no" >&6; }
5671fi
5672
5673
5674 test -n "$ac_ct_AR" && break
5675done
5676
5677 if test "x$ac_ct_AR" = x; then
5678 AR="ar"
5679 else
5680 case $cross_compiling:$ac_tool_warned in
5681yes:)
5682{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5683$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5684ac_tool_warned=yes ;;
5685esac
5686 AR=$ac_ct_AR
5687 fi
5688fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005689
5690
5691# tweak ARFLAGS only if the user didn't set it on the command line
5692
5693if test -z "$ARFLAGS"
5694then
5695 ARFLAGS="rc"
5696fi
5697
5698
5699# Extract the first word of "svnversion", so it can be a program name with args.
5700set dummy svnversion; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5702$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005703if ${ac_cv_prog_SVNVERSION+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005704 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005705else
5706 if test -n "$SVNVERSION"; then
5707 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
5708else
5709as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5710for as_dir in $PATH
5711do
5712 IFS=$as_save_IFS
5713 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005714 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005715 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005716 ac_cv_prog_SVNVERSION="found"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005717 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005718 break 2
5719 fi
5720done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005721 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005722IFS=$as_save_IFS
5723
5724 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
5725fi
5726fi
5727SVNVERSION=$ac_cv_prog_SVNVERSION
5728if test -n "$SVNVERSION"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SVNVERSION" >&5
5730$as_echo "$SVNVERSION" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005731else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5733$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005734fi
5735
5736
5737if test $SVNVERSION = found
5738then
5739 SVNVERSION="svnversion \$(srcdir)"
5740else
5741 SVNVERSION="echo Unversioned directory"
5742fi
5743
Trent Nelsond86ceec2012-10-16 09:42:45 -04005744
Trent Nelsonabf20512012-10-17 04:32:49 -04005745if test "$abs_srcdir" != "$abs_builddir"; then
Trent Nelsond86ceec2012-10-16 09:42:45 -04005746 # If we're building out-of-tree make sure Include (in the current dir)
5747 # gets picked up before its $srcdir counterpart in order for Python-ast.h
5748 # and graminit.h to get picked up from the correct directory.
5749 # (A side effect of this is that these resources will automatically be
5750 # regenerated when building out-of-tree, regardless of whether or not
5751 # the $srcdir counterpart is up-to-date. This is an acceptable trade
5752 # off.)
5753 BASECPPFLAGS="-IInclude"
5754else
5755 BASECPPFLAGS=""
5756fi
5757
Georg Brandl3a5508e2011-03-06 10:42:21 +01005758
5759
5760
5761# Extract the first word of "hg", so it can be a program name with args.
5762set dummy hg; ac_word=$2
5763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5764$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01005765if ${ac_cv_prog_HAS_HG+:} false; then :
Georg Brandl3a5508e2011-03-06 10:42:21 +01005766 $as_echo_n "(cached) " >&6
5767else
5768 if test -n "$HAS_HG"; then
5769 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
5770else
5771as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5772for as_dir in $PATH
5773do
5774 IFS=$as_save_IFS
5775 test -z "$as_dir" && as_dir=.
5776 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005777 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Georg Brandl3a5508e2011-03-06 10:42:21 +01005778 ac_cv_prog_HAS_HG="found"
5779 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5780 break 2
5781 fi
5782done
5783 done
5784IFS=$as_save_IFS
5785
5786 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
5787fi
5788fi
5789HAS_HG=$ac_cv_prog_HAS_HG
5790if test -n "$HAS_HG"; then
5791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
5792$as_echo "$HAS_HG" >&6; }
5793else
5794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5795$as_echo "no" >&6; }
5796fi
5797
5798
5799if test $HAS_HG = found
5800then
5801 HGVERSION="hg id -i \$(srcdir)"
5802 HGTAG="hg id -t \$(srcdir)"
5803 HGBRANCH="hg id -b \$(srcdir)"
5804else
5805 HGVERSION=""
5806 HGTAG=""
5807 HGBRANCH=""
5808fi
5809
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005810case $MACHDEP in
5811bsdos*|hp*|HP*)
5812 # install -d does not work on BSDI or HP-UX
5813 if test -z "$INSTALL"
5814 then
5815 INSTALL="${srcdir}/install-sh -c"
5816 fi
5817esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005818# Find a good install program. We prefer a C program (faster),
5819# so one script is as good as another. But avoid the broken or
5820# incompatible versions:
5821# SysV /etc/install, /usr/sbin/install
5822# SunOS /usr/etc/install
5823# IRIX /sbin/install
5824# AIX /bin/install
5825# AmigaOS /C/install, which installs bootblocks on floppy discs
5826# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5827# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5828# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
5829# OS/2's system install, which has a completely different semantic
5830# ./install, which can be erroneously created by make from ./install.sh.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005831# Reject install programs that cannot install multiple files.
5832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
5833$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005834if test -z "$INSTALL"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +01005835if ${ac_cv_path_install+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005836 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005837else
5838 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5839for as_dir in $PATH
5840do
5841 IFS=$as_save_IFS
5842 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005843 # Account for people who put trailing slashes in PATH elements.
5844case $as_dir/ in #((
5845 ./ | .// | /[cC]/* | \
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005846 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005847 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005848 /usr/ucb/* ) ;;
5849 *)
5850 # OSF1 and SCO ODT 3.0 have their own names for install.
5851 # Don't use installbsd from OSF since it installs stuff as root
5852 # by default.
5853 for ac_prog in ginstall scoinst install; do
5854 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005855 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005856 if test $ac_prog = install &&
5857 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5858 # AIX install. It has an incompatible calling convention.
5859 :
5860 elif test $ac_prog = install &&
5861 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5862 # program-specific install script used by HP pwplus--don't use.
5863 :
5864 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005865 rm -rf conftest.one conftest.two conftest.dir
5866 echo one > conftest.one
5867 echo two > conftest.two
5868 mkdir conftest.dir
5869 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5870 test -s conftest.one && test -s conftest.two &&
5871 test -s conftest.dir/conftest.one &&
5872 test -s conftest.dir/conftest.two
5873 then
5874 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5875 break 3
5876 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005877 fi
5878 fi
5879 done
5880 done
5881 ;;
5882esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005883
5884 done
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005885IFS=$as_save_IFS
5886
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005887rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005888
5889fi
5890 if test "${ac_cv_path_install+set}" = set; then
5891 INSTALL=$ac_cv_path_install
5892 else
5893 # As a last resort, use the slow shell script. Don't cache a
5894 # value for INSTALL within a source directory, because that will
5895 # break other packages using the cache if that directory is
5896 # removed, or if the value is a relative name.
5897 INSTALL=$ac_install_sh
5898 fi
5899fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005900{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
5901$as_echo "$INSTALL" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005902
5903# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5904# It thinks the first close brace ends the variable substitution.
5905test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5906
5907test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5908
5909test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5910
Trent Nelsonf6407a12012-08-30 14:56:13 +00005911{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
5912$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
5913if test -z "$MKDIR_P"; then
5914 if ${ac_cv_path_mkdir+:} false; then :
5915 $as_echo_n "(cached) " >&6
5916else
5917 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5918for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
5919do
5920 IFS=$as_save_IFS
5921 test -z "$as_dir" && as_dir=.
5922 for ac_prog in mkdir gmkdir; do
5923 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01005924 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Trent Nelsonf6407a12012-08-30 14:56:13 +00005925 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
5926 'mkdir (GNU coreutils) '* | \
5927 'mkdir (coreutils) '* | \
5928 'mkdir (fileutils) '4.1*)
5929 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
5930 break 3;;
5931 esac
5932 done
5933 done
5934 done
5935IFS=$as_save_IFS
5936
5937fi
5938
5939 test -d ./--version && rmdir ./--version
5940 if test "${ac_cv_path_mkdir+set}" = set; then
5941 MKDIR_P="$ac_cv_path_mkdir -p"
5942 else
5943 # As a last resort, use the slow shell script. Don't cache a
5944 # value for MKDIR_P within a source directory, because that will
5945 # break other packages using the cache if that directory is
5946 # removed, or if the value is a relative name.
5947 MKDIR_P="$ac_install_sh -d"
5948 fi
5949fi
5950{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
5951$as_echo "$MKDIR_P" >&6; }
5952
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005953
5954# Not every filesystem supports hard links
5955
5956if test -z "$LN" ; then
5957 case $ac_sys_system in
5958 BeOS*) LN="ln -s";;
5959 CYGWIN*) LN="ln -s";;
5960 atheos*) LN="ln -s";;
5961 *) LN=ln;;
5962 esac
5963fi
5964
5965# Check for --with-pydebug
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
5967$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005968
5969# Check whether --with-pydebug was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005970if test "${with_pydebug+set}" = set; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005971 withval=$with_pydebug;
5972if test "$withval" != no
5973then
5974
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005975$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005976
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5978$as_echo "yes" >&6; };
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005979 Py_DEBUG='true'
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005980else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5981$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005982fi
5983else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00005984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5985$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005986fi
5987
5988
5989# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5990# merged with this chunk of code?
5991
5992# Optimizer/debugger flags
5993# ------------------------
5994# (The following bit of code is complicated enough - please keep things
5995# indented properly. Just pretend you're editing Python code. ;-)
5996
5997# There are two parallel sets of case statements below, one that checks to
5998# see if OPT was set and one that does BASECFLAGS setting based upon
5999# compiler and platform. BASECFLAGS tweaks need to be made even if the
6000# user set OPT.
6001
6002# tweak OPT based on compiler and platform, only if the user didn't set
6003# it on the command line
6004
Benjamin Petersond4b721b2010-03-23 20:58:37 +00006005if test "${OPT-unset}" = "unset"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006006then
6007 case $GCC in
6008 yes)
6009 if test "$CC" != 'g++' ; then
6010 STRICT_PROTO="-Wstrict-prototypes"
6011 fi
6012 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6013 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6014 WRAP="-fwrapv"
6015 fi
Stefan Krah503e5e12011-09-14 15:19:42 +02006016
6017 # Clang also needs -fwrapv
Stefan Krah2bc1e8f2011-12-08 22:26:06 +01006018 case $CC in
6019 *clang*) WRAP="-fwrapv"
6020 ;;
6021 esac
Stefan Krah503e5e12011-09-14 15:19:42 +02006022
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006023 case $ac_cv_prog_cc_g in
6024 yes)
6025 if test "$Py_DEBUG" = 'true' ; then
6026 # Optimization messes up debuggers, so turn it off for
6027 # debug builds.
Mark Dickinsond2f3e3f2010-05-05 22:23:58 +00006028 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006029 else
6030 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
6031 fi
6032 ;;
6033 *)
6034 OPT="-O3 -Wall $STRICT_PROTO"
6035 ;;
6036 esac
6037 case $ac_sys_system in
6038 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6039 ;;
6040 esac
6041 ;;
6042
6043 *)
6044 OPT="-O"
6045 ;;
6046 esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006047fi
6048
6049
6050
6051# The -arch flags for universal builds on OSX
6052UNIVERSAL_ARCH_FLAGS=
6053
6054
6055# tweak BASECFLAGS based on compiler and platform
6056case $GCC in
6057yes)
6058 # Python violates C99 rules, by casting between incompatible
6059 # pointer types. GCC may generate bad code as a result of that,
6060 # so use -fno-strict-aliasing if supported.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006061 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -fno-strict-aliasing" >&5
6062$as_echo_n "checking whether $CC accepts -fno-strict-aliasing... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006063 ac_save_cc="$CC"
6064 CC="$CC -fno-strict-aliasing"
Matthias Klose3cef2a92012-03-14 23:39:33 +01006065 if ${ac_cv_no_strict_aliasing_ok+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006066 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00006067else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006068 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006069/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00006070
6071int
6072main ()
6073{
Mark Dickinson5e13e292010-05-11 08:55:06 +00006074
Gregory P. Smith373469a2009-11-01 21:03:38 +00006075 ;
6076 return 0;
6077}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006078_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006079if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006080 ac_cv_no_strict_aliasing_ok=yes
6081else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006082 ac_cv_no_strict_aliasing_ok=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006083fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00006084rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00006085fi
6086
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006087 CC="$ac_save_cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing_ok" >&5
6089$as_echo "$ac_cv_no_strict_aliasing_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006090 if test $ac_cv_no_strict_aliasing_ok = yes
6091 then
6092 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6093 fi
6094
6095 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
6096 # support. Without this, treatment of subnormals doesn't follow
6097 # the standard.
doko@python.orgd65e2ba2013-01-31 23:52:03 +01006098 case $host in
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006099 alpha*)
6100 BASECFLAGS="$BASECFLAGS -mieee"
6101 ;;
6102 esac
6103
6104 case $ac_sys_system in
6105 SCO_SV*)
6106 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
6107 ;;
6108 # is there any other compiler on Darwin besides gcc?
6109 Darwin*)
6110 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
6111 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006112 if test "${CC}" = gcc
6113 then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006114 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
6115$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006116 case "${UNIVERSALSDK}" in
6117 */MacOSX10.4u.sdk)
6118 # Build using 10.4 SDK, force usage of gcc when the
6119 # compiler is gcc, otherwise the user will get very
6120 # confusing error messages when building on OSX 10.6
6121 CC=gcc-4.0
6122 CPP=cpp-4.0
6123 ;;
6124 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
6126$as_echo "$CC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006127 fi
6128
6129 # Calculate the right deployment target for this build.
6130 #
Ned Deilyc40b9032014-06-25 13:48:46 -07006131 cur_target_major=`sw_vers -productVersion | \
6132 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
6133 cur_target_minor=`sw_vers -productVersion | \
6134 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
6135 cur_target="${cur_target_major}.${cur_target_minor}"
6136 if test ${cur_target_major} -eq 10 && \
6137 test ${cur_target_minor} -ge 3
6138 then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006139 cur_target=10.3
Ronald Oussoren25967582009-09-06 10:00:26 +00006140 if test ${enable_universalsdk}; then
6141 if test "${UNIVERSAL_ARCHS}" = "all"; then
6142 # Ensure that the default platform for a
6143 # 4-way universal build is OSX 10.5,
6144 # that's the first OS release where
6145 # 4-way builds make sense.
6146 cur_target='10.5'
Ronald Oussoren23d92532009-09-07 06:12:00 +00006147
6148 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
6149 cur_target='10.5'
6150
6151 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
6152 cur_target='10.5'
6153
6154 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
6155 cur_target='10.5'
Ronald Oussoren25967582009-09-06 10:00:26 +00006156 fi
6157 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00006158 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren25967582009-09-06 10:00:26 +00006159 # On Intel macs default to a deployment
6160 # target of 10.4, that's the first OSX
6161 # release with Intel support.
6162 cur_target="10.4"
6163 fi
6164 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006165 fi
6166 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
6167
6168 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
6169 # environment with a value that is the same as what we'll use
6170 # in the Makefile to ensure that we'll get the same compiler
6171 # environment during configure and build time.
6172 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
6173 export MACOSX_DEPLOYMENT_TARGET
6174 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
6175
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006176 if test "${enable_universalsdk}"; then
6177 UNIVERSAL_ARCH_FLAGS=""
6178 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
6179 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
6180 ARCH_RUN_32BIT=""
Ronald Oussoren75912852010-04-08 08:13:31 +00006181 LIPO_32BIT_FLAGS=""
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006182
6183 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
6184 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
6185 LIPO_32BIT_FLAGS=""
6186 ARCH_RUN_32BIT="true"
6187
6188 elif test "$UNIVERSAL_ARCHS" = "all" ; then
6189 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
6190 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren92397ce2010-01-17 19:32:00 +00006191 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006192
6193 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
6194 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
6195 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren92397ce2010-01-17 19:32:00 +00006196 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006197
6198 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
6199 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
6200 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren9922f172010-02-11 13:19:34 +00006201 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006202
6203 else
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006204 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 +00006205
6206 fi
6207
6208
Ronald Oussoren974eb5e2010-04-18 17:59:37 +00006209 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
6210 if test "${UNIVERSALSDK}" != "/"
6211 then
6212 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
6213 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
6214 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00006215 fi
6216
6217 fi
6218
6219
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006220 ;;
6221 OSF*)
6222 BASECFLAGS="$BASECFLAGS -mieee"
6223 ;;
6224 esac
6225 ;;
6226
6227*)
6228 case $ac_sys_system in
6229 OpenUNIX*|UnixWare*)
6230 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
6231 ;;
6232 OSF*)
6233 BASECFLAGS="$BASECFLAGS -ieee -std"
6234 ;;
6235 SCO_SV*)
6236 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
6237 ;;
6238 esac
6239 ;;
6240esac
6241
Zachary Ware6ed42ea2015-12-21 11:43:03 -06006242# ICC needs -fp-model strict or floats behave badly
6243case "$CC" in
6244*icc*)
6245 BASECFLAGS="$BASECFLAGS -fp-model strict"
6246 ;;
6247esac
6248
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006249if test "$Py_DEBUG" = 'true'; then
6250 :
6251else
6252 OPT="-DNDEBUG $OPT"
6253fi
6254
6255if test "$ac_arch_flags"
6256then
6257 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
6258fi
6259
6260# disable check for icc since it seems to pass, but generates a warning
6261if test "$CC" = icc
6262then
6263 ac_cv_opt_olimit_ok=no
6264fi
6265
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -OPT:Olimit=0" >&5
6267$as_echo_n "checking whether $CC accepts -OPT:Olimit=0... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006268if ${ac_cv_opt_olimit_ok+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006269 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006270else
6271 ac_save_cc="$CC"
6272CC="$CC -OPT:Olimit=0"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006273cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006274/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00006275
6276int
6277main ()
6278{
Mark Dickinson5e13e292010-05-11 08:55:06 +00006279
Gregory P. Smith373469a2009-11-01 21:03:38 +00006280 ;
6281 return 0;
6282}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006283_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006284if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006285 ac_cv_opt_olimit_ok=yes
6286else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006287 ac_cv_opt_olimit_ok=no
Matthias Klosec511b472010-05-08 11:01:39 +00006288
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006289fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00006290rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006291CC="$ac_save_cc"
6292fi
6293
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006294{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_opt_olimit_ok" >&5
6295$as_echo "$ac_cv_opt_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006296if test $ac_cv_opt_olimit_ok = yes; then
6297 case $ac_sys_system in
6298 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
6299 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
6300 # environment?
6301 Darwin*)
6302 ;;
Trent Nelson34562e12012-10-17 18:01:12 -04006303 # XXX thankfully this useless troublemaker of a flag has been
6304 # eradicated in the 3.x line. For now, make sure it isn't picked
6305 # up by any of our other platforms that use CC.
6306 AIX*|SunOS*|HP-UX*|IRIX*)
6307 ;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006308 *)
6309 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
6310 ;;
6311 esac
6312else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006313 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Olimit 1500" >&5
6314$as_echo_n "checking whether $CC accepts -Olimit 1500... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006315 if ${ac_cv_olimit_ok+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006316 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006317else
6318 ac_save_cc="$CC"
6319 CC="$CC -Olimit 1500"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006320 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006321/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00006322
6323int
6324main ()
6325{
Mark Dickinson5e13e292010-05-11 08:55:06 +00006326
Gregory P. Smith373469a2009-11-01 21:03:38 +00006327 ;
6328 return 0;
6329}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006330_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006331if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006332 ac_cv_olimit_ok=yes
6333else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006334 ac_cv_olimit_ok=no
Matthias Klosec511b472010-05-08 11:01:39 +00006335
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006336fi
Gregory P. Smith373469a2009-11-01 21:03:38 +00006337rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006338 CC="$ac_save_cc"
6339fi
6340
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_olimit_ok" >&5
6342$as_echo "$ac_cv_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006343 if test $ac_cv_olimit_ok = yes; then
Stefan Krah67473262012-11-29 00:17:05 +01006344 case $ac_sys_system in
6345 # Issue #16534: On HP-UX ac_cv_olimit_ok=yes is a false positive.
6346 HP-UX*)
6347 ;;
6348 *)
6349 BASECFLAGS="$BASECFLAGS -Olimit 1500"
6350 ;;
6351 esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006352 fi
6353fi
6354
6355# Check whether GCC supports PyArg_ParseTuple format
6356if test "$GCC" = "yes"
6357then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006358 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
6359$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006360 save_CFLAGS=$CFLAGS
Benjamin Petersonc8759662013-05-11 13:00:05 -05006361 CFLAGS="$CFLAGS -Werror -Wformat"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006362 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006363/* end confdefs.h. */
6364
6365 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006366int
6367main ()
6368{
6369
6370 ;
6371 return 0;
6372}
Matthias Klosec511b472010-05-08 11:01:39 +00006373
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006374_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006375if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006376
Matthias Klosec511b472010-05-08 11:01:39 +00006377
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006378$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006379
Matthias Klosec511b472010-05-08 11:01:39 +00006380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006381$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00006382
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006383else
Matthias Klosec511b472010-05-08 11:01:39 +00006384
6385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006386$as_echo "no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006387
6388fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006389rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6390 CFLAGS=$save_CFLAGS
6391fi
6392
Brett Cannon4ff151a2015-09-18 15:09:42 -07006393
Gregory P. Smith6d8fdfc2016-09-07 23:28:23 -07006394# Enable optimization flags
6395
6396
6397Py_OPT='false'
6398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-optimizations" >&5
6399$as_echo_n "checking for --with-optimizations... " >&6; }
6400
6401# Check whether --with-optimizations was given.
6402if test "${with_optimizations+set}" = set; then :
6403 withval=$with_optimizations;
6404if test "$withval" != no
6405then
6406 Py_OPT='true'
6407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6408$as_echo "yes" >&6; };
6409else
6410 Py_OPT='false'
6411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6412$as_echo "no" >&6; };
6413fi
6414else
6415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6416$as_echo "no" >&6; }
6417fi
6418
6419if test "$Py_OPT" = 'true' ; then
6420 case $ac_sys_system in
6421 Darwin*)
6422 # At least on macOS El Capitan, LTO does not work with PGO.
6423 Py_LTO='false'
6424 ;;
6425 esac
6426 Py_LTO='true'
6427 DEF_MAKE_ALL_RULE="profile-opt"
6428 DEF_MAKE_RULE="build_all"
6429else
6430 DEF_MAKE_ALL_RULE="build_all"
6431 DEF_MAKE_RULE="all"
6432fi
6433
6434
Gregory P. Smith ext:(%20%5BGoogle%20Inc.%5D)c543a0f2016-06-02 23:44:40 +00006435# Enable LTO flags
6436
6437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-lto" >&5
6438$as_echo_n "checking for --with-lto... " >&6; }
6439
6440# Check whether --with-lto was given.
6441if test "${with_lto+set}" = set; then :
6442 withval=$with_lto;
6443if test "$withval" != no
6444then
6445 Py_LTO='true'
6446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6447$as_echo "yes" >&6; };
6448else
6449 Py_LTO='false'
6450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6451$as_echo "no" >&6; };
6452fi
6453else
6454 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6455$as_echo "no" >&6; }
6456fi
6457
6458if test "$Py_LTO" = 'true' ; then
6459 case $CC in
6460 *clang*)
6461 # Any changes made here should be reflected in the GCC+Darwin case below
6462 LTOFLAGS="-flto"
6463 ;;
6464 *gcc*)
6465 case $ac_sys_system in
6466 Darwin*)
6467 LTOFLAGS="-flto"
6468 ;;
6469 *)
6470 LTOFLAGS="-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none"
6471 ;;
6472 esac
6473 ;;
6474 esac
6475fi
6476
6477
Brett Cannon4ff151a2015-09-18 15:09:42 -07006478# Enable PGO flags.
Zachary Ware6ed42ea2015-12-21 11:43:03 -06006479
6480
6481
6482
6483
6484
Brett Cannon4ff151a2015-09-18 15:09:42 -07006485# Extract the first word of "llvm-profdata", so it can be a program name with args.
6486set dummy llvm-profdata; ac_word=$2
6487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6488$as_echo_n "checking for $ac_word... " >&6; }
6489if ${ac_cv_prog_LLVM_PROF_FOUND+:} false; then :
6490 $as_echo_n "(cached) " >&6
6491else
6492 if test -n "$LLVM_PROF_FOUND"; then
6493 ac_cv_prog_LLVM_PROF_FOUND="$LLVM_PROF_FOUND" # Let the user override the test.
6494else
6495as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6496for as_dir in $PATH
6497do
6498 IFS=$as_save_IFS
6499 test -z "$as_dir" && as_dir=.
6500 for ac_exec_ext in '' $ac_executable_extensions; do
6501 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6502 ac_cv_prog_LLVM_PROF_FOUND="found"
6503 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6504 break 2
6505 fi
6506done
6507 done
6508IFS=$as_save_IFS
6509
6510 test -z "$ac_cv_prog_LLVM_PROF_FOUND" && ac_cv_prog_LLVM_PROF_FOUND="not-found"
6511fi
6512fi
6513LLVM_PROF_FOUND=$ac_cv_prog_LLVM_PROF_FOUND
6514if test -n "$LLVM_PROF_FOUND"; then
6515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROF_FOUND" >&5
6516$as_echo "$LLVM_PROF_FOUND" >&6; }
6517else
6518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6519$as_echo "no" >&6; }
6520fi
6521
6522
6523LLVM_PROF_ERR=no
6524case $CC in
6525 *clang*)
6526 # Any changes made here should be reflected in the GCC+Darwin case below
6527 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6528 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
6529 LLVM_PROF_MERGER="llvm-profdata merge -output=code.profclangd *.profclangr"
6530 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6531 if test $LLVM_PROF_FOUND = not-found
6532 then
6533 LLVM_PROF_ERR=yes
6534 fi
6535 ;;
6536 *gcc*)
6537 case $ac_sys_system in
6538 Darwin*)
6539 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
6540 PGO_PROF_USE_FLAG="-fprofile-instr-use=code.profclangd"
6541 LLVM_PROF_MERGER="llvm-profdata merge -output=code.profclangd *.profclangr"
6542 LLVM_PROF_FILE="LLVM_PROFILE_FILE=\"code-%p.profclangr\""
6543 if test $LLVM_PROF_FOUND = not-found
6544 then
6545 LLVM_PROF_ERR=yes
6546 fi
6547 ;;
6548 *)
6549 PGO_PROF_GEN_FLAG="-fprofile-generate"
6550 PGO_PROF_USE_FLAG="-fprofile-use -fprofile-correction"
6551 LLVM_PROF_MERGER="true"
6552 LLVM_PROF_FILE=""
6553 ;;
6554 esac
6555 ;;
Zachary Ware6ed42ea2015-12-21 11:43:03 -06006556 *icc*)
6557 PGO_PROF_GEN_FLAG="-prof-gen"
6558 PGO_PROF_USE_FLAG="-prof-use"
6559 LLVM_PROF_MERGER="true"
6560 LLVM_PROF_FILE=""
6561 ;;
Brett Cannon4ff151a2015-09-18 15:09:42 -07006562esac
6563
6564
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006565# On some compilers, pthreads are available without further options
6566# (e.g. MacOS X). On some of these systems, the compiler will not
6567# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
6568# So we have to see first whether pthreads are available without
6569# options before we can check whether -Kpthread improves anything.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
6571$as_echo_n "checking whether pthreads are available without options... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006572if ${ac_cv_pthread_is_default+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006573 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006574else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006575 if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006576 ac_cv_pthread_is_default=no
6577else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006578 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006579/* end confdefs.h. */
6580
Stefan Krahae66ca62012-11-22 22:36:57 +01006581#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006582#include <pthread.h>
6583
6584void* routine(void* p){return NULL;}
6585
6586int main(){
6587 pthread_t p;
6588 if(pthread_create(&p,NULL,routine,NULL)!=0)
6589 return 1;
6590 (void)pthread_detach(p);
6591 return 0;
6592}
6593
6594_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006595if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006596
6597 ac_cv_pthread_is_default=yes
6598 ac_cv_kthread=no
6599 ac_cv_pthread=no
6600
6601else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006602 ac_cv_pthread_is_default=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006603fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006604rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6605 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006606fi
6607
6608
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006609fi
6610
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006611{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
6612$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006613
6614
6615if test $ac_cv_pthread_is_default = yes
6616then
6617 ac_cv_kpthread=no
6618else
6619# -Kpthread, if available, provides the right #defines
6620# and linker options to make pthread_create available
6621# Some compilers won't report that they do not support -Kpthread,
6622# so we need to run a program to see whether it really made the
6623# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
6625$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006626if ${ac_cv_kpthread+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006627 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006628else
6629 ac_save_cc="$CC"
6630CC="$CC -Kpthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006631if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006632 ac_cv_kpthread=no
6633else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006634 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006635/* end confdefs.h. */
6636
Stefan Krahae66ca62012-11-22 22:36:57 +01006637#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006638#include <pthread.h>
6639
6640void* routine(void* p){return NULL;}
6641
6642int main(){
6643 pthread_t p;
6644 if(pthread_create(&p,NULL,routine,NULL)!=0)
6645 return 1;
6646 (void)pthread_detach(p);
6647 return 0;
6648}
6649
6650_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006651if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006652 ac_cv_kpthread=yes
6653else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006654 ac_cv_kpthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006655fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006656rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6657 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006658fi
6659
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006660CC="$ac_save_cc"
6661fi
6662
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006663{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
6664$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006665fi
6666
6667if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
6668then
6669# -Kthread, if available, provides the right #defines
6670# and linker options to make pthread_create available
6671# Some compilers won't report that they do not support -Kthread,
6672# so we need to run a program to see whether it really made the
6673# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
6675$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006676if ${ac_cv_kthread+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006677 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006678else
6679 ac_save_cc="$CC"
6680CC="$CC -Kthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006681if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006682 ac_cv_kthread=no
6683else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006684 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006685/* end confdefs.h. */
6686
Stefan Krahae66ca62012-11-22 22:36:57 +01006687#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006688#include <pthread.h>
6689
6690void* routine(void* p){return NULL;}
6691
6692int main(){
6693 pthread_t p;
6694 if(pthread_create(&p,NULL,routine,NULL)!=0)
6695 return 1;
6696 (void)pthread_detach(p);
6697 return 0;
6698}
6699
6700_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006701if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006702 ac_cv_kthread=yes
6703else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006704 ac_cv_kthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006705fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006706rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6707 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006708fi
6709
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006710CC="$ac_save_cc"
6711fi
6712
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006713{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
6714$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006715fi
6716
6717if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
6718then
6719# -pthread, if available, provides the right #defines
6720# and linker options to make pthread_create available
6721# Some compilers won't report that they do not support -pthread,
6722# so we need to run a program to see whether it really made the
6723# function available.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
6725$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.orgfa3f9a32013-01-25 15:32:31 +01006726if ${ac_cv_pthread+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006727 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006728else
6729 ac_save_cc="$CC"
6730CC="$CC -pthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006731if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006732 ac_cv_pthread=no
6733else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006734 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006735/* end confdefs.h. */
6736
Stefan Krahae66ca62012-11-22 22:36:57 +01006737#include <stdio.h>
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006738#include <pthread.h>
6739
6740void* routine(void* p){return NULL;}
6741
6742int main(){
6743 pthread_t p;
6744 if(pthread_create(&p,NULL,routine,NULL)!=0)
6745 return 1;
6746 (void)pthread_detach(p);
6747 return 0;
6748}
6749
6750_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006751if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006752 ac_cv_pthread=yes
6753else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006754 ac_cv_pthread=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006755fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006756rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6757 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006758fi
6759
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006760CC="$ac_save_cc"
6761fi
6762
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006763{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
6764$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006765fi
6766
6767# If we have set a CC compiler flag for thread support then
6768# check if it works for CXX, too.
6769ac_cv_cxx_thread=no
6770if test ! -z "$CXX"
6771then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
6773$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006774ac_save_cxx="$CXX"
6775
6776if test "$ac_cv_kpthread" = "yes"
6777then
6778 CXX="$CXX -Kpthread"
6779 ac_cv_cxx_thread=yes
6780elif test "$ac_cv_kthread" = "yes"
6781then
6782 CXX="$CXX -Kthread"
6783 ac_cv_cxx_thread=yes
6784elif test "$ac_cv_pthread" = "yes"
6785then
6786 CXX="$CXX -pthread"
6787 ac_cv_cxx_thread=yes
6788fi
6789
6790if test $ac_cv_cxx_thread = yes
6791then
6792 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
6793 $CXX -c conftest.$ac_ext 2>&5
6794 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
6795 && test -s conftest$ac_exeext && ./conftest$ac_exeext
6796 then
6797 ac_cv_cxx_thread=yes
6798 else
6799 ac_cv_cxx_thread=no
6800 fi
6801 rm -fr conftest*
6802fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006803{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
6804$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006805fi
6806CXX="$ac_save_cxx"
6807
6808
6809# checks for header files
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6811$as_echo_n "checking for ANSI C header files... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006812if ${ac_cv_header_stdc+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006813 $as_echo_n "(cached) " >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006814else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006815 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006816/* end confdefs.h. */
6817#include <stdlib.h>
6818#include <stdarg.h>
6819#include <string.h>
6820#include <float.h>
6821
6822int
6823main ()
6824{
6825
6826 ;
6827 return 0;
6828}
6829_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006830if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006831 ac_cv_header_stdc=yes
6832else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006833 ac_cv_header_stdc=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006834fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006835rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6836
6837if test $ac_cv_header_stdc = yes; then
6838 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006839 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006840/* end confdefs.h. */
6841#include <string.h>
6842
6843_ACEOF
6844if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006845 $EGREP "memchr" >/dev/null 2>&1; then :
6846
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006847else
6848 ac_cv_header_stdc=no
6849fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006850rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006851
6852fi
6853
6854if test $ac_cv_header_stdc = yes; then
6855 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006856 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006857/* end confdefs.h. */
6858#include <stdlib.h>
6859
6860_ACEOF
6861if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006862 $EGREP "free" >/dev/null 2>&1; then :
6863
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006864else
6865 ac_cv_header_stdc=no
6866fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006867rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006868
6869fi
6870
6871if test $ac_cv_header_stdc = yes; then
6872 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006873 if test "$cross_compiling" = yes; then :
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006874 :
6875else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006876 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006877/* end confdefs.h. */
6878#include <ctype.h>
6879#include <stdlib.h>
6880#if ((' ' & 0x0FF) == 0x020)
6881# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6882# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6883#else
6884# define ISLOWER(c) \
6885 (('a' <= (c) && (c) <= 'i') \
6886 || ('j' <= (c) && (c) <= 'r') \
6887 || ('s' <= (c) && (c) <= 'z'))
6888# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6889#endif
6890
6891#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6892int
6893main ()
6894{
6895 int i;
6896 for (i = 0; i < 256; i++)
6897 if (XOR (islower (i), ISLOWER (i))
6898 || toupper (i) != TOUPPER (i))
6899 return 2;
6900 return 0;
6901}
6902_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006903if ac_fn_c_try_run "$LINENO"; then :
6904
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006905else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006906 ac_cv_header_stdc=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006907fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006908rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6909 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006910fi
6911
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006912fi
6913fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006914{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6915$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006916if test $ac_cv_header_stdc = yes; then
6917
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006918$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006919
6920fi
6921
doko@ubuntu.comf27ec3e2014-04-17 20:11:19 +02006922for ac_header in asm/types.h conio.h direct.h dlfcn.h errno.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00006923fcntl.h grp.h \
doko@ubuntu.comf27ec3e2014-04-17 20:11:19 +02006924ieeefp.h io.h langinfo.h libintl.h poll.h process.h pthread.h \
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00006925shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006926unistd.h utime.h \
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00006927sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
6928sys/lock.h sys/mkdev.h sys/modem.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00006929sys/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 +00006930sys/termio.h sys/time.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00006931sys/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 +00006932sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimes3aa138f2013-06-18 13:25:24 +02006933bluetooth/bluetooth.h linux/tipc.h spawn.h util.h alloca.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006934do :
6935 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6936ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006937if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006938 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006939#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006940_ACEOF
6941
6942fi
6943
Guido van Rossum627b2d71993-12-24 10:39:16 +00006944done
6945
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006946ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006947for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006948 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6950$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006951if eval \${$as_ac_Header+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006952 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006953else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006954 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006955/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006956#include <sys/types.h>
6957#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006958
Martin v. Löwis11437992002-04-12 09:54:03 +00006959int
6960main ()
6961{
6962if ((DIR *) 0)
6963return 0;
6964 ;
6965 return 0;
6966}
6967_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006968if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006969 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006970else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006971 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006972fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006973rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006974fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006975eval ac_res=\$$as_ac_Header
6976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6977$as_echo "$ac_res" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +00006978if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006979 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006980#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006981_ACEOF
6982
6983ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006984fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006985
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006986done
6987# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6988if test $ac_header_dirent = dirent.h; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006989 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6990$as_echo_n "checking for library containing opendir... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01006991if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006992 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006993else
Martin v. Löwis11437992002-04-12 09:54:03 +00006994 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00006995cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006996/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006997
Martin v. Löwiseba40652007-08-30 20:10:57 +00006998/* Override any GCC internal prototype to avoid an error.
6999 Use char because int might match the return type of a GCC
7000 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007001#ifdef __cplusplus
7002extern "C"
7003#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007004char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007005int
7006main ()
7007{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007008return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007009 ;
7010 return 0;
7011}
7012_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007013for ac_lib in '' dir; do
7014 if test -z "$ac_lib"; then
7015 ac_res="none required"
7016 else
7017 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00007018 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00007019 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007020 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007021 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00007022fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007023rm -f core conftest.err conftest.$ac_objext \
7024 conftest$ac_exeext
Matthias Klose3cef2a92012-03-14 23:39:33 +01007025 if ${ac_cv_search_opendir+:} false; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007026 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00007027fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007028done
Matthias Klose3cef2a92012-03-14 23:39:33 +01007029if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007030
Martin v. Löwiseba40652007-08-30 20:10:57 +00007031else
7032 ac_cv_search_opendir=no
7033fi
7034rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007035LIBS=$ac_func_search_save_LIBS
7036fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007037{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7038$as_echo "$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007039ac_res=$ac_cv_search_opendir
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007040if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007041 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007042
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007043fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007044
Michael W. Hudson54241132001-12-07 15:38:26 +00007045else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007046 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7047$as_echo_n "checking for library containing opendir... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007048if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007049 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007050else
7051 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007052cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007053/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007054
Martin v. Löwiseba40652007-08-30 20:10:57 +00007055/* Override any GCC internal prototype to avoid an error.
7056 Use char because int might match the return type of a GCC
7057 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007058#ifdef __cplusplus
7059extern "C"
7060#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007061char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007062int
7063main ()
7064{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007065return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007066 ;
7067 return 0;
7068}
7069_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007070for ac_lib in '' x; do
7071 if test -z "$ac_lib"; then
7072 ac_res="none required"
7073 else
7074 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00007075 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00007076 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007077 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007078 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00007079fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007080rm -f core conftest.err conftest.$ac_objext \
7081 conftest$ac_exeext
Matthias Klose3cef2a92012-03-14 23:39:33 +01007082 if ${ac_cv_search_opendir+:} false; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007083 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00007084fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007085done
Matthias Klose3cef2a92012-03-14 23:39:33 +01007086if ${ac_cv_search_opendir+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007087
Martin v. Löwiseba40652007-08-30 20:10:57 +00007088else
7089 ac_cv_search_opendir=no
7090fi
7091rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007092LIBS=$ac_func_search_save_LIBS
7093fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007094{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7095$as_echo "$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007096ac_res=$ac_cv_search_opendir
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007097if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007098 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007099
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007100fi
7101
7102fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007103
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7105$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007106if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007107 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007108else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007109 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007110/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007111#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007112int
7113main ()
7114{
7115return makedev(0, 0);
7116 ;
7117 return 0;
7118}
7119_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007120if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007121 ac_cv_header_sys_types_h_makedev=yes
7122else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007123 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007124fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007125rm -f core conftest.err conftest.$ac_objext \
7126 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007127
7128fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007129{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7130$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007131
7132if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007133ac_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 +01007134if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007135
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007136$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007137
7138fi
7139
7140
7141
7142 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007143 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 +01007144if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007145
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007146$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007147
7148fi
7149
7150
7151 fi
7152fi
7153
Michael W. Hudson54241132001-12-07 15:38:26 +00007154
Martin v. Löwis11017b12006-01-14 18:12:57 +00007155# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007156for ac_header in linux/netlink.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007157do :
7158 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 +00007159#ifdef HAVE_ASM_TYPES_H
7160#include <asm/types.h>
7161#endif
7162#ifdef HAVE_SYS_SOCKET_H
7163#include <sys/socket.h>
7164#endif
7165
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007166"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007167if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007168 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007169#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007170_ACEOF
7171
7172fi
7173
7174done
7175
7176
Guido van Rossum627b2d71993-12-24 10:39:16 +00007177# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00007178was_it_defined=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
7180$as_echo_n "checking for clock_t in time.h... " >&6; }
7181cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007182/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007183#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007184
7185_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007186if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007187 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00007188 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007189else
Martin v. Löwis11437992002-04-12 09:54:03 +00007190
7191
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007192$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00007193
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007194
Guido van Rossum627b2d71993-12-24 10:39:16 +00007195fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00007196rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007197
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007198{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
7199$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00007200
Neal Norwitz11690112002-07-30 01:08:28 +00007201# Check whether using makedev requires defining _OSF_SOURCE
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
7203$as_echo_n "checking for makedev... " >&6; }
7204cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007205/* end confdefs.h. */
Jesus Cea616de772010-04-28 10:32:30 +00007206
7207#if defined(MAJOR_IN_MKDEV)
7208#include <sys/mkdev.h>
7209#elif defined(MAJOR_IN_SYSMACROS)
7210#include <sys/sysmacros.h>
7211#else
Neal Norwitz6eb37f02003-02-23 23:28:15 +00007212#include <sys/types.h>
Jesus Cea616de772010-04-28 10:32:30 +00007213#endif
Neal Norwitz11690112002-07-30 01:08:28 +00007214int
7215main ()
7216{
7217 makedev(0, 0)
7218 ;
7219 return 0;
7220}
7221_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007222if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007223 ac_cv_has_makedev=yes
7224else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007225 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007226fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007227rm -f core conftest.err conftest.$ac_objext \
7228 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00007229if test "$ac_cv_has_makedev" = "no"; then
7230 # we didn't link, try if _OSF_SOURCE will allow us to link
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007231 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007232/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00007233
Neal Norwitz6eb37f02003-02-23 23:28:15 +00007234#define _OSF_SOURCE 1
7235#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00007236
Neal Norwitz11690112002-07-30 01:08:28 +00007237int
7238main ()
7239{
7240 makedev(0, 0)
7241 ;
7242 return 0;
7243}
7244_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007245if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007246 ac_cv_has_makedev=yes
7247else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007248 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007249fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007250rm -f core conftest.err conftest.$ac_objext \
7251 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00007252 if test "$ac_cv_has_makedev" = "yes"; then
7253
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007254$as_echo "#define _OSF_SOURCE 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007255
7256 fi
7257fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007258{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
7259$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007260if test "$ac_cv_has_makedev" = "yes"; then
7261
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007262$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007263
7264fi
7265
Martin v. Löwis399a6892002-10-04 10:22:02 +00007266# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7267# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7268# defined, but the compiler does not support pragma redefine_extname,
7269# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7270# structures (such as rlimit64) without declaring them. As a
7271# work-around, disable LFS on such configurations
7272
7273use_lfs=yes
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
7275$as_echo_n "checking Solaris LFS bug... " >&6; }
7276cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007277/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007278
7279#define _LARGEFILE_SOURCE 1
7280#define _FILE_OFFSET_BITS 64
7281#include <sys/resource.h>
7282
Martin v. Löwis399a6892002-10-04 10:22:02 +00007283int
7284main ()
7285{
7286struct rlimit foo;
7287 ;
7288 return 0;
7289}
7290_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007291if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00007292 sol_lfs_bug=no
7293else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007294 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00007295fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007296rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007297{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
7298$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007299if test "$sol_lfs_bug" = "yes"; then
7300 use_lfs=no
7301fi
7302
7303if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00007304# Two defines needed to enable largefile support on various platforms
7305# These may affect some typedefs
Georg Brandl94800df2011-02-25 11:09:02 +00007306case $ac_sys_system/$ac_sys_release in
7307AIX*)
7308
7309$as_echo "#define _LARGE_FILES 1" >>confdefs.h
7310
7311 ;;
7312esac
Guido van Rossum810cc512001-09-09 23:51:39 +00007313
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007314$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007315
7316
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007317$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00007318
Martin v. Löwis399a6892002-10-04 10:22:02 +00007319fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007320
Guido van Rossum84e7b241996-08-19 21:59:00 +00007321# Add some code to confdefs.h so that the test for off_t works on SCO
7322cat >> confdefs.h <<\EOF
7323#if defined(SCO_DS)
7324#undef _OFF_T
7325#endif
7326EOF
7327
Guido van Rossumef2255b2000-03-10 22:30:29 +00007328# Type availability checks
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007329ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007330if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007331
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007332else
Martin v. Löwis11437992002-04-12 09:54:03 +00007333
7334cat >>confdefs.h <<_ACEOF
7335#define mode_t int
7336_ACEOF
7337
7338fi
7339
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007340ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007341if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007342
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007343else
Martin v. Löwis11437992002-04-12 09:54:03 +00007344
7345cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007346#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00007347_ACEOF
7348
7349fi
7350
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007351ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007352if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007353
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007354else
Martin v. Löwis11437992002-04-12 09:54:03 +00007355
7356cat >>confdefs.h <<_ACEOF
7357#define pid_t int
7358_ACEOF
7359
7360fi
7361
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007362
Martin v. Löwis11437992002-04-12 09:54:03 +00007363cat >>confdefs.h <<_ACEOF
Matthias Klosecbf54b12010-05-08 11:04:18 +00007364#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00007365_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007366
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007367ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007368if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007369
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007370else
Martin v. Löwis11437992002-04-12 09:54:03 +00007371
7372cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007373#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007374_ACEOF
7375
7376fi
7377
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
7379$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007380if ${ac_cv_type_uid_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007381 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007382else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007383 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007384/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007385#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007386
7387_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007388if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007389 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007390 ac_cv_type_uid_t=yes
7391else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007392 ac_cv_type_uid_t=no
7393fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00007394rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007395
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007396fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007397{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
7398$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007399if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007400
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007401$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007402
7403
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007404$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007405
7406fi
7407
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007408
7409# There are two separate checks for each of the exact-width integer types we
7410# need. First we check whether the type is available using the usual
7411# AC_CHECK_TYPE macro with the default includes (which includes <inttypes.h>
7412# and <stdint.h> where available). We then also use the special type checks of
7413# the form AC_TYPE_UINT32_T, which in the case that uint32_t is not available
7414# directly, #define's uint32_t to be a suitable type.
7415
7416ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
7417if test "x$ac_cv_type_uint32_t" = xyes; then :
7418
7419$as_echo "#define HAVE_UINT32_T 1" >>confdefs.h
7420
7421fi
7422
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007423ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
7424case $ac_cv_c_uint32_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007425 no|yes) ;; #(
7426 *)
7427
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007428$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007429
7430
7431cat >>confdefs.h <<_ACEOF
7432#define uint32_t $ac_cv_c_uint32_t
7433_ACEOF
7434;;
7435 esac
7436
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007437
7438ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
7439if test "x$ac_cv_type_uint64_t" = xyes; then :
7440
7441$as_echo "#define HAVE_UINT64_T 1" >>confdefs.h
7442
7443fi
7444
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007445ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
7446case $ac_cv_c_uint64_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007447 no|yes) ;; #(
7448 *)
7449
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007450$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007451
7452
7453cat >>confdefs.h <<_ACEOF
7454#define uint64_t $ac_cv_c_uint64_t
7455_ACEOF
7456;;
7457 esac
7458
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007459
7460ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
7461if test "x$ac_cv_type_int32_t" = xyes; then :
7462
7463$as_echo "#define HAVE_INT32_T 1" >>confdefs.h
7464
7465fi
7466
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007467ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
7468case $ac_cv_c_int32_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007469 no|yes) ;; #(
7470 *)
7471
7472cat >>confdefs.h <<_ACEOF
7473#define int32_t $ac_cv_c_int32_t
7474_ACEOF
7475;;
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007476esac
7477
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007478
7479ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
7480if test "x$ac_cv_type_int64_t" = xyes; then :
7481
7482$as_echo "#define HAVE_INT64_T 1" >>confdefs.h
7483
7484fi
7485
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007486ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
7487case $ac_cv_c_int64_t in #(
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007488 no|yes) ;; #(
7489 *)
7490
7491cat >>confdefs.h <<_ACEOF
7492#define int64_t $ac_cv_c_int64_t
7493_ACEOF
7494;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007495esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00007496
Mark Dickinson17c50cd2012-12-02 13:13:56 +00007497
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007498ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007499if test "x$ac_cv_type_ssize_t" = xyes; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00007500
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007501$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00007502
7503fi
7504
Jack Jansendd19cf82001-12-06 22:36:17 +00007505
Michael W. Hudson54241132001-12-07 15:38:26 +00007506# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007507# ANSI C requires sizeof(char) == 1, so no need to check it
Martin v. Löwiseba40652007-08-30 20:10:57 +00007508# The cast to long int works around a bug in the HP C Compiler
7509# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7510# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7511# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
7513$as_echo_n "checking size of int... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007514if ${ac_cv_sizeof_int+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007515 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007516else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007517 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 +00007518
Martin v. Löwis11437992002-04-12 09:54:03 +00007519else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007520 if test "$ac_cv_type_int" = yes; then
7521 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7522$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007523as_fn_error 77 "cannot compute sizeof (int)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007524See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007525 else
7526 ac_cv_sizeof_int=0
7527 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007528fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007529
Martin v. Löwis11437992002-04-12 09:54:03 +00007530fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007531{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
7532$as_echo "$ac_cv_sizeof_int" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007533
7534
7535
Martin v. Löwis11437992002-04-12 09:54:03 +00007536cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007537#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007538_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007539
7540
Martin v. Löwiseba40652007-08-30 20:10:57 +00007541# The cast to long int works around a bug in the HP C Compiler
7542# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7543# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7544# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
7546$as_echo_n "checking size of long... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007547if ${ac_cv_sizeof_long+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007548 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007549else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007550 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 +00007551
Martin v. Löwis11437992002-04-12 09:54:03 +00007552else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007553 if test "$ac_cv_type_long" = yes; then
7554 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7555$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007556as_fn_error 77 "cannot compute sizeof (long)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007557See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007558 else
7559 ac_cv_sizeof_long=0
7560 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007561fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007562
Martin v. Löwis11437992002-04-12 09:54:03 +00007563fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007564{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
7565$as_echo "$ac_cv_sizeof_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007566
7567
7568
Martin v. Löwis11437992002-04-12 09:54:03 +00007569cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007570#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007571_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007572
7573
Martin v. Löwiseba40652007-08-30 20:10:57 +00007574# The cast to long int works around a bug in the HP C Compiler
7575# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7576# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7577# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
7579$as_echo_n "checking size of void *... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007580if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007581 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007582else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007583 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 +00007584
Martin v. Löwis11437992002-04-12 09:54:03 +00007585else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007586 if test "$ac_cv_type_void_p" = yes; then
7587 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7588$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007589as_fn_error 77 "cannot compute sizeof (void *)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007590See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007591 else
7592 ac_cv_sizeof_void_p=0
7593 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007594fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007595
Martin v. Löwis11437992002-04-12 09:54:03 +00007596fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007597{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
7598$as_echo "$ac_cv_sizeof_void_p" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007599
7600
7601
Martin v. Löwis11437992002-04-12 09:54:03 +00007602cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007603#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00007604_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007605
7606
Martin v. Löwiseba40652007-08-30 20:10:57 +00007607# The cast to long int works around a bug in the HP C Compiler
7608# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7609# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7610# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
7612$as_echo_n "checking size of short... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007613if ${ac_cv_sizeof_short+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007614 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007615else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007616 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 +00007617
Martin v. Löwis11437992002-04-12 09:54:03 +00007618else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007619 if test "$ac_cv_type_short" = yes; then
7620 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7621$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007622as_fn_error 77 "cannot compute sizeof (short)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007623See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007624 else
7625 ac_cv_sizeof_short=0
7626 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007627fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007628
Martin v. Löwis11437992002-04-12 09:54:03 +00007629fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007630{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
7631$as_echo "$ac_cv_sizeof_short" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007632
7633
7634
Martin v. Löwis11437992002-04-12 09:54:03 +00007635cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007636#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007637_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007638
7639
Martin v. Löwiseba40652007-08-30 20:10:57 +00007640# The cast to long int works around a bug in the HP C Compiler
7641# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7642# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7643# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
7645$as_echo_n "checking size of float... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007646if ${ac_cv_sizeof_float+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007647 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007648else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007649 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 +00007650
Martin v. Löwis11437992002-04-12 09:54:03 +00007651else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007652 if test "$ac_cv_type_float" = yes; then
7653 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7654$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007655as_fn_error 77 "cannot compute sizeof (float)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007656See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007657 else
7658 ac_cv_sizeof_float=0
7659 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007660fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007661
Martin v. Löwis11437992002-04-12 09:54:03 +00007662fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007663{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
7664$as_echo "$ac_cv_sizeof_float" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007665
7666
7667
Martin v. Löwis11437992002-04-12 09:54:03 +00007668cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007669#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007670_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007671
7672
Martin v. Löwiseba40652007-08-30 20:10:57 +00007673# The cast to long int works around a bug in the HP C Compiler
7674# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7675# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7676# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
7678$as_echo_n "checking size of double... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007679if ${ac_cv_sizeof_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007680 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007681else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007682 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 +00007683
Martin v. Löwis11437992002-04-12 09:54:03 +00007684else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007685 if test "$ac_cv_type_double" = yes; then
7686 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7687$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007688as_fn_error 77 "cannot compute sizeof (double)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007689See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007690 else
7691 ac_cv_sizeof_double=0
7692 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007693fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007694
Martin v. Löwis11437992002-04-12 09:54:03 +00007695fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007696{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
7697$as_echo "$ac_cv_sizeof_double" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007698
7699
7700
Martin v. Löwis11437992002-04-12 09:54:03 +00007701cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007702#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007703_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007704
7705
Martin v. Löwiseba40652007-08-30 20:10:57 +00007706# The cast to long int works around a bug in the HP C Compiler
7707# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7708# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7709# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
7711$as_echo_n "checking size of fpos_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007712if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007713 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007714else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007715 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 +00007716
Martin v. Löwis11437992002-04-12 09:54:03 +00007717else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007718 if test "$ac_cv_type_fpos_t" = yes; then
7719 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7720$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007721as_fn_error 77 "cannot compute sizeof (fpos_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007722See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007723 else
7724 ac_cv_sizeof_fpos_t=0
7725 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007726fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007727
Martin v. Löwis11437992002-04-12 09:54:03 +00007728fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007729{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
7730$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007731
7732
7733
Martin v. Löwis11437992002-04-12 09:54:03 +00007734cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007735#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007736_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007737
Michael W. Hudson54241132001-12-07 15:38:26 +00007738
Martin v. Löwiseba40652007-08-30 20:10:57 +00007739# The cast to long int works around a bug in the HP C Compiler
7740# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7741# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7742# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
7744$as_echo_n "checking size of size_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007745if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007746 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007747else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007748 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 +00007749
Martin v. Löwis18e16552006-02-15 17:27:45 +00007750else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007751 if test "$ac_cv_type_size_t" = yes; then
7752 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7753$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007754as_fn_error 77 "cannot compute sizeof (size_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007755See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007756 else
7757 ac_cv_sizeof_size_t=0
7758 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00007759fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007760
Martin v. Löwis18e16552006-02-15 17:27:45 +00007761fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007762{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
7763$as_echo "$ac_cv_sizeof_size_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007764
7765
7766
Martin v. Löwis18e16552006-02-15 17:27:45 +00007767cat >>confdefs.h <<_ACEOF
7768#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
7769_ACEOF
7770
7771
Christian Heimes951cc0f2008-01-31 23:08:23 +00007772# The cast to long int works around a bug in the HP C Compiler
7773# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7774# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7775# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007776{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
7777$as_echo_n "checking size of pid_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007778if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007779 $as_echo_n "(cached) " >&6
Christian Heimes951cc0f2008-01-31 23:08:23 +00007780else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007781 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 +00007782
Christian Heimes951cc0f2008-01-31 23:08:23 +00007783else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007784 if test "$ac_cv_type_pid_t" = yes; then
7785 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7786$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007787as_fn_error 77 "cannot compute sizeof (pid_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007788See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes951cc0f2008-01-31 23:08:23 +00007789 else
7790 ac_cv_sizeof_pid_t=0
7791 fi
7792fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007793
Christian Heimes951cc0f2008-01-31 23:08:23 +00007794fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007795{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
7796$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes951cc0f2008-01-31 23:08:23 +00007797
7798
7799
7800cat >>confdefs.h <<_ACEOF
7801#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
7802_ACEOF
7803
7804
Michael W. Hudson54241132001-12-07 15:38:26 +00007805
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
7807$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007808have_long_long=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007809cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007810/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007811
Martin v. Löwis11437992002-04-12 09:54:03 +00007812int
7813main ()
7814{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007815long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007816 ;
7817 return 0;
7818}
7819_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007820if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007821
7822
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007823$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007824
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007825 have_long_long=yes
7826
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007827fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007828rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007829{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
7830$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007831if test "$have_long_long" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00007832# The cast to long int works around a bug in the HP C Compiler
7833# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7834# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7835# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
7837$as_echo_n "checking size of long long... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007838if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007839 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007840else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007841 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 +00007842
Martin v. Löwis11437992002-04-12 09:54:03 +00007843else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007844 if test "$ac_cv_type_long_long" = yes; then
7845 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7846$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007847as_fn_error 77 "cannot compute sizeof (long long)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007848See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007849 else
7850 ac_cv_sizeof_long_long=0
7851 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007852fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007853
Martin v. Löwis11437992002-04-12 09:54:03 +00007854fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007855{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
7856$as_echo "$ac_cv_sizeof_long_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007857
7858
7859
Martin v. Löwis11437992002-04-12 09:54:03 +00007860cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007861#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007862_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007863
Michael W. Hudson54241132001-12-07 15:38:26 +00007864
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007865fi
7866
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
7868$as_echo_n "checking for long double support... " >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007869have_long_double=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007870cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007871/* end confdefs.h. */
7872
7873int
7874main ()
7875{
Matthias Klosec511b472010-05-08 11:01:39 +00007876long double x; x = (long double)0;
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007877 ;
7878 return 0;
7879}
7880_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007881if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007882
7883
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007884$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007885
7886 have_long_double=yes
7887
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007888fi
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007889rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007890{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
7891$as_echo "$have_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007892if test "$have_long_double" = yes ; then
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007893# The cast to long int works around a bug in the HP C Compiler
7894# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7895# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7896# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
7898$as_echo_n "checking size of long double... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007899if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007900 $as_echo_n "(cached) " >&6
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007901else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007902 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 +00007903
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007904else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007905 if test "$ac_cv_type_long_double" = yes; then
7906 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7907$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007908as_fn_error 77 "cannot compute sizeof (long double)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007909See \`config.log' for more details" "$LINENO" 5; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007910 else
7911 ac_cv_sizeof_long_double=0
7912 fi
7913fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007914
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007915fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007916{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
7917$as_echo "$ac_cv_sizeof_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +00007918
7919
7920
7921cat >>confdefs.h <<_ACEOF
7922#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7923_ACEOF
7924
7925
7926fi
7927
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7929$as_echo_n "checking for _Bool support... " >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007930have_c99_bool=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007931cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007932/* end confdefs.h. */
7933
7934int
7935main ()
7936{
7937_Bool x; x = (_Bool)0;
7938 ;
7939 return 0;
7940}
7941_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007942if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007943
7944
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007945$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007946
7947 have_c99_bool=yes
7948
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007949fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007950rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007951{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7952$as_echo "$have_c99_bool" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007953if test "$have_c99_bool" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00007954# The cast to long int works around a bug in the HP C Compiler
7955# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7956# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7957# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
7959$as_echo_n "checking size of _Bool... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01007960if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007961 $as_echo_n "(cached) " >&6
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007962else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007963 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 +00007964
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007965else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007966 if test "$ac_cv_type__Bool" = yes; then
7967 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7968$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00007969as_fn_error 77 "cannot compute sizeof (_Bool)
Matthias Klose3cef2a92012-03-14 23:39:33 +01007970See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007971 else
7972 ac_cv_sizeof__Bool=0
7973 fi
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007974fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007975
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007976fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007977{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
7978$as_echo "$ac_cv_sizeof__Bool" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007979
7980
7981
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +00007982cat >>confdefs.h <<_ACEOF
7983#define SIZEOF__BOOL $ac_cv_sizeof__Bool
7984_ACEOF
7985
7986
7987fi
7988
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007989ac_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 +00007990 #include <stdint.h>
7991 #endif
Antoine Pitrou7be5a652010-10-10 08:14:41 +00007992 #ifdef HAVE_INTTYPES_H
7993 #include <inttypes.h>
7994 #endif
Matthias Klosea0bea5d2010-05-08 10:00:28 +00007995"
Matthias Klose3cef2a92012-03-14 23:39:33 +01007996if test "x$ac_cv_type_uintptr_t" = xyes; then :
Martin v. Löwisebe26702006-10-02 14:55:51 +00007997
7998cat >>confdefs.h <<_ACEOF
7999#define HAVE_UINTPTR_T 1
8000_ACEOF
8001
Martin v. Löwiseba40652007-08-30 20:10:57 +00008002# The cast to long int works around a bug in the HP C Compiler
8003# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8004# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8005# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8007$as_echo_n "checking size of uintptr_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008008if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008009 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008010else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008011 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 +00008012
Martin v. Löwis11437992002-04-12 09:54:03 +00008013else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008014 if test "$ac_cv_type_uintptr_t" = yes; then
8015 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8016$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008017as_fn_error 77 "cannot compute sizeof (uintptr_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01008018See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008019 else
8020 ac_cv_sizeof_uintptr_t=0
8021 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008022fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008023
Martin v. Löwis11437992002-04-12 09:54:03 +00008024fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008025{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8026$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008027
8028
8029
Martin v. Löwis11437992002-04-12 09:54:03 +00008030cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008031#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008032_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008033
Michael W. Hudson54241132001-12-07 15:38:26 +00008034
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008035fi
8036
Martin v. Löwisebe26702006-10-02 14:55:51 +00008037
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008038# The cast to long int works around a bug in the HP C Compiler
8039# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8040# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8041# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8043$as_echo_n "checking size of off_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008044if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008045 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008046else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008047 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008048#ifdef HAVE_SYS_TYPES_H
8049#include <sys/types.h>
8050#endif
8051
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008052"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008053
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008054else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008055 if test "$ac_cv_type_off_t" = yes; then
8056 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8057$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008058as_fn_error 77 "cannot compute sizeof (off_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01008059See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008060 else
8061 ac_cv_sizeof_off_t=0
8062 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008063fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008064
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008065fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008066{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8067$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008068
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008069
8070
Martin v. Löwis11437992002-04-12 09:54:03 +00008071cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008072#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008073_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008074
Michael W. Hudson54241132001-12-07 15:38:26 +00008075
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008076
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8078$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson0ef0b912009-12-31 21:11:48 +00008079if test "$have_long_long" = yes
8080then
8081if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008082 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008083
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008084$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008085
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8087$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008088else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8090$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008091fi
Mark Dickinson0ef0b912009-12-31 21:11:48 +00008092else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8094$as_echo "no" >&6; }
Mark Dickinson0ef0b912009-12-31 21:11:48 +00008095fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008096
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008097# The cast to long int works around a bug in the HP C Compiler
8098# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8099# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8100# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8102$as_echo_n "checking size of time_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008103if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008104 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008105else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008106 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008107#ifdef HAVE_SYS_TYPES_H
8108#include <sys/types.h>
8109#endif
8110#ifdef HAVE_TIME_H
8111#include <time.h>
8112#endif
8113
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008114"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008115
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008116else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008117 if test "$ac_cv_type_time_t" = yes; then
8118 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8119$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008120as_fn_error 77 "cannot compute sizeof (time_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01008121See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008122 else
8123 ac_cv_sizeof_time_t=0
8124 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008125fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008126
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008127fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008128{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8129$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008130
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008131
8132
Martin v. Löwis11437992002-04-12 09:54:03 +00008133cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008134#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008135_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008136
Michael W. Hudson54241132001-12-07 15:38:26 +00008137
8138
Trent Mick635f6fb2000-08-23 21:33:05 +00008139# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008140ac_save_cc="$CC"
8141if test "$ac_cv_kpthread" = "yes"
8142then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008143elif test "$ac_cv_kthread" = "yes"
8144then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008145elif test "$ac_cv_pthread" = "yes"
8146then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008147fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8149$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008150have_pthread_t=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008151cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008152/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00008153
8154 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008155int
8156main ()
8157{
Guido van Rossum12580492000-09-24 16:47:19 +00008158pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008159 ;
8160 return 0;
8161}
Matthias Klosec511b472010-05-08 11:01:39 +00008162
Martin v. Löwis11437992002-04-12 09:54:03 +00008163_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008164if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008165 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008166fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008167rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008168{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8169$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008170if test "$have_pthread_t" = yes ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008171 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008172# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8173# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8174# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8176$as_echo_n "checking size of pthread_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008177if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008178 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008179else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008180 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008181#ifdef HAVE_PTHREAD_H
8182#include <pthread.h>
8183#endif
8184
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008185"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008186
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008187else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008188 if test "$ac_cv_type_pthread_t" = yes; then
8189 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8190$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008191as_fn_error 77 "cannot compute sizeof (pthread_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +01008192See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008193 else
8194 ac_cv_sizeof_pthread_t=0
8195 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008196fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008197
Trent Mick635f6fb2000-08-23 21:33:05 +00008198fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008199{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8200$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008201
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008202
8203
Martin v. Löwis11437992002-04-12 09:54:03 +00008204cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008205#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008206_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008207
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00008208
Trent Mick635f6fb2000-08-23 21:33:05 +00008209fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008210CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008211
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-toolbox-glue" >&5
8213$as_echo_n "checking for --enable-toolbox-glue... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008214# Check whether --enable-toolbox-glue was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008215if test "${enable_toolbox_glue+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008216 enableval=$enable_toolbox_glue;
8217fi
Jack Jansene578a632001-08-15 01:27:14 +00008218
8219
8220if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +00008221then
Jack Jansene578a632001-08-15 01:27:14 +00008222 case $ac_sys_system/$ac_sys_release in
8223 Darwin/*)
8224 enable_toolbox_glue="yes";;
8225 *)
8226 enable_toolbox_glue="no";;
8227 esac
8228fi
8229case "$enable_toolbox_glue" in
8230yes)
Jack Jansene578a632001-08-15 01:27:14 +00008231 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008232 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +00008233
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008234$as_echo "#define USE_TOOLBOX_OBJECT_GLUE 1" >>confdefs.h
Jack Jansene578a632001-08-15 01:27:14 +00008235
8236 ;;
8237*)
Jack Jansene578a632001-08-15 01:27:14 +00008238 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00008239 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00008240 ;;
8241esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008242{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_toolbox_glue" >&5
8243$as_echo "$enable_toolbox_glue" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00008244
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008245
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00008246
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008247case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +00008248 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008249 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8250 ;;
8251 Darwin/*)
8252 OTHER_LIBTOOL_OPT=""
8253 ;;
8254esac
8255
8256
Ronald Oussoren25967582009-09-06 10:00:26 +00008257
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008258case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +00008259 Darwin/[01567]\..*)
Ronald Oussoren988117f2006-04-29 11:31:35 +00008260 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8261 if test "${enable_universalsdk}"; then
8262 :
8263 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00008264 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Ronald Oussoren988117f2006-04-29 11:31:35 +00008265 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008266 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008267 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008268 Darwin/*)
Ronald Oussorena55af9a2010-01-17 16:25:57 +00008269 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008270 if test ${gcc_version} '<' 4.0
8271 then
8272 LIBTOOL_CRUFT="-lcc_dynamic"
8273 else
8274 LIBTOOL_CRUFT=""
8275 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008276 if test "$cross_compiling" = yes; then :
Ronald Oussoren23d92532009-09-07 06:12:00 +00008277 ac_osx_32bit=yes
Ronald Oussoren25967582009-09-06 10:00:26 +00008278else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008279 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren25967582009-09-06 10:00:26 +00008280/* end confdefs.h. */
Ronald Oussoren23d92532009-09-07 06:12:00 +00008281
Ronald Oussoren25967582009-09-06 10:00:26 +00008282 #include <unistd.h>
8283 int main(int argc, char*argv[])
8284 {
8285 if (sizeof(long) == 4) {
8286 return 0;
8287 } else {
8288 return 1;
8289 }
Ronald Oussoren84ddd722009-09-08 07:17:10 +00008290 }
Ronald Oussoren23d92532009-09-07 06:12:00 +00008291
Ronald Oussoren25967582009-09-06 10:00:26 +00008292_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008293if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren25967582009-09-06 10:00:26 +00008294 ac_osx_32bit=yes
8295else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008296 ac_osx_32bit=no
Ronald Oussoren25967582009-09-06 10:00:26 +00008297fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008298rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8299 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren25967582009-09-06 10:00:26 +00008300fi
8301
8302
Ronald Oussoren25967582009-09-06 10:00:26 +00008303 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00008304 case `/usr/bin/arch` in
Ronald Oussoren25967582009-09-06 10:00:26 +00008305 i386)
8306 MACOSX_DEFAULT_ARCH="i386"
8307 ;;
8308 ppc)
8309 MACOSX_DEFAULT_ARCH="ppc"
8310 ;;
8311 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008312 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren25967582009-09-06 10:00:26 +00008313 ;;
8314 esac
8315 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00008316 case `/usr/bin/arch` in
Ronald Oussoren25967582009-09-06 10:00:26 +00008317 i386)
8318 MACOSX_DEFAULT_ARCH="x86_64"
8319 ;;
8320 ppc)
8321 MACOSX_DEFAULT_ARCH="ppc64"
8322 ;;
8323 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008324 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren25967582009-09-06 10:00:26 +00008325 ;;
8326 esac
8327
8328 #ARCH_RUN_32BIT="true"
8329 fi
8330
8331 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00008332 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008333 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008334esac
8335
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
8337$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008338if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008339then
Skip Montanarodecc6a42003-01-01 20:07:49 +00008340 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00008341 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008342 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008343
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008344$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008345
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8347$as_echo "yes" >&6; }
Ronald Oussoren450d5612009-06-08 21:12:41 +00008348 if test $enable_shared = "yes"
8349 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008350 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 +00008351 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008352else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8354$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008355fi
8356
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
8358$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008359case $ac_sys_system/$ac_sys_release in
8360 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008361
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008362$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008363
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
8365$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008366 ;;
8367 *)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8369$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008370 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008371esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008372
Guido van Rossum0a516c91994-09-12 10:58:40 +00008373# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008374
Michael W. Hudson54241132001-12-07 15:38:26 +00008375
8376
8377
8378
Ronald Oussoren75912852010-04-08 08:13:31 +00008379
Guido van Rossum0a516c91994-09-12 10:58:40 +00008380# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00008381# -- usually .so, .sl on HP-UX, .dll on Cygwin
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
8383$as_echo_n "checking SO... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008384if test -z "$SO"
8385then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008386 case $ac_sys_system in
Neal Norwitz58e28882006-05-19 07:00:58 +00008387 hp*|HP*)
8388 case `uname -m` in
8389 ia64) SO=.so;;
8390 *) SO=.sl;;
8391 esac
8392 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00008393 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00008394 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008395 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +00008396else
8397 # this might also be a termcap variable, see #610332
8398 echo
8399 echo '====================================================================='
8400 echo '+ +'
8401 echo '+ WARNING: You have set SO in your environment. +'
8402 echo '+ Do you really mean to change the extension for shared libraries? +'
8403 echo '+ Continuing in 10 seconds to let you to ponder. +'
8404 echo '+ +'
8405 echo '====================================================================='
8406 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +00008407fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008408{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
8409$as_echo "$SO" >&6; }
Neal Norwitz58e28882006-05-19 07:00:58 +00008410
Ronald Oussoren79f90492009-01-02 10:44:46 +00008411
Neal Norwitz58e28882006-05-19 07:00:58 +00008412cat >>confdefs.h <<_ACEOF
8413#define SHLIB_EXT "$SO"
8414_ACEOF
8415
Guido van Rossum0a516c91994-09-12 10:58:40 +00008416# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00008417# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008418# (Shared libraries in this instance are shared modules to be loaded into
8419# Python, as opposed to building Python itself as a shared library.)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
8421$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008422if test -z "$LDSHARED"
8423then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008424 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008425 AIX*)
Georg Brandl71f4fbb2011-02-25 11:04:50 +00008426 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00008427 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008428 ;;
8429 BeOS*)
8430 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00008431 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008432 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008433 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008434 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008435 SunOS/5*)
Ronald Oussoren75912852010-04-08 08:13:31 +00008436 if test "$GCC" = "yes" ; then
8437 LDSHARED='$(CC) -shared'
8438 LDCXXSHARED='$(CXX) -shared'
8439 else
8440 LDSHARED='$(CC) -G'
8441 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a662000-05-26 12:22:54 +00008442 fi ;;
Thomas Hellerdc96a772008-04-04 10:07:55 +00008443 hp*|HP*)
Ronald Oussoren75912852010-04-08 08:13:31 +00008444 if test "$GCC" = "yes" ; then
8445 LDSHARED='$(CC) -shared'
8446 LDCXXSHARED='$(CXX) -shared'
8447 else
8448 LDSHARED='ld -b'
Thomas Hellerdc96a772008-04-04 10:07:55 +00008449 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +00008450 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +00008451 Darwin/1.3*)
Stefan Krah3a3e2032010-11-28 15:30:05 +00008452 LDSHARED='$(CC) -bundle'
8453 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00008454 if test "$enable_framework" ; then
8455 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008456 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8457 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008458 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008459 else
8460 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008461 LDSHARED="$LDSHARED -undefined suppress"
Ronald Oussoren75912852010-04-08 08:13:31 +00008462 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008463 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008464 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Stefan Krah3a3e2032010-11-28 15:30:05 +00008465 LDSHARED='$(CC) -bundle'
8466 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00008467 if test "$enable_framework" ; then
8468 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008469 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8470 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008471 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008472 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008473 # No framework, use the Python app as bundle-loader
8474 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00008475 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008476 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008477 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008478 Darwin/*)
8479 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
8480 # This allows an extension to be used in any Python
Ronald Oussoren38f1b982007-09-02 09:46:07 +00008481
Ned Deilyc40b9032014-06-25 13:48:46 -07008482 dep_target_major=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
8483 sed 's/\([0-9]*\)\.\([0-9]*\).*/\1/'`
8484 dep_target_minor=`echo ${MACOSX_DEPLOYMENT_TARGET} | \
8485 sed 's/\([0-9]*\)\.\([0-9]*\).*/\2/'`
8486 if test ${dep_target_major} -eq 10 && \
8487 test ${dep_target_minor} -le 2
Jack Jansen6b08a402004-06-03 12:41:45 +00008488 then
Ned Deilyc40b9032014-06-25 13:48:46 -07008489 # building for OS X 10.0 through 10.2
Stefan Krah3a3e2032010-11-28 15:30:05 +00008490 LDSHARED='$(CC) -bundle'
8491 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00008492 if test "$enable_framework" ; then
8493 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008494 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8495 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008496 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008497 else
8498 # No framework, use the Python app as bundle-loader
8499 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8500 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Ronald Oussoren75912852010-04-08 08:13:31 +00008501 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008502 fi
Ned Deilyc40b9032014-06-25 13:48:46 -07008503 else
8504 # building for OS X 10.3 and later
8505 if test "${enable_universalsdk}"; then
8506 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
8507 fi
8508 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
8509 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
8510 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00008511 fi
8512 ;;
Ronald Oussoren75912852010-04-08 08:13:31 +00008513 Linux*|GNU*|QNX*)
8514 LDSHARED='$(CC) -shared'
8515 LDCXXSHARED='$(CXX) -shared';;
8516 BSD/OS*/4*)
8517 LDSHARED="gcc -shared"
8518 LDCXXSHARED="g++ -shared";;
Martin v. Löwis222c5152006-06-03 07:37:13 +00008519 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008520 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008521 then
Stefan Krah3a3e2032010-11-28 15:30:05 +00008522 LDSHARED='$(CC) -shared'
8523 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00008524 else
Stefan Krah3a3e2032010-11-28 15:30:05 +00008525 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00008526 fi;;
Martin v. Löwis222c5152006-06-03 07:37:13 +00008527 OpenBSD*)
8528 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8529 then
Stefan Krah3a3e2032010-11-28 15:30:05 +00008530 LDSHARED='$(CC) -shared $(CCSHARED)'
8531 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Martin v. Löwis222c5152006-06-03 07:37:13 +00008532 else
8533 case `uname -r` in
8534 [01].* | 2.[0-7] | 2.[0-7].*)
8535 LDSHARED="ld -Bshareable ${LDFLAGS}"
8536 ;;
8537 *)
Stefan Krah3a3e2032010-11-28 15:30:05 +00008538 LDSHARED='$(CC) -shared $(CCSHARED)'
8539 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Martin v. Löwis222c5152006-06-03 07:37:13 +00008540 ;;
8541 esac
8542 fi;;
Ronald Oussoren75912852010-04-08 08:13:31 +00008543 NetBSD*|DragonFly*)
Antoine Pitroucb402772011-01-02 20:51:34 +00008544 LDSHARED='$(CC) -shared'
8545 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008546 OpenUNIX*|UnixWare*)
Ronald Oussoren75912852010-04-08 08:13:31 +00008547 if test "$GCC" = "yes" ; then
8548 LDSHARED='$(CC) -shared'
8549 LDCXXSHARED='$(CXX) -shared'
8550 else
8551 LDSHARED='$(CC) -G'
8552 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00008553 fi;;
Ronald Oussoren75912852010-04-08 08:13:31 +00008554 SCO_SV*)
8555 LDSHARED='$(CC) -Wl,-G,-Bexport'
8556 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
8557 CYGWIN*)
8558 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
8559 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
8560 atheos*)
8561 LDSHARED="gcc -shared"
8562 LDCXXSHARED="g++ -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008563 *) LDSHARED="ld";;
8564 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008565fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008566{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
8567$as_echo "$LDSHARED" >&6; }
Ronald Oussoren75912852010-04-08 08:13:31 +00008568LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008569BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008570# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008571# library (module) -- this is only needed for a few systems
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
8573$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008574if test -z "$CCSHARED"
8575then
Guido van Rossum07397971997-04-29 21:49:50 +00008576 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008577 SunOS*) if test "$GCC" = yes;
Martin v. Löwiseb623572007-03-12 10:50:39 +00008578 then CCSHARED="-fPIC";
8579 elif test `uname -p` = sparc;
8580 then CCSHARED="-xcode=pic32";
8581 else CCSHARED="-Kpic";
8582 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00008583 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00008584 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00008585 else CCSHARED="+z";
8586 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008587 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008588 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008589 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008590 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008591 if test "$GCC" = "yes"
8592 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008593 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008594 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008595 SCO_SV*)
8596 if test "$GCC" = "yes"
8597 then CCSHARED="-fPIC"
8598 else CCSHARED="-Kpic -belf"
8599 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008600 IRIX*/6*) case $CC in
8601 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00008602 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008603 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008604 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008605 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008606fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008607{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
8608$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008609# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008610# the python executable -- this is only needed for a few systems
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
8612$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008613if test -z "$LINKFORSHARED"
8614then
Guido van Rossum07397971997-04-29 21:49:50 +00008615 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008616 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008617 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00008618 LINKFORSHARED="-Wl,-E -Wl,+s";;
8619# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008620 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008621 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008622 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00008623 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008624 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
8625 # which is
Jack Jansene578a632001-08-15 01:27:14 +00008626 # not used by the core itself but which needs to be in the core so
8627 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +00008628 # -prebind is no longer used, because it actually seems to give a
8629 # slowdown in stead of a speedup, maybe due to the large number of
8630 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008631
8632 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +00008633 if test "$enable_framework"
8634 then
Jack Jansenda49e192005-01-07 13:08:22 +00008635 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008636 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008637 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008638 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008639 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00008640 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008641 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00008642 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8643 then
8644 LINKFORSHARED="-Wl,--export-dynamic"
8645 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008646 SunOS/5*) case $CC in
8647 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00008648 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00008649 then
8650 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008651 fi;;
8652 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00008653 CYGWIN*)
8654 if test $enable_shared = "no"
8655 then
8656 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
8657 fi;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00008658 QNX*)
8659 # -Wl,-E causes the symbols to be added to the dynamic
8660 # symbol table so that they can be found when a module
8661 # is loaded. -N 2048K causes the stack size to be set
8662 # to 2048 kilobytes so that the stack doesn't overflow
8663 # when running test_compile.py.
8664 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008665 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008666fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008667{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
8668$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008669
Michael W. Hudson54241132001-12-07 15:38:26 +00008670
Ronald Oussoren0d236eb2008-06-06 21:31:33 +00008671
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
8673$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008674if test ! "$LIBRARY" = "$LDLIBRARY"
8675then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00008676 case $ac_sys_system in
8677 CYGWIN*)
8678 # Cygwin needs CCSHARED when building extension DLLs
8679 # but not when building the interpreter DLL.
8680 CFLAGSFORSHARED='';;
8681 *)
8682 CFLAGSFORSHARED='$(CCSHARED)'
8683 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008684fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008685{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
8686$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008687
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008688# SHLIBS are libraries (except -lc and -lm) to link to the python shared
8689# library (with --enable-shared).
8690# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008691# symbols, this must be set to $(LIBS) (expanded by make). We do this even
8692# if it is not required, since it creates a dependency of the shared library
8693# to LIBS. This, in turn, means that applications linking the shared libpython
8694# don't need to link LIBS explicitly. The default should be only changed
8695# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008696
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
8698$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008699case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008700 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008701 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008702esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008703{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
8704$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008705
8706
Guido van Rossum627b2d71993-12-24 10:39:16 +00008707# checks for libraries
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
8709$as_echo_n "checking for dlopen in -ldl... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008710if ${ac_cv_lib_dl_dlopen+:} 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="-ldl $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 dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008725int
8726main ()
8727{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008728return dlopen ();
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_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008735else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008736 ac_cv_lib_dl_dlopen=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_dl_dlopen" >&5
8743$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008744if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008745 cat >>confdefs.h <<_ACEOF
8746#define HAVE_LIBDL 1
8747_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008748
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008749 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00008750
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008751fi
8752 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
8754$as_echo_n "checking for shl_load in -ldld... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008755if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008756 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008757else
Martin v. Löwis11437992002-04-12 09:54:03 +00008758 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008759LIBS="-ldld $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008760cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008761/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008762
Martin v. Löwiseba40652007-08-30 20:10:57 +00008763/* Override any GCC internal prototype to avoid an error.
8764 Use char because int might match the return type of a GCC
8765 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008766#ifdef __cplusplus
8767extern "C"
8768#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008769char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008770int
8771main ()
8772{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008773return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008774 ;
8775 return 0;
8776}
8777_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008778if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008779 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008780else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008781 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008782fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008783rm -f core conftest.err conftest.$ac_objext \
8784 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008785LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008786fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008787{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
8788$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008789if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008790 cat >>confdefs.h <<_ACEOF
8791#define HAVE_LIBDLD 1
8792_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008793
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008794 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008795
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008796fi
8797 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00008798
Ronald Oussoren79f90492009-01-02 10:44:46 +00008799# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00008800if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008801 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
8802$as_echo_n "checking for library containing sem_init... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008803if ${ac_cv_search_sem_init+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008804 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008805else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008806 ac_func_search_save_LIBS=$LIBS
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008807cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008808/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008809
Martin v. Löwiseba40652007-08-30 20:10:57 +00008810/* Override any GCC internal prototype to avoid an error.
8811 Use char because int might match the return type of a GCC
8812 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008813#ifdef __cplusplus
8814extern "C"
8815#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008816char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008817int
8818main ()
8819{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008820return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008821 ;
8822 return 0;
8823}
8824_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00008825for ac_lib in '' pthread rt posix4; do
8826 if test -z "$ac_lib"; then
8827 ac_res="none required"
8828 else
8829 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00008830 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00008831 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008832 if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008833 ac_cv_search_sem_init=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00008834fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008835rm -f core conftest.err conftest.$ac_objext \
8836 conftest$ac_exeext
Matthias Klose3cef2a92012-03-14 23:39:33 +01008837 if ${ac_cv_search_sem_init+:} false; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008838 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00008839fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008840done
Matthias Klose3cef2a92012-03-14 23:39:33 +01008841if ${ac_cv_search_sem_init+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008842
Martin v. Löwiseba40652007-08-30 20:10:57 +00008843else
8844 ac_cv_search_sem_init=no
8845fi
8846rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008847LIBS=$ac_func_search_save_LIBS
8848fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008849{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
8850$as_echo "$ac_cv_search_sem_init" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008851ac_res=$ac_cv_search_sem_init
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008852if test "$ac_res" != no; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00008853 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008854
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008855fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00008856 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00008857 # posix4 on Solaris 2.6
8858 # pthread (first!) on Linux
8859fi
8860
Martin v. Löwis19d17342003-06-14 21:03:05 +00008861# check if we need libintl for locale functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
8863$as_echo_n "checking for textdomain in -lintl... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008864if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008865 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00008866else
8867 ac_check_lib_save_LIBS=$LIBS
8868LIBS="-lintl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008869cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008870/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008871
Martin v. Löwiseba40652007-08-30 20:10:57 +00008872/* Override any GCC internal prototype to avoid an error.
8873 Use char because int might match the return type of a GCC
8874 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008875#ifdef __cplusplus
8876extern "C"
8877#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00008878char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008879int
8880main ()
8881{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008882return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008883 ;
8884 return 0;
8885}
8886_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008887if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008888 ac_cv_lib_intl_textdomain=yes
8889else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008890 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00008891fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008892rm -f core conftest.err conftest.$ac_objext \
8893 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00008894LIBS=$ac_check_lib_save_LIBS
8895fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008896{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
8897$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008898if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008899
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008900$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00008901
8902fi
8903
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008904
8905# checks for system dependent C++ extensions support
8906case "$ac_sys_system" in
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008907 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
8908$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
8909 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008910/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +00008911
Georg Brandl94800df2011-02-25 11:09:02 +00008912 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008913int
8914main ()
8915{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008916loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00008917 ;
8918 return 0;
8919}
Matthias Klosec511b472010-05-08 11:01:39 +00008920
Martin v. Löwis11437992002-04-12 09:54:03 +00008921_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008922if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008923
Matthias Klosec511b472010-05-08 11:01:39 +00008924
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008925$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008926
Matthias Klosec511b472010-05-08 11:01:39 +00008927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008928$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00008929
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008930else
Matthias Klosec511b472010-05-08 11:01:39 +00008931
8932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008933$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +00008934
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008935fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008936rm -f core conftest.err conftest.$ac_objext \
8937 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008938 *) ;;
8939esac
8940
Guido van Rossum70c7f481998-03-26 18:44:10 +00008941# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008942# BeOS' sockets are stashed in libnet.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
8944$as_echo_n "checking for t_open in -lnsl... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008945if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008946 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008947else
Martin v. Löwis11437992002-04-12 09:54:03 +00008948 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008949LIBS="-lnsl $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008950cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008951/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008952
Martin v. Löwiseba40652007-08-30 20:10:57 +00008953/* Override any GCC internal prototype to avoid an error.
8954 Use char because int might match the return type of a GCC
8955 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008956#ifdef __cplusplus
8957extern "C"
8958#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008959char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008960int
8961main ()
8962{
Martin v. Löwiseba40652007-08-30 20:10:57 +00008963return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008964 ;
8965 return 0;
8966}
8967_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008968if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008969 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008970else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008971 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008972fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008973rm -f core conftest.err conftest.$ac_objext \
8974 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008975LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008976fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008977{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
8978$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008979if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008980 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008981fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00008982 # SVR4
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8984$as_echo_n "checking for socket in -lsocket... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01008985if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008986 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008987else
Martin v. Löwis11437992002-04-12 09:54:03 +00008988 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008989LIBS="-lsocket $LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00008990cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008991/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008992
Martin v. Löwiseba40652007-08-30 20:10:57 +00008993/* Override any GCC internal prototype to avoid an error.
8994 Use char because int might match the return type of a GCC
8995 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008996#ifdef __cplusplus
8997extern "C"
8998#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008999char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009000int
9001main ()
9002{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009003return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009004 ;
9005 return 0;
9006}
9007_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009008if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009009 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009010else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009011 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009012fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009013rm -f core conftest.err conftest.$ac_objext \
9014 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009015LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009016fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009017{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9018$as_echo "$ac_cv_lib_socket_socket" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009019if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009020 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009021fi
9022 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009023
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +00009024case "$ac_sys_system" in
9025BeOS*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lnet" >&5
9027$as_echo_n "checking for socket in -lnet... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009028if ${ac_cv_lib_net_socket+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009029 $as_echo_n "(cached) " >&6
Guido van Rossumad678af1998-10-02 14:42:15 +00009030else
Martin v. Löwis11437992002-04-12 09:54:03 +00009031 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00009032LIBS="-lnet $LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009033cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009034/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009035
Martin v. Löwiseba40652007-08-30 20:10:57 +00009036/* Override any GCC internal prototype to avoid an error.
9037 Use char because int might match the return type of a GCC
9038 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009039#ifdef __cplusplus
9040extern "C"
9041#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009042char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009043int
9044main ()
9045{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009046return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009047 ;
9048 return 0;
9049}
9050_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009051if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009052 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +00009053else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009054 ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +00009055fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009056rm -f core conftest.err conftest.$ac_objext \
9057 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009058LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +00009059fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009060{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_net_socket" >&5
9061$as_echo "$ac_cv_lib_net_socket" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009062if test "x$ac_cv_lib_net_socket" = xyes; then :
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009063 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009064fi
9065 # BeOS
9066;;
9067esac
Guido van Rossum70c7f481998-03-26 18:44:10 +00009068
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9070$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009071
Martin v. Löwiseba40652007-08-30 20:10:57 +00009072# Check whether --with-libs was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009073if test "${with_libs+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009074 withval=$with_libs;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009075{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9076$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009077LIBS="$withval $LIBS"
9078
9079else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9081$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009082fi
9083
Guido van Rossum7f43da71994-08-01 12:15:30 +00009084
Benjamin Peterson64e8f6e2014-12-15 00:00:23 -05009085
9086
9087
9088
9089
9090
9091
9092if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
9093 if test -n "$ac_tool_prefix"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009094 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9095set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9097$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009098if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009099 $as_echo_n "(cached) " >&6
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009100else
9101 case $PKG_CONFIG in
9102 [\\/]* | ?:[\\/]*)
9103 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9104 ;;
9105 *)
9106 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9107for as_dir in $PATH
9108do
9109 IFS=$as_save_IFS
9110 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009111 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009112 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009113 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009114 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009115 break 2
9116 fi
9117done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009118 done
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009119IFS=$as_save_IFS
9120
9121 ;;
9122esac
9123fi
9124PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9125if test -n "$PKG_CONFIG"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9127$as_echo "$PKG_CONFIG" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009128else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9130$as_echo "no" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009131fi
9132
9133
9134fi
9135if test -z "$ac_cv_path_PKG_CONFIG"; then
9136 ac_pt_PKG_CONFIG=$PKG_CONFIG
9137 # Extract the first word of "pkg-config", so it can be a program name with args.
9138set dummy pkg-config; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9140$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009141if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009142 $as_echo_n "(cached) " >&6
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009143else
9144 case $ac_pt_PKG_CONFIG in
9145 [\\/]* | ?:[\\/]*)
9146 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9147 ;;
9148 *)
9149 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9150for as_dir in $PATH
9151do
9152 IFS=$as_save_IFS
9153 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009154 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009155 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009156 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009157 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009158 break 2
9159 fi
9160done
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009161 done
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009162IFS=$as_save_IFS
9163
9164 ;;
9165esac
9166fi
9167ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9168if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009169 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9170$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009171else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009172 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9173$as_echo "no" >&6; }
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009174fi
9175
9176 if test "x$ac_pt_PKG_CONFIG" = x; then
9177 PKG_CONFIG=""
9178 else
9179 case $cross_compiling:$ac_tool_warned in
9180yes:)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009181{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9182$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009183ac_tool_warned=yes ;;
9184esac
9185 PKG_CONFIG=$ac_pt_PKG_CONFIG
9186 fi
9187else
9188 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9189fi
9190
Benjamin Peterson64e8f6e2014-12-15 00:00:23 -05009191fi
9192if test -n "$PKG_CONFIG"; then
9193 _pkg_min_version=0.9.0
9194 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
9195$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
9196 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
9197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9198$as_echo "yes" >&6; }
9199 else
9200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9201$as_echo "no" >&6; }
9202 PKG_CONFIG=""
9203 fi
9204fi
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009205
9206# Check for use of the system expat library
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
9208$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009209
9210# Check whether --with-system_expat was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009211if test "${with_system_expat+set}" = set; then :
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009212 withval=$with_system_expat;
Benjamin Petersonf2d1b2a2010-10-31 16:53:53 +00009213else
9214 with_system_expat="no"
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009215fi
9216
9217
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009218{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
9219$as_echo "$with_system_expat" >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009220
9221# Check for use of the system libffi library
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
9223$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009224
9225# Check whether --with-system_ffi was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009226if test "${with_system_ffi+set}" = set; then :
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009227 withval=$with_system_ffi;
Benjamin Petersonf2d1b2a2010-10-31 16:53:53 +00009228else
9229 with_system_ffi="no"
Benjamin Petersone9e07bf2010-03-09 21:46:54 +00009230fi
9231
9232
9233if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +00009234 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
9235else
9236 LIBFFI_INCLUDEDIR=""
9237fi
9238
9239
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009240{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
9241$as_echo "$with_system_ffi" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +00009242
Ned Deilya2a9f572013-10-25 00:30:10 -07009243# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
9244
9245
9246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
9247$as_echo_n "checking for --with-tcltk-includes... " >&6; }
9248
9249# Check whether --with-tcltk-includes was given.
9250if test "${with_tcltk_includes+set}" = set; then :
9251 withval=$with_tcltk_includes;
9252else
9253 with_tcltk_includes="default"
9254fi
9255
9256{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
9257$as_echo "$with_tcltk_includes" >&6; }
9258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
9259$as_echo_n "checking for --with-tcltk-libs... " >&6; }
9260
9261# Check whether --with-tcltk-libs was given.
9262if test "${with_tcltk_libs+set}" = set; then :
9263 withval=$with_tcltk_libs;
9264else
9265 with_tcltk_libs="default"
9266fi
9267
9268{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
9269$as_echo "$with_tcltk_libs" >&6; }
9270if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
9271then
9272 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
9273 then
9274 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
9275 fi
9276 TCLTK_INCLUDES=""
9277 TCLTK_LIBS=""
9278else
9279 TCLTK_INCLUDES="$with_tcltk_includes"
9280 TCLTK_LIBS="$with_tcltk_libs"
9281fi
9282
Benjamin Peterson867475c2009-04-29 20:36:25 +00009283# Check for --with-dbmliborder
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
9285$as_echo_n "checking for --with-dbmliborder... " >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +00009286
9287# Check whether --with-dbmliborder was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009288if test "${with_dbmliborder+set}" = set; then :
Benjamin Peterson867475c2009-04-29 20:36:25 +00009289 withval=$with_dbmliborder;
9290if test x$with_dbmliborder = xyes
9291then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009292as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Benjamin Peterson867475c2009-04-29 20:36:25 +00009293else
9294 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
9295 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
9296 then
Georg Brandl71f4fbb2011-02-25 11:04:50 +00009297 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Benjamin Peterson867475c2009-04-29 20:36:25 +00009298 fi
9299 done
9300fi
9301fi
9302
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009303{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
9304$as_echo "$with_dbmliborder" >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +00009305
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009306# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009307
9308
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
9310$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009311
Martin v. Löwiseba40652007-08-30 20:10:57 +00009312# Check whether --with-signal-module was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009313if test "${with_signal_module+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009314 withval=$with_signal_module;
9315fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009316
9317
9318if test -z "$with_signal_module"
9319then with_signal_module="yes"
9320fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009321{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
9322$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009323
9324if test "${with_signal_module}" = "yes"; then
9325 USE_SIGNAL_MODULE=""
9326 SIGNAL_OBJS=""
9327else
9328 USE_SIGNAL_MODULE="#"
9329 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9330fi
9331
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009332# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009333
Barry Warsawc0d24d82000-06-29 16:12:00 +00009334USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009335
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dec-threads" >&5
9337$as_echo_n "checking for --with-dec-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009338
Guido van Rossumec2f0731997-01-22 20:54:01 +00009339
Martin v. Löwiseba40652007-08-30 20:10:57 +00009340# Check whether --with-dec-threads was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009341if test "${with_dec_threads+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009342 withval=$with_dec_threads;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009343{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9344$as_echo "$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +00009345LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +00009346if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +00009347 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +00009348fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009349else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9351$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009352fi
9353
Martin v. Löwis11437992002-04-12 09:54:03 +00009354
9355# Templates for things AC_DEFINEd more than once.
9356# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009357
9358
Martin v. Löwis11437992002-04-12 09:54:03 +00009359
9360
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
9362$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009363
Martin v. Löwiseba40652007-08-30 20:10:57 +00009364# Check whether --with-threads was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009365if test "${with_threads+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009366 withval=$with_threads;
9367fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009368
9369
Barry Warsawc0d24d82000-06-29 16:12:00 +00009370# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009371
Martin v. Löwiseba40652007-08-30 20:10:57 +00009372# Check whether --with-thread was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009373if test "${with_thread+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009374 withval=$with_thread; with_threads=$with_thread
9375fi
9376
Barry Warsawc0d24d82000-06-29 16:12:00 +00009377
9378if test -z "$with_threads"
9379then with_threads="yes"
9380fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009381{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
9382$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d82000-06-29 16:12:00 +00009383
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009384
Barry Warsawc0d24d82000-06-29 16:12:00 +00009385if test "$with_threads" = "no"
9386then
9387 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009388elif test "$ac_cv_pthread_is_default" = yes
9389then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009390 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009391
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009392 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009393 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009394
9395 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009396 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009397elif test "$ac_cv_kpthread" = "yes"
9398then
9399 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009400 if test "$ac_cv_cxx_thread" = "yes"; then
9401 CXX="$CXX -Kpthread"
9402 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009403 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009404
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009405 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009406 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009407elif test "$ac_cv_kthread" = "yes"
9408then
9409 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009410 if test "$ac_cv_cxx_thread" = "yes"; then
9411 CXX="$CXX -Kthread"
9412 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009413 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009414
9415 posix_threads=yes
9416 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009417elif test "$ac_cv_pthread" = "yes"
9418then
9419 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009420 if test "$ac_cv_cxx_thread" = "yes"; then
9421 CXX="$CXX -pthread"
9422 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009423 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009424
9425 posix_threads=yes
9426 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009427else
9428 if test ! -z "$with_threads" -a -d "$with_threads"
9429 then LDFLAGS="$LDFLAGS -L$with_threads"
9430 fi
9431 if test ! -z "$withval" -a -d "$withval"
9432 then LDFLAGS="$LDFLAGS -L$withval"
9433 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009434
9435 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00009436 # define _POSIX_THREADS in unistd.h. Some apparently don't
9437 # (e.g. gnu pth with pthread emulation)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009438 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
9439$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
9440 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009441/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009442
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009443#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009444#ifdef _POSIX_THREADS
9445yes
9446#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009447
9448_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009449if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009450 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009451 unistd_defines_pthreads=yes
9452else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009453 unistd_defines_pthreads=no
9454fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00009455rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009456
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
9458$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009459
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009460 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009461
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009462 ac_fn_c_check_header_mongrel "$LINENO" "cthreads.h" "ac_cv_header_cthreads_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +01009463if test "x$ac_cv_header_cthreads_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009464 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00009465
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009466 $as_echo "#define C_THREADS 1" >>confdefs.h
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009467
Martin v. Löwis11437992002-04-12 09:54:03 +00009468
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009469$as_echo "#define HURD_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009470
9471 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009472 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009473else
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009474
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009475 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 +01009476if test "x$ac_cv_header_mach_cthreads_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009477 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +00009478
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009479 $as_echo "#define C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009480
Martin v. Löwis11437992002-04-12 09:54:03 +00009481
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009482$as_echo "#define MACH_C_THREADS 1" >>confdefs.h
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009483
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009484 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009485else
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009486
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009487 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pth" >&5
9488$as_echo_n "checking for --with-pth... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009489
Martin v. Löwiseba40652007-08-30 20:10:57 +00009490# Check whether --with-pth was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009491if test "${with_pth+set}" = set; then :
9492 withval=$with_pth; { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9493$as_echo "$withval" >&6; }
9494 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009495
9496
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009497$as_echo "#define HAVE_PTH 1" >>confdefs.h
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009498
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009499 LIBS="-lpth $LIBS"
9500 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +00009501else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009502 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9503$as_echo "no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009504
9505 # Just looking for pthread_create in libpthread is not enough:
9506 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
9507 # So we really have to include pthread.h, and then link.
9508 _libs=$LIBS
9509 LIBS="$LIBS -lpthread"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009510 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
9511$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
9512 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009513/* end confdefs.h. */
Stefan Krahae66ca62012-11-22 22:36:57 +01009514
9515#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009516#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00009517
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009518void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00009519int
9520main ()
9521{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009522
9523pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00009524 ;
9525 return 0;
9526}
9527_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009528if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009529
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009530 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9531$as_echo "yes" >&6; }
9532 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00009533
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009534 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009535 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009536else
Martin v. Löwis11437992002-04-12 09:54:03 +00009537
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009538 LIBS=$_libs
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009539 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Matthias Klose3cef2a92012-03-14 23:39:33 +01009540if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009541 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00009542
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009543 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009544 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00009545else
Guido van Rossumad678af1998-10-02 14:42:15 +00009546
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009547 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 +01009548if test "x$ac_cv_header_atheos_threads_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009549 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009550
9551
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009552$as_echo "#define ATHEOS_THREADS 1" >>confdefs.h
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009553
9554 THREADOBJ="Python/thread.o"
9555else
9556
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009557 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 +01009558if test "x$ac_cv_header_kernel_OS_h" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009559 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00009560
9561
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009562$as_echo "#define BEOS_THREADS 1" >>confdefs.h
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009563
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009564 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009565else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009566
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009567 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
9568$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009569if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009570 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009571else
Martin v. Löwis11437992002-04-12 09:54:03 +00009572 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009573LIBS="-lpthreads $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009574cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009575/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009576
Martin v. Löwiseba40652007-08-30 20:10:57 +00009577/* Override any GCC internal prototype to avoid an error.
9578 Use char because int might match the return type of a GCC
9579 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009580#ifdef __cplusplus
9581extern "C"
9582#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009583char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009584int
9585main ()
9586{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009587return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009588 ;
9589 return 0;
9590}
9591_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009592if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009593 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00009594else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009595 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00009596fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009597rm -f core conftest.err conftest.$ac_objext \
9598 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009599LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009600fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009601{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
9602$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009603if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009604 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00009605
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009606 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009607 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009608 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00009609else
Greg Steinadf63d62000-07-05 10:38:09 +00009610
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009611 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
9612$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009613if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009614 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00009615else
Martin v. Löwis11437992002-04-12 09:54:03 +00009616 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009617LIBS="-lc_r $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009618cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009619/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009620
Martin v. Löwiseba40652007-08-30 20:10:57 +00009621/* Override any GCC internal prototype to avoid an error.
9622 Use char because int might match the return type of a GCC
9623 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009624#ifdef __cplusplus
9625extern "C"
9626#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009627char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009628int
9629main ()
9630{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009631return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009632 ;
9633 return 0;
9634}
9635_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009636if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009637 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00009638else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009639 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00009640fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009641rm -f core conftest.err conftest.$ac_objext \
9642 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009643LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00009644fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009645{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
9646$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009647if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009648 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00009649
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009650 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009651 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009652 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009653else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009654
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009655 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
9656$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009657if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009658 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009659else
Martin v. Löwis11437992002-04-12 09:54:03 +00009660 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009661LIBS="-lpthread $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009662cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009663/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009664
Martin v. Löwiseba40652007-08-30 20:10:57 +00009665/* Override any GCC internal prototype to avoid an error.
9666 Use char because int might match the return type of a GCC
9667 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009668#ifdef __cplusplus
9669extern "C"
9670#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009671char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009672int
9673main ()
9674{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009675return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009676 ;
9677 return 0;
9678}
9679_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009680if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009681 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009682else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009683 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009684fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009685rm -f core conftest.err conftest.$ac_objext \
9686 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009687LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009688fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009689{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
9690$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009691if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009692 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009693
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009694 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009695 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009696 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009697else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009698
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009699 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
9700$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009701if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009702 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00009703else
Martin v. Löwis11437992002-04-12 09:54:03 +00009704 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009705LIBS="-lcma $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009706cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009707/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009708
Martin v. Löwiseba40652007-08-30 20:10:57 +00009709/* Override any GCC internal prototype to avoid an error.
9710 Use char because int might match the return type of a GCC
9711 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009712#ifdef __cplusplus
9713extern "C"
9714#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009715char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009716int
9717main ()
9718{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009719return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009720 ;
9721 return 0;
9722}
9723_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009724if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009725 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00009726else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009727 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00009728fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009729rm -f core conftest.err conftest.$ac_objext \
9730 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009731LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009732fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009733{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
9734$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009735if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009736 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00009737
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009738 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009739 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009740 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00009741else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00009742
Martin v. Löwis130fb172001-07-19 11:00:41 +00009743 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00009744fi
9745
Guido van Rossum627b2d71993-12-24 10:39:16 +00009746
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009747fi
9748
Guido van Rossum0be3e491997-05-22 20:33:33 +00009749fi
9750
Guido van Rossum49545951997-12-02 19:28:29 +00009751fi
9752
Guido van Rossumb93a8621998-05-07 13:27:32 +00009753fi
9754
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009755
Michael W. Hudson54241132001-12-07 15:38:26 +00009756fi
9757
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009758
9759fi
9760
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009761fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009762rm -f core conftest.err conftest.$ac_objext \
9763 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009764fi
9765
Martin v. Löwis11437992002-04-12 09:54:03 +00009766fi
9767
9768
9769fi
9770
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009771
Michael W. Hudson54241132001-12-07 15:38:26 +00009772
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009773 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
9774$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009775if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009776 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009777else
Martin v. Löwis11437992002-04-12 09:54:03 +00009778 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009779LIBS="-lmpc $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009780cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009781/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009782
Martin v. Löwiseba40652007-08-30 20:10:57 +00009783/* Override any GCC internal prototype to avoid an error.
9784 Use char because int might match the return type of a GCC
9785 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009786#ifdef __cplusplus
9787extern "C"
9788#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009789char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009790int
9791main ()
9792{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009793return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009794 ;
9795 return 0;
9796}
9797_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009798if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009799 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009800else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009801 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009802fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009803rm -f core conftest.err conftest.$ac_objext \
9804 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009805LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009806fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009807{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
9808$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009809if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009810 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009811
Martin v. Löwis130fb172001-07-19 11:00:41 +00009812 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009813 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009814 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009815fi
9816
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009817
Neal Norwitza978ab02002-11-02 16:58:05 +00009818 if test "$posix_threads" != "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009819 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
9820$as_echo_n "checking for thr_create in -lthread... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009821if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009822 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009823else
Martin v. Löwis11437992002-04-12 09:54:03 +00009824 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009825LIBS="-lthread $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009826cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009827/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009828
Martin v. Löwiseba40652007-08-30 20:10:57 +00009829/* Override any GCC internal prototype to avoid an error.
9830 Use char because int might match the return type of a GCC
9831 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009832#ifdef __cplusplus
9833extern "C"
9834#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009835char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009836int
9837main ()
9838{
Martin v. Löwiseba40652007-08-30 20:10:57 +00009839return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009840 ;
9841 return 0;
9842}
9843_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009844if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009845 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009846else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009847 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009848fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009849rm -f core conftest.err conftest.$ac_objext \
9850 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009851LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009852fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009853{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
9854$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009855if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009856 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009857
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009858 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009859 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009860 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009861fi
9862
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009863 fi
Michael W. Hudson54241132001-12-07 15:38:26 +00009864
Martin v. Löwis130fb172001-07-19 11:00:41 +00009865 if test "$USE_THREAD_MODULE" != "#"
9866 then
9867 # If the above checks didn't disable threads, (at least) OSF1
9868 # needs this '-threads' argument during linking.
9869 case $ac_sys_system in
9870 OSF1) LDLAST=-threads;;
9871 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +00009872 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009873fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009874
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009875if test "$posix_threads" = "yes"; then
9876 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009877
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009878$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009879
9880 fi
9881
9882 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
9883 case $ac_sys_system/$ac_sys_release in
Charles-François Natali4929eb92011-07-21 19:41:04 +02009884 SunOS/5.6)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009885$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009886
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009887 ;;
9888 SunOS/5.8)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009889$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009890
9891 ;;
Charles-François Natali4929eb92011-07-21 19:41:04 +02009892 AIX/*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009893$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimescba36bb2008-01-30 22:54:18 +00009894
9895 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009896 esac
9897
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009898 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
9899$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +01009900 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009901 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009902else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009903 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009904 ac_cv_pthread_system_supported=no
9905else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009906 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009907/* end confdefs.h. */
Stefan Krahae66ca62012-11-22 22:36:57 +01009908
9909 #include <stdio.h>
9910 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009911 void *foo(void *parm) {
9912 return NULL;
9913 }
9914 main() {
9915 pthread_attr_t attr;
9916 pthread_t id;
9917 if (pthread_attr_init(&attr)) exit(-1);
9918 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
9919 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
9920 exit(0);
9921 }
9922_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009923if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009924 ac_cv_pthread_system_supported=yes
9925else
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009926 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009927fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009928rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9929 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009930fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009931
Martin v. Löwiseba40652007-08-30 20:10:57 +00009932
Guido van Rossum627b2d71993-12-24 10:39:16 +00009933fi
9934
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
9936$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009937 if test "$ac_cv_pthread_system_supported" = "yes"; then
9938
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009939$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009940
9941 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009942 for ac_func in pthread_sigmask
9943do :
9944 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Matthias Klose3cef2a92012-03-14 23:39:33 +01009945if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009946 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009947#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009948_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00009949 case $ac_sys_system in
9950 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009951
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009952$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00009953
9954 ;;
9955 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009956fi
9957done
9958
Christian Heimes0d604cf2013-08-21 13:26:05 +02009959 for ac_func in pthread_atfork
9960do :
9961 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
9962if test "x$ac_cv_func_pthread_atfork" = xyes; then :
9963 cat >>confdefs.h <<_ACEOF
9964#define HAVE_PTHREAD_ATFORK 1
9965_ACEOF
9966
9967fi
9968done
9969
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009970fi
9971
9972
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009973# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00009974
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
9976$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009977# Check whether --enable-ipv6 was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009978if test "${enable_ipv6+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +00009979 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009980 no)
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9982$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009983 ipv6=no
9984 ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009985 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9986$as_echo "yes" >&6; }
9987 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009988
9989 ipv6=yes
9990 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009991 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009992else
Martin v. Löwis11437992002-04-12 09:54:03 +00009993
Matthias Klosea0bea5d2010-05-08 10:00:28 +00009994 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009995/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009996 /* AF_INET6 available check */
9997#include <sys/types.h>
9998#include <sys/socket.h>
Charles-François Natalibe2b9072013-01-08 19:47:00 +01009999int
10000main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010001{
Charles-François Natalibe2b9072013-01-08 19:47:00 +010010002int domain = AF_INET6;
10003 ;
10004 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010005}
Martin v. Löwis11437992002-04-12 09:54:03 +000010006_ACEOF
Charles-François Natalibe2b9072013-01-08 19:47:00 +010010007if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +000010008
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10010$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010011 ipv6=yes
Matthias Klosec511b472010-05-08 11:01:39 +000010012
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010013else
Matthias Klosec511b472010-05-08 11:01:39 +000010014
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10016$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010017 ipv6=no
Matthias Klosec511b472010-05-08 11:01:39 +000010018
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010019fi
Charles-François Natalibe2b9072013-01-08 19:47:00 +010010020rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010021
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010022if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010023 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
10024$as_echo_n "checking if RFC2553 API is available... " >&6; }
10025 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010026/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +000010027
10028 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010029#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010030int
10031main ()
10032{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010033struct sockaddr_in6 x;
Matthias Klosec511b472010-05-08 11:01:39 +000010034 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000010035 ;
10036 return 0;
10037}
Matthias Klosec511b472010-05-08 11:01:39 +000010038
Martin v. Löwis11437992002-04-12 09:54:03 +000010039_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010040if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +000010041
10042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010043$as_echo "yes" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000010044 ipv6=yes
10045
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010046else
Matthias Klosec511b472010-05-08 11:01:39 +000010047
10048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010049$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000010050 ipv6=no
10051
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010052fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010053rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010054fi
10055
10056if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010057 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000010058
10059fi
10060
Martin v. Löwiseba40652007-08-30 20:10:57 +000010061fi
10062
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010063
10064ipv6type=unknown
10065ipv6lib=none
10066ipv6trylibc=no
10067
10068if test "$ipv6" = "yes"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010069 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
10070$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000010071 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
10072 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010073 case $i in
10074 inria)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010075 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010076/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010077
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010078#include <netinet/in.h>
10079#ifdef IPV6_INRIA_VERSION
10080yes
10081#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010082_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010083if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010084 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010085 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010086fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000010087rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010088
10089 ;;
10090 kame)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010091 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010092/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010093
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010094#include <netinet/in.h>
10095#ifdef __KAME__
10096yes
10097#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010098_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010099if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010100 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010101 ipv6type=$i;
10102 ipv6lib=inet6
10103 ipv6libdir=/usr/local/v6/lib
10104 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010105fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000010106rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010107
10108 ;;
10109 linux-glibc)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010110 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010111/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010112
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010113#include <features.h>
10114#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10115yes
10116#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010117_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010118if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010119 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010120 ipv6type=$i;
10121 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010122fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000010123rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010124
10125 ;;
10126 linux-inet6)
10127 if test -d /usr/inet6; then
10128 ipv6type=$i
10129 ipv6lib=inet6
10130 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010131 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010132 fi
10133 ;;
10134 solaris)
10135 if test -f /etc/netconfig; then
Antoine Pitrou31e85952011-01-03 18:57:14 +000010136 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010137 ipv6type=$i
10138 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010139 fi
10140 fi
10141 ;;
10142 toshiba)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010143 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010144/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010145
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010146#include <sys/param.h>
10147#ifdef _TOSHIBA_INET6
10148yes
10149#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010150_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010151if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010152 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010153 ipv6type=$i;
10154 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010155 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010156fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000010157rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010158
10159 ;;
10160 v6d)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010161 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010162/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010163
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010164#include </usr/local/v6/include/sys/v6config.h>
10165#ifdef __V6D__
10166yes
10167#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010168_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010169if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010170 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010171 ipv6type=$i;
10172 ipv6lib=v6;
10173 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010174 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010175fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000010176rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010177
10178 ;;
10179 zeta)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010180 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010181/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010182
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010183#include <sys/param.h>
10184#ifdef _ZETA_MINAMI_INET6
10185yes
10186#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010187_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010188if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010189 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010190 ipv6type=$i;
10191 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010192 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010193fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000010194rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010195
10196 ;;
10197 esac
10198 if test "$ipv6type" != "unknown"; then
10199 break
10200 fi
10201 done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10203$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010204fi
10205
10206if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10207 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10208 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10209 echo "using lib$ipv6lib"
10210 else
10211 if test $ipv6trylibc = "yes"; then
10212 echo "using libc"
10213 else
10214 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10215 echo "You need to fetch lib$ipv6lib.a from appropriate"
10216 echo 'ipv6 kit and compile beforehand.'
10217 exit 1
10218 fi
10219 fi
10220fi
10221
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
10223$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
10224cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010225/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +000010226
10227 #include <Carbon/Carbon.h>
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010228int
10229main ()
10230{
10231FSIORefNum fRef = 0
10232 ;
10233 return 0;
10234}
Mark Dickinson0712b562010-05-08 19:13:21 +000010235
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010236_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010237if ac_fn_c_try_compile "$LINENO"; then :
Matthias Klosec511b472010-05-08 11:01:39 +000010238
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010239
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010240$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010241
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10243$as_echo "yes" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010244
Mark Dickinson0712b562010-05-08 19:13:21 +000010245else
10246
10247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10248$as_echo "no" >&6; }
10249
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010250fi
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000010251rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10252
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010253# Check for --with-doc-strings
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10255$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010256
Martin v. Löwiseba40652007-08-30 20:10:57 +000010257# Check whether --with-doc-strings was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010258if test "${with_doc_strings+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010259 withval=$with_doc_strings;
10260fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010261
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010262
10263if test -z "$with_doc_strings"
10264then with_doc_strings="yes"
10265fi
10266if test "$with_doc_strings" != "no"
10267then
10268
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010269$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010270
10271fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010272{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10273$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010274
Neil Schemenauera35c6882001-02-27 04:45:05 +000010275# Check for Python-specific malloc support
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
10277$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010278
Martin v. Löwiseba40652007-08-30 20:10:57 +000010279# Check whether --with-tsc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010280if test "${with_tsc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010281 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010282if test "$withval" != no
10283then
10284
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010285$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010286
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10288$as_echo "yes" >&6; }
10289else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10290$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010291fi
10292else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010293 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10294$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010295fi
10296
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010297
10298# Check for Python-specific malloc support
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10300$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010301
Martin v. Löwiseba40652007-08-30 20:10:57 +000010302# Check whether --with-pymalloc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010303if test "${with_pymalloc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010304 withval=$with_pymalloc;
10305fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010306
Neil Schemenauera35c6882001-02-27 04:45:05 +000010307
Neil Schemenauer16c22972002-03-22 15:34:49 +000010308if test -z "$with_pymalloc"
10309then with_pymalloc="yes"
10310fi
10311if test "$with_pymalloc" != "no"
10312then
Martin v. Löwis11437992002-04-12 09:54:03 +000010313
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010314$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010315
10316fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010317{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10318$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010319
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010320# Check for Valgrind support
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
10322$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010323
10324# Check whether --with-valgrind was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010325if test "${with_valgrind+set}" = set; then :
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010326 withval=$with_valgrind;
10327else
10328 with_valgrind=no
10329fi
10330
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010331{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
10332$as_echo "$with_valgrind" >&6; }
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010333if test "$with_valgrind" != no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010334 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 +010010335if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010336
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010337$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010338
10339else
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010340 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000010341
10342fi
10343
10344
10345fi
10346
Barry Warsawef82cd72000-06-30 16:21:01 +000010347# Check for --with-wctype-functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-wctype-functions" >&5
10349$as_echo_n "checking for --with-wctype-functions... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010350
Martin v. Löwiseba40652007-08-30 20:10:57 +000010351# Check whether --with-wctype-functions was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010352if test "${with_wctype_functions+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000010353 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000010354if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000010355then
10356
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010357$as_echo "#define WANT_WCTYPE_FUNCTIONS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000010358
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10360$as_echo "yes" >&6; }
10361else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10362$as_echo "no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000010363fi
10364else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10366$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010367fi
10368
Barry Warsawef82cd72000-06-30 16:21:01 +000010369
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010370# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000010371
Guido van Rossum98935bf2001-09-05 19:13:16 +000010372DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000010373
Guido van Rossume97ee181999-12-20 21:27:22 +000010374# the dlopen() function means we might want to use dynload_shlib.o. some
10375# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000010376for ac_func in dlopen
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010377do :
10378 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010379if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010380 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010381#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010382_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000010383
Guido van Rossume97ee181999-12-20 21:27:22 +000010384fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010385done
Guido van Rossume97ee181999-12-20 21:27:22 +000010386
Michael W. Hudson54241132001-12-07 15:38:26 +000010387
Guido van Rossume97ee181999-12-20 21:27:22 +000010388# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
10389# loading of modules.
10390
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
10392$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010393if test -z "$DYNLOADFILE"
10394then
10395 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000010396 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
10397 if test "$ac_cv_func_dlopen" = yes
10398 then DYNLOADFILE="dynload_shlib.o"
10399 else DYNLOADFILE="dynload_aix.o"
10400 fi
10401 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000010402 BeOS*) DYNLOADFILE="dynload_beos.o";;
10403 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Anthony Baxter82201742006-04-09 15:07:40 +000010404 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
10405 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010406 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000010407 *)
10408 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
10409 # out any dynamic loading
10410 if test "$ac_cv_func_dlopen" = yes
10411 then DYNLOADFILE="dynload_shlib.o"
10412 else DYNLOADFILE="dynload_stub.o"
10413 fi
10414 ;;
10415 esac
10416fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010417{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
10418$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010419if test "$DYNLOADFILE" != "dynload_stub.o"
10420then
Martin v. Löwis11437992002-04-12 09:54:03 +000010421
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010422$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000010423
10424fi
10425
Neil Schemenauer4e425612001-06-19 15:44:15 +000010426# MACHDEP_OBJS can be set to platform-specific object files needed by Python
10427
Michael W. Hudson54241132001-12-07 15:38:26 +000010428
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
10430$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010431if test -z "$MACHDEP_OBJS"
10432then
Jack Jansene578a632001-08-15 01:27:14 +000010433 MACHDEP_OBJS=$extra_machdep_objs
10434else
10435 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000010436fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010437{ $as_echo "$as_me:${as_lineno-$LINENO}: result: MACHDEP_OBJS" >&5
10438$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010439
Guido van Rossum627b2d71993-12-24 10:39:16 +000010440# checks for library functions
Martin v. Löwisaef18b12008-03-24 13:31:16 +000010441for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
10442 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
doko@ubuntu.coma50b0de2015-04-13 21:55:59 +020010443 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
10444 getentropy \
Martin v. Löwis50ea4562009-11-27 13:56:01 +000010445 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Benjamin Petersond16e01c2014-02-04 10:20:26 -050010446 initgroups kill killpg lchmod lchown lstat mkfifo mknod mktime mmap \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000010447 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000010448 putenv readlink realpath \
Jesse Noller355b1262009-04-02 00:03:28 +000010449 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
10450 setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000010451 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Martin v. Löwis50ea4562009-11-27 13:56:01 +000010452 setlocale setregid setreuid setresuid setresgid \
10453 setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +000010454 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000010455 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Neal Norwitz05a45592006-03-20 06:30:08 +000010456 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010457do :
10458 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10459ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000010460if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010461 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010462#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010463_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010464
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010465fi
10466done
10467
Michael W. Hudson54241132001-12-07 15:38:26 +000010468
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010469# For some functions, having a definition is not sufficient, since
10470# we want to take their address.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
10472$as_echo_n "checking for chroot... " >&6; }
10473cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010474/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010475#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010476int
10477main ()
10478{
10479void *x=chroot
10480 ;
10481 return 0;
10482}
10483_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010484if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010485
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010486$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010487
Matthias Klosec511b472010-05-08 11:01:39 +000010488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010489$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010490else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10492$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010493
10494fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010495rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
10497$as_echo_n "checking for link... " >&6; }
10498cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010499/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010500#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010501int
10502main ()
10503{
10504void *x=link
10505 ;
10506 return 0;
10507}
10508_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010509if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010510
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010511$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010512
Matthias Klosec511b472010-05-08 11:01:39 +000010513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010514$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010515else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10517$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010518
10519fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010520rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
10522$as_echo_n "checking for symlink... " >&6; }
10523cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010524/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010525#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010526int
10527main ()
10528{
10529void *x=symlink
10530 ;
10531 return 0;
10532}
10533_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010534if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010535
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010536$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010537
Matthias Klosec511b472010-05-08 11:01:39 +000010538 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010539$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010540else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10542$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010543
10544fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010545rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
10547$as_echo_n "checking for fchdir... " >&6; }
10548cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010549/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010550#include <unistd.h>
10551int
10552main ()
10553{
10554void *x=fchdir
10555 ;
10556 return 0;
10557}
10558_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010559if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010560
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010561$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010562
Matthias Klosec511b472010-05-08 11:01:39 +000010563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010564$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010565else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10567$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010568
10569fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010570rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
10572$as_echo_n "checking for fsync... " >&6; }
10573cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010574/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010575#include <unistd.h>
10576int
10577main ()
10578{
10579void *x=fsync
10580 ;
10581 return 0;
10582}
10583_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010584if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010585
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010586$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010587
Matthias Klosec511b472010-05-08 11:01:39 +000010588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010589$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010590else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10592$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010593
10594fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010595rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
10597$as_echo_n "checking for fdatasync... " >&6; }
10598cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010599/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010600#include <unistd.h>
10601int
10602main ()
10603{
10604void *x=fdatasync
10605 ;
10606 return 0;
10607}
10608_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010609if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010610
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010611$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010612
Matthias Klosec511b472010-05-08 11:01:39 +000010613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010614$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010615else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10617$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010618
10619fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010620rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
10622$as_echo_n "checking for epoll... " >&6; }
10623cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010624/* end confdefs.h. */
10625#include <sys/epoll.h>
10626int
10627main ()
10628{
10629void *x=epoll_create
10630 ;
10631 return 0;
10632}
10633_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010634if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010635
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010636$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010637
Matthias Klosec511b472010-05-08 11:01:39 +000010638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010639$as_echo "yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010640else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10642$as_echo "no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010643
10644fi
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010645rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
10647$as_echo_n "checking for kqueue... " >&6; }
10648cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010649/* end confdefs.h. */
10650
10651#include <sys/types.h>
10652#include <sys/event.h>
10653
10654int
10655main ()
10656{
10657int x=kqueue()
10658 ;
10659 return 0;
10660}
10661_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010662if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010663
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010664$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010665
Matthias Klosec511b472010-05-08 11:01:39 +000010666 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010667$as_echo "yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010668else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10670$as_echo "no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010671
10672fi
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000010673rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010674# On some systems (eg. FreeBSD 5), we would find a definition of the
10675# functions ctermid_r, setgroups in the library, but no prototype
10676# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
10677# address to avoid compiler warnings and potential miscompilations
10678# because of the missing prototypes.
10679
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
10681$as_echo_n "checking for ctermid_r... " >&6; }
10682cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010683/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010684
Martin v. Löwisd5843682002-11-21 20:41:28 +000010685#include <stdio.h>
10686
Martin v. Löwisd5843682002-11-21 20:41:28 +000010687int
10688main ()
10689{
10690void* p = ctermid_r
10691 ;
10692 return 0;
10693}
10694_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010695if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010696
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010697$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010698
Matthias Klosec511b472010-05-08 11:01:39 +000010699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010700$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010701else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10703$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010704
10705fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010706rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10707
Antoine Pitroub170f172010-09-10 18:47:36 +000010708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
10709$as_echo_n "checking for flock declaration... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010710if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010711 $as_echo_n "(cached) " >&6
10712else
10713 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010714/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010715#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010716int
10717main ()
10718{
10719void* p = flock
Antoine Pitroub170f172010-09-10 18:47:36 +000010720
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010721 ;
10722 return 0;
10723}
10724_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010725if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010726 ac_cv_flock_decl=yes
10727else
10728 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010729
10730fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010731rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitrou85729812010-09-07 14:55:24 +000010732
Antoine Pitroub170f172010-09-10 18:47:36 +000010733fi
10734{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
10735$as_echo "$ac_cv_flock_decl" >&6; }
10736if test "x${ac_cv_flock_decl}" = xyes; then
10737 for ac_func in flock
10738do :
10739 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Matthias Klose3cef2a92012-03-14 23:39:33 +010010740if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010741 cat >>confdefs.h <<_ACEOF
10742#define HAVE_FLOCK 1
Antoine Pitrou85729812010-09-07 14:55:24 +000010743_ACEOF
Antoine Pitroub170f172010-09-10 18:47:36 +000010744
Antoine Pitrou85729812010-09-07 14:55:24 +000010745else
Antoine Pitroub170f172010-09-10 18:47:36 +000010746 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitrou85729812010-09-07 14:55:24 +000010747$as_echo_n "checking for flock in -lbsd... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010748if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitrou85729812010-09-07 14:55:24 +000010749 $as_echo_n "(cached) " >&6
10750else
10751 ac_check_lib_save_LIBS=$LIBS
10752LIBS="-lbsd $LIBS"
10753cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10754/* end confdefs.h. */
10755
10756/* Override any GCC internal prototype to avoid an error.
10757 Use char because int might match the return type of a GCC
10758 builtin and then its argument prototype would still apply. */
10759#ifdef __cplusplus
10760extern "C"
10761#endif
10762char flock ();
10763int
10764main ()
10765{
10766return flock ();
10767 ;
10768 return 0;
10769}
10770_ACEOF
10771if ac_fn_c_try_link "$LINENO"; then :
10772 ac_cv_lib_bsd_flock=yes
10773else
10774 ac_cv_lib_bsd_flock=no
10775fi
10776rm -f core conftest.err conftest.$ac_objext \
10777 conftest$ac_exeext conftest.$ac_ext
10778LIBS=$ac_check_lib_save_LIBS
10779fi
10780{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
10781$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010782if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroub170f172010-09-10 18:47:36 +000010783 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitrou85729812010-09-07 14:55:24 +000010784
10785
10786$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
10787
10788
10789fi
10790
10791
10792fi
Antoine Pitroub170f172010-09-10 18:47:36 +000010793done
10794
Antoine Pitrou85729812010-09-07 14:55:24 +000010795fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010796
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
10798$as_echo_n "checking for getpagesize... " >&6; }
10799cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010800/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010801
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010802#include <unistd.h>
10803
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010804int
10805main ()
10806{
10807void* p = getpagesize
10808 ;
10809 return 0;
10810}
10811_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010812if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010813
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010814$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010815
Matthias Klosec511b472010-05-08 11:01:39 +000010816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010817$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010818else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10820$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010821
10822fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010823rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010824
Charles-François Natali93a11752011-11-27 13:01:35 +010010825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
10826$as_echo_n "checking for broken unsetenv... " >&6; }
10827cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10828/* end confdefs.h. */
10829
10830#include <stdlib.h>
10831
10832int
10833main ()
10834{
10835int res = unsetenv("DUMMY")
10836 ;
10837 return 0;
10838}
10839_ACEOF
10840if ac_fn_c_try_compile "$LINENO"; then :
10841 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10842$as_echo "no" >&6; }
10843else
10844
10845$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
10846
10847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10848$as_echo "yes" >&6; }
10849
10850fi
10851rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10852
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010853for ac_prog in true
10854do
10855 # Extract the first word of "$ac_prog", so it can be a program name with args.
10856set dummy $ac_prog; ac_word=$2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10858$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010859if ${ac_cv_prog_TRUE+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010860 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010861else
10862 if test -n "$TRUE"; then
10863 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
10864else
10865as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10866for as_dir in $PATH
10867do
10868 IFS=$as_save_IFS
10869 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010870 for ac_exec_ext in '' $ac_executable_extensions; do
Charles-François Natalibe2b9072013-01-08 19:47:00 +010010871 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010872 ac_cv_prog_TRUE="$ac_prog"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010873 $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 +000010874 break 2
10875 fi
10876done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010877 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000010878IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010879
10880fi
10881fi
10882TRUE=$ac_cv_prog_TRUE
10883if test -n "$TRUE"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010884 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
10885$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010886else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10888$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010889fi
10890
Martin v. Löwiseba40652007-08-30 20:10:57 +000010891
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010892 test -n "$TRUE" && break
10893done
10894test -n "$TRUE" || TRUE="/bin/true"
10895
10896
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
10898$as_echo_n "checking for inet_aton in -lc... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010899if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010900 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010901else
10902 ac_check_lib_save_LIBS=$LIBS
10903LIBS="-lc $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010904cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010905/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010906
Martin v. Löwiseba40652007-08-30 20:10:57 +000010907/* Override any GCC internal prototype to avoid an error.
10908 Use char because int might match the return type of a GCC
10909 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010910#ifdef __cplusplus
10911extern "C"
10912#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010913char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010914int
10915main ()
10916{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010917return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010918 ;
10919 return 0;
10920}
10921_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010922if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010923 ac_cv_lib_c_inet_aton=yes
10924else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010925 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010926fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010927rm -f core conftest.err conftest.$ac_objext \
10928 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010929LIBS=$ac_check_lib_save_LIBS
10930fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010931{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
10932$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010933if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010934 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010935else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010936 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
10937$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010938if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010939 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010940else
10941 ac_check_lib_save_LIBS=$LIBS
10942LIBS="-lresolv $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010943cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010944/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010945
Martin v. Löwiseba40652007-08-30 20:10:57 +000010946/* Override any GCC internal prototype to avoid an error.
10947 Use char because int might match the return type of a GCC
10948 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010949#ifdef __cplusplus
10950extern "C"
10951#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010952char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010953int
10954main ()
10955{
Martin v. Löwiseba40652007-08-30 20:10:57 +000010956return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010957 ;
10958 return 0;
10959}
10960_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010961if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010962 ac_cv_lib_resolv_inet_aton=yes
10963else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010964 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010965fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010966rm -f core conftest.err conftest.$ac_objext \
10967 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010968LIBS=$ac_check_lib_save_LIBS
10969fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010970{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
10971$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010972if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010973 cat >>confdefs.h <<_ACEOF
10974#define HAVE_LIBRESOLV 1
10975_ACEOF
10976
10977 LIBS="-lresolv $LIBS"
10978
10979fi
10980
10981
10982fi
10983
10984
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010985# On Tru64, chflags seems to be present, but calling it will
10986# exit Python
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
10988$as_echo_n "checking for chflags... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010010989if ${ac_cv_have_chflags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010990 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000010991else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010992 if test "$cross_compiling" = yes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000010993 ac_cv_have_chflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010994else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000010995 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010996/* end confdefs.h. */
Ned Deily43e10542011-06-27 23:41:53 -070010997
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000010998#include <sys/stat.h>
10999#include <unistd.h>
11000int main(int argc, char*argv[])
11001{
11002 if(chflags(argv[0], 0) != 0)
11003 return 1;
11004 return 0;
11005}
Ned Deily43e10542011-06-27 23:41:53 -070011006
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011007_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011008if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011009 ac_cv_have_chflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011010else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011011 ac_cv_have_chflags=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011012fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011013rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11014 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000011015fi
11016
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011017
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011018fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011019{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
11020$as_echo "$ac_cv_have_chflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000011021if test "$ac_cv_have_chflags" = cross ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011022 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011023if test "x$ac_cv_func_chflags" = xyes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000011024 ac_cv_have_chflags="yes"
11025else
11026 ac_cv_have_chflags="no"
11027fi
11028
11029fi
11030if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011031
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011032$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011033
11034fi
11035
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
11037$as_echo_n "checking for lchflags... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011038if ${ac_cv_have_lchflags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011039 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011040else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011041 if test "$cross_compiling" = yes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000011042 ac_cv_have_lchflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011043else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011044 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011045/* end confdefs.h. */
Ned Deily43e10542011-06-27 23:41:53 -070011046
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011047#include <sys/stat.h>
11048#include <unistd.h>
11049int main(int argc, char*argv[])
11050{
11051 if(lchflags(argv[0], 0) != 0)
11052 return 1;
11053 return 0;
11054}
Ned Deily43e10542011-06-27 23:41:53 -070011055
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011056_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011057if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011058 ac_cv_have_lchflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011059else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011060 ac_cv_have_lchflags=no
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000011061fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011062rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11063 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011064fi
11065
11066
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011067fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011068{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
11069$as_echo "$ac_cv_have_lchflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000011070if test "$ac_cv_have_lchflags" = cross ; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011071 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011072if test "x$ac_cv_func_lchflags" = xyes; then :
Gregory P. Smith49437c22009-11-02 01:38:35 +000011073 ac_cv_have_lchflags="yes"
11074else
11075 ac_cv_have_lchflags="no"
11076fi
11077
11078fi
11079if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011080
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011081$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011082
11083fi
11084
Ronald Oussorenf8752642006-07-06 10:13:35 +000011085case $ac_sys_system/$ac_sys_release in
11086Darwin/*)
11087 _CUR_CFLAGS="${CFLAGS}"
11088 _CUR_LDFLAGS="${LDFLAGS}"
11089 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11090 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11091 ;;
11092esac
11093
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11095$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011096if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011097 $as_echo_n "(cached) " >&6
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011098else
11099 ac_check_lib_save_LIBS=$LIBS
11100LIBS="-lz $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011101cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011102/* end confdefs.h. */
11103
Martin v. Löwiseba40652007-08-30 20:10:57 +000011104/* Override any GCC internal prototype to avoid an error.
11105 Use char because int might match the return type of a GCC
11106 builtin and then its argument prototype would still apply. */
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011107#ifdef __cplusplus
11108extern "C"
11109#endif
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011110char inflateCopy ();
11111int
11112main ()
11113{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011114return inflateCopy ();
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011115 ;
11116 return 0;
11117}
11118_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011119if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011120 ac_cv_lib_z_inflateCopy=yes
11121else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011122 ac_cv_lib_z_inflateCopy=no
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011123fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011124rm -f core conftest.err conftest.$ac_objext \
11125 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011126LIBS=$ac_check_lib_save_LIBS
11127fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011128{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
11129$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011130if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011131
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011132$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000011133
11134fi
11135
11136
Ronald Oussorenf8752642006-07-06 10:13:35 +000011137case $ac_sys_system/$ac_sys_release in
11138Darwin/*)
11139 CFLAGS="${_CUR_CFLAGS}"
11140 LDFLAGS="${_CUR_LDFLAGS}"
11141 ;;
11142esac
11143
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
11145$as_echo_n "checking for hstrerror... " >&6; }
11146cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011147/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011148
Martin v. Löwise9416172003-05-03 10:12:45 +000011149#include <netdb.h>
11150
Martin v. Löwise9416172003-05-03 10:12:45 +000011151int
11152main ()
11153{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011154void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011155 ;
11156 return 0;
11157}
11158_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011159if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011160
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011161$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011162
Matthias Klosec511b472010-05-08 11:01:39 +000011163 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011164$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011165else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011166 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11167$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011168
11169fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011170rm -f core conftest.err conftest.$ac_objext \
11171 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011172
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
11174$as_echo_n "checking for inet_aton... " >&6; }
11175cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011176/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011177
Martin v. Löwis86d66262006-02-17 08:40:11 +000011178#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011179#include <sys/socket.h>
11180#include <netinet/in.h>
11181#include <arpa/inet.h>
11182
Martin v. Löwise9416172003-05-03 10:12:45 +000011183int
11184main ()
11185{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011186void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011187 ;
11188 return 0;
11189}
11190_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011191if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011192
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011193$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011194
Matthias Klosec511b472010-05-08 11:01:39 +000011195 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011196$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011197else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11199$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011200
11201fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011202rm -f core conftest.err conftest.$ac_objext \
11203 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011204
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
11206$as_echo_n "checking for inet_pton... " >&6; }
11207cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011208/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011209
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011210#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011211#include <sys/socket.h>
11212#include <netinet/in.h>
11213#include <arpa/inet.h>
11214
Martin v. Löwise9416172003-05-03 10:12:45 +000011215int
11216main ()
11217{
11218void* p = inet_pton
11219 ;
11220 return 0;
11221}
11222_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011223if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011224
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011225$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011226
Matthias Klosec511b472010-05-08 11:01:39 +000011227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011228$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011229else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11231$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011232
11233fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011234rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000011235
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011236# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
11238$as_echo_n "checking for setgroups... " >&6; }
11239cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011240/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011241
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011242#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011243#ifdef HAVE_GRP_H
11244#include <grp.h>
11245#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000011246
Martin v. Löwisd5843682002-11-21 20:41:28 +000011247int
11248main ()
11249{
11250void* p = setgroups
11251 ;
11252 return 0;
11253}
11254_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011255if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011256
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011257$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011258
Matthias Klosec511b472010-05-08 11:01:39 +000011259 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011260$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011261else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011262 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11263$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011264
11265fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011266rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000011267
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011268# check for openpty and forkpty
11269
11270for ac_func in openpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011271do :
11272 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011273if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011274 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011275#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011276_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011277
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011278else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011279 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
11280$as_echo_n "checking for openpty in -lutil... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011281if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011282 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011283else
Martin v. Löwis11437992002-04-12 09:54:03 +000011284 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011285LIBS="-lutil $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011286cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011287/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011288
Martin v. Löwiseba40652007-08-30 20:10:57 +000011289/* Override any GCC internal prototype to avoid an error.
11290 Use char because int might match the return type of a GCC
11291 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011292#ifdef __cplusplus
11293extern "C"
11294#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011295char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011296int
11297main ()
11298{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011299return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011300 ;
11301 return 0;
11302}
11303_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011304if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011305 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011306else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011307 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011308fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011309rm -f core conftest.err conftest.$ac_objext \
11310 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011311LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011312fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011313{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
11314$as_echo "$ac_cv_lib_util_openpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011315if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011316 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011317 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011318else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011319 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
11320$as_echo_n "checking for openpty in -lbsd... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011321if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011322 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011323else
11324 ac_check_lib_save_LIBS=$LIBS
11325LIBS="-lbsd $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011326cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011327/* end confdefs.h. */
11328
Martin v. Löwiseba40652007-08-30 20:10:57 +000011329/* Override any GCC internal prototype to avoid an error.
11330 Use char because int might match the return type of a GCC
11331 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011332#ifdef __cplusplus
11333extern "C"
11334#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011335char openpty ();
11336int
11337main ()
11338{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011339return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011340 ;
11341 return 0;
11342}
11343_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011344if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011345 ac_cv_lib_bsd_openpty=yes
11346else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011347 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011348fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011349rm -f core conftest.err conftest.$ac_objext \
11350 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011351LIBS=$ac_check_lib_save_LIBS
11352fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011353{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
11354$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011355if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011356 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011357 LIBS="$LIBS -lbsd"
11358fi
11359
11360
11361fi
11362
Fred Drake8cef4cf2000-06-28 16:40:38 +000011363
11364fi
11365done
11366
11367for ac_func in forkpty
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011368do :
11369 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011370if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011371 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011372#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011373_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011374
Fred Drake8cef4cf2000-06-28 16:40:38 +000011375else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011376 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
11377$as_echo_n "checking for forkpty in -lutil... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011378if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011379 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011380else
Martin v. Löwis11437992002-04-12 09:54:03 +000011381 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011382LIBS="-lutil $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011383cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011384/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011385
Martin v. Löwiseba40652007-08-30 20:10:57 +000011386/* Override any GCC internal prototype to avoid an error.
11387 Use char because int might match the return type of a GCC
11388 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011389#ifdef __cplusplus
11390extern "C"
11391#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011392char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011393int
11394main ()
11395{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011396return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011397 ;
11398 return 0;
11399}
11400_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011401if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011402 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011403else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011404 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011405fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011406rm -f core conftest.err conftest.$ac_objext \
11407 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011408LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011409fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011410{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
11411$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011412if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011413 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011414 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011415else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011416 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
11417$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011418if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011419 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011420else
11421 ac_check_lib_save_LIBS=$LIBS
11422LIBS="-lbsd $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011423cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011424/* end confdefs.h. */
11425
Martin v. Löwiseba40652007-08-30 20:10:57 +000011426/* Override any GCC internal prototype to avoid an error.
11427 Use char because int might match the return type of a GCC
11428 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011429#ifdef __cplusplus
11430extern "C"
11431#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011432char forkpty ();
11433int
11434main ()
11435{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011436return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011437 ;
11438 return 0;
11439}
11440_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011441if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011442 ac_cv_lib_bsd_forkpty=yes
11443else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011444 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011445fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011446rm -f core conftest.err conftest.$ac_objext \
11447 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011448LIBS=$ac_check_lib_save_LIBS
11449fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011450{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
11451$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011452if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011453 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011454 LIBS="$LIBS -lbsd"
11455fi
11456
11457
11458fi
11459
Fred Drake8cef4cf2000-06-28 16:40:38 +000011460
11461fi
11462done
11463
Jack Jansendd19cf82001-12-06 22:36:17 +000011464
Brett Cannonaa5778d2008-03-18 04:09:00 +000011465# Stuff for expat.
Brett Cannonaa5778d2008-03-18 04:09:00 +000011466for ac_func in memmove
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011467do :
11468 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011469if test "x$ac_cv_func_memmove" = xyes; then :
Brett Cannonaa5778d2008-03-18 04:09:00 +000011470 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011471#define HAVE_MEMMOVE 1
Brett Cannonaa5778d2008-03-18 04:09:00 +000011472_ACEOF
11473
11474fi
11475done
11476
11477
Michael W. Hudson54241132001-12-07 15:38:26 +000011478# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000011479for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011480do :
11481 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11482ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011483if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011484 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011485#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011486_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000011487
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011488fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000011489done
11490
Michael W. Hudson54241132001-12-07 15:38:26 +000011491
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011492ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011493if test "x$ac_cv_func_dup2" = xyes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011494 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000011495
Martin v. Löwis1142de32002-03-29 16:28:31 +000011496else
Martin v. Löwiseba40652007-08-30 20:10:57 +000011497 case " $LIBOBJS " in
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011498 *" dup2.$ac_objext "* ) ;;
11499 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Martin v. Löwiseba40652007-08-30 20:10:57 +000011500 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011501esac
11502
Martin v. Löwis1142de32002-03-29 16:28:31 +000011503fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011504
11505ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011506if test "x$ac_cv_func_getcwd" = xyes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011507 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
11508
11509else
11510 case " $LIBOBJS " in
11511 *" getcwd.$ac_objext "* ) ;;
11512 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
11513 ;;
11514esac
11515
11516fi
11517
11518ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011519if test "x$ac_cv_func_strdup" = xyes; then :
Georg Brandl71f4fbb2011-02-25 11:04:50 +000011520 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
11521
11522else
11523 case " $LIBOBJS " in
11524 *" strdup.$ac_objext "* ) ;;
11525 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
11526 ;;
11527esac
11528
11529fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000011530
11531
11532for ac_func in getpgrp
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011533do :
11534 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011535if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011536 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011537#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011538_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011539 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011540/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011541#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011542int
11543main ()
11544{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011545getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011546 ;
11547 return 0;
11548}
11549_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011550if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011551
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011552$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011553
Guido van Rossum627b2d71993-12-24 10:39:16 +000011554fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011555rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011556
Guido van Rossum627b2d71993-12-24 10:39:16 +000011557fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011558done
Guido van Rossum627b2d71993-12-24 10:39:16 +000011559
Jack Jansen150753c2003-03-29 22:07:47 +000011560for ac_func in setpgrp
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011561do :
11562 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011563if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000011564 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011565#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000011566_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011567 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011568/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000011569#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000011570int
11571main ()
11572{
11573setpgrp(0,0);
11574 ;
11575 return 0;
11576}
11577_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011578if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011579
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011580$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011581
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011582fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011583rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000011584
11585fi
11586done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011587
Thomas Wouters3a584202000-08-05 23:28:51 +000011588for ac_func in gettimeofday
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011589do :
11590 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011591if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011592 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011593#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011594_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011595 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011596/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011597#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011598int
11599main ()
11600{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011601gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011602 ;
11603 return 0;
11604}
11605_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011606if ac_fn_c_try_compile "$LINENO"; then :
11607
Guido van Rossum627b2d71993-12-24 10:39:16 +000011608else
Skip Montanaro6dead952003-09-25 14:50:04 +000011609
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011610$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011611
Martin v. Löwis11437992002-04-12 09:54:03 +000011612
Guido van Rossum627b2d71993-12-24 10:39:16 +000011613fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011614rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011615
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011616fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011617done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011618
Michael W. Hudson54241132001-12-07 15:38:26 +000011619
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
11621$as_echo_n "checking for major... " >&6; }
11622cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011623/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011624
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011625#if defined(MAJOR_IN_MKDEV)
11626#include <sys/mkdev.h>
11627#elif defined(MAJOR_IN_SYSMACROS)
11628#include <sys/sysmacros.h>
11629#else
11630#include <sys/types.h>
11631#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011632
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011633int
11634main ()
11635{
11636
11637 makedev(major(0),minor(0));
11638
11639 ;
11640 return 0;
11641}
11642_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011643if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011644
11645
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011646$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011647
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11649$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011650
11651else
Skip Montanaro6dead952003-09-25 14:50:04 +000011652
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11654$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011655
11656fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011657rm -f core conftest.err conftest.$ac_objext \
11658 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011659
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011660# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000011661# for [no]getaddrinfo in netdb.h.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
11663$as_echo_n "checking for getaddrinfo... " >&6; }
11664cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011665/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011666
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011667#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011668#include <sys/socket.h>
11669#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011670#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011671
Martin v. Löwis11437992002-04-12 09:54:03 +000011672int
11673main ()
11674{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011675getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000011676 ;
11677 return 0;
11678}
11679_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011680if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011681 have_getaddrinfo=yes
11682else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011683 have_getaddrinfo=no
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011684fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011685rm -f core conftest.err conftest.$ac_objext \
11686 conftest$ac_exeext conftest.$ac_ext
11687{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
11688$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011689if test $have_getaddrinfo = yes
11690then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011691 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
11692$as_echo_n "checking getaddrinfo bug... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011693 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011694 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011695else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011696 if test "$cross_compiling" = yes; then :
doko@python.orgd65e2ba2013-01-31 23:52:03 +010011697
11698if test "${enable_ipv6+set}" = set; then
11699 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
11700else
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011701 ac_cv_buggy_getaddrinfo=yes
doko@python.orgd65e2ba2013-01-31 23:52:03 +010011702fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011703else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011704 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011705/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011706
Stefan Krah0afe4e42012-11-22 23:56:51 +010011707#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011708#include <sys/types.h>
11709#include <netdb.h>
11710#include <string.h>
11711#include <sys/socket.h>
11712#include <netinet/in.h>
11713
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011714int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011715{
11716 int passive, gaierr, inet4 = 0, inet6 = 0;
11717 struct addrinfo hints, *ai, *aitop;
11718 char straddr[INET6_ADDRSTRLEN], strport[16];
11719
11720 for (passive = 0; passive <= 1; passive++) {
11721 memset(&hints, 0, sizeof(hints));
11722 hints.ai_family = AF_UNSPEC;
11723 hints.ai_flags = passive ? AI_PASSIVE : 0;
11724 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000011725 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011726 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
11727 (void)gai_strerror(gaierr);
11728 goto bad;
11729 }
11730 for (ai = aitop; ai; ai = ai->ai_next) {
11731 if (ai->ai_addr == NULL ||
11732 ai->ai_addrlen == 0 ||
11733 getnameinfo(ai->ai_addr, ai->ai_addrlen,
11734 straddr, sizeof(straddr), strport, sizeof(strport),
11735 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
11736 goto bad;
11737 }
11738 switch (ai->ai_family) {
11739 case AF_INET:
11740 if (strcmp(strport, "54321") != 0) {
11741 goto bad;
11742 }
11743 if (passive) {
11744 if (strcmp(straddr, "0.0.0.0") != 0) {
11745 goto bad;
11746 }
11747 } else {
11748 if (strcmp(straddr, "127.0.0.1") != 0) {
11749 goto bad;
11750 }
11751 }
11752 inet4++;
11753 break;
11754 case AF_INET6:
11755 if (strcmp(strport, "54321") != 0) {
11756 goto bad;
11757 }
11758 if (passive) {
11759 if (strcmp(straddr, "::") != 0) {
11760 goto bad;
11761 }
11762 } else {
11763 if (strcmp(straddr, "::1") != 0) {
11764 goto bad;
11765 }
11766 }
11767 inet6++;
11768 break;
11769 case AF_UNSPEC:
11770 goto bad;
11771 break;
11772 default:
11773 /* another family support? */
11774 break;
11775 }
11776 }
Benjamin Petersond34677c2016-09-06 15:54:24 -070011777 freeaddrinfo(aitop);
11778 aitop = NULL;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011779 }
11780
11781 if (!(inet4 == 0 || inet4 == 2))
11782 goto bad;
11783 if (!(inet6 == 0 || inet6 == 2))
11784 goto bad;
11785
11786 if (aitop)
11787 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011788 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011789
11790 bad:
11791 if (aitop)
11792 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011793 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011794}
11795
Martin v. Löwis11437992002-04-12 09:54:03 +000011796_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011797if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011798 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011799else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011800 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011801fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011802rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11803 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011804fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011805
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011806fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011807
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011808fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011809
Benjamin Peterson75fed812010-11-01 01:47:19 +000011810{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
11811$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
11812
Mark Dickinson0ef0b912009-12-31 21:11:48 +000011813if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000011814then
11815 if test $ipv6 = yes
11816 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011817 echo 'Fatal: You must get working getaddrinfo() function.'
11818 echo ' or you can specify "--disable-ipv6"'.
11819 exit 1
11820 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011821else
Martin v. Löwis11437992002-04-12 09:54:03 +000011822
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011823$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011824
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011825fi
Benjamin Peterson75fed812010-11-01 01:47:19 +000011826
Jack Jansen9a66b6d2001-08-08 13:56:14 +000011827for ac_func in getnameinfo
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011828do :
11829 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011830if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011831 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011832#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011833_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011834
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011835fi
11836done
11837
Michael W. Hudson54241132001-12-07 15:38:26 +000011838
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011839# checks for structures
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
11841$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011842if ${ac_cv_header_time+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011843 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011844else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011845 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011846/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011847#include <sys/types.h>
11848#include <sys/time.h>
11849#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011850
Martin v. Löwis11437992002-04-12 09:54:03 +000011851int
11852main ()
11853{
11854if ((struct tm *) 0)
11855return 0;
11856 ;
11857 return 0;
11858}
11859_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011860if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011861 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011862else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011863 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011864fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011865rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011866fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011867{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
11868$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011869if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011870
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011871$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011872
11873fi
11874
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
11876$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011877if ${ac_cv_struct_tm+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011878 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011879else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011881/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011882#include <sys/types.h>
11883#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011884
Martin v. Löwis11437992002-04-12 09:54:03 +000011885int
11886main ()
11887{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011888struct tm tm;
11889 int *p = &tm.tm_sec;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011890 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000011891 ;
11892 return 0;
11893}
11894_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011895if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011896 ac_cv_struct_tm=time.h
11897else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011898 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011899fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011900rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011901fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011902{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
11903$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011904if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011905
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011906$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011907
11908fi
11909
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011910ac_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 +000011911#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000011912
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011913"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011914if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011915
11916cat >>confdefs.h <<_ACEOF
11917#define HAVE_STRUCT_TM_TM_ZONE 1
11918_ACEOF
11919
11920
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011921fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011922
Martin v. Löwis11437992002-04-12 09:54:03 +000011923if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
11924
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011925$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011926
11927else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011928 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
11929"
Matthias Klose3cef2a92012-03-14 23:39:33 +010011930if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011931 ac_have_decl=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000011932else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011933 ac_have_decl=0
Martin v. Löwiseba40652007-08-30 20:10:57 +000011934fi
11935
Martin v. Löwiseba40652007-08-30 20:10:57 +000011936cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011937#define HAVE_DECL_TZNAME $ac_have_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +000011938_ACEOF
11939
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011940 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
11941$as_echo_n "checking for tzname... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010011942if ${ac_cv_var_tzname+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011943 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000011944else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011945 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011946/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011947#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000011948#if !HAVE_DECL_TZNAME
11949extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000011950#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011951
Martin v. Löwis11437992002-04-12 09:54:03 +000011952int
11953main ()
11954{
Martin v. Löwiseba40652007-08-30 20:10:57 +000011955return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000011956 ;
11957 return 0;
11958}
11959_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011960if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011961 ac_cv_var_tzname=yes
11962else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011963 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011964fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011965rm -f core conftest.err conftest.$ac_objext \
11966 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000011967fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011968{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
11969$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011970 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011971
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011972$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011973
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011974 fi
11975fi
11976
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011977ac_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 +010011978if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011979
11980cat >>confdefs.h <<_ACEOF
11981#define HAVE_STRUCT_STAT_ST_RDEV 1
11982_ACEOF
11983
11984
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011985fi
11986
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011987ac_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 +010011988if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011989
Martin v. Löwis11437992002-04-12 09:54:03 +000011990cat >>confdefs.h <<_ACEOF
11991#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
11992_ACEOF
11993
11994
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011995fi
11996
Matthias Klosea0bea5d2010-05-08 10:00:28 +000011997ac_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 +010011998if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000011999
12000cat >>confdefs.h <<_ACEOF
12001#define HAVE_STRUCT_STAT_ST_FLAGS 1
12002_ACEOF
12003
12004
12005fi
12006
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012007ac_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 +010012008if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012009
12010cat >>confdefs.h <<_ACEOF
12011#define HAVE_STRUCT_STAT_ST_GEN 1
12012_ACEOF
12013
12014
12015fi
12016
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012017ac_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 +010012018if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012019
12020cat >>confdefs.h <<_ACEOF
12021#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
12022_ACEOF
12023
12024
12025fi
12026
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012027ac_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 +010012028if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012029
Martin v. Löwis11437992002-04-12 09:54:03 +000012030cat >>confdefs.h <<_ACEOF
12031#define HAVE_STRUCT_STAT_ST_BLOCKS 1
12032_ACEOF
12033
12034
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012035fi
12036
Michael W. Hudson54241132001-12-07 15:38:26 +000012037
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
12039$as_echo_n "checking for time.h that defines altzone... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012040if ${ac_cv_header_time_altzone+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012041 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012042else
Matthias Klosec511b472010-05-08 11:01:39 +000012043
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012044 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012045/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012046#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012047int
12048main ()
12049{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012050return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000012051 ;
12052 return 0;
12053}
12054_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012055if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012056 ac_cv_header_time_altzone=yes
12057else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012058 ac_cv_header_time_altzone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012059fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012060rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosec511b472010-05-08 11:01:39 +000012061
Martin v. Löwiseba40652007-08-30 20:10:57 +000012062fi
12063
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012064{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
12065$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012066if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012067
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012068$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012069
12070fi
12071
Guido van Rossumda88dad1995-01-26 00:46:29 +000012072was_it_defined=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
12074$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
12075cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012076/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012077
12078#include <sys/types.h>
12079#include <sys/select.h>
12080#include <sys/time.h>
12081
Martin v. Löwis11437992002-04-12 09:54:03 +000012082int
12083main ()
12084{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012085;
Martin v. Löwis11437992002-04-12 09:54:03 +000012086 ;
12087 return 0;
12088}
12089_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012090if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012091
12092
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012093$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012094
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012095 was_it_defined=yes
12096
Martin v. Löwiseba40652007-08-30 20:10:57 +000012097fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012098rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012099{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
12100$as_echo "$was_it_defined" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012101
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
12103$as_echo_n "checking for addrinfo... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012104if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012105 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012106else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012107 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012108/* end confdefs.h. */
Matthias Klosec511b472010-05-08 11:01:39 +000012109#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012110int
12111main ()
12112{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012113struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000012114 ;
12115 return 0;
12116}
12117_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012118if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012119 ac_cv_struct_addrinfo=yes
12120else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012121 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012122fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012123rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12124fi
12125
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012126{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
12127$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012128if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012129
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012130$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012131
12132fi
12133
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
12135$as_echo_n "checking for sockaddr_storage... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012136if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012137 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012138else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012139 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012140/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012141
12142# include <sys/types.h>
12143# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012144int
12145main ()
12146{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012147struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000012148 ;
12149 return 0;
12150}
12151_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012152if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012153 ac_cv_struct_sockaddr_storage=yes
12154else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012155 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012156fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012157rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12158fi
12159
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012160{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
12161$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012162if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012163
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012164$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012165
12166fi
12167
Guido van Rossum627b2d71993-12-24 10:39:16 +000012168# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000012169
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
12171$as_echo_n "checking whether char is unsigned... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012172if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012173 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000012174else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012175 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012176/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012177$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012178int
12179main ()
12180{
12181static int test_array [1 - 2 * !(((char) -1) < 0)];
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012182test_array [0] = 0;
12183return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012184
12185 ;
12186 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000012187}
Martin v. Löwis11437992002-04-12 09:54:03 +000012188_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012189if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012190 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012191else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012192 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012193fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012194rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012195fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012196{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
12197$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012198if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012199 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012200
12201fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000012202
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12204$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012205if ${ac_cv_c_const+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012206 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012207else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012208 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012209/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012210
Martin v. Löwis11437992002-04-12 09:54:03 +000012211int
12212main ()
12213{
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012214
Martin v. Löwis11437992002-04-12 09:54:03 +000012215#ifndef __cplusplus
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012216 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012217 typedef int charset[2];
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012218 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000012219 /* SunOS 4.1.1 cc rejects this. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000012220 char const *const *pcpcc;
12221 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000012222 /* NEC SVR4.0.2 mips cc rejects this. */
12223 struct point {int x, y;};
12224 static struct point const zero = {0,0};
12225 /* AIX XL C 1.02.0.0 rejects this.
12226 It does not let you subtract one const X* pointer from another in
12227 an arm of an if-expression whose if-part is not a constant
12228 expression */
12229 const char *g = "string";
Martin v. Löwiseba40652007-08-30 20:10:57 +000012230 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012231 /* HPUX 7.0 cc rejects these. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000012232 ++pcpcc;
12233 ppc = (char**) pcpcc;
12234 pcpcc = (char const *const *) ppc;
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012235 { /* SCO 3.2v4 cc rejects this sort of thing. */
12236 char tx;
12237 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000012238 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012239
Martin v. Löwis11437992002-04-12 09:54:03 +000012240 *t++ = 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012241 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012242 }
12243 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12244 int x[] = {25, 17};
12245 const int *foo = &x[0];
12246 ++foo;
12247 }
12248 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12249 typedef const int *iptr;
12250 iptr p = 0;
12251 ++p;
12252 }
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012253 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000012254 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Charles-François Natalibe2b9072013-01-08 19:47:00 +010012255 struct s { int j; const int *ap[3]; } bx;
12256 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000012257 }
12258 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12259 const int foo = 10;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012260 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012261 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012262 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000012263#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000012264
Martin v. Löwis11437992002-04-12 09:54:03 +000012265 ;
12266 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012267}
Martin v. Löwis11437992002-04-12 09:54:03 +000012268_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012269if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012270 ac_cv_c_const=yes
12271else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012272 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012273fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012274rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012275fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012276{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12277$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012278if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012279
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012280$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012281
12282fi
12283
Michael W. Hudson54241132001-12-07 15:38:26 +000012284
Guido van Rossumda88dad1995-01-26 00:46:29 +000012285works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012286{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
12287$as_echo_n "checking for working volatile... " >&6; }
12288cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012289/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012290
Martin v. Löwis11437992002-04-12 09:54:03 +000012291int
12292main ()
12293{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012294volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012295 ;
12296 return 0;
12297}
12298_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012299if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012300 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012301else
Skip Montanaro6dead952003-09-25 14:50:04 +000012302
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012303$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012304
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012305
Guido van Rossum627b2d71993-12-24 10:39:16 +000012306fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012307rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012308{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12309$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012310
Guido van Rossumda88dad1995-01-26 00:46:29 +000012311works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
12313$as_echo_n "checking for working signed char... " >&6; }
12314cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012315/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012316
Martin v. Löwis11437992002-04-12 09:54:03 +000012317int
12318main ()
12319{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012320signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000012321 ;
12322 return 0;
12323}
12324_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012325if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012326 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012327else
Skip Montanaro6dead952003-09-25 14:50:04 +000012328
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012329$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000012330
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012331
Guido van Rossum7f43da71994-08-01 12:15:30 +000012332fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012333rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012334{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12335$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012336
Guido van Rossumda88dad1995-01-26 00:46:29 +000012337have_prototypes=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
12339$as_echo_n "checking for prototypes... " >&6; }
12340cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012341/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012342int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012343int
12344main ()
12345{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012346return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000012347 ;
12348 return 0;
12349}
12350_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012351if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012352
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012353$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012354
Matthias Klosec511b472010-05-08 11:01:39 +000012355 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012356fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012357rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012358{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
12359$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012360
Guido van Rossumda88dad1995-01-26 00:46:29 +000012361works=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
12363$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
12364cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012365/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012366
12367#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000012368int foo(int x, ...) {
12369 va_list va;
12370 va_start(va, x);
12371 va_arg(va, int);
12372 va_arg(va, char *);
12373 va_arg(va, double);
12374 return 0;
12375}
Guido van Rossum7f43da71994-08-01 12:15:30 +000012376
Martin v. Löwis11437992002-04-12 09:54:03 +000012377int
12378main ()
12379{
Guido van Rossum90eea071996-08-30 20:58:57 +000012380return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000012381 ;
12382 return 0;
12383}
12384_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012385if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012386
12387
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012388$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012389
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012390 works=yes
12391
Guido van Rossum627b2d71993-12-24 10:39:16 +000012392fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012393rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012394{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12395$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012396
Martin v. Löwisd6320502004-08-12 13:45:08 +000012397# check for socketpair
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
12399$as_echo_n "checking for socketpair... " >&6; }
12400cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012401/* end confdefs.h. */
12402
12403#include <sys/types.h>
12404#include <sys/socket.h>
12405
12406int
12407main ()
12408{
12409void *x=socketpair
12410 ;
12411 return 0;
12412}
12413_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012414if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000012415
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012416$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000012417
Matthias Klosec511b472010-05-08 11:01:39 +000012418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012419$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012420else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12422$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012423
12424fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012425rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012426
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012427# check if sockaddr has sa_len member
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
12429$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
12430cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012431/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012432#include <sys/types.h>
12433#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012434int
12435main ()
12436{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012437struct sockaddr x;
12438x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012439 ;
12440 return 0;
12441}
12442_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012443if ac_fn_c_try_compile "$LINENO"; then :
12444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12445$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012446
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012447$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012448
12449else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12451$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000012452
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012453fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012454rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012455
Guido van Rossumda88dad1995-01-26 00:46:29 +000012456va_list_is_array=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
12458$as_echo_n "checking whether va_list is an array... " >&6; }
12459cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012460/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012461
12462#ifdef HAVE_STDARG_PROTOTYPES
12463#include <stdarg.h>
12464#else
12465#include <varargs.h>
12466#endif
12467
Martin v. Löwis11437992002-04-12 09:54:03 +000012468int
12469main ()
12470{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012471va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000012472 ;
12473 return 0;
12474}
12475_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012476if ac_fn_c_try_compile "$LINENO"; then :
12477
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012478else
Skip Montanaro6dead952003-09-25 14:50:04 +000012479
Martin v. Löwis11437992002-04-12 09:54:03 +000012480
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012481$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012482
Guido van Rossumda88dad1995-01-26 00:46:29 +000012483 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012484
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012485fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012486rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012487{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
12488$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012489
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012490# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000012491
12492
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012493ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012494if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012495
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012496 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000012497
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012498 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
12499$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012500 OLD_CFLAGS=$CFLAGS
12501 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012502 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012503/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012504
12505# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012506
Martin v. Löwis11437992002-04-12 09:54:03 +000012507int
12508main ()
12509{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012510
12511 char *name;
12512 struct hostent *he, *res;
12513 char buffer[2048];
12514 int buflen = 2048;
12515 int h_errnop;
12516
12517 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012518
12519 ;
12520 return 0;
12521}
12522_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012523if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012524
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012525 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012526
Martin v. Löwis11437992002-04-12 09:54:03 +000012527
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012528$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012529
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012530 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12531$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012532
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012533else
Skip Montanaro6dead952003-09-25 14:50:04 +000012534
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12536$as_echo "no" >&6; }
12537 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
12538$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
12539 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012540/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012541
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012542# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012543
Martin v. Löwis11437992002-04-12 09:54:03 +000012544int
12545main ()
12546{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012547
12548 char *name;
12549 struct hostent *he;
Matthias Klosec511b472010-05-08 11:01:39 +000012550 char buffer[2048];
12551 int buflen = 2048;
12552 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012553
Matthias Klosec511b472010-05-08 11:01:39 +000012554 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012555
12556 ;
12557 return 0;
12558}
12559_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012560if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012561
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012562 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012563
Martin v. Löwis11437992002-04-12 09:54:03 +000012564
Matthias Klosec511b472010-05-08 11:01:39 +000012565$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012566
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12568$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012569
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012570else
Skip Montanaro6dead952003-09-25 14:50:04 +000012571
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12573$as_echo "no" >&6; }
Matthias Klosec511b472010-05-08 11:01:39 +000012574 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
12575$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
12576 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12577/* end confdefs.h. */
12578
12579# include <netdb.h>
12580
12581int
12582main ()
12583{
12584
12585 char *name;
12586 struct hostent *he;
12587 struct hostent_data data;
12588
12589 (void) gethostbyname_r(name, he, &data);
12590
12591 ;
12592 return 0;
12593}
12594_ACEOF
12595if ac_fn_c_try_compile "$LINENO"; then :
12596
12597 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
12598
12599
12600$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
12601
12602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12603$as_echo "yes" >&6; }
12604
12605else
12606
12607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12608$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012609
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012610fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012611rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012612
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012613fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012614rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012615
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012616fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012617rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012618 CFLAGS=$OLD_CFLAGS
12619
12620else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012621
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012622 for ac_func in gethostbyname
12623do :
12624 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012625if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012626 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012627#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012628_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012629
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012630fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012631done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012632
Michael W. Hudson54241132001-12-07 15:38:26 +000012633
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012634fi
12635
Michael W. Hudson54241132001-12-07 15:38:26 +000012636
12637
12638
12639
12640
12641
Guido van Rossum627b2d71993-12-24 10:39:16 +000012642# checks for system services
12643# (none yet)
12644
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012645# Linux requires this for correct f.p. operations
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012646ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Matthias Klose3cef2a92012-03-14 23:39:33 +010012647if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012648
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012649else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012650 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
12651$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012652if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012653 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012654else
Martin v. Löwis11437992002-04-12 09:54:03 +000012655 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012656LIBS="-lieee $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012657cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012658/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012659
Martin v. Löwiseba40652007-08-30 20:10:57 +000012660/* Override any GCC internal prototype to avoid an error.
12661 Use char because int might match the return type of a GCC
12662 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012663#ifdef __cplusplus
12664extern "C"
12665#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012666char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012667int
12668main ()
12669{
Martin v. Löwiseba40652007-08-30 20:10:57 +000012670return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012671 ;
12672 return 0;
12673}
12674_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012675if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012676 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012677else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012678 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012679fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012680rm -f core conftest.err conftest.$ac_objext \
12681 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012682LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012683fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012684{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
12685$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012686if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012687 cat >>confdefs.h <<_ACEOF
12688#define HAVE_LIBIEEE 1
12689_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012690
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012691 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012692
Guido van Rossum627b2d71993-12-24 10:39:16 +000012693fi
12694
Michael W. Hudson54241132001-12-07 15:38:26 +000012695
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012696fi
12697
Michael W. Hudson54241132001-12-07 15:38:26 +000012698
Guido van Rossum7f253911997-05-09 02:42:48 +000012699# Check for --with-fpectl
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
12701$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012702
Martin v. Löwiseba40652007-08-30 20:10:57 +000012703# Check whether --with-fpectl was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012704if test "${with_fpectl+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000012705 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000012706if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000012707then
12708
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012709$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012710
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12712$as_echo "yes" >&6; }
12713else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12714$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012715fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000012716else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12718$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012719fi
12720
Guido van Rossum7f253911997-05-09 02:42:48 +000012721
Guido van Rossum7f43da71994-08-01 12:15:30 +000012722# check for --with-libm=...
12723
Guido van Rossum563e7081996-09-10 18:20:48 +000012724case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000012725Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012726BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000012727*) LIBM=-lm
12728esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
12730$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012731
Martin v. Löwiseba40652007-08-30 20:10:57 +000012732# Check whether --with-libm was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012733if test "${with_libm+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000012734 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000012735if test "$withval" = no
12736then LIBM=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
12738$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012739elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012740then LIBM=$withval
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
12742$as_echo "set LIBM=\"$withval\"" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012743else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012744fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012745else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
12747$as_echo "default LIBM=\"$LIBM\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012748fi
12749
Guido van Rossum7f43da71994-08-01 12:15:30 +000012750
12751# check for --with-libc=...
12752
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
12754$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012755
Martin v. Löwiseba40652007-08-30 20:10:57 +000012756# Check whether --with-libc was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012757if test "${with_libc+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000012758 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000012759if test "$withval" = no
12760then LIBC=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
12762$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012763elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012764then LIBC=$withval
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
12766$as_echo "set LIBC=\"$withval\"" >&6; }
Georg Brandl71f4fbb2011-02-25 11:04:50 +000012767else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012768fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012769else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
12771$as_echo "default LIBC=\"$LIBC\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012772fi
12773
Guido van Rossum7f43da71994-08-01 12:15:30 +000012774
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012775# **************************************************
12776# * Check for various properties of floating point *
12777# **************************************************
Mark Dickinson265d7382008-04-21 22:32:24 +000012778
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
12780$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012781if ${ac_cv_little_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012782 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012783else
12784
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012785if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012786 ac_cv_little_endian_double=no
12787else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012788 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012789/* end confdefs.h. */
12790
12791#include <string.h>
12792int main() {
12793 double x = 9006104071832581.0;
12794 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
12795 return 0;
12796 else
12797 return 1;
12798}
12799
12800_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012801if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012802 ac_cv_little_endian_double=yes
12803else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012804 ac_cv_little_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012805fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012806rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12807 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012808fi
12809
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012810fi
12811
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012812{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
12813$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012814if test "$ac_cv_little_endian_double" = yes
12815then
12816
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012817$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012818
12819fi
12820
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
12822$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012823if ${ac_cv_big_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012824 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012825else
12826
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012827if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012828 ac_cv_big_endian_double=no
12829else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012830 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012831/* end confdefs.h. */
12832
12833#include <string.h>
12834int main() {
12835 double x = 9006104071832581.0;
12836 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
12837 return 0;
12838 else
12839 return 1;
12840}
12841
12842_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012843if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012844 ac_cv_big_endian_double=yes
12845else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012846 ac_cv_big_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012847fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012848rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12849 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012850fi
12851
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012852fi
12853
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012854{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
12855$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012856if test "$ac_cv_big_endian_double" = yes
12857then
12858
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012859$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012860
12861fi
12862
12863# Some ARM platforms use a mixed-endian representation for doubles.
12864# While Python doesn't currently have full support for these platforms
12865# (see e.g., issue 1762561), we can at least make sure that float <-> string
12866# conversions work.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
12868$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010012869if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012870 $as_echo_n "(cached) " >&6
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012871else
12872
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012873if test "$cross_compiling" = yes; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012874 ac_cv_mixed_endian_double=no
12875else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012876 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012877/* end confdefs.h. */
12878
12879#include <string.h>
12880int main() {
12881 double x = 9006104071832581.0;
12882 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
12883 return 0;
12884 else
12885 return 1;
12886}
12887
12888_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012889if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012890 ac_cv_mixed_endian_double=yes
12891else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012892 ac_cv_mixed_endian_double=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012893fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012894rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12895 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012896fi
12897
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012898fi
12899
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012900{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
12901$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012902if test "$ac_cv_mixed_endian_double" = yes
12903then
12904
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012905$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012906
12907fi
12908
12909# The short float repr introduced in Python 3.1 requires the
12910# correctly-rounded string <-> double conversion functions from
12911# Python/dtoa.c, which in turn require that the FPU uses 53-bit
12912# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsona548dee2009-11-15 13:12:43 +000012913# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012914# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsona548dee2009-11-15 13:12:43 +000012915
12916# This inline assembler syntax may also work for suncc and icc,
12917# so we try it on all platforms.
12918
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
12920$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
12921cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012922/* end confdefs.h. */
12923
12924int
12925main ()
12926{
12927
Mark Dickinsona548dee2009-11-15 13:12:43 +000012928 unsigned short cw;
12929 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
12930 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012931
12932 ;
12933 return 0;
12934}
12935_ACEOF
Stefan Krah99e36b92015-07-03 15:30:54 +020012936if ac_fn_c_try_link "$LINENO"; then :
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012937 have_gcc_asm_for_x87=yes
12938else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012939 have_gcc_asm_for_x87=no
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012940fi
Stefan Krah99e36b92015-07-03 15:30:54 +020012941rm -f core conftest.err conftest.$ac_objext \
12942 conftest$ac_exeext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012943{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
12944$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsona548dee2009-11-15 13:12:43 +000012945if test "$have_gcc_asm_for_x87" = yes
12946then
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012947
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012948$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012949
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000012950fi
Mark Dickinson7a3d8642008-04-22 00:54:27 +000012951
Mark Dickinson04b27232009-01-04 12:29:36 +000012952# Detect whether system arithmetic is subject to x87-style double
12953# rounding issues. The result of this test has little meaning on non
12954# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
12955# mode is round-to-nearest and double rounding issues are present, and
12956# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
12958$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinson99abd142009-10-24 13:44:16 +000012959# $BASECFLAGS may affect the result
12960ac_save_cc="$CC"
12961CC="$CC $BASECFLAGS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012962if test "$cross_compiling" = yes; then :
Mark Dickinson04b27232009-01-04 12:29:36 +000012963 ac_cv_x87_double_rounding=no
12964else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012965 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson04b27232009-01-04 12:29:36 +000012966/* end confdefs.h. */
12967
12968#include <stdlib.h>
12969#include <math.h>
12970int main() {
12971 volatile double x, y, z;
12972 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
12973 x = 0.99999999999999989; /* 1-2**-53 */
12974 y = 1./x;
12975 if (y != 1.)
12976 exit(0);
12977 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
12978 x = 1e16;
12979 y = 2.99999;
12980 z = x + y;
12981 if (z != 1e16+4.)
12982 exit(0);
12983 /* both tests show evidence of double rounding */
12984 exit(1);
12985}
12986
12987_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012988if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson04b27232009-01-04 12:29:36 +000012989 ac_cv_x87_double_rounding=no
12990else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012991 ac_cv_x87_double_rounding=yes
Mark Dickinson04b27232009-01-04 12:29:36 +000012992fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012993rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12994 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson04b27232009-01-04 12:29:36 +000012995fi
12996
Mark Dickinson99abd142009-10-24 13:44:16 +000012997CC="$ac_save_cc"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000012998{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
12999$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson04b27232009-01-04 12:29:36 +000013000if test "$ac_cv_x87_double_rounding" = yes
13001then
13002
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013003$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson04b27232009-01-04 12:29:36 +000013004
13005fi
13006
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000013007# ************************************
13008# * Check for mathematical functions *
13009# ************************************
13010
13011LIBS_SAVE=$LIBS
13012LIBS="$LIBS $LIBM"
13013
Mark Dickinson265d7382008-04-21 22:32:24 +000013014# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
13015# -0. on some architectures.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
13017$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013018if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013019 $as_echo_n "(cached) " >&6
Mark Dickinson265d7382008-04-21 22:32:24 +000013020else
13021
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013022if test "$cross_compiling" = yes; then :
Mark Dickinson265d7382008-04-21 22:32:24 +000013023 ac_cv_tanh_preserves_zero_sign=no
13024else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013025 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson265d7382008-04-21 22:32:24 +000013026/* end confdefs.h. */
13027
13028#include <math.h>
Mark Dickinson7a3d8642008-04-22 00:54:27 +000013029#include <stdlib.h>
Mark Dickinson265d7382008-04-21 22:32:24 +000013030int main() {
13031 /* return 0 if either negative zeros don't exist
13032 on this platform or if negative zeros exist
13033 and tanh(-0.) == -0. */
13034 if (atan2(0., -1.) == atan2(-0., -1.) ||
13035 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
13036 else exit(1);
13037}
13038
13039_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013040if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson265d7382008-04-21 22:32:24 +000013041 ac_cv_tanh_preserves_zero_sign=yes
13042else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013043 ac_cv_tanh_preserves_zero_sign=no
Mark Dickinson265d7382008-04-21 22:32:24 +000013044fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013045rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13046 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson265d7382008-04-21 22:32:24 +000013047fi
13048
Mark Dickinson265d7382008-04-21 22:32:24 +000013049fi
13050
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013051{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
13052$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Mark Dickinson265d7382008-04-21 22:32:24 +000013053if test "$ac_cv_tanh_preserves_zero_sign" = yes
13054then
13055
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013056$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Mark Dickinson265d7382008-04-21 22:32:24 +000013057
13058fi
13059
Mark Dickinson65898e02009-09-05 10:27:00 +000013060for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013061do :
13062 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13063ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013064if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinson65898e02009-09-05 10:27:00 +000013065 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013066#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Mark Dickinson65898e02009-09-05 10:27:00 +000013067_ACEOF
13068
13069fi
13070done
13071
Mark Dickinson65898e02009-09-05 10:27:00 +000013072for ac_func in hypot lgamma log1p round tgamma
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013073do :
13074 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13075ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013076if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Christian Heimes0a8143f2007-12-18 23:22:54 +000013077 cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013078#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes0a8143f2007-12-18 23:22:54 +000013079_ACEOF
13080
13081fi
13082done
13083
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013084ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
13085"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013086if test "x$ac_cv_have_decl_isinf" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013087 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013088else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013089 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013090fi
13091
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013092cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013093#define HAVE_DECL_ISINF $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013094_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013095ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
13096"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013097if test "x$ac_cv_have_decl_isnan" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013098 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013099else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013100 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013101fi
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013102
13103cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013104#define HAVE_DECL_ISNAN $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013105_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013106ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
13107"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013108if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013109 ac_have_decl=1
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013110else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013111 ac_have_decl=0
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013112fi
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013113
13114cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013115#define HAVE_DECL_ISFINITE $ac_have_decl
Mark Dickinsond181e3a2009-01-04 13:57:26 +000013116_ACEOF
13117
13118
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000013119LIBS=$LIBS_SAVE
13120
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013121# For multiprocessing module, check that sem_open
13122# actually works. For FreeBSD versions <= 7.2,
13123# the kernel module that provides POSIX semaphores
13124# isn't loaded by default, so an attempt to call
13125# sem_open results in a 'Signal 12' error.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
13127$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013128if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013129 $as_echo_n "(cached) " >&6
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013130else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013131 if test "$cross_compiling" = yes; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013132 ac_cv_posix_semaphores_enabled=yes
13133else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013134 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013135/* end confdefs.h. */
13136
13137#include <unistd.h>
13138#include <fcntl.h>
13139#include <stdio.h>
13140#include <semaphore.h>
13141#include <sys/stat.h>
13142
13143int main(void) {
13144 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
13145 if (a == SEM_FAILED) {
13146 perror("sem_open");
13147 return 1;
13148 }
13149 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000013150 sem_unlink("/autoconf");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013151 return 0;
13152}
13153
13154_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013155if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013156 ac_cv_posix_semaphores_enabled=yes
13157else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013158 ac_cv_posix_semaphores_enabled=no
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013159fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013160rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13161 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013162fi
13163
13164
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013165fi
13166
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013167{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
13168$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013169if test $ac_cv_posix_semaphores_enabled = no
13170then
13171
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013172$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013173
13174fi
13175
13176# Multiprocessing check for broken sem_getvalue
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
13178$as_echo_n "checking for broken sem_getvalue... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013179if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013180 $as_echo_n "(cached) " >&6
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013181else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013182 if test "$cross_compiling" = yes; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013183 ac_cv_broken_sem_getvalue=yes
13184else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013185 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013186/* end confdefs.h. */
13187
13188#include <unistd.h>
13189#include <fcntl.h>
13190#include <stdio.h>
13191#include <semaphore.h>
13192#include <sys/stat.h>
13193
13194int main(void){
Mark Dickinson59dc89e2009-12-13 21:06:06 +000013195 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013196 int count;
13197 int res;
13198 if(a==SEM_FAILED){
13199 perror("sem_open");
13200 return 1;
13201
13202 }
13203 res = sem_getvalue(a, &count);
13204 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000013205 sem_unlink("/autocftw");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013206 return res==-1 ? 1 : 0;
13207}
13208
13209_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013210if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013211 ac_cv_broken_sem_getvalue=no
13212else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013213 ac_cv_broken_sem_getvalue=yes
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013214fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013215rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13216 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013217fi
13218
13219
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013220fi
13221
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013222{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
13223$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013224if test $ac_cv_broken_sem_getvalue = yes
13225then
13226
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013227$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Mark Dickinsonc63392c2009-11-28 13:13:13 +000013228
13229fi
13230
Mark Dickinsonefc82f72009-03-20 15:51:55 +000013231# determine what size digit to use for Python's longs
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
13233$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000013234# Check whether --enable-big-digits was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013235if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonefc82f72009-03-20 15:51:55 +000013236 enableval=$enable_big_digits; case $enable_big_digits in
13237yes)
13238 enable_big_digits=30 ;;
13239no)
13240 enable_big_digits=15 ;;
1324115|30)
13242 ;;
13243*)
Matthias Klose3cef2a92012-03-14 23:39:33 +010013244 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 +000013245esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013246{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
13247$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000013248
13249cat >>confdefs.h <<_ACEOF
13250#define PYLONG_BITS_IN_DIGIT $enable_big_digits
13251_ACEOF
13252
13253
13254else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013255 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13256$as_echo "no value specified" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000013257fi
13258
13259
Guido van Rossumef2255b2000-03-10 22:30:29 +000013260# check for wchar.h
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013261ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Matthias Klose3cef2a92012-03-14 23:39:33 +010013262if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013263
13264
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013265$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013266
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013267 wchar_h="yes"
13268
Guido van Rossumef2255b2000-03-10 22:30:29 +000013269else
Martin v. Löwis11437992002-04-12 09:54:03 +000013270 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000013271
13272fi
13273
Michael W. Hudson54241132001-12-07 15:38:26 +000013274
Martin v. Löwis11437992002-04-12 09:54:03 +000013275
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013276# determine wchar_t size
13277if test "$wchar_h" = yes
13278then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013279 # The cast to long int works around a bug in the HP C Compiler
Martin v. Löwiseba40652007-08-30 20:10:57 +000013280# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13281# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13282# This bug is HP SR number 8606223364.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
13284$as_echo_n "checking size of wchar_t... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013285if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013286 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013287else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013288 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
13289"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013290
Martin v. Löwis11437992002-04-12 09:54:03 +000013291else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013292 if test "$ac_cv_type_wchar_t" = yes; then
13293 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13294$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013295as_fn_error 77 "cannot compute sizeof (wchar_t)
Matthias Klose3cef2a92012-03-14 23:39:33 +010013296See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013297 else
13298 ac_cv_sizeof_wchar_t=0
13299 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013300fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013301
Martin v. Löwis11437992002-04-12 09:54:03 +000013302fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013303{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
13304$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013305
13306
13307
Martin v. Löwis11437992002-04-12 09:54:03 +000013308cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013309#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013310_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013311
Michael W. Hudson54241132001-12-07 15:38:26 +000013312
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013313fi
13314
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
13316$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013317have_ucs4_tcl=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013318cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013319/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013320
13321#include <tcl.h>
13322#if TCL_UTF_MAX != 6
13323# error "NOT UCS4_TCL"
13324#endif
13325int
13326main ()
13327{
13328
13329 ;
13330 return 0;
13331}
13332_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013333if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013334
13335
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013336$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013337
13338 have_ucs4_tcl=yes
13339
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013340fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013341rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013342{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
13343$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013344
Skip Montanaro6dead952003-09-25 14:50:04 +000013345# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013346if test "$wchar_h" = yes
13347then
13348 # check whether wchar_t is signed or not
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013349 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
13350$as_echo_n "checking whether wchar_t is signed... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013351 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013352 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013353else
13354
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013355 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013356 ac_cv_wchar_t_signed=yes
13357else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013358 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013359/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013360
13361 #include <wchar.h>
13362 int main()
13363 {
Martin v. Löwis44fe0e42006-04-11 07:15:30 +000013364 /* Success: exit code 0 */
13365 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013366 }
13367
13368_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013369if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013370 ac_cv_wchar_t_signed=yes
13371else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013372 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013373fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013374rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13375 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013376fi
13377
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013378fi
13379
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
13381$as_echo "$ac_cv_wchar_t_signed" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013382fi
13383
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking what type to use for unicode" >&5
13385$as_echo_n "checking what type to use for unicode... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013386# Check whether --enable-unicode was given.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013387if test "${enable_unicode+set}" = set; then :
Martin v. Löwiseba40652007-08-30 20:10:57 +000013388 enableval=$enable_unicode;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013389else
13390 enable_unicode=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +000013391fi
13392
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013393
13394if test $enable_unicode = yes
13395then
Martin v. Löwisfd917792001-06-27 20:22:04 +000013396 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013397 case "$have_ucs4_tcl" in
13398 yes) enable_unicode="ucs4"
13399 ;;
13400 *) enable_unicode="ucs2"
13401 ;;
13402 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013403fi
13404
Martin v. Löwis0036cba2002-04-12 09:58:45 +000013405
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013406case "$enable_unicode" in
13407ucs2) unicode_size="2"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013408 $as_echo "#define Py_UNICODE_SIZE 2" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013409
13410 ;;
13411ucs4) unicode_size="4"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013412 $as_echo "#define Py_UNICODE_SIZE 4" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013413
13414 ;;
Martin v. Löwised11a5d2012-05-20 10:42:17 +020013415no) ;; # To allow --disable-unicode
Matthias Klose3cef2a92012-03-14 23:39:33 +010013416*) 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 +000013417esac
13418
Michael W. Hudson54241132001-12-07 15:38:26 +000013419
Martin v. Löwis11437992002-04-12 09:54:03 +000013420
13421
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013422if test "$enable_unicode" = "no"
13423then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000013424 UNICODE_OBJS=""
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not used" >&5
13426$as_echo "not used" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013427else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000013428 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000013429
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013430$as_echo "#define Py_USING_UNICODE 1" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013431
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013432
13433 # wchar_t is only usable if it maps to an unsigned type
13434 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000013435 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013436 then
13437 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013438
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013439$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013440
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013441 $as_echo "#define PY_UNICODE_TYPE wchar_t" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013442
13443 elif test "$ac_cv_sizeof_short" = "$unicode_size"
13444 then
13445 PY_UNICODE_TYPE="unsigned short"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013446 $as_echo "#define PY_UNICODE_TYPE unsigned short" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013447
13448 elif test "$ac_cv_sizeof_long" = "$unicode_size"
13449 then
13450 PY_UNICODE_TYPE="unsigned long"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013451 $as_echo "#define PY_UNICODE_TYPE unsigned long" >>confdefs.h
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013452
13453 else
13454 PY_UNICODE_TYPE="no type found"
13455 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PY_UNICODE_TYPE" >&5
13457$as_echo "$PY_UNICODE_TYPE" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013458fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000013459
13460# check for endianness
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013461 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13462$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013463if ${ac_cv_c_bigendian+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013464 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000013465else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013466 ac_cv_c_bigendian=unknown
13467 # See if we're dealing with a universal compiler.
13468 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13469/* end confdefs.h. */
13470#ifndef __APPLE_CC__
13471 not a universal capable compiler
13472 #endif
13473 typedef int dummy;
13474
Skip Montanaro6dead952003-09-25 14:50:04 +000013475_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013476if ac_fn_c_try_compile "$LINENO"; then :
13477
13478 # Check for potential -arch flags. It is not universal unless
13479 # there are at least two -arch flags with different values.
13480 ac_arch=
13481 ac_prev=
13482 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13483 if test -n "$ac_prev"; then
13484 case $ac_word in
13485 i?86 | x86_64 | ppc | ppc64)
13486 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13487 ac_arch=$ac_word
13488 else
13489 ac_cv_c_bigendian=universal
13490 break
13491 fi
13492 ;;
13493 esac
13494 ac_prev=
13495 elif test "x$ac_word" = "x-arch"; then
13496 ac_prev=arch
13497 fi
13498 done
13499fi
13500rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13501 if test $ac_cv_c_bigendian = unknown; then
13502 # See if sys/param.h defines the BYTE_ORDER macro.
13503 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013504/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013505#include <sys/types.h>
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013506 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013507
Martin v. Löwis11437992002-04-12 09:54:03 +000013508int
13509main ()
13510{
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013511#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13512 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13513 && LITTLE_ENDIAN)
13514 bogus endian macros
13515 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013516
13517 ;
13518 return 0;
13519}
13520_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013521if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013522 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013523 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013524/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013525#include <sys/types.h>
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013526 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013527
Martin v. Löwis11437992002-04-12 09:54:03 +000013528int
13529main ()
13530{
Guido van Rossumef2255b2000-03-10 22:30:29 +000013531#if BYTE_ORDER != BIG_ENDIAN
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013532 not big endian
13533 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013534
13535 ;
13536 return 0;
13537}
13538_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013539if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013540 ac_cv_c_bigendian=yes
13541else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013542 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000013543fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013544rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013545fi
13546rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13547 fi
13548 if test $ac_cv_c_bigendian = unknown; then
13549 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13550 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013551/* end confdefs.h. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013552#include <limits.h>
13553
Martin v. Löwis11437992002-04-12 09:54:03 +000013554int
13555main ()
13556{
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013557#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13558 bogus endian macros
13559 #endif
13560
Martin v. Löwis11437992002-04-12 09:54:03 +000013561 ;
13562 return 0;
13563}
13564_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013565if ac_fn_c_try_compile "$LINENO"; then :
13566 # It does; now see whether it defined to _BIG_ENDIAN or not.
13567 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13568/* end confdefs.h. */
13569#include <limits.h>
13570
13571int
13572main ()
13573{
13574#ifndef _BIG_ENDIAN
13575 not big endian
13576 #endif
13577
13578 ;
13579 return 0;
13580}
13581_ACEOF
13582if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013583 ac_cv_c_bigendian=yes
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000013584else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013585 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013586fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013587rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13588fi
13589rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13590 fi
13591 if test $ac_cv_c_bigendian = unknown; then
13592 # Compile a test program.
13593 if test "$cross_compiling" = yes; then :
13594 # Try to guess by grepping values from an object file.
13595 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13596/* end confdefs.h. */
13597short int ascii_mm[] =
13598 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13599 short int ascii_ii[] =
13600 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13601 int use_ascii (int i) {
13602 return ascii_mm[i] + ascii_ii[i];
13603 }
13604 short int ebcdic_ii[] =
13605 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13606 short int ebcdic_mm[] =
13607 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13608 int use_ebcdic (int i) {
13609 return ebcdic_mm[i] + ebcdic_ii[i];
13610 }
13611 extern int foo;
Martin v. Löwiseba40652007-08-30 20:10:57 +000013612
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013613int
13614main ()
13615{
13616return use_ascii (foo) == use_ebcdic (foo);
13617 ;
13618 return 0;
13619}
13620_ACEOF
13621if ac_fn_c_try_compile "$LINENO"; then :
13622 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13623 ac_cv_c_bigendian=yes
13624 fi
13625 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13626 if test "$ac_cv_c_bigendian" = unknown; then
13627 ac_cv_c_bigendian=no
13628 else
13629 # finding both strings is unlikely to happen, but who knows?
13630 ac_cv_c_bigendian=unknown
13631 fi
13632 fi
13633fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013634rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013635else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013636 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013637/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000013638$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013639int
13640main ()
13641{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013642
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013643 /* Are we little or big endian? From Harbison&Steele. */
13644 union
13645 {
13646 long int l;
13647 char c[sizeof (long int)];
13648 } u;
13649 u.l = 1;
13650 return u.c[sizeof (long int) - 1] == 1;
Martin v. Löwiseba40652007-08-30 20:10:57 +000013651
13652 ;
13653 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000013654}
Martin v. Löwis11437992002-04-12 09:54:03 +000013655_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013656if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013657 ac_cv_c_bigendian=no
13658else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013659 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000013660fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013661rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13662 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000013663fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013664
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013665 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013666fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013667{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
13668$as_echo "$ac_cv_c_bigendian" >&6; }
13669 case $ac_cv_c_bigendian in #(
13670 yes)
13671 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
13672;; #(
13673 no)
13674 ;; #(
13675 universal)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013676
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013677$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000013678
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013679 ;; #(
13680 *)
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013681 as_fn_error $? "unknown endianness
Matthias Klose3cef2a92012-03-14 23:39:33 +010013682 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013683 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000013684
Michael W. Hudson54241132001-12-07 15:38:26 +000013685
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013686# Check whether right shifting a negative integer extends the sign bit
13687# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
13689$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013690if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013691 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000013692else
Martin v. Löwis11437992002-04-12 09:54:03 +000013693
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013694if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013695 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013696else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013697 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013698/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013699
13700int main()
13701{
Vladimir Marangozova6180282000-07-12 05:05:06 +000013702 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013703}
13704
Martin v. Löwis11437992002-04-12 09:54:03 +000013705_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013706if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000013707 ac_cv_rshift_extends_sign=yes
13708else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013709 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000013710fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013711rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13712 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000013713fi
13714
Martin v. Löwiseba40652007-08-30 20:10:57 +000013715fi
13716
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013717{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
13718$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000013719if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013720then
Martin v. Löwis11437992002-04-12 09:54:03 +000013721
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013722$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013723
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013724fi
13725
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013726# check for getc_unlocked and related locking functions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
13728$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013729if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013730 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013731else
Martin v. Löwis11437992002-04-12 09:54:03 +000013732
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013733cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013734/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013735#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013736int
13737main ()
13738{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013739
13740 FILE *f = fopen("/dev/null", "r");
13741 flockfile(f);
13742 getc_unlocked(f);
13743 funlockfile(f);
13744
Martin v. Löwis11437992002-04-12 09:54:03 +000013745 ;
13746 return 0;
13747}
13748_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013749if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013750 ac_cv_have_getc_unlocked=yes
13751else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013752 ac_cv_have_getc_unlocked=no
13753fi
13754rm -f core conftest.err conftest.$ac_objext \
13755 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013756fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013757
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013758{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
13759$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013760if test "$ac_cv_have_getc_unlocked" = yes
13761then
Martin v. Löwis11437992002-04-12 09:54:03 +000013762
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013763$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013764
13765fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013766
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013767# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000013768# save the value of LIBS so we don't actually link Python with readline
13769LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013770
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013771# On some systems we need to link readline to a termcap compatible
13772# library. NOTE: Keep the precedence of listed libraries synchronised
13773# with setup.py.
13774py_cv_lib_readline=no
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
13776$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013777for py_libtermcap in "" ncursesw ncurses curses termcap; do
13778 if test -z "$py_libtermcap"; then
13779 READLINE_LIBS="-lreadline"
13780 else
13781 READLINE_LIBS="-lreadline -l$py_libtermcap"
13782 fi
13783 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013784 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013785/* end confdefs.h. */
13786
Martin v. Löwiseba40652007-08-30 20:10:57 +000013787/* Override any GCC internal prototype to avoid an error.
13788 Use char because int might match the return type of a GCC
13789 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013790#ifdef __cplusplus
13791extern "C"
13792#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013793char readline ();
13794int
13795main ()
13796{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013797return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013798 ;
13799 return 0;
13800}
13801_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013802if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013803 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013804fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013805rm -f core conftest.err conftest.$ac_objext \
13806 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013807 if test $py_cv_lib_readline = yes; then
13808 break
13809 fi
13810done
13811# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
13812#AC_SUBST([READLINE_LIBS])
Gregory P. Smithe080cdf2008-09-07 19:19:04 +000013813if test $py_cv_lib_readline = no; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
13815$as_echo "none" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013816else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
13818$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000013819
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013820$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013821
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013822fi
13823
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013824# check for readline 2.1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
13826$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013827if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013828 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013829else
13830 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013831LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013832cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013833/* end confdefs.h. */
13834
Martin v. Löwiseba40652007-08-30 20:10:57 +000013835/* Override any GCC internal prototype to avoid an error.
13836 Use char because int might match the return type of a GCC
13837 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013838#ifdef __cplusplus
13839extern "C"
13840#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013841char rl_callback_handler_install ();
13842int
13843main ()
13844{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013845return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013846 ;
13847 return 0;
13848}
13849_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013850if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013851 ac_cv_lib_readline_rl_callback_handler_install=yes
13852else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013853 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013854fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013855rm -f core conftest.err conftest.$ac_objext \
13856 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013857LIBS=$ac_check_lib_save_LIBS
13858fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013859{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
13860$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013861if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013862
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013863$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013864
13865fi
13866
13867
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013868# check for readline 2.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013869cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013870/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013871#include <readline/readline.h>
13872_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013873if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013874 have_readline=yes
13875else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013876 have_readline=no
Matthias Klosec511b472010-05-08 11:01:39 +000013877
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013878fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000013879rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013880if test $have_readline = yes
13881then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013882 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013883/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013884#include <readline/readline.h>
13885
13886_ACEOF
13887if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013888 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013889
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013890$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013891
13892fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000013893rm -f conftest*
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000013894
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013895 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000013896/* end confdefs.h. */
13897#include <readline/readline.h>
13898
13899_ACEOF
13900if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013901 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000013902
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013903$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000013904
13905fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000013906rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013907
13908fi
13909
Martin v. Löwis0daad592001-09-30 21:09:59 +000013910# check for readline 4.0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013911{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
13912$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013913if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013914 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000013915else
Martin v. Löwis11437992002-04-12 09:54:03 +000013916 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013917LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013918cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013919/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013920
Martin v. Löwiseba40652007-08-30 20:10:57 +000013921/* Override any GCC internal prototype to avoid an error.
13922 Use char because int might match the return type of a GCC
13923 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013924#ifdef __cplusplus
13925extern "C"
13926#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013927char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013928int
13929main ()
13930{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013931return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013932 ;
13933 return 0;
13934}
13935_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013936if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013937 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000013938else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013939 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000013940fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013941rm -f core conftest.err conftest.$ac_objext \
13942 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013943LIBS=$ac_check_lib_save_LIBS
13944fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013945{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
13946$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013947if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013948
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013949$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000013950
Martin v. Löwis0daad592001-09-30 21:09:59 +000013951fi
13952
Michael W. Hudson54241132001-12-07 15:38:26 +000013953
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013954# also in 4.0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
13956$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013957if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013958 $as_echo_n "(cached) " >&6
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013959else
13960 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000013961LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013962cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013963/* end confdefs.h. */
13964
13965/* Override any GCC internal prototype to avoid an error.
13966 Use char because int might match the return type of a GCC
13967 builtin and then its argument prototype would still apply. */
13968#ifdef __cplusplus
13969extern "C"
13970#endif
13971char rl_completion_display_matches_hook ();
13972int
13973main ()
13974{
13975return rl_completion_display_matches_hook ();
13976 ;
13977 return 0;
13978}
13979_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013980if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013981 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
13982else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013983 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013984fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013985rm -f core conftest.err conftest.$ac_objext \
13986 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013987LIBS=$ac_check_lib_save_LIBS
13988fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013989{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
13990$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010013991if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013992
Matthias Klosea0bea5d2010-05-08 10:00:28 +000013993$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000013994
13995fi
13996
13997
Martin Pantera70c3232016-04-03 02:54:58 +000013998# also in 4.0, but not in editline
13999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_resize_terminal in -lreadline" >&5
14000$as_echo_n "checking for rl_resize_terminal in -lreadline... " >&6; }
14001if ${ac_cv_lib_readline_rl_resize_terminal+:} false; then :
14002 $as_echo_n "(cached) " >&6
14003else
14004 ac_check_lib_save_LIBS=$LIBS
14005LIBS="-lreadline $READLINE_LIBS $LIBS"
14006cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14007/* end confdefs.h. */
14008
14009/* Override any GCC internal prototype to avoid an error.
14010 Use char because int might match the return type of a GCC
14011 builtin and then its argument prototype would still apply. */
14012#ifdef __cplusplus
14013extern "C"
14014#endif
14015char rl_resize_terminal ();
14016int
14017main ()
14018{
14019return rl_resize_terminal ();
14020 ;
14021 return 0;
14022}
14023_ACEOF
14024if ac_fn_c_try_link "$LINENO"; then :
14025 ac_cv_lib_readline_rl_resize_terminal=yes
14026else
14027 ac_cv_lib_readline_rl_resize_terminal=no
14028fi
14029rm -f core conftest.err conftest.$ac_objext \
14030 conftest$ac_exeext conftest.$ac_ext
14031LIBS=$ac_check_lib_save_LIBS
14032fi
14033{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_resize_terminal" >&5
14034$as_echo "$ac_cv_lib_readline_rl_resize_terminal" >&6; }
14035if test "x$ac_cv_lib_readline_rl_resize_terminal" = xyes; then :
14036
14037$as_echo "#define HAVE_RL_RESIZE_TERMINAL 1" >>confdefs.h
14038
14039fi
14040
14041
Martin v. Löwis0daad592001-09-30 21:09:59 +000014042# check for readline 4.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
14044$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014045if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014046 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000014047else
Martin v. Löwis11437992002-04-12 09:54:03 +000014048 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000014049LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014050cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014051/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014052
Martin v. Löwiseba40652007-08-30 20:10:57 +000014053/* Override any GCC internal prototype to avoid an error.
14054 Use char because int might match the return type of a GCC
14055 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014056#ifdef __cplusplus
14057extern "C"
14058#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014059char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014060int
14061main ()
14062{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014063return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014064 ;
14065 return 0;
14066}
14067_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014068if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014069 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000014070else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014071 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000014072fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014073rm -f core conftest.err conftest.$ac_objext \
14074 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014075LIBS=$ac_check_lib_save_LIBS
14076fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014077{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
14078$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014079if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014080
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014081$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000014082
Guido van Rossum353ae582001-07-10 16:45:32 +000014083fi
14084
Jack Jansendd19cf82001-12-06 22:36:17 +000014085
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014086# also in readline 4.2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014087cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014088/* end confdefs.h. */
14089#include <readline/readline.h>
14090_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014091if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014092 have_readline=yes
14093else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014094 have_readline=no
Matthias Klosec511b472010-05-08 11:01:39 +000014095
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014096fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000014097rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014098if test $have_readline = yes
14099then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014100 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014101/* end confdefs.h. */
14102#include <readline/readline.h>
14103
14104_ACEOF
14105if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014106 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014107
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014108$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014109
14110fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000014111rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014112
14113fi
14114
Martin v. Löwis82bca632006-02-10 20:49:30 +000014115# End of readline checks: restore LIBS
14116LIBS=$LIBS_no_readline
14117
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
14119$as_echo_n "checking for broken nice()... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014120if ${ac_cv_broken_nice+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014121 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014122else
Martin v. Löwis11437992002-04-12 09:54:03 +000014123
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014124if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014125 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014126else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014127 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014128/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014129
14130int main()
14131{
14132 int val1 = nice(1);
14133 if (val1 != -1 && val1 == nice(2))
14134 exit(0);
14135 exit(1);
14136}
14137
Martin v. Löwis11437992002-04-12 09:54:03 +000014138_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014139if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014140 ac_cv_broken_nice=yes
14141else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014142 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014143fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014144rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14145 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014146fi
14147
Martin v. Löwiseba40652007-08-30 20:10:57 +000014148fi
14149
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014150{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
14151$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014152if test "$ac_cv_broken_nice" = yes
14153then
Martin v. Löwis11437992002-04-12 09:54:03 +000014154
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014155$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014156
14157fi
14158
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
14160$as_echo_n "checking for broken poll()... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014161if ${ac_cv_broken_poll+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014162 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014163else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014164 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014165 ac_cv_broken_poll=no
14166else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014167 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014168/* end confdefs.h. */
14169
14170#include <poll.h>
14171
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014172int main()
14173{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014174 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014175 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014176
14177 close (42);
14178
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014179 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014180 if (poll_test < 0)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014181 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014182 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014183 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014184 else
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014185 return 1;
14186}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014187
14188_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014189if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014190 ac_cv_broken_poll=yes
14191else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014192 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014193fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014194rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14195 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014196fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014197
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014198fi
14199
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014200{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
14201$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014202if test "$ac_cv_broken_poll" = yes
14203then
14204
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014205$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014206
14207fi
14208
Brett Cannon43802422005-02-10 20:48:03 +000014209# 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 +000014210# (which is not required by ISO C or UNIX spec) and/or if we support
14211# tzname[]
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014212ac_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 +000014213#include <$ac_cv_struct_tm>
14214
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014215"
Matthias Klose3cef2a92012-03-14 23:39:33 +010014216if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000014217
14218cat >>confdefs.h <<_ACEOF
14219#define HAVE_STRUCT_TM_TM_ZONE 1
14220_ACEOF
14221
14222
14223fi
14224
14225if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14226
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014227$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014228
14229else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014230 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
14231"
Matthias Klose3cef2a92012-03-14 23:39:33 +010014232if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014233 ac_have_decl=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000014234else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014235 ac_have_decl=0
Martin v. Löwiseba40652007-08-30 20:10:57 +000014236fi
14237
Martin v. Löwiseba40652007-08-30 20:10:57 +000014238cat >>confdefs.h <<_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014239#define HAVE_DECL_TZNAME $ac_have_decl
Martin v. Löwiseba40652007-08-30 20:10:57 +000014240_ACEOF
14241
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014242 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
14243$as_echo_n "checking for tzname... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014244if ${ac_cv_var_tzname+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014245 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000014246else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014247 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014248/* end confdefs.h. */
14249#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000014250#if !HAVE_DECL_TZNAME
14251extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000014252#endif
14253
14254int
14255main ()
14256{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014257return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000014258 ;
14259 return 0;
14260}
14261_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014262if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000014263 ac_cv_var_tzname=yes
14264else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014265 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000014266fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014267rm -f core conftest.err conftest.$ac_objext \
14268 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014269fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014270{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
14271$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000014272 if test $ac_cv_var_tzname = yes; then
14273
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014274$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014275
14276 fi
14277fi
14278
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014279
Martin v. Löwis1d459062005-03-14 21:23:33 +000014280# check tzset(3) exists and works like we expect it to
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
14282$as_echo_n "checking for working tzset()... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014283if ${ac_cv_working_tzset+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014284 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014285else
14286
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014287if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014288 ac_cv_working_tzset=no
14289else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014290 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014291/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014292
14293#include <stdlib.h>
14294#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000014295#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000014296
14297#if HAVE_TZNAME
14298extern char *tzname[];
14299#endif
14300
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014301int main()
14302{
Brett Cannon18367812003-09-19 00:59:16 +000014303 /* Note that we need to ensure that not only does tzset(3)
14304 do 'something' with localtime, but it works as documented
14305 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000014306 This includes making sure that tzname is set properly if
14307 tm->tm_zone does not exist since it is the alternative way
14308 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000014309
14310 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000014311 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000014312 */
14313
Martin v. Löwis1d459062005-03-14 21:23:33 +000014314 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000014315 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
14316
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014317 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014318 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014319 if (localtime(&groundhogday)->tm_hour != 0)
14320 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014321#if HAVE_TZNAME
14322 /* For UTC, tzname[1] is sometimes "", sometimes " " */
14323 if (strcmp(tzname[0], "UTC") ||
14324 (tzname[1][0] != 0 && tzname[1][0] != ' '))
14325 exit(1);
14326#endif
Brett Cannon18367812003-09-19 00:59:16 +000014327
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014328 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014329 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014330 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014331 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014332#if HAVE_TZNAME
14333 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
14334 exit(1);
14335#endif
Brett Cannon18367812003-09-19 00:59:16 +000014336
14337 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
14338 tzset();
14339 if (localtime(&groundhogday)->tm_hour != 11)
14340 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014341#if HAVE_TZNAME
14342 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
14343 exit(1);
14344#endif
14345
14346#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000014347 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
14348 exit(1);
14349 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
14350 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014351#endif
Brett Cannon18367812003-09-19 00:59:16 +000014352
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014353 exit(0);
14354}
14355
14356_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014357if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014358 ac_cv_working_tzset=yes
14359else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014360 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014361fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014362rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14363 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014364fi
14365
Martin v. Löwiseba40652007-08-30 20:10:57 +000014366fi
14367
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014368{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
14369$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014370if test "$ac_cv_working_tzset" = yes
14371then
14372
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014373$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014374
14375fi
14376
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014377# Look for subsecond timestamps in struct stat
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
14379$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014380if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014381 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014382else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014383 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014384/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014385#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014386int
14387main ()
14388{
14389
14390struct stat st;
14391st.st_mtim.tv_nsec = 1;
14392
14393 ;
14394 return 0;
14395}
14396_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014397if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000014398 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014399else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014400 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014401fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014402rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14403fi
14404
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014405{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
14406$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014407if test "$ac_cv_stat_tv_nsec" = yes
14408then
14409
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014410$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014411
14412fi
14413
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014414# Look for BSD style subsecond timestamps in struct stat
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
14416$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014417if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014418 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014419else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014420 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014421/* end confdefs.h. */
14422#include <sys/stat.h>
14423int
14424main ()
14425{
14426
14427struct stat st;
14428st.st_mtimespec.tv_nsec = 1;
14429
14430 ;
14431 return 0;
14432}
14433_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014434if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014435 ac_cv_stat_tv_nsec2=yes
14436else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014437 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014438fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014439rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14440fi
14441
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014442{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
14443$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014444if test "$ac_cv_stat_tv_nsec2" = yes
14445then
14446
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014447$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014448
14449fi
14450
doko@ubuntu.comf27ec3e2014-04-17 20:11:19 +020014451# first curses configure check
14452ac_save_cppflags="$CPPFLAGS"
14453CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
14454
14455for ac_header in curses.h ncurses.h
14456do :
14457 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14458ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14459if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14460 cat >>confdefs.h <<_ACEOF
14461#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14462_ACEOF
14463
14464fi
14465
14466done
14467
14468
14469# On Solaris, term.h requires curses.h
14470for ac_header in term.h
14471do :
14472 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
14473#ifdef HAVE_CURSES_H
14474#include <curses.h>
14475#endif
14476
14477"
14478if test "x$ac_cv_header_term_h" = xyes; then :
14479 cat >>confdefs.h <<_ACEOF
14480#define HAVE_TERM_H 1
14481_ACEOF
14482
14483fi
14484
14485done
14486
14487
Jack Jansen666b1e72001-10-31 12:11:48 +000014488# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
14490$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014491if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014492 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014493else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014494 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014495/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014496#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014497int
14498main ()
14499{
Jack Jansen666b1e72001-10-31 12:11:48 +000014500
14501 int rtn;
14502 rtn = mvwdelch(0,0,0);
14503
Martin v. Löwis11437992002-04-12 09:54:03 +000014504 ;
14505 return 0;
14506}
14507_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014508if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014509 ac_cv_mvwdelch_is_expression=yes
14510else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014511 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014512fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014513rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14514fi
14515
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014516{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
14517$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000014518
14519if test "$ac_cv_mvwdelch_is_expression" = yes
14520then
Martin v. Löwis11437992002-04-12 09:54:03 +000014521
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014522$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014523
14524fi
14525
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
14527$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014528if ${ac_cv_window_has_flags+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014529 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014530else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014531 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014532/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014533#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014534int
14535main ()
14536{
Jack Jansen666b1e72001-10-31 12:11:48 +000014537
14538 WINDOW *w;
14539 w->_flags = 0;
14540
Martin v. Löwis11437992002-04-12 09:54:03 +000014541 ;
14542 return 0;
14543}
14544_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014545if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014546 ac_cv_window_has_flags=yes
14547else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014548 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014549fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014550rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14551fi
14552
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014553{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
14554$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000014555
Jack Jansen666b1e72001-10-31 12:11:48 +000014556
14557if test "$ac_cv_window_has_flags" = yes
14558then
Martin v. Löwis11437992002-04-12 09:54:03 +000014559
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014560$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014561
14562fi
14563
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
14565$as_echo_n "checking for is_term_resized... " >&6; }
14566cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000014567/* end confdefs.h. */
14568#include <curses.h>
14569int
14570main ()
14571{
14572void *x=is_term_resized
14573 ;
14574 return 0;
14575}
14576_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014577if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000014578
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014579$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000014580
Matthias Klosec511b472010-05-08 11:01:39 +000014581 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014582$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014583else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14585$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014586
14587fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014588rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14589
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
14591$as_echo_n "checking for resize_term... " >&6; }
14592cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000014593/* end confdefs.h. */
14594#include <curses.h>
14595int
14596main ()
14597{
14598void *x=resize_term
14599 ;
14600 return 0;
14601}
14602_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014603if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000014604
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014605$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000014606
Matthias Klosec511b472010-05-08 11:01:39 +000014607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014608$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014609else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14611$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014612
14613fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014614rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14615
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
14617$as_echo_n "checking for resizeterm... " >&6; }
14618cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000014619/* end confdefs.h. */
14620#include <curses.h>
14621int
14622main ()
14623{
14624void *x=resizeterm
14625 ;
14626 return 0;
14627}
14628_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014629if ac_fn_c_try_compile "$LINENO"; then :
Walter Dörwald4994d952006-06-19 08:07:50 +000014630
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014631$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Walter Dörwald4994d952006-06-19 08:07:50 +000014632
Matthias Klosec511b472010-05-08 11:01:39 +000014633 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014634$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014635else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014636 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14637$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000014638
14639fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014640rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.comf27ec3e2014-04-17 20:11:19 +020014641# last curses configure check
14642CPPFLAGS=$ac_save_cppflags
Martin v. Löwiseba40652007-08-30 20:10:57 +000014643
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
14645$as_echo "$as_me: checking for device files" >&6;}
14646
14647if test "x$cross_compiling" = xyes; then
14648 if test "${ac_cv_file__dev_ptmx+set}" != set; then
14649 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14650$as_echo_n "checking for /dev/ptmx... " >&6; }
14651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14652$as_echo "not set" >&6; }
14653 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14654 fi
14655 if test "${ac_cv_file__dev_ptc+set}" != set; then
14656 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14657$as_echo_n "checking for /dev/ptc... " >&6; }
14658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14659$as_echo "not set" >&6; }
14660 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14661 fi
14662fi
14663
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14665$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014666if ${ac_cv_file__dev_ptmx+:} false; then :
14667 $as_echo_n "(cached) " >&6
14668else
14669 test "$cross_compiling" = yes &&
14670 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14671if test -r "/dev/ptmx"; then
14672 ac_cv_file__dev_ptmx=yes
14673else
14674 ac_cv_file__dev_ptmx=no
14675fi
14676fi
14677{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
14678$as_echo "$ac_cv_file__dev_ptmx" >&6; }
14679if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Martin v. Löwisfefbc202006-10-17 18:59:23 +000014680
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014681fi
14682
14683if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014684
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014685$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014686
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014687fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14689$as_echo_n "checking for /dev/ptc... " >&6; }
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014690if ${ac_cv_file__dev_ptc+:} false; then :
14691 $as_echo_n "(cached) " >&6
14692else
14693 test "$cross_compiling" = yes &&
14694 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14695if test -r "/dev/ptc"; then
14696 ac_cv_file__dev_ptc=yes
14697else
14698 ac_cv_file__dev_ptc=no
14699fi
14700fi
14701{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
14702$as_echo "$ac_cv_file__dev_ptc" >&6; }
14703if test "x$ac_cv_file__dev_ptc" = xyes; then :
Martin v. Löwisfefbc202006-10-17 18:59:23 +000014704
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014705fi
14706
14707if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000014708
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014709$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000014710
Neal Norwitz865400f2003-03-21 01:42:58 +000014711fi
14712
Mark Dickinson82864d12009-11-15 16:18:58 +000014713if test "$have_long_long" = yes
14714then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014715 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
14716$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014717 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014718 $as_echo_n "(cached) " >&6
Mark Dickinson82864d12009-11-15 16:18:58 +000014719else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014720 if test "$cross_compiling" = yes; then :
doko@python.orgd65e2ba2013-01-31 23:52:03 +010014721 ac_cv_have_long_long_format="cross -- assuming no"
14722 if test x$GCC = xyes; then
14723 save_CFLAGS=$CFLAGS
14724 CFLAGS="$CFLAGS -Werror -Wformat"
14725 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14726/* end confdefs.h. */
14727
14728 #include <stdio.h>
14729 #include <stddef.h>
14730
14731int
14732main ()
14733{
14734
14735 char *buffer;
14736 sprintf(buffer, "%lld", (long long)123);
14737 sprintf(buffer, "%lld", (long long)-123);
14738 sprintf(buffer, "%llu", (unsigned long long)123);
14739
14740 ;
14741 return 0;
14742}
14743_ACEOF
14744if ac_fn_c_try_compile "$LINENO"; then :
14745 ac_cv_have_long_long_format=yes
14746
14747fi
14748rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14749 CFLAGS=$save_CFLAGS
14750 fi
Mark Dickinson82864d12009-11-15 16:18:58 +000014751else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014752 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson82864d12009-11-15 16:18:58 +000014753/* end confdefs.h. */
14754
14755 #include <stdio.h>
14756 #include <stddef.h>
14757 #include <string.h>
14758
14759 #ifdef HAVE_SYS_TYPES_H
14760 #include <sys/types.h>
14761 #endif
14762
14763 int main()
14764 {
14765 char buffer[256];
14766
14767 if (sprintf(buffer, "%lld", (long long)123) < 0)
14768 return 1;
14769 if (strcmp(buffer, "123"))
14770 return 1;
14771
14772 if (sprintf(buffer, "%lld", (long long)-123) < 0)
14773 return 1;
14774 if (strcmp(buffer, "-123"))
14775 return 1;
14776
14777 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
14778 return 1;
14779 if (strcmp(buffer, "123"))
14780 return 1;
14781
14782 return 0;
14783 }
14784
14785_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014786if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson82864d12009-11-15 16:18:58 +000014787 ac_cv_have_long_long_format=yes
14788else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014789 ac_cv_have_long_long_format=no
Mark Dickinson82864d12009-11-15 16:18:58 +000014790fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014791rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14792 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson82864d12009-11-15 16:18:58 +000014793fi
14794
14795
Mark Dickinson82864d12009-11-15 16:18:58 +000014796fi
14797
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
14799$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson82864d12009-11-15 16:18:58 +000014800fi
14801
Mark Dickinson5ce84742009-12-31 20:48:04 +000014802if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson82864d12009-11-15 16:18:58 +000014803then
14804
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014805$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson82864d12009-11-15 16:18:58 +000014806
14807fi
14808
Ronald Oussoren315cd0c2009-11-19 16:25:21 +000014809if test $ac_sys_system = Darwin
14810then
14811 LIBS="$LIBS -framework CoreFoundation"
14812fi
14813
Mark Dickinson82864d12009-11-15 16:18:58 +000014814
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
14816$as_echo_n "checking for %zd printf() format support... " >&6; }
Matthias Klose3cef2a92012-03-14 23:39:33 +010014817if ${ac_cv_have_size_t_format+:} false; then :
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014818 $as_echo_n "(cached) " >&6
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014819else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014820 if test "$cross_compiling" = yes; then :
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000014821 ac_cv_have_size_t_format="cross -- assuming yes"
14822
Brett Cannon09d12362006-05-11 05:11:33 +000014823else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014824 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon09d12362006-05-11 05:11:33 +000014825/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014826
Brett Cannon09d12362006-05-11 05:11:33 +000014827#include <stdio.h>
14828#include <stddef.h>
14829#include <string.h>
14830
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000014831#ifdef HAVE_SYS_TYPES_H
14832#include <sys/types.h>
14833#endif
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000014834
14835#ifdef HAVE_SSIZE_T
14836typedef ssize_t Py_ssize_t;
14837#elif SIZEOF_VOID_P == SIZEOF_LONG
14838typedef long Py_ssize_t;
14839#else
14840typedef int Py_ssize_t;
14841#endif
Brett Cannon09d12362006-05-11 05:11:33 +000014842
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000014843int main()
14844{
14845 char buffer[256];
14846
Brett Cannon09d12362006-05-11 05:11:33 +000014847 if(sprintf(buffer, "%zd", (size_t)123) < 0)
14848 return 1;
14849
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000014850 if (strcmp(buffer, "123"))
14851 return 1;
14852
14853 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
14854 return 1;
14855
14856 if (strcmp(buffer, "-123"))
Brett Cannon09d12362006-05-11 05:11:33 +000014857 return 1;
14858
14859 return 0;
14860}
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014861
Brett Cannon09d12362006-05-11 05:11:33 +000014862_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014863if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014864 ac_cv_have_size_t_format=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014865else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014866 ac_cv_have_size_t_format=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014867fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014868rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14869 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000014870fi
14871
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014872fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014873{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
14874$as_echo "$ac_cv_have_size_t_format" >&6; }
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000014875if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014876
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014877$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014878
14879fi
14880
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014881ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000014882#ifdef HAVE_SYS_TYPES_H
14883#include <sys/types.h>
14884#endif
14885#ifdef HAVE_SYS_SOCKET_H
14886#include <sys/socket.h>
14887#endif
14888
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014889"
Matthias Klose3cef2a92012-03-14 23:39:33 +010014890if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000014891
Martin v. Löwis11437992002-04-12 09:54:03 +000014892else
Guido van Rossum95713eb2000-05-18 20:53:31 +000014893
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014894$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000014895
14896fi
14897
Michael W. Hudson54241132001-12-07 15:38:26 +000014898
Benjamin Peterson7497e912010-10-16 00:53:39 +000014899case $ac_sys_system in
14900AIX*)
14901
14902$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
14903 ;;
14904esac
14905
14906
Michael W. Hudson54241132001-12-07 15:38:26 +000014907
14908
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000014909for h in `(cd $srcdir;echo Python/thread_*.h)`
14910do
14911 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
14912done
14913
Michael W. Hudson54241132001-12-07 15:38:26 +000014914
Neal Norwitzd24499d2005-12-18 21:36:39 +000014915SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000014916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
14917$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014918for dir in $SRCDIRS; do
14919 if test ! -d $dir; then
14920 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000014921 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014922done
Benjamin Peterson2c992a02015-05-28 12:45:31 -050014923
14924# BEGIN_COMPUTED_GOTO
14925# Check for --with-computed-gotos
14926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
14927$as_echo_n "checking for --with-computed-gotos... " >&6; }
14928
14929# Check whether --with-computed-gotos was given.
14930if test "${with_computed_gotos+set}" = set; then :
14931 withval=$with_computed_gotos;
14932if test "$withval" = yes
14933then
14934
14935$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
14936
14937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14938$as_echo "yes" >&6; }
14939fi
14940if test "$withval" = no
14941then
14942
14943$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
14944
14945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14946$as_echo "no" >&6; }
14947fi
14948
14949else
14950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14951$as_echo "no value specified" >&6; }
14952fi
14953
14954
14955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
14956$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
14957if ${ac_cv_computed_gotos+:} false; then :
14958 $as_echo_n "(cached) " >&6
14959else
14960 if test "$cross_compiling" = yes; then :
14961 if test "${with_computed_gotos+set}" = set; then
14962 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
14963 else
14964 ac_cv_computed_gotos=no
14965 fi
14966else
14967 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14968/* end confdefs.h. */
14969
14970int main(int argc, char **argv)
14971{
14972 static void *targets[1] = { &&LABEL1 };
14973 goto LABEL2;
14974LABEL1:
14975 return 0;
14976LABEL2:
14977 goto *targets[0];
14978 return 1;
14979}
14980
14981_ACEOF
14982if ac_fn_c_try_run "$LINENO"; then :
14983 ac_cv_computed_gotos=yes
14984else
14985 ac_cv_computed_gotos=no
14986fi
14987rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14988 conftest.$ac_objext conftest.beam conftest.$ac_ext
14989fi
14990
14991fi
14992
14993{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
14994$as_echo "$ac_cv_computed_gotos" >&6; }
14995case "$ac_cv_computed_gotos" in yes*)
14996
14997$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
14998
14999esac
15000# END_COMPUTED_GOTO
15001
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015002{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
15003$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000015004
Ned Deily3f1d0b32014-11-20 02:11:03 -080015005# ensurepip option
15006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ensurepip" >&5
15007$as_echo_n "checking for ensurepip... " >&6; }
15008
15009# Check whether --with-ensurepip was given.
15010if test "${with_ensurepip+set}" = set; then :
15011 withval=$with_ensurepip;
15012else
15013 with_ensurepip=no
15014fi
15015
15016case $with_ensurepip in #(
15017 yes|upgrade) :
15018 ENSUREPIP=upgrade ;; #(
15019 install) :
15020 ENSUREPIP=install ;; #(
15021 no) :
15022 ENSUREPIP=no ;; #(
15023 *) :
15024 as_fn_error $? "--with-ensurepip=upgrade|install|no" "$LINENO" 5 ;;
15025esac
15026{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENSUREPIP" >&5
15027$as_echo "$ENSUREPIP" >&6; }
15028
15029
Guido van Rossum627b2d71993-12-24 10:39:16 +000015030# generate output files
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000015031ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000015032
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000015033ac_config_files="$ac_config_files Modules/ld_so_aix"
15034
Martin v. Löwis11437992002-04-12 09:54:03 +000015035cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015036# This file is a shell script that caches the results of configure
15037# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000015038# scripts and configure runs, see configure's option --config-cache.
15039# It is not useful on other systems. If it contains results you don't
15040# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015041#
Martin v. Löwis11437992002-04-12 09:54:03 +000015042# config.status only pays attention to the cache file if you give it
15043# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015044#
Skip Montanaro6dead952003-09-25 14:50:04 +000015045# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000015046# loading this file, other *unset* `ac_cv_foo' will be assigned the
15047# following values.
15048
15049_ACEOF
15050
Guido van Rossumf78abae1997-01-21 22:02:36 +000015051# The following way of writing the cache mishandles newlines in values,
15052# but we know of no workaround that is simple, portable, and efficient.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015053# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015054# Ultrix sh set writes to stderr and can't be redirected directly,
15055# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015056(
15057 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
15058 eval ac_val=\$$ac_var
15059 case $ac_val in #(
15060 *${as_nl}*)
15061 case $ac_var in #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015062 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
15063$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015064 esac
15065 case $ac_var in #(
15066 _ | IFS | as_nl) ;; #(
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015067 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
15068 *) { eval $ac_var=; unset $ac_var;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015069 esac ;;
15070 esac
15071 done
15072
Martin v. Löwis11437992002-04-12 09:54:03 +000015073 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +000015074 case $as_nl`(ac_space=' '; set) 2>&1` in #(
15075 *${as_nl}ac_space=\ *)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015076 # `set' does not quote correctly, so add quotes: double-quote
15077 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000015078 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015079 "s/'/'\\\\''/g;
15080 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwiseba40652007-08-30 20:10:57 +000015081 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000015082 *)
15083 # `set' quotes correctly as required by POSIX, so do not add quotes.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015084 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000015085 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015086 esac |
15087 sort
15088) |
Martin v. Löwis11437992002-04-12 09:54:03 +000015089 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000015090 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000015091 t clear
Martin v. Löwiseba40652007-08-30 20:10:57 +000015092 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000015093 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15094 t end
Martin v. Löwiseba40652007-08-30 20:10:57 +000015095 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15096 :end' >>confcache
15097if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
15098 if test -w "$cache_file"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +010015099 if test "x$cache_file" != "x/dev/null"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015100 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
15101$as_echo "$as_me: updating cache $cache_file" >&6;}
Matthias Klose3cef2a92012-03-14 23:39:33 +010015102 if test ! -f "$cache_file" || test -h "$cache_file"; then
15103 cat confcache >"$cache_file"
15104 else
15105 case $cache_file in #(
15106 */* | ?:*)
15107 mv -f confcache "$cache_file"$$ &&
15108 mv -f "$cache_file"$$ "$cache_file" ;; #(
15109 *)
15110 mv -f confcache "$cache_file" ;;
15111 esac
15112 fi
15113 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015114 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015115 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
15116$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015117 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015118fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015119rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000015120
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015121test "x$prefix" = xNONE && prefix=$ac_default_prefix
15122# Let make expand exec_prefix.
15123test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000015124
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015125DEFS=-DHAVE_CONFIG_H
15126
Skip Montanaro6dead952003-09-25 14:50:04 +000015127ac_libobjs=
15128ac_ltlibobjs=
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015129U=
Skip Montanaro6dead952003-09-25 14:50:04 +000015130for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
15131 # 1. Remove the extension, and $U if already installed.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015132 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015133 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015134 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
15135 # will be set to the directory where LIBOBJS objects are built.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015136 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
15137 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000015138done
15139LIBOBJS=$ac_libobjs
15140
15141LTLIBOBJS=$ac_ltlibobjs
15142
15143
Martin v. Löwis11437992002-04-12 09:54:03 +000015144
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015145
Matthias Klose3cef2a92012-03-14 23:39:33 +010015146: "${CONFIG_STATUS=./config.status}"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015147ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000015148ac_clean_files_save=$ac_clean_files
15149ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015150{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
15151$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
15152as_write_fail=0
15153cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015154#! $SHELL
15155# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015156# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015157# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000015158# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015159
Martin v. Löwis11437992002-04-12 09:54:03 +000015160debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000015161ac_cs_recheck=false
15162ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000015163
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015164SHELL=\${CONFIG_SHELL-$SHELL}
15165export SHELL
15166_ASEOF
15167cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
15168## -------------------- ##
15169## M4sh Initialization. ##
15170## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000015171
Martin v. Löwiseba40652007-08-30 20:10:57 +000015172# Be more Bourne compatible
15173DUALCASE=1; export DUALCASE # for MKS sh
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015174if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015175 emulate sh
15176 NULLCMD=:
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015177 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000015178 # is contrary to our usage. Disable this feature.
15179 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000015180 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000015181else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015182 case `(set -o) 2>/dev/null` in #(
15183 *posix*) :
15184 set -o posix ;; #(
15185 *) :
15186 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015187esac
Martin v. Löwis11437992002-04-12 09:54:03 +000015188fi
Michael W. Hudson54241132001-12-07 15:38:26 +000015189
Skip Montanaro6dead952003-09-25 14:50:04 +000015190
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015191as_nl='
15192'
15193export as_nl
15194# Printing a long string crashes Solaris 7 /usr/bin/printf.
15195as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
15196as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
15197as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
15198# Prefer a ksh shell builtin over an external printf program on Solaris,
15199# but without wasting forks for bash or zsh.
15200if test -z "$BASH_VERSION$ZSH_VERSION" \
15201 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
15202 as_echo='print -r --'
15203 as_echo_n='print -rn --'
15204elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
15205 as_echo='printf %s\n'
15206 as_echo_n='printf %s'
15207else
15208 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
15209 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
15210 as_echo_n='/usr/ucb/echo -n'
15211 else
15212 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
15213 as_echo_n_body='eval
15214 arg=$1;
15215 case $arg in #(
15216 *"$as_nl"*)
15217 expr "X$arg" : "X\\(.*\\)$as_nl";
15218 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
15219 esac;
15220 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
15221 '
15222 export as_echo_n_body
15223 as_echo_n='sh -c $as_echo_n_body as_echo'
15224 fi
15225 export as_echo_body
15226 as_echo='sh -c $as_echo_body as_echo'
15227fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015228
15229# The user is always right.
15230if test "${PATH_SEPARATOR+set}" != set; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015231 PATH_SEPARATOR=:
15232 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
15233 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
15234 PATH_SEPARATOR=';'
15235 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000015236fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015237
Martin v. Löwiseba40652007-08-30 20:10:57 +000015238
15239# IFS
15240# We need space, tab and new line, in precisely that order. Quoting is
15241# there to prevent editors from complaining about space-tab.
15242# (If _AS_PATH_WALK were called with IFS unset, it would disable word
15243# splitting by setting IFS to empty value.)
Martin v. Löwiseba40652007-08-30 20:10:57 +000015244IFS=" "" $as_nl"
15245
15246# Find who we are. Look in the path if we contain no directory separator.
Matthias Klose3cef2a92012-03-14 23:39:33 +010015247as_myself=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015248case $0 in #((
Martin v. Löwiseba40652007-08-30 20:10:57 +000015249 *[\\/]* ) as_myself=$0 ;;
15250 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000015251for as_dir in $PATH
15252do
15253 IFS=$as_save_IFS
15254 test -z "$as_dir" && as_dir=.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015255 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15256 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000015257IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000015258
Martin v. Löwiseba40652007-08-30 20:10:57 +000015259 ;;
15260esac
15261# We did not find ourselves, most probably we were run as `sh COMMAND'
15262# in which case we are not to be found in the path.
15263if test "x$as_myself" = x; then
15264 as_myself=$0
15265fi
15266if test ! -f "$as_myself"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015267 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
15268 exit 1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015269fi
15270
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015271# Unset variables that we do not need and which cause bugs (e.g. in
15272# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
15273# suppresses any "Segmentation fault" message there. '((' could
15274# trigger a bug in pdksh 5.2.14.
15275for as_var in BASH_ENV ENV MAIL MAILPATH
15276do eval test x\${$as_var+set} = xset \
15277 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Martin v. Löwiseba40652007-08-30 20:10:57 +000015278done
15279PS1='$ '
15280PS2='> '
15281PS4='+ '
15282
15283# NLS nuisances.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015284LC_ALL=C
15285export LC_ALL
15286LANGUAGE=C
15287export LANGUAGE
Martin v. Löwiseba40652007-08-30 20:10:57 +000015288
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015289# CDPATH.
15290(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
15291
15292
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015293# as_fn_error STATUS ERROR [LINENO LOG_FD]
15294# ----------------------------------------
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015295# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
15296# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015297# script with STATUS, using 1 if that was 0.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015298as_fn_error ()
15299{
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015300 as_status=$1; test $as_status -eq 0 && as_status=1
15301 if test "$4"; then
15302 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
15303 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015304 fi
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015305 $as_echo "$as_me: error: $2" >&2
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015306 as_fn_exit $as_status
15307} # as_fn_error
15308
15309
15310# as_fn_set_status STATUS
15311# -----------------------
15312# Set $? to STATUS, without forking.
15313as_fn_set_status ()
15314{
15315 return $1
15316} # as_fn_set_status
15317
15318# as_fn_exit STATUS
15319# -----------------
15320# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
15321as_fn_exit ()
15322{
15323 set +e
15324 as_fn_set_status $1
15325 exit $1
15326} # as_fn_exit
15327
15328# as_fn_unset VAR
15329# ---------------
15330# Portably unset VAR.
15331as_fn_unset ()
15332{
15333 { eval $1=; unset $1;}
15334}
15335as_unset=as_fn_unset
15336# as_fn_append VAR VALUE
15337# ----------------------
15338# Append the text in VALUE to the end of the definition contained in VAR. Take
15339# advantage of any shell optimizations that allow amortized linear growth over
15340# repeated appends, instead of the typical quadratic growth present in naive
15341# implementations.
15342if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
15343 eval 'as_fn_append ()
15344 {
15345 eval $1+=\$2
15346 }'
15347else
15348 as_fn_append ()
15349 {
15350 eval $1=\$$1\$2
15351 }
15352fi # as_fn_append
15353
15354# as_fn_arith ARG...
15355# ------------------
15356# Perform arithmetic evaluation on the ARGs, and store the result in the
15357# global $as_val. Take advantage of shells that can avoid forks. The arguments
15358# must be portable across $(()) and expr.
15359if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
15360 eval 'as_fn_arith ()
15361 {
15362 as_val=$(( $* ))
15363 }'
15364else
15365 as_fn_arith ()
15366 {
15367 as_val=`expr "$@" || test $? -eq 1`
15368 }
15369fi # as_fn_arith
15370
15371
Martin v. Löwiseba40652007-08-30 20:10:57 +000015372if expr a : '\(a\)' >/dev/null 2>&1 &&
15373 test "X`expr 00001 : '.*\(...\)'`" = X001; then
15374 as_expr=expr
15375else
15376 as_expr=false
15377fi
15378
15379if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
15380 as_basename=basename
15381else
15382 as_basename=false
15383fi
15384
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015385if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
15386 as_dirname=dirname
15387else
15388 as_dirname=false
15389fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015390
Martin v. Löwiseba40652007-08-30 20:10:57 +000015391as_me=`$as_basename -- "$0" ||
15392$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15393 X"$0" : 'X\(//\)$' \| \
15394 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015395$as_echo X/"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000015396 sed '/^.*\/\([^/][^/]*\)\/*$/{
15397 s//\1/
15398 q
15399 }
15400 /^X\/\(\/\/\)$/{
15401 s//\1/
15402 q
15403 }
15404 /^X\/\(\/\).*/{
15405 s//\1/
15406 q
15407 }
15408 s/.*/./; q'`
15409
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015410# Avoid depending upon Character Ranges.
15411as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15412as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15413as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15414as_cr_digits='0123456789'
15415as_cr_alnum=$as_cr_Letters$as_cr_digits
Martin v. Löwiseba40652007-08-30 20:10:57 +000015416
15417ECHO_C= ECHO_N= ECHO_T=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015418case `echo -n x` in #(((((
Martin v. Löwiseba40652007-08-30 20:10:57 +000015419-n*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015420 case `echo 'xy\c'` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000015421 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015422 xy) ECHO_C='\c';;
15423 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
15424 ECHO_T=' ';;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015425 esac;;
15426*)
15427 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000015428esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015429
Martin v. Löwis11437992002-04-12 09:54:03 +000015430rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +000015431if test -d conf$$.dir; then
15432 rm -f conf$$.dir/conf$$.file
15433else
15434 rm -f conf$$.dir
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015435 mkdir conf$$.dir 2>/dev/null
Martin v. Löwiseba40652007-08-30 20:10:57 +000015436fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015437if (echo >conf$$.file) 2>/dev/null; then
15438 if ln -s conf$$.file conf$$ 2>/dev/null; then
15439 as_ln_s='ln -s'
15440 # ... but there are two gotchas:
15441 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
15442 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015443 # In both cases, we have to default to `cp -pR'.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015444 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015445 as_ln_s='cp -pR'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015446 elif ln conf$$.file conf$$ 2>/dev/null; then
15447 as_ln_s=ln
15448 else
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015449 as_ln_s='cp -pR'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015450 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015451else
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015452 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000015453fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015454rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
15455rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000015456
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015457
15458# as_fn_mkdir_p
15459# -------------
15460# Create "$as_dir" as a directory, including parents if necessary.
15461as_fn_mkdir_p ()
15462{
15463
15464 case $as_dir in #(
15465 -*) as_dir=./$as_dir;;
15466 esac
15467 test -d "$as_dir" || eval $as_mkdir_p || {
15468 as_dirs=
15469 while :; do
15470 case $as_dir in #(
15471 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
15472 *) as_qdir=$as_dir;;
15473 esac
15474 as_dirs="'$as_qdir' $as_dirs"
15475 as_dir=`$as_dirname -- "$as_dir" ||
15476$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15477 X"$as_dir" : 'X\(//\)[^/]' \| \
15478 X"$as_dir" : 'X\(//\)$' \| \
15479 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
15480$as_echo X"$as_dir" |
15481 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15482 s//\1/
15483 q
15484 }
15485 /^X\(\/\/\)[^/].*/{
15486 s//\1/
15487 q
15488 }
15489 /^X\(\/\/\)$/{
15490 s//\1/
15491 q
15492 }
15493 /^X\(\/\).*/{
15494 s//\1/
15495 q
15496 }
15497 s/.*/./; q'`
15498 test -d "$as_dir" && break
15499 done
15500 test -z "$as_dirs" || eval "mkdir $as_dirs"
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015501 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015502
15503
15504} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000015505if mkdir -p . 2>/dev/null; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015506 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000015507else
Skip Montanarof0d5f792004-08-15 14:08:23 +000015508 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000015509 as_mkdir_p=false
15510fi
15511
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015512
15513# as_fn_executable_p FILE
15514# -----------------------
15515# Test if FILE is an executable regular file.
15516as_fn_executable_p ()
15517{
15518 test -f "$1" && test -x "$1"
15519} # as_fn_executable_p
15520as_test_x='test -x'
15521as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015522
15523# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015524as_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 +000015525
15526# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015527as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015528
15529
Martin v. Löwis11437992002-04-12 09:54:03 +000015530exec 6>&1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015531## ----------------------------------- ##
15532## Main body of $CONFIG_STATUS script. ##
15533## ----------------------------------- ##
15534_ASEOF
15535test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015536
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015537cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15538# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000015539# report actual input values of CONFIG_FILES etc. instead of their
Martin v. Löwiseba40652007-08-30 20:10:57 +000015540# values after options handling.
15541ac_log="
Martin v. Löwis174440b2008-10-03 08:59:41 +000015542This file was extended by python $as_me 2.7, which was
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015543generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000015544
15545 CONFIG_FILES = $CONFIG_FILES
15546 CONFIG_HEADERS = $CONFIG_HEADERS
15547 CONFIG_LINKS = $CONFIG_LINKS
15548 CONFIG_COMMANDS = $CONFIG_COMMANDS
15549 $ $0 $@
15550
Martin v. Löwiseba40652007-08-30 20:10:57 +000015551on `(hostname || uname -n) 2>/dev/null | sed 1q`
15552"
15553
Martin v. Löwis11437992002-04-12 09:54:03 +000015554_ACEOF
15555
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015556case $ac_config_files in *"
15557"*) set x $ac_config_files; shift; ac_config_files=$*;;
15558esac
15559
15560case $ac_config_headers in *"
15561"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
15562esac
15563
15564
15565cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015566# Files that config.status was made for.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015567config_files="$ac_config_files"
15568config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000015569
Martin v. Löwiseba40652007-08-30 20:10:57 +000015570_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015571
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015572cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015573ac_cs_usage="\
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015574\`$as_me' instantiates files and other configuration actions
15575from templates according to the current configuration. Unless the files
15576and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000015577
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015578Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000015579
15580 -h, --help print this help, then exit
Martin v. Löwiseba40652007-08-30 20:10:57 +000015581 -V, --version print version number and configuration settings, then exit
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015582 --config print configuration, then exit
15583 -q, --quiet, --silent
15584 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000015585 -d, --debug don't remove temporary files
15586 --recheck update $as_me by reconfiguring in the same conditions
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015587 --file=FILE[:TEMPLATE]
15588 instantiate the configuration file FILE
15589 --header=FILE[:TEMPLATE]
15590 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000015591
15592Configuration files:
15593$config_files
15594
15595Configuration headers:
15596$config_headers
15597
Benjamin Petersoncc8929b2016-08-03 22:01:32 -070015598Report bugs to <https://bugs.python.org/>."
Skip Montanaro89e975f2007-08-22 19:05:21 +000015599
Martin v. Löwiseba40652007-08-30 20:10:57 +000015600_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015601cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15602ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000015603ac_cs_version="\\
Martin v. Löwis174440b2008-10-03 08:59:41 +000015604python config.status 2.7
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015605configured by $0, generated by GNU Autoconf 2.69,
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015606 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000015607
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015608Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000015609This config.status script is free software; the Free Software Foundation
15610gives unlimited permission to copy, distribute and modify it."
Martin v. Löwiseba40652007-08-30 20:10:57 +000015611
15612ac_pwd='$ac_pwd'
15613srcdir='$srcdir'
15614INSTALL='$INSTALL'
Trent Nelsonf6407a12012-08-30 14:56:13 +000015615MKDIR_P='$MKDIR_P'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015616test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000015617_ACEOF
15618
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015619cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15620# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000015621ac_need_defaults=:
15622while test $# != 0
15623do
15624 case $1 in
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015625 --*=?*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000015626 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15627 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000015628 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000015629 ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015630 --*=)
15631 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15632 ac_optarg=
15633 ac_shift=:
15634 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015635 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000015636 ac_option=$1
15637 ac_optarg=$2
15638 ac_shift=shift
15639 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015640 esac
15641
Skip Montanaro6dead952003-09-25 14:50:04 +000015642 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000015643 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000015644 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15645 ac_cs_recheck=: ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015646 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015647 $as_echo "$ac_cs_version"; exit ;;
15648 --config | --confi | --conf | --con | --co | --c )
15649 $as_echo "$ac_cs_config"; exit ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015650 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000015651 debug=: ;;
15652 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000015653 $ac_shift
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015654 case $ac_optarg in
15655 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015656 '') as_fn_error $? "missing file argument" ;;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015657 esac
15658 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015659 ac_need_defaults=false;;
15660 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000015661 $ac_shift
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015662 case $ac_optarg in
15663 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15664 esac
15665 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015666 ac_need_defaults=false;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015667 --he | --h)
15668 # Conflict between --help and --header
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015669 as_fn_error $? "ambiguous option: \`$1'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015670Try \`$0 --help' for more information.";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015671 --help | --hel | -h )
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015672 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000015673 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
15674 | -silent | --silent | --silen | --sile | --sil | --si | --s)
15675 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015676
15677 # This is an error.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015678 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015679Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015680
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015681 *) as_fn_append ac_config_targets " $1"
Martin v. Löwiseba40652007-08-30 20:10:57 +000015682 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015683
15684 esac
15685 shift
15686done
15687
Skip Montanaro6dead952003-09-25 14:50:04 +000015688ac_configure_extra_args=
15689
15690if $ac_cs_silent; then
15691 exec 6>/dev/null
15692 ac_configure_extra_args="$ac_configure_extra_args --silent"
15693fi
15694
15695_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015696cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000015697if \$ac_cs_recheck; then
Charles-François Natalibe2b9072013-01-08 19:47:00 +010015698 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015699 shift
15700 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
15701 CONFIG_SHELL='$SHELL'
Martin v. Löwiseba40652007-08-30 20:10:57 +000015702 export CONFIG_SHELL
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015703 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000015704fi
15705
Martin v. Löwis11437992002-04-12 09:54:03 +000015706_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015707cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015708exec 5>>config.log
15709{
15710 echo
15711 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
15712## Running $as_me. ##
15713_ASBOX
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015714 $as_echo "$ac_log"
Martin v. Löwiseba40652007-08-30 20:10:57 +000015715} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015716
Martin v. Löwiseba40652007-08-30 20:10:57 +000015717_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015718cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015719_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015720
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015721cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000015722
15723# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000015724for ac_config_target in $ac_config_targets
15725do
Martin v. Löwiseba40652007-08-30 20:10:57 +000015726 case $ac_config_target in
15727 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
15728 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
15729 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
15730 "Mac/IDLE/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/IDLE/Makefile" ;;
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000015731 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
15732 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015733 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
15734 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000015735 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000015736 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000015737
Matthias Klose3cef2a92012-03-14 23:39:33 +010015738 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015739 esac
15740done
15741
Martin v. Löwiseba40652007-08-30 20:10:57 +000015742
Martin v. Löwis11437992002-04-12 09:54:03 +000015743# If the user did not use the arguments to specify the items to instantiate,
15744# then the envvar interface is used. Set only those that are not.
15745# We use the long form for the default assignment because of an extremely
15746# bizarre bug on SunOS 4.1.3.
15747if $ac_need_defaults; then
15748 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15749 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15750fi
15751
Skip Montanaro6dead952003-09-25 14:50:04 +000015752# Have a temporary directory for convenience. Make it in the build tree
Martin v. Löwiseba40652007-08-30 20:10:57 +000015753# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000015754# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015755# Hook for its removal unless debugging.
15756# Note that there is a small window in which the directory will not be cleaned:
15757# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000015758$debug ||
15759{
Matthias Klose3cef2a92012-03-14 23:39:33 +010015760 tmp= ac_tmp=
Martin v. Löwiseba40652007-08-30 20:10:57 +000015761 trap 'exit_status=$?
Matthias Klose3cef2a92012-03-14 23:39:33 +010015762 : "${ac_tmp:=$tmp}"
15763 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +000015764' 0
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015765 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000015766}
Martin v. Löwis11437992002-04-12 09:54:03 +000015767# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000015768
Martin v. Löwis11437992002-04-12 09:54:03 +000015769{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015770 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Matthias Klose3cef2a92012-03-14 23:39:33 +010015771 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000015772} ||
15773{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015774 tmp=./conf$$-$RANDOM
15775 (umask 077 && mkdir "$tmp")
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015776} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Matthias Klose3cef2a92012-03-14 23:39:33 +010015777ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000015778
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015779# Set up the scripts for CONFIG_FILES section.
15780# No need to generate them if there are no CONFIG_FILES.
15781# This happens for instance with `./config.status config.h'.
Martin v. Löwiseba40652007-08-30 20:10:57 +000015782if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015783
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015784
15785ac_cr=`echo X | tr X '\015'`
15786# On cygwin, bash can eat \r inside `` if the user requested igncr.
15787# But we know of no other shell where ac_cr would be empty at this
15788# point, so we can use a bashism as a fallback.
15789if test "x$ac_cr" = x; then
15790 eval ac_cr=\$\'\\r\'
15791fi
15792ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
15793if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015794 ac_cs_awk_cr='\\r'
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015795else
15796 ac_cs_awk_cr=$ac_cr
15797fi
15798
Matthias Klose3cef2a92012-03-14 23:39:33 +010015799echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000015800_ACEOF
15801
Martin v. Löwiseba40652007-08-30 20:10:57 +000015802
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015803{
15804 echo "cat >conf$$subs.awk <<_ACEOF" &&
15805 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
15806 echo "_ACEOF"
15807} >conf$$subs.sh ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015808 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15809ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000015810ac_delim='%!_!# '
15811for ac_last_try in false false false false false :; do
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015812 . ./conf$$subs.sh ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015813 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015814
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015815 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
15816 if test $ac_delim_n = $ac_delim_num; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015817 break
15818 elif $ac_last_try; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015819 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015820 else
15821 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000015822 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015823done
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015824rm -f conf$$subs.sh
Martin v. Löwiseba40652007-08-30 20:10:57 +000015825
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015826cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Matthias Klose3cef2a92012-03-14 23:39:33 +010015827cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000015828_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015829sed -n '
15830h
15831s/^/S["/; s/!.*/"]=/
15832p
15833g
15834s/^[^!]*!//
15835:repl
15836t repl
15837s/'"$ac_delim"'$//
15838t delim
15839:nl
15840h
15841s/\(.\{148\}\)..*/\1/
15842t more1
15843s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
15844p
15845n
15846b repl
15847:more1
15848s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15849p
15850g
15851s/.\{148\}//
15852t nl
15853:delim
15854h
15855s/\(.\{148\}\)..*/\1/
15856t more2
15857s/["\\]/\\&/g; s/^/"/; s/$/"/
15858p
15859b
15860:more2
15861s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15862p
15863g
15864s/.\{148\}//
15865t delim
15866' <conf$$subs.awk | sed '
15867/^[^""]/{
15868 N
15869 s/\n//
15870}
15871' >>$CONFIG_STATUS || ac_write_fail=1
15872rm -f conf$$subs.awk
15873cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15874_ACAWK
Matthias Klose3cef2a92012-03-14 23:39:33 +010015875cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015876 for (key in S) S_is_set[key] = 1
15877 FS = ""
15878
15879}
15880{
15881 line = $ 0
15882 nfields = split(line, field, "@")
15883 substed = 0
15884 len = length(field[1])
15885 for (i = 2; i < nfields; i++) {
15886 key = field[i]
15887 keylen = length(key)
15888 if (S_is_set[key]) {
15889 value = S[key]
15890 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
15891 len += length(value) + length(field[++i])
15892 substed = 1
15893 } else
15894 len += 1 + keylen
15895 }
15896
15897 print line
15898}
15899
15900_ACAWK
Martin v. Löwiseba40652007-08-30 20:10:57 +000015901_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015902cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15903if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
15904 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
15905else
15906 cat
Matthias Klose3cef2a92012-03-14 23:39:33 +010015907fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015908 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015909_ACEOF
15910
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015911# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
15912# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Martin v. Löwiseba40652007-08-30 20:10:57 +000015913# trailing colons and then remove the whole line if VPATH becomes empty
15914# (actually we leave an empty line to preserve line numbers).
15915if test "x$srcdir" = x.; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015916 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
15917h
15918s///
15919s/^/:/
15920s/[ ]*$/:/
15921s/:\$(srcdir):/:/g
15922s/:\${srcdir}:/:/g
15923s/:@srcdir@:/:/g
15924s/^:*//
Martin v. Löwiseba40652007-08-30 20:10:57 +000015925s/:*$//
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015926x
15927s/\(=[ ]*\).*/\1/
15928G
15929s/\n//
Martin v. Löwiseba40652007-08-30 20:10:57 +000015930s/^[^=]*=[ ]*$//
15931}'
15932fi
15933
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015934cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015935fi # test -n "$CONFIG_FILES"
15936
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015937# Set up the scripts for CONFIG_HEADERS section.
15938# No need to generate them if there are no CONFIG_HEADERS.
15939# This happens for instance with `./config.status Makefile'.
15940if test -n "$CONFIG_HEADERS"; then
Matthias Klose3cef2a92012-03-14 23:39:33 +010015941cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015942BEGIN {
15943_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000015944
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015945# Transform confdefs.h into an awk script `defines.awk', embedded as
15946# here-document in config.status, that substitutes the proper values into
15947# config.h.in to produce config.h.
15948
15949# Create a delimiter string that does not exist in confdefs.h, to ease
15950# handling of long lines.
15951ac_delim='%!_!# '
15952for ac_last_try in false false :; do
Matthias Klose3cef2a92012-03-14 23:39:33 +010015953 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
15954 if test -z "$ac_tt"; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015955 break
15956 elif $ac_last_try; then
Georg Brandl71f4fbb2011-02-25 11:04:50 +000015957 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000015958 else
15959 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
15960 fi
15961done
15962
15963# For the awk script, D is an array of macro values keyed by name,
15964# likewise P contains macro parameters if any. Preserve backslash
15965# newline sequences.
15966
15967ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
15968sed -n '
15969s/.\{148\}/&'"$ac_delim"'/g
15970t rset
15971:rset
15972s/^[ ]*#[ ]*define[ ][ ]*/ /
15973t def
15974d
15975:def
15976s/\\$//
15977t bsnl
15978s/["\\]/\\&/g
15979s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15980D["\1"]=" \3"/p
15981s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
15982d
15983:bsnl
15984s/["\\]/\\&/g
15985s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
15986D["\1"]=" \3\\\\\\n"\\/p
15987t cont
15988s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
15989t cont
15990d
15991:cont
15992n
15993s/.\{148\}/&'"$ac_delim"'/g
15994t clear
15995:clear
15996s/\\$//
15997t bsnlc
15998s/["\\]/\\&/g; s/^/"/; s/$/"/p
15999d
16000:bsnlc
16001s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
16002b cont
16003' <confdefs.h | sed '
16004s/'"$ac_delim"'/"\\\
16005"/g' >>$CONFIG_STATUS || ac_write_fail=1
16006
16007cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16008 for (key in D) D_is_set[key] = 1
16009 FS = ""
16010}
16011/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
16012 line = \$ 0
16013 split(line, arg, " ")
16014 if (arg[1] == "#") {
16015 defundef = arg[2]
16016 mac1 = arg[3]
16017 } else {
16018 defundef = substr(arg[1], 2)
16019 mac1 = arg[2]
16020 }
16021 split(mac1, mac2, "(") #)
16022 macro = mac2[1]
16023 prefix = substr(line, 1, index(line, defundef) - 1)
16024 if (D_is_set[macro]) {
16025 # Preserve the white space surrounding the "#".
16026 print prefix "define", macro P[macro] D[macro]
16027 next
16028 } else {
16029 # Replace #undef with comments. This is necessary, for example,
16030 # in the case of _POSIX_SOURCE, which is predefined and required
16031 # on some systems where configure will not decide to define it.
16032 if (defundef == "undef") {
16033 print "/*", prefix defundef, macro, "*/"
16034 next
16035 }
16036 }
16037}
16038{ print }
16039_ACAWK
16040_ACEOF
16041cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016042 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016043fi # test -n "$CONFIG_HEADERS"
16044
16045
16046eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
16047shift
16048for ac_tag
Martin v. Löwiseba40652007-08-30 20:10:57 +000016049do
16050 case $ac_tag in
16051 :[FHLC]) ac_mode=$ac_tag; continue;;
16052 esac
16053 case $ac_mode$ac_tag in
16054 :[FHL]*:*);;
Matthias Klose3cef2a92012-03-14 23:39:33 +010016055 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016056 :[FH]-) ac_tag=-:-;;
16057 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
16058 esac
16059 ac_save_IFS=$IFS
16060 IFS=:
16061 set x $ac_tag
16062 IFS=$ac_save_IFS
16063 shift
16064 ac_file=$1
16065 shift
16066
16067 case $ac_mode in
16068 :L) ac_source=$1;;
16069 :[FH])
16070 ac_file_inputs=
16071 for ac_f
16072 do
16073 case $ac_f in
Matthias Klose3cef2a92012-03-14 23:39:33 +010016074 -) ac_f="$ac_tmp/stdin";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016075 *) # Look for the file first in the build tree, then in the source tree
16076 # (if the path is not absolute). The absolute path cannot be DOS-style,
16077 # because $ac_f cannot contain `:'.
16078 test -f "$ac_f" ||
16079 case $ac_f in
16080 [\\/$]*) false;;
16081 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
16082 esac ||
Matthias Klose3cef2a92012-03-14 23:39:33 +010016083 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016084 esac
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016085 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
16086 as_fn_append ac_file_inputs " '$ac_f'"
Martin v. Löwiseba40652007-08-30 20:10:57 +000016087 done
16088
16089 # Let's still pretend it is `configure' which instantiates (i.e., don't
16090 # use $as_me), people would be surprised to read:
16091 # /* config.h. Generated by config.status. */
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016092 configure_input='Generated from '`
16093 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
16094 `' by configure.'
Martin v. Löwiseba40652007-08-30 20:10:57 +000016095 if test x"$ac_file" != x-; then
16096 configure_input="$ac_file. $configure_input"
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016097 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
16098$as_echo "$as_me: creating $ac_file" >&6;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000016099 fi
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016100 # Neutralize special characters interpreted by sed in replacement strings.
16101 case $configure_input in #(
16102 *\&* | *\|* | *\\* )
16103 ac_sed_conf_input=`$as_echo "$configure_input" |
16104 sed 's/[\\\\&|]/\\\\&/g'`;; #(
16105 *) ac_sed_conf_input=$configure_input;;
16106 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000016107
16108 case $ac_tag in
Matthias Klose3cef2a92012-03-14 23:39:33 +010016109 *:-:* | *:-) cat >"$ac_tmp/stdin" \
16110 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016111 esac
16112 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016113 esac
16114
Martin v. Löwiseba40652007-08-30 20:10:57 +000016115 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000016116$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016117 X"$ac_file" : 'X\(//\)[^/]' \| \
16118 X"$ac_file" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000016119 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016120$as_echo X"$ac_file" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000016121 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16122 s//\1/
16123 q
16124 }
16125 /^X\(\/\/\)[^/].*/{
16126 s//\1/
16127 q
16128 }
16129 /^X\(\/\/\)$/{
16130 s//\1/
16131 q
16132 }
16133 /^X\(\/\).*/{
16134 s//\1/
16135 q
16136 }
16137 s/.*/./; q'`
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016138 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000016139 ac_builddir=.
16140
Martin v. Löwiseba40652007-08-30 20:10:57 +000016141case "$ac_dir" in
16142.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
16143*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016144 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000016145 # A ".." for each directory in $ac_dir_suffix.
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016146 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000016147 case $ac_top_builddir_sub in
16148 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
16149 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
16150 esac ;;
16151esac
16152ac_abs_top_builddir=$ac_pwd
16153ac_abs_builddir=$ac_pwd$ac_dir_suffix
16154# for backward compatibility:
16155ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000016156
16157case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +000016158 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000016159 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +000016160 ac_top_srcdir=$ac_top_builddir_sub
16161 ac_abs_top_srcdir=$ac_pwd ;;
16162 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000016163 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016164 ac_top_srcdir=$srcdir
16165 ac_abs_top_srcdir=$srcdir ;;
16166 *) # Relative name.
16167 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
16168 ac_top_srcdir=$ac_top_build_prefix$srcdir
16169 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016170esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000016171ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000016172
Martin v. Löwis11437992002-04-12 09:54:03 +000016173
Martin v. Löwiseba40652007-08-30 20:10:57 +000016174 case $ac_mode in
16175 :F)
16176 #
16177 # CONFIG_FILE
16178 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016179
16180 case $INSTALL in
16181 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016182 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016183 esac
Trent Nelsonf6407a12012-08-30 14:56:13 +000016184 ac_MKDIR_P=$MKDIR_P
16185 case $MKDIR_P in
16186 [\\/$]* | ?:[\\/]* ) ;;
16187 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
16188 esac
Brett Cannon19fab762007-06-02 03:02:29 +000016189_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000016190
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016191cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000016192# If the template does not know about datarootdir, expand it.
16193# FIXME: This hack should be removed a few years after 2.60.
16194ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016195ac_sed_dataroot='
16196/datarootdir/ {
Martin v. Löwiseba40652007-08-30 20:10:57 +000016197 p
16198 q
16199}
16200/@datadir@/p
16201/@docdir@/p
16202/@infodir@/p
16203/@localedir@/p
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016204/@mandir@/p'
16205case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000016206*datarootdir*) ac_datarootdir_seen=yes;;
16207*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016208 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
16209$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000016210_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016211cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000016212 ac_datarootdir_hack='
16213 s&@datadir@&$datadir&g
16214 s&@docdir@&$docdir&g
16215 s&@infodir@&$infodir&g
16216 s&@localedir@&$localedir&g
16217 s&@mandir@&$mandir&g
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016218 s&\\\${datarootdir}&$datarootdir&g' ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000016219esac
16220_ACEOF
16221
16222# Neutralize VPATH when `$srcdir' = `.'.
16223# Shell code in configure.ac might set extrasub.
16224# FIXME: do we really want to maintain this feature?
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016225cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16226ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000016227$extrasub
16228_ACEOF
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016229cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016230:t
16231/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016232s|@configure_input@|$ac_sed_conf_input|;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000016233s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016234s&@top_build_prefix@&$ac_top_build_prefix&;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000016235s&@srcdir@&$ac_srcdir&;t t
16236s&@abs_srcdir@&$ac_abs_srcdir&;t t
16237s&@top_srcdir@&$ac_top_srcdir&;t t
16238s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
16239s&@builddir@&$ac_builddir&;t t
16240s&@abs_builddir@&$ac_abs_builddir&;t t
16241s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
16242s&@INSTALL@&$ac_INSTALL&;t t
Trent Nelsonf6407a12012-08-30 14:56:13 +000016243s&@MKDIR_P@&$ac_MKDIR_P&;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000016244$ac_datarootdir_hack
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016245"
Matthias Klose3cef2a92012-03-14 23:39:33 +010016246eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
16247 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016248
Martin v. Löwiseba40652007-08-30 20:10:57 +000016249test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Matthias Klose3cef2a92012-03-14 23:39:33 +010016250 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
16251 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
16252 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016253 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016254which seems to be undefined. Please make sure it is defined" >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016255$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016256which seems to be undefined. Please make sure it is defined" >&2;}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016257
Matthias Klose3cef2a92012-03-14 23:39:33 +010016258 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000016259 case $ac_file in
Matthias Klose3cef2a92012-03-14 23:39:33 +010016260 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
16261 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016262 esac \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016263 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016264 ;;
16265 :H)
16266 #
16267 # CONFIG_HEADER
16268 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016269 if test x"$ac_file" != x-; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016270 {
16271 $as_echo "/* $configure_input */" \
Matthias Klose3cef2a92012-03-14 23:39:33 +010016272 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
16273 } >"$ac_tmp/config.h" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016274 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Matthias Klose3cef2a92012-03-14 23:39:33 +010016275 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016276 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
16277$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016278 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016279 rm -f "$ac_file"
Matthias Klose3cef2a92012-03-14 23:39:33 +010016280 mv "$ac_tmp/config.h" "$ac_file" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016281 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016282 fi
16283 else
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016284 $as_echo "/* $configure_input */" \
Matthias Klose3cef2a92012-03-14 23:39:33 +010016285 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016286 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016287 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016288 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000016289
Martin v. Löwiseba40652007-08-30 20:10:57 +000016290
16291 esac
16292
Antoine Pitrouaabdceb2010-09-10 20:03:17 +000016293
16294 case $ac_file$ac_mode in
16295 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
16296
16297 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000016298done # for ac_tag
16299
Guido van Rossum627b2d71993-12-24 10:39:16 +000016300
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016301as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000016302_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016303ac_clean_files=$ac_clean_files_save
16304
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016305test $ac_write_fail = 0 ||
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016306 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016307
Martin v. Löwis11437992002-04-12 09:54:03 +000016308
16309# configure is writing to config.log, and then calls config.status.
16310# config.status does its own redirection, appending to config.log.
16311# Unfortunately, on DOS this fails, as config.log is still kept open
16312# by configure, so config.status won't be able to write to it; its
16313# output is simply discarded. So we exec the FD to /dev/null,
16314# effectively closing config.log, so it can be properly (re)opened and
16315# appended to by config.status. When coming back to configure, we
16316# need to make the FD available again.
16317if test "$no_create" != yes; then
16318 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000016319 ac_config_status_args=
16320 test "$silent" = yes &&
16321 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000016322 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000016323 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000016324 exec 5>>config.log
16325 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16326 # would make configure fail if this is the last instruction.
Georg Brandl71f4fbb2011-02-25 11:04:50 +000016327 $ac_cs_success || as_fn_exit 1
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016328fi
16329if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
16330 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
16331$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016332fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000016333
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016334
Martin v. Löwisf7afe952006-04-14 15:16:15 +000016335echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016336if test ! -f Modules/Setup
16337then
16338 cp $srcdir/Modules/Setup.dist Modules/Setup
16339fi
16340
Martin v. Löwisf7afe952006-04-14 15:16:15 +000016341echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016342if test ! -f Modules/Setup.local
16343then
16344 echo "# Edit this file for local setup changes" >Modules/Setup.local
16345fi
16346
16347echo "creating Makefile"
16348$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
16349 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000016350 Modules/Setup.local Modules/Setup
Skip Montanaro89e975f2007-08-22 19:05:21 +000016351
16352case $ac_sys_system in
16353BeOS)
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016354 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000016355
16356 Support for BeOS is deprecated as of Python 2.6.
16357 See PEP 11 for the gory details.
16358 " >&5
Matthias Klosea0bea5d2010-05-08 10:00:28 +000016359$as_echo "$as_me: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000016360
16361 Support for BeOS is deprecated as of Python 2.6.
16362 See PEP 11 for the gory details.
16363 " >&2;}
16364 ;;
16365*) ;;
16366esac
16367
Neil Schemenauerc761fc82001-02-19 04:50:49 +000016368mv config.c Modules
Gregory P. Smith6d8fdfc2016-09-07 23:28:23 -070016369
16370if test "$Py_OPT" = 'false' -a "$Py_DEBUG" != 'true'; then
16371 echo "" >&6
16372 echo "" >&6
16373 echo "If you want a release build with all optimizations active (LTO, PGO, etc),"
16374 echo "please run ./configure --with-optimizations" >&6
16375 echo "" >&6
16376 echo "" >&6
16377fi