blob: 7d00e4d6c5e3989dd43b6a2cea31e036ee6d1376 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00002# Guess values for system-dependent variables and create Makefiles.
Ross Lagerwall2bb842a2012-10-29 17:39:19 +00003# Generated by GNU Autoconf 2.69 for python 3.4.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004#
Georg Brandle2e15612009-05-20 18:25:10 +00005# Report bugs to <http://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00006#
Matthias Kloseb9621712010-04-24 17:59:49 +00007#
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00008# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
Matthias Kloseb9621712010-04-24 17:59:49 +00009#
10#
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011# This configure script is free software; the Free Software Foundation
12# gives unlimited permission to copy, distribute and modify it.
Matthias Kloseb9621712010-04-24 17:59:49 +000013## -------------------- ##
14## M4sh Initialization. ##
15## -------------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +000016
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017# Be more Bourne compatible
18DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000019if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000020 emulate sh
21 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000022 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000023 # is contrary to our usage. Disable this feature.
24 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000026else
Matthias Kloseb9621712010-04-24 17:59:49 +000027 case `(set -o) 2>/dev/null` in #(
28 *posix*) :
29 set -o posix ;; #(
30 *) :
31 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000032esac
Martin v. Löwis11437992002-04-12 09:54:03 +000033fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000034
35
Matthias Kloseb9621712010-04-24 17:59:49 +000036as_nl='
37'
38export as_nl
39# Printing a long string crashes Solaris 7 /usr/bin/printf.
40as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
41as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
42as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
43# Prefer a ksh shell builtin over an external printf program on Solaris,
44# but without wasting forks for bash or zsh.
45if test -z "$BASH_VERSION$ZSH_VERSION" \
46 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
47 as_echo='print -r --'
48 as_echo_n='print -rn --'
49elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
50 as_echo='printf %s\n'
51 as_echo_n='printf %s'
52else
53 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
54 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
55 as_echo_n='/usr/ucb/echo -n'
56 else
57 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
58 as_echo_n_body='eval
59 arg=$1;
60 case $arg in #(
61 *"$as_nl"*)
62 expr "X$arg" : "X\\(.*\\)$as_nl";
63 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
64 esac;
65 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66 '
67 export as_echo_n_body
68 as_echo_n='sh -c $as_echo_n_body as_echo'
69 fi
70 export as_echo_body
71 as_echo='sh -c $as_echo_body as_echo'
72fi
Martin v. Löwis11437992002-04-12 09:54:03 +000073
74# The user is always right.
75if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000076 PATH_SEPARATOR=:
77 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
78 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
79 PATH_SEPARATOR=';'
80 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000081fi
Martin v. Löwis11437992002-04-12 09:54:03 +000082
Thomas Wouters47b49bf2007-08-30 22:15:33 +000083
84# IFS
85# We need space, tab and new line, in precisely that order. Quoting is
86# there to prevent editors from complaining about space-tab.
87# (If _AS_PATH_WALK were called with IFS unset, it would disable word
88# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000089IFS=" "" $as_nl"
90
91# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020092as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000093case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000094 *[\\/]* ) as_myself=$0 ;;
95 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000096for as_dir in $PATH
97do
98 IFS=$as_save_IFS
99 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +0000100 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
101 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000102IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +0000103
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000104 ;;
105esac
106# We did not find ourselves, most probably we were run as `sh COMMAND'
107# in which case we are not to be found in the path.
108if test "x$as_myself" = x; then
109 as_myself=$0
110fi
111if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000112 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
113 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000114fi
115
Matthias Kloseb9621712010-04-24 17:59:49 +0000116# Unset variables that we do not need and which cause bugs (e.g. in
117# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
118# suppresses any "Segmentation fault" message there. '((' could
119# trigger a bug in pdksh 5.2.14.
120for as_var in BASH_ENV ENV MAIL MAILPATH
121do eval test x\${$as_var+set} = xset \
122 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000123done
124PS1='$ '
125PS2='> '
126PS4='+ '
127
128# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +0000129LC_ALL=C
130export LC_ALL
131LANGUAGE=C
132export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000133
Matthias Kloseb9621712010-04-24 17:59:49 +0000134# CDPATH.
135(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
136
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000137# Use a proper internal environment variable to ensure we don't fall
138 # into an infinite loop, continuously re-executing ourselves.
139 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
140 _as_can_reexec=no; export _as_can_reexec;
141 # We cannot yet assume a decent shell, so we have to provide a
142# neutralization value for shells without unset; and this also
143# works around shells that cannot unset nonexistent variables.
144# Preserve -v and -x to the replacement shell.
145BASH_ENV=/dev/null
146ENV=/dev/null
147(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
148case $- in # ((((
149 *v*x* | *x*v* ) as_opts=-vx ;;
150 *v* ) as_opts=-v ;;
151 *x* ) as_opts=-x ;;
152 * ) as_opts= ;;
153esac
154exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
155# Admittedly, this is quite paranoid, since all the known shells bail
156# out after a failed `exec'.
157$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
158as_fn_exit 255
159 fi
160 # We don't want this to propagate to other subprocesses.
161 { _as_can_reexec=; unset _as_can_reexec;}
Matthias Kloseb9621712010-04-24 17:59:49 +0000162if test "x$CONFIG_SHELL" = x; then
163 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
164 emulate sh
165 NULLCMD=:
166 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
167 # is contrary to our usage. Disable this feature.
168 alias -g '\${1+\"\$@\"}'='\"\$@\"'
169 setopt NO_GLOB_SUBST
170else
171 case \`(set -o) 2>/dev/null\` in #(
172 *posix*) :
173 set -o posix ;; #(
174 *) :
175 ;;
176esac
177fi
178"
179 as_required="as_fn_return () { (exit \$1); }
180as_fn_success () { as_fn_return 0; }
181as_fn_failure () { as_fn_return 1; }
182as_fn_ret_success () { return 0; }
183as_fn_ret_failure () { return 1; }
184
185exitcode=0
186as_fn_success || { exitcode=1; echo as_fn_success failed.; }
187as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
188as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
189as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
190if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
191
192else
193 exitcode=1; echo positional parameters were not saved.
194fi
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000195test x\$exitcode = x0 || exit 1
196test -x / || exit 1"
Matthias Kloseb9621712010-04-24 17:59:49 +0000197 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
198 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
199 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
200 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
201test \$(( 1 + 1 )) = 2 || exit 1"
202 if (eval "$as_required") 2>/dev/null; then :
203 as_have_required=yes
204else
205 as_have_required=no
206fi
207 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
208
209else
210 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
211as_found=false
212for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
213do
214 IFS=$as_save_IFS
215 test -z "$as_dir" && as_dir=.
216 as_found=:
217 case $as_dir in #(
218 /*)
219 for as_base in sh bash ksh sh5; do
220 # Try only shells that exist, to save several forks.
221 as_shell=$as_dir/$as_base
222 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
223 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
224 CONFIG_SHELL=$as_shell as_have_required=yes
225 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
226 break 2
227fi
228fi
229 done;;
230 esac
231 as_found=false
232done
233$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
234 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
235 CONFIG_SHELL=$SHELL as_have_required=yes
236fi; }
237IFS=$as_save_IFS
238
239
240 if test "x$CONFIG_SHELL" != x; then :
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000241 export CONFIG_SHELL
242 # We cannot yet assume a decent shell, so we have to provide a
243# neutralization value for shells without unset; and this also
244# works around shells that cannot unset nonexistent variables.
245# Preserve -v and -x to the replacement shell.
246BASH_ENV=/dev/null
247ENV=/dev/null
248(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
249case $- in # ((((
250 *v*x* | *x*v* ) as_opts=-vx ;;
251 *v* ) as_opts=-v ;;
252 *x* ) as_opts=-x ;;
253 * ) as_opts= ;;
254esac
255exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
256# Admittedly, this is quite paranoid, since all the known shells bail
257# out after a failed `exec'.
258$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
259exit 255
Matthias Kloseb9621712010-04-24 17:59:49 +0000260fi
261
262 if test x$as_have_required = xno; then :
263 $as_echo "$0: This script requires a shell more modern than all"
264 $as_echo "$0: the shells that I found on your system."
265 if test x${ZSH_VERSION+set} = xset ; then
266 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
267 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
268 else
269 $as_echo "$0: Please tell bug-autoconf@gnu.org and
270$0: http://bugs.python.org/ about your system, including
271$0: any error possibly output before this message. Then
272$0: install a modern shell, or manually run the script
273$0: under such a shell if you do have one."
274 fi
275 exit 1
276fi
277fi
278fi
279SHELL=${CONFIG_SHELL-/bin/sh}
280export SHELL
281# Unset more variables known to interfere with behavior of common tools.
282CLICOLOR_FORCE= GREP_OPTIONS=
283unset CLICOLOR_FORCE GREP_OPTIONS
284
285## --------------------- ##
286## M4sh Shell Functions. ##
287## --------------------- ##
288# as_fn_unset VAR
289# ---------------
290# Portably unset VAR.
291as_fn_unset ()
292{
293 { eval $1=; unset $1;}
294}
295as_unset=as_fn_unset
296
297# as_fn_set_status STATUS
298# -----------------------
299# Set $? to STATUS, without forking.
300as_fn_set_status ()
301{
302 return $1
303} # as_fn_set_status
304
305# as_fn_exit STATUS
306# -----------------
307# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
308as_fn_exit ()
309{
310 set +e
311 as_fn_set_status $1
312 exit $1
313} # as_fn_exit
314
315# as_fn_mkdir_p
316# -------------
317# Create "$as_dir" as a directory, including parents if necessary.
318as_fn_mkdir_p ()
319{
320
321 case $as_dir in #(
322 -*) as_dir=./$as_dir;;
323 esac
324 test -d "$as_dir" || eval $as_mkdir_p || {
325 as_dirs=
326 while :; do
327 case $as_dir in #(
328 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
329 *) as_qdir=$as_dir;;
330 esac
331 as_dirs="'$as_qdir' $as_dirs"
332 as_dir=`$as_dirname -- "$as_dir" ||
333$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
334 X"$as_dir" : 'X\(//\)[^/]' \| \
335 X"$as_dir" : 'X\(//\)$' \| \
336 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
337$as_echo X"$as_dir" |
338 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
339 s//\1/
340 q
341 }
342 /^X\(\/\/\)[^/].*/{
343 s//\1/
344 q
345 }
346 /^X\(\/\/\)$/{
347 s//\1/
348 q
349 }
350 /^X\(\/\).*/{
351 s//\1/
352 q
353 }
354 s/.*/./; q'`
355 test -d "$as_dir" && break
356 done
357 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200358 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +0000359
360
361} # as_fn_mkdir_p
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000362
363# as_fn_executable_p FILE
364# -----------------------
365# Test if FILE is an executable regular file.
366as_fn_executable_p ()
367{
368 test -f "$1" && test -x "$1"
369} # as_fn_executable_p
Matthias Kloseb9621712010-04-24 17:59:49 +0000370# as_fn_append VAR VALUE
371# ----------------------
372# Append the text in VALUE to the end of the definition contained in VAR. Take
373# advantage of any shell optimizations that allow amortized linear growth over
374# repeated appends, instead of the typical quadratic growth present in naive
375# implementations.
376if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
377 eval 'as_fn_append ()
378 {
379 eval $1+=\$2
380 }'
381else
382 as_fn_append ()
383 {
384 eval $1=\$$1\$2
385 }
386fi # as_fn_append
387
388# as_fn_arith ARG...
389# ------------------
390# Perform arithmetic evaluation on the ARGs, and store the result in the
391# global $as_val. Take advantage of shells that can avoid forks. The arguments
392# must be portable across $(()) and expr.
393if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
394 eval 'as_fn_arith ()
395 {
396 as_val=$(( $* ))
397 }'
398else
399 as_fn_arith ()
400 {
401 as_val=`expr "$@" || test $? -eq 1`
402 }
403fi # as_fn_arith
404
405
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200406# as_fn_error STATUS ERROR [LINENO LOG_FD]
407# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +0000408# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
409# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200410# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +0000411as_fn_error ()
412{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200413 as_status=$1; test $as_status -eq 0 && as_status=1
414 if test "$4"; then
415 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
416 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +0000417 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200418 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +0000419 as_fn_exit $as_status
420} # as_fn_error
421
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000422if expr a : '\(a\)' >/dev/null 2>&1 &&
423 test "X`expr 00001 : '.*\(...\)'`" = X001; then
424 as_expr=expr
425else
426 as_expr=false
427fi
428
429if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
430 as_basename=basename
431else
432 as_basename=false
433fi
434
Matthias Kloseb9621712010-04-24 17:59:49 +0000435if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
436 as_dirname=dirname
437else
438 as_dirname=false
439fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000440
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000441as_me=`$as_basename -- "$0" ||
442$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
443 X"$0" : 'X\(//\)$' \| \
444 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000445$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000446 sed '/^.*\/\([^/][^/]*\)\/*$/{
447 s//\1/
448 q
449 }
450 /^X\/\(\/\/\)$/{
451 s//\1/
452 q
453 }
454 /^X\/\(\/\).*/{
455 s//\1/
456 q
457 }
458 s/.*/./; q'`
459
Matthias Kloseb9621712010-04-24 17:59:49 +0000460# Avoid depending upon Character Ranges.
461as_cr_letters='abcdefghijklmnopqrstuvwxyz'
462as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
463as_cr_Letters=$as_cr_letters$as_cr_LETTERS
464as_cr_digits='0123456789'
465as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000466
467
Matthias Kloseb9621712010-04-24 17:59:49 +0000468 as_lineno_1=$LINENO as_lineno_1a=$LINENO
469 as_lineno_2=$LINENO as_lineno_2a=$LINENO
470 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
471 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
472 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000473 sed -n '
474 p
475 /[$]LINENO/=
476 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000477 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000478 s/[$]LINENO.*/&-/
479 t lineno
480 b
481 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000482 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000483 :loop
484 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000485 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000486 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000487 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000488 chmod +x "$as_me.lineno" ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000489 { $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 +0000490
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000491 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
492 # already done that, so ensure we don't try to do so again and fall
493 # in an infinite loop. This has already happened in practice.
494 _as_can_reexec=no; export _as_can_reexec
Martin v. Löwis11437992002-04-12 09:54:03 +0000495 # Don't try to exec as it changes $[0], causing all sort of problems
496 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000497 # original and so on. Autoconf is especially sensitive to this).
498 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000499 # Exit status is that of the last command.
500 exit
501}
502
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000503ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +0000504case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000505-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000506 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000507 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +0000508 xy) ECHO_C='\c';;
509 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
510 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000511 esac;;
512*)
513 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000514esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000515
Martin v. Löwis11437992002-04-12 09:54:03 +0000516rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000517if test -d conf$$.dir; then
518 rm -f conf$$.dir/conf$$.file
519else
520 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +0000521 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000522fi
Matthias Kloseb9621712010-04-24 17:59:49 +0000523if (echo >conf$$.file) 2>/dev/null; then
524 if ln -s conf$$.file conf$$ 2>/dev/null; then
525 as_ln_s='ln -s'
526 # ... but there are two gotchas:
527 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
528 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000529 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +0000530 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000531 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +0000532 elif ln conf$$.file conf$$ 2>/dev/null; then
533 as_ln_s=ln
534 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000535 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +0000536 fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000537else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000538 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +0000539fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000540rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
541rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000542
Skip Montanaro6dead952003-09-25 14:50:04 +0000543if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000544 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +0000545else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000546 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000547 as_mkdir_p=false
548fi
549
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000550as_test_x='test -x'
551as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +0000552
553# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000554as_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 +0000555
556# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000557as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000558
559
Matthias Kloseb9621712010-04-24 17:59:49 +0000560test -n "$DJDIR" || exec 7<&0 </dev/null
561exec 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000562
563# Name of the host.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200564# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
Martin v. Löwis11437992002-04-12 09:54:03 +0000565# so uname gets run too.
566ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
567
Martin v. Löwis11437992002-04-12 09:54:03 +0000568#
569# Initializations.
570#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000571ac_default_prefix=/usr/local
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000572ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000573ac_config_libobj_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000574LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000575cross_compiling=no
576subdirs=
577MFLAGS=
578MAKEFLAGS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000579
Martin v. Löwis11437992002-04-12 09:54:03 +0000580# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000581PACKAGE_NAME='python'
582PACKAGE_TARNAME='python'
Georg Brandl08a90122012-09-29 09:34:13 +0200583PACKAGE_VERSION='3.4'
584PACKAGE_STRING='python 3.4'
Georg Brandle2e15612009-05-20 18:25:10 +0000585PACKAGE_BUGREPORT='http://bugs.python.org/'
Matthias Kloseb9621712010-04-24 17:59:49 +0000586PACKAGE_URL=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000587
588ac_unique_file="Include/object.h"
589# Factoring default headers for most tests.
590ac_includes_default="\
591#include <stdio.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000592#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000593# include <sys/types.h>
594#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000595#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000596# include <sys/stat.h>
597#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000598#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000599# include <stdlib.h>
600# include <stddef.h>
601#else
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000602# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000603# include <stdlib.h>
604# endif
605#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000606#ifdef HAVE_STRING_H
607# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000608# include <memory.h>
609# endif
610# include <string.h>
611#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000612#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000613# include <strings.h>
614#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000615#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000616# include <inttypes.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +0000617#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000618#ifdef HAVE_STDINT_H
619# include <stdint.h>
620#endif
621#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000622# include <unistd.h>
623#endif"
624
Matthias Kloseb9621712010-04-24 17:59:49 +0000625ac_subst_vars='LTLIBOBJS
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000626SRCDIRS
Matthias Kloseb9621712010-04-24 17:59:49 +0000627THREADHEADERS
doko@python.org87421192013-01-26 11:39:31 +0100628LIBPL
629PY_ENABLE_SHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700630EXT_SUFFIX
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000631SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000632LIBC
633LIBM
634HAVE_GETHOSTBYNAME
635HAVE_GETHOSTBYNAME_R
636HAVE_GETHOSTBYNAME_R_3_ARG
637HAVE_GETHOSTBYNAME_R_5_ARG
638HAVE_GETHOSTBYNAME_R_6_ARG
639LIBOBJS
640TRUE
641MACHDEP_OBJS
642DYNLOADFILE
643DLINCLDIR
644THREADOBJ
645LDLAST
646USE_THREAD_MODULE
647SIGNAL_OBJS
648USE_SIGNAL_MODULE
Ned Deilyd819b932013-09-06 01:07:05 -0700649TCLTK_LIBS
650TCLTK_INCLUDES
Matthias Kloseb9621712010-04-24 17:59:49 +0000651LIBFFI_INCLUDEDIR
652PKG_CONFIG
653SHLIBS
654CFLAGSFORSHARED
655LINKFORSHARED
656CCSHARED
657BLDSHARED
658LDCXXSHARED
659LDSHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700660SHLIB_SUFFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000661LIBTOOL_CRUFT
662OTHER_LIBTOOL_OPT
663UNIVERSAL_ARCH_FLAGS
664BASECFLAGS
665OPT
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000666ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000667LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100668MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000669INSTALL_DATA
670INSTALL_SCRIPT
671INSTALL_PROGRAM
Matthias Klosec4c48422012-10-21 23:05:35 +0200672PYTHON
673ASDLGEN
doko@ubuntu.com58844492012-06-30 18:25:32 +0200674ac_ct_READELF
675READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000676ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200677ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000678AR
679RANLIB
Daniel Stutzbacha606faa2010-08-31 19:51:07 +0000680USE_INLINE
Matthias Kloseb9621712010-04-24 17:59:49 +0000681GNULD
682LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000683LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000684RUNSHARED
685INSTSONAME
686LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000687PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000688BLDLIBRARY
689DLLLIBRARY
690LDLIBRARY
691LIBRARY
doko@python.org3e6e2ac2013-01-25 13:12:29 +0100692MULTIARCH
Matthias Kloseb9621712010-04-24 17:59:49 +0000693BUILDEXEEXT
694EGREP
695GREP
696CPP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200697NO_AS_NEEDED
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200698ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000699MAINCC
700CXX
701OBJEXT
702EXEEXT
703ac_ct_CC
704CPPFLAGS
705LDFLAGS
706CFLAGS
707CC
708EXPORT_MACOSX_DEPLOYMENT_TARGET
709CONFIGURE_MACOSX_DEPLOYMENT_TARGET
710SGI_ABI
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200711_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000712MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000713FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000714FRAMEWORKUNIXTOOLSPREFIX
715FRAMEWORKALTINSTALLLAST
716FRAMEWORKALTINSTALLFIRST
717FRAMEWORKINSTALLLAST
718FRAMEWORKINSTALLFIRST
719PYTHONFRAMEWORKINSTALLDIR
720PYTHONFRAMEWORKPREFIX
721PYTHONFRAMEWORKDIR
722PYTHONFRAMEWORKIDENTIFIER
723PYTHONFRAMEWORK
724LIPO_32BIT_FLAGS
725ARCH_RUN_32BIT
726UNIVERSALSDK
727CONFIG_ARGS
728SOVERSION
729VERSION
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200730PYTHON_FOR_BUILD
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100731host_os
732host_vendor
733host_cpu
734host
735build_os
736build_vendor
737build_cpu
738build
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -0500739HAS_HG
740HGBRANCH
741HGTAG
742HGVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400743BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000744target_alias
745host_alias
746build_alias
747LIBS
748ECHO_T
749ECHO_N
750ECHO_C
751DEFS
752mandir
753localedir
754libdir
755psdir
756pdfdir
757dvidir
758htmldir
759infodir
760docdir
761oldincludedir
762includedir
763localstatedir
764sharedstatedir
765sysconfdir
766datadir
767datarootdir
768libexecdir
769sbindir
770bindir
771program_transform_name
772prefix
773exec_prefix
774PACKAGE_URL
775PACKAGE_BUGREPORT
776PACKAGE_STRING
777PACKAGE_VERSION
778PACKAGE_TARNAME
779PACKAGE_NAME
780PATH_SEPARATOR
781SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000782ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000783ac_user_opts='
784enable_option_checking
785enable_universalsdk
786with_universal_archs
787with_framework_name
788enable_framework
789with_gcc
790with_cxx_main
791with_suffix
792enable_shared
793enable_profiling
794with_pydebug
795with_libs
796with_system_expat
797with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100798with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000799enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700800with_tcltk_includes
801with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000802with_dbmliborder
803with_signal_module
Matthias Kloseb9621712010-04-24 17:59:49 +0000804with_threads
805with_thread
806enable_ipv6
807with_doc_strings
808with_tsc
809with_pymalloc
810with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000811with_fpectl
812with_libm
813with_libc
814enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000815with_computed_gotos
816'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000817 ac_precious_vars='build_alias
818host_alias
819target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100820MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000821CC
822CFLAGS
823LDFLAGS
824LIBS
825CPPFLAGS
Charles-François Natali47413c12011-10-06 19:47:44 +0200826CPP'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000827
Guido van Rossum627b2d71993-12-24 10:39:16 +0000828
Guido van Rossum7f43da71994-08-01 12:15:30 +0000829# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000830ac_init_help=
831ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000832ac_unrecognized_opts=
833ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000834# The variables have the same names as the options, with
835# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000836cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000837exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000838no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000839no_recursion=
840prefix=NONE
841program_prefix=NONE
842program_suffix=NONE
843program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000844silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000845site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000846srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000847verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000848x_includes=NONE
849x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000850
851# Installation directory options.
852# These are left unexpanded so users can "make install exec_prefix=/foo"
853# and all the variables that are supposed to be based on exec_prefix
854# by default will actually change.
855# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000856# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000857bindir='${exec_prefix}/bin'
858sbindir='${exec_prefix}/sbin'
859libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000860datarootdir='${prefix}/share'
861datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000862sysconfdir='${prefix}/etc'
863sharedstatedir='${prefix}/com'
864localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000865includedir='${prefix}/include'
866oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000867docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
868infodir='${datarootdir}/info'
869htmldir='${docdir}'
870dvidir='${docdir}'
871pdfdir='${docdir}'
872psdir='${docdir}'
873libdir='${exec_prefix}/lib'
874localedir='${datarootdir}/locale'
875mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000876
Guido van Rossum7f43da71994-08-01 12:15:30 +0000877ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000878ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000879for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000880do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000881 # If the previous option needs an argument, assign it.
882 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000883 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000884 ac_prev=
885 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000886 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000887
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000888 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200889 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
890 *=) ac_optarg= ;;
891 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000892 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000893
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000894 # Accept the important Cygnus configure options, so we can diagnose typos.
895
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000896 case $ac_dashdash$ac_option in
897 --)
898 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000899
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000900 -bindir | --bindir | --bindi | --bind | --bin | --bi)
901 ac_prev=bindir ;;
902 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000903 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000904
905 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000906 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000907 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000908 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000909
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000910 -cache-file | --cache-file | --cache-fil | --cache-fi \
911 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
912 ac_prev=cache_file ;;
913 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
914 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000915 cache_file=$ac_optarg ;;
916
917 --config-cache | -C)
918 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000919
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000920 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000921 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000922 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000923 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000924
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000925 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
926 | --dataroo | --dataro | --datar)
927 ac_prev=datarootdir ;;
928 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
929 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
930 datarootdir=$ac_optarg ;;
931
Guido van Rossum7f43da71994-08-01 12:15:30 +0000932 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000933 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000934 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000935 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200936 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000937 ac_useropt_orig=$ac_useropt
938 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
939 case $ac_user_opts in
940 *"
941"enable_$ac_useropt"
942"*) ;;
943 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
944 ac_unrecognized_sep=', ';;
945 esac
946 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000947
948 -docdir | --docdir | --docdi | --doc | --do)
949 ac_prev=docdir ;;
950 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
951 docdir=$ac_optarg ;;
952
953 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
954 ac_prev=dvidir ;;
955 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
956 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000957
958 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000959 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000960 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000961 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200962 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000963 ac_useropt_orig=$ac_useropt
964 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
965 case $ac_user_opts in
966 *"
967"enable_$ac_useropt"
968"*) ;;
969 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
970 ac_unrecognized_sep=', ';;
971 esac
972 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000973
Guido van Rossum7f43da71994-08-01 12:15:30 +0000974 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
975 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
976 | --exec | --exe | --ex)
977 ac_prev=exec_prefix ;;
978 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
979 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
980 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000981 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000982
983 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000984 # Obsolete; use --with-gas.
985 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000986
Martin v. Löwis11437992002-04-12 09:54:03 +0000987 -help | --help | --hel | --he | -h)
988 ac_init_help=long ;;
989 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
990 ac_init_help=recursive ;;
991 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
992 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000993
994 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000995 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000996 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000997 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000998
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000999 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1000 ac_prev=htmldir ;;
1001 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1002 | --ht=*)
1003 htmldir=$ac_optarg ;;
1004
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001005 -includedir | --includedir | --includedi | --included | --include \
1006 | --includ | --inclu | --incl | --inc)
1007 ac_prev=includedir ;;
1008 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1009 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001010 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001011
1012 -infodir | --infodir | --infodi | --infod | --info | --inf)
1013 ac_prev=infodir ;;
1014 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001015 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001016
1017 -libdir | --libdir | --libdi | --libd)
1018 ac_prev=libdir ;;
1019 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001020 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001021
1022 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1023 | --libexe | --libex | --libe)
1024 ac_prev=libexecdir ;;
1025 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1026 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001027 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001028
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001029 -localedir | --localedir | --localedi | --localed | --locale)
1030 ac_prev=localedir ;;
1031 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1032 localedir=$ac_optarg ;;
1033
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001034 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001035 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001036 ac_prev=localstatedir ;;
1037 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001038 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001039 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001040
1041 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1042 ac_prev=mandir ;;
1043 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001044 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001045
Guido van Rossum7f43da71994-08-01 12:15:30 +00001046 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001047 # Obsolete; use --without-fp.
1048 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001049
1050 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001051 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001052 no_create=yes ;;
1053
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001054 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1055 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1056 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001057
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001058 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1059 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1060 | --oldin | --oldi | --old | --ol | --o)
1061 ac_prev=oldincludedir ;;
1062 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1063 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1064 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001065 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001066
Guido van Rossum7f43da71994-08-01 12:15:30 +00001067 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1068 ac_prev=prefix ;;
1069 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001070 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001071
1072 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1073 | --program-pre | --program-pr | --program-p)
1074 ac_prev=program_prefix ;;
1075 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1076 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001077 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001078
1079 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1080 | --program-suf | --program-su | --program-s)
1081 ac_prev=program_suffix ;;
1082 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1083 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001084 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001085
1086 -program-transform-name | --program-transform-name \
1087 | --program-transform-nam | --program-transform-na \
1088 | --program-transform-n | --program-transform- \
1089 | --program-transform | --program-transfor \
1090 | --program-transfo | --program-transf \
1091 | --program-trans | --program-tran \
1092 | --progr-tra | --program-tr | --program-t)
1093 ac_prev=program_transform_name ;;
1094 -program-transform-name=* | --program-transform-name=* \
1095 | --program-transform-nam=* | --program-transform-na=* \
1096 | --program-transform-n=* | --program-transform-=* \
1097 | --program-transform=* | --program-transfor=* \
1098 | --program-transfo=* | --program-transf=* \
1099 | --program-trans=* | --program-tran=* \
1100 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001101 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001102
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001103 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1104 ac_prev=pdfdir ;;
1105 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1106 pdfdir=$ac_optarg ;;
1107
1108 -psdir | --psdir | --psdi | --psd | --ps)
1109 ac_prev=psdir ;;
1110 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1111 psdir=$ac_optarg ;;
1112
Guido van Rossum7f43da71994-08-01 12:15:30 +00001113 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1114 | -silent | --silent | --silen | --sile | --sil)
1115 silent=yes ;;
1116
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001117 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1118 ac_prev=sbindir ;;
1119 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1120 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001121 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001122
1123 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1124 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1125 | --sharedst | --shareds | --shared | --share | --shar \
1126 | --sha | --sh)
1127 ac_prev=sharedstatedir ;;
1128 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1129 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1130 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1131 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001132 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001133
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001134 -site | --site | --sit)
1135 ac_prev=site ;;
1136 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001137 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001138
Guido van Rossum7f43da71994-08-01 12:15:30 +00001139 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1140 ac_prev=srcdir ;;
1141 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001142 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001143
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001144 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1145 | --syscon | --sysco | --sysc | --sys | --sy)
1146 ac_prev=sysconfdir ;;
1147 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1148 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001149 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001150
Guido van Rossum7f43da71994-08-01 12:15:30 +00001151 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001152 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001153 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001154 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001155
1156 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1157 verbose=yes ;;
1158
Martin v. Löwis11437992002-04-12 09:54:03 +00001159 -version | --version | --versio | --versi | --vers | -V)
1160 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001161
1162 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001163 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001164 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001165 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001166 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001167 ac_useropt_orig=$ac_useropt
1168 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1169 case $ac_user_opts in
1170 *"
1171"with_$ac_useropt"
1172"*) ;;
1173 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1174 ac_unrecognized_sep=', ';;
1175 esac
1176 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001177
1178 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001179 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001180 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001181 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001182 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001183 ac_useropt_orig=$ac_useropt
1184 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1185 case $ac_user_opts in
1186 *"
1187"with_$ac_useropt"
1188"*) ;;
1189 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1190 ac_unrecognized_sep=', ';;
1191 esac
1192 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001193
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001194 --x)
1195 # Obsolete; use --with-x.
1196 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001197
1198 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1199 | --x-incl | --x-inc | --x-in | --x-i)
1200 ac_prev=x_includes ;;
1201 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1202 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001203 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001204
1205 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1206 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1207 ac_prev=x_libraries ;;
1208 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1209 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001210 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001211
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001212 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1213Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001214 ;;
1215
Martin v. Löwis11437992002-04-12 09:54:03 +00001216 *=*)
1217 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1218 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001219 case $ac_envvar in #(
1220 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001221 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001222 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001223 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001224 export $ac_envvar ;;
1225
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001226 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001227 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001228 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001229 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001230 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001231 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001232 ;;
1233
1234 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001235done
1236
Guido van Rossum7f43da71994-08-01 12:15:30 +00001237if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001238 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001239 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001240fi
1241
Matthias Kloseb9621712010-04-24 17:59:49 +00001242if test -n "$ac_unrecognized_opts"; then
1243 case $enable_option_checking in
1244 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001245 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001246 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1247 esac
1248fi
1249
1250# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001251for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1252 datadir sysconfdir sharedstatedir localstatedir includedir \
1253 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1254 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001255do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001256 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001257 # Remove trailing slashes.
1258 case $ac_val in
1259 */ )
1260 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1261 eval $ac_var=\$ac_val;;
1262 esac
1263 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001264 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001265 [\\/$]* | ?:[\\/]* ) continue;;
1266 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001267 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001268 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001269done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001270
Martin v. Löwis11437992002-04-12 09:54:03 +00001271# There might be people who depend on the old broken behavior: `$host'
1272# used to hold the argument of --host etc.
1273# FIXME: To remove some day.
1274build=$build_alias
1275host=$host_alias
1276target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001277
Martin v. Löwis11437992002-04-12 09:54:03 +00001278# FIXME: To remove some day.
1279if test "x$host_alias" != x; then
1280 if test "x$build_alias" = x; then
1281 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001282 elif test "x$build_alias" != "x$host_alias"; then
1283 cross_compiling=yes
1284 fi
1285fi
1286
1287ac_tool_prefix=
1288test -n "$host_alias" && ac_tool_prefix=$host_alias-
1289
1290test "$silent" = yes && exec 6>/dev/null
1291
Guido van Rossum627b2d71993-12-24 10:39:16 +00001292
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001293ac_pwd=`pwd` && test -n "$ac_pwd" &&
1294ac_ls_di=`ls -di .` &&
1295ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001296 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001297test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001298 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001299
1300
Guido van Rossum627b2d71993-12-24 10:39:16 +00001301# Find the source files, if location was not specified.
1302if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001303 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001304 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001305 ac_confdir=`$as_dirname -- "$as_myself" ||
1306$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1307 X"$as_myself" : 'X\(//\)[^/]' \| \
1308 X"$as_myself" : 'X\(//\)$' \| \
1309 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1310$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001311 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1312 s//\1/
1313 q
1314 }
1315 /^X\(\/\/\)[^/].*/{
1316 s//\1/
1317 q
1318 }
1319 /^X\(\/\/\)$/{
1320 s//\1/
1321 q
1322 }
1323 /^X\(\/\).*/{
1324 s//\1/
1325 q
1326 }
1327 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001328 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001329 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001330 srcdir=..
1331 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001332else
1333 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001334fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001335if test ! -r "$srcdir/$ac_unique_file"; then
1336 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001337 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001338fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001339ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1340ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001341 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001342 pwd)`
1343# When building in place, set srcdir=.
1344if test "$ac_abs_confdir" = "$ac_pwd"; then
1345 srcdir=.
1346fi
1347# Remove unnecessary trailing slashes from srcdir.
1348# Double slashes in file names in object file debugging info
1349# mess up M-x gdb in Emacs.
1350case $srcdir in
1351*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1352esac
1353for ac_var in $ac_precious_vars; do
1354 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1355 eval ac_env_${ac_var}_value=\$${ac_var}
1356 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1357 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1358done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001359
Martin v. Löwis11437992002-04-12 09:54:03 +00001360#
1361# Report the --help message.
1362#
1363if test "$ac_init_help" = "long"; then
1364 # Omit some internal or obsolete options to make the list less imposing.
1365 # This message is too long to be a string in the A/UX 3.1 sh.
1366 cat <<_ACEOF
Georg Brandl08a90122012-09-29 09:34:13 +02001367\`configure' configures python 3.4 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001368
1369Usage: $0 [OPTION]... [VAR=VALUE]...
1370
1371To assign environment variables (e.g., CC, CFLAGS...), specify them as
1372VAR=VALUE. See below for descriptions of some of the useful variables.
1373
1374Defaults for the options are specified in brackets.
1375
1376Configuration:
1377 -h, --help display this help and exit
1378 --help=short display options specific to this package
1379 --help=recursive display the short help of all the included packages
1380 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001381 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001382 --cache-file=FILE cache test results in FILE [disabled]
1383 -C, --config-cache alias for \`--cache-file=config.cache'
1384 -n, --no-create do not create output files
1385 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1386
Martin v. Löwis11437992002-04-12 09:54:03 +00001387Installation directories:
1388 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001389 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001390 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001391 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001392
1393By default, \`make install' will install all the files in
1394\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1395an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1396for instance \`--prefix=\$HOME'.
1397
1398For better control, use the options below.
1399
1400Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001401 --bindir=DIR user executables [EPREFIX/bin]
1402 --sbindir=DIR system admin executables [EPREFIX/sbin]
1403 --libexecdir=DIR program executables [EPREFIX/libexec]
1404 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1405 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1406 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1407 --libdir=DIR object code libraries [EPREFIX/lib]
1408 --includedir=DIR C header files [PREFIX/include]
1409 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1410 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1411 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1412 --infodir=DIR info documentation [DATAROOTDIR/info]
1413 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1414 --mandir=DIR man documentation [DATAROOTDIR/man]
1415 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1416 --htmldir=DIR html documentation [DOCDIR]
1417 --dvidir=DIR dvi documentation [DOCDIR]
1418 --pdfdir=DIR pdf documentation [DOCDIR]
1419 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001420_ACEOF
1421
1422 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001423
1424System types:
1425 --build=BUILD configure for building on BUILD [guessed]
1426 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001427_ACEOF
1428fi
1429
1430if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001431 case $ac_init_help in
Georg Brandl08a90122012-09-29 09:34:13 +02001432 short | recursive ) echo "Configuration of python 3.4:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001433 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001434 cat <<\_ACEOF
1435
1436Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001437 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001438 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1439 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001440 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001441 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001442 --enable-framework[=INSTALLDIR]
1443 Build (MacOSX|Darwin) framework
1444 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001445 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001446 --enable-loadable-sqlite-extensions
1447 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001448 --enable-ipv6 Enable ipv6 (with ipv4) support
1449 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001450 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001451 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001452
1453Optional Packages:
1454 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1455 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001456 --with-universal-archs=ARCH
1457 select architectures for universal build ("32-bit",
Ronald Oussoren3c064c12009-09-08 07:12:42 +00001458 "64-bit", "3-way", "intel" or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001459 --with-framework-name=FRAMEWORK
1460 specify an alternate name of the framework built
1461 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001462 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001463 --with-cxx-main=<compiler>
1464 compile main() and link python executable with C++
1465 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001466 --with-suffix=.exe set executable suffix
1467 --with-pydebug build with Py_DEBUG defined
1468 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001469 --with-system-expat build pyexpat module using an installed expat
1470 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001471 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001472 --with-system-libmpdec build _decimal module using an installed libmpdec
1473 library
Ned Deilyd819b932013-09-06 01:07:05 -07001474 --with-tcltk-includes='-I...'
1475 override search for Tcl and Tk include files
1476 --with-tcltk-libs='-L...'
1477 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001478 --with-dbmliborder=db1:db2:...
1479 order to check db backends for dbm. Valid value is a
1480 colon separated string with the backend names
1481 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001482 --with-signal-module disable/enable signal module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001483 --with(out)-threads[=DIRECTORY]
1484 disable/enable thread support
1485 --with(out)-thread[=DIRECTORY]
1486 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001487 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001488 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001489 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001490 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001491 --with-fpectl enable SIGFPE catching
1492 --with-libm=STRING math library
1493 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001494 --with(out)-computed-gotos
1495 Use computed gotos in evaluation loop (enabled by
1496 default on supported compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001497
1498Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001499 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001500 CC C compiler command
1501 CFLAGS C compiler flags
1502 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1503 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001504 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001505 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001506 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001507 CPP C preprocessor
1508
1509Use these variables to override the choices made by `configure' or to help
1510it to find libraries and programs with nonstandard names/locations.
1511
Georg Brandle2e15612009-05-20 18:25:10 +00001512Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001513_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001514ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001515fi
1516
1517if test "$ac_init_help" = "recursive"; then
1518 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001519 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001520 test -d "$ac_dir" ||
1521 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1522 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001523 ac_builddir=.
1524
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001525case "$ac_dir" in
1526.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1527*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001528 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001529 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001530 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001531 case $ac_top_builddir_sub in
1532 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1533 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1534 esac ;;
1535esac
1536ac_abs_top_builddir=$ac_pwd
1537ac_abs_builddir=$ac_pwd$ac_dir_suffix
1538# for backward compatibility:
1539ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001540
1541case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001542 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001543 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001544 ac_top_srcdir=$ac_top_builddir_sub
1545 ac_abs_top_srcdir=$ac_pwd ;;
1546 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001547 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001548 ac_top_srcdir=$srcdir
1549 ac_abs_top_srcdir=$srcdir ;;
1550 *) # Relative name.
1551 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1552 ac_top_srcdir=$ac_top_build_prefix$srcdir
1553 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001554esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001555ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001556
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001557 cd "$ac_dir" || { ac_status=$?; continue; }
1558 # Check for guested configure.
1559 if test -f "$ac_srcdir/configure.gnu"; then
1560 echo &&
1561 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1562 elif test -f "$ac_srcdir/configure"; then
1563 echo &&
1564 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001565 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001566 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001567 fi || ac_status=$?
1568 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001569 done
1570fi
1571
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001572test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001573if $ac_init_version; then
1574 cat <<\_ACEOF
Georg Brandl08a90122012-09-29 09:34:13 +02001575python configure 3.4
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001576generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001577
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001578Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001579This configure script is free software; the Free Software Foundation
1580gives unlimited permission to copy, distribute and modify it.
1581_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001582 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001583fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001584
1585## ------------------------ ##
1586## Autoconf initialization. ##
1587## ------------------------ ##
1588
1589# ac_fn_c_try_compile LINENO
1590# --------------------------
1591# Try to compile conftest.$ac_ext, and return whether this succeeded.
1592ac_fn_c_try_compile ()
1593{
1594 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1595 rm -f conftest.$ac_objext
1596 if { { ac_try="$ac_compile"
1597case "(($ac_try" in
1598 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1599 *) ac_try_echo=$ac_try;;
1600esac
1601eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1602$as_echo "$ac_try_echo"; } >&5
1603 (eval "$ac_compile") 2>conftest.err
1604 ac_status=$?
1605 if test -s conftest.err; then
1606 grep -v '^ *+' conftest.err >conftest.er1
1607 cat conftest.er1 >&5
1608 mv -f conftest.er1 conftest.err
1609 fi
1610 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1611 test $ac_status = 0; } && {
1612 test -z "$ac_c_werror_flag" ||
1613 test ! -s conftest.err
1614 } && test -s conftest.$ac_objext; then :
1615 ac_retval=0
1616else
1617 $as_echo "$as_me: failed program was:" >&5
1618sed 's/^/| /' conftest.$ac_ext >&5
1619
1620 ac_retval=1
1621fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001622 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001623 as_fn_set_status $ac_retval
1624
1625} # ac_fn_c_try_compile
1626
Matthias Kloseb9621712010-04-24 17:59:49 +00001627# ac_fn_c_try_link LINENO
1628# -----------------------
1629# Try to link conftest.$ac_ext, and return whether this succeeded.
1630ac_fn_c_try_link ()
1631{
1632 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1633 rm -f conftest.$ac_objext conftest$ac_exeext
1634 if { { ac_try="$ac_link"
1635case "(($ac_try" in
1636 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1637 *) ac_try_echo=$ac_try;;
1638esac
1639eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1640$as_echo "$ac_try_echo"; } >&5
1641 (eval "$ac_link") 2>conftest.err
1642 ac_status=$?
1643 if test -s conftest.err; then
1644 grep -v '^ *+' conftest.err >conftest.er1
1645 cat conftest.er1 >&5
1646 mv -f conftest.er1 conftest.err
1647 fi
1648 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1649 test $ac_status = 0; } && {
1650 test -z "$ac_c_werror_flag" ||
1651 test ! -s conftest.err
1652 } && test -s conftest$ac_exeext && {
1653 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001654 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001655 }; 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
1663 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1664 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1665 # interfere with the next link command; also delete a directory that is
1666 # left behind by Apple's compiler. We do this before executing the actions.
1667 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001668 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001669 as_fn_set_status $ac_retval
1670
1671} # ac_fn_c_try_link
1672
Matthias Kloseb9621712010-04-24 17:59:49 +00001673# ac_fn_c_try_cpp LINENO
1674# ----------------------
1675# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1676ac_fn_c_try_cpp ()
1677{
1678 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1679 if { { ac_try="$ac_cpp conftest.$ac_ext"
1680case "(($ac_try" in
1681 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1682 *) ac_try_echo=$ac_try;;
1683esac
1684eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1685$as_echo "$ac_try_echo"; } >&5
1686 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1687 ac_status=$?
1688 if test -s conftest.err; then
1689 grep -v '^ *+' conftest.err >conftest.er1
1690 cat conftest.er1 >&5
1691 mv -f conftest.er1 conftest.err
1692 fi
1693 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001694 test $ac_status = 0; } > conftest.i && {
Matthias Kloseb9621712010-04-24 17:59:49 +00001695 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1696 test ! -s conftest.err
1697 }; then :
1698 ac_retval=0
1699else
1700 $as_echo "$as_me: failed program was:" >&5
1701sed 's/^/| /' conftest.$ac_ext >&5
1702
1703 ac_retval=1
1704fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001705 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001706 as_fn_set_status $ac_retval
1707
1708} # ac_fn_c_try_cpp
1709
1710# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1711# -------------------------------------------------------
1712# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1713# the include files in INCLUDES and setting the cache variable VAR
1714# accordingly.
1715ac_fn_c_check_header_mongrel ()
1716{
1717 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001718 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001719 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1720$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001721if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001722 $as_echo_n "(cached) " >&6
1723fi
1724eval ac_res=\$$3
1725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1726$as_echo "$ac_res" >&6; }
1727else
1728 # Is the header compilable?
1729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1730$as_echo_n "checking $2 usability... " >&6; }
1731cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1732/* end confdefs.h. */
1733$4
1734#include <$2>
1735_ACEOF
1736if ac_fn_c_try_compile "$LINENO"; then :
1737 ac_header_compiler=yes
1738else
1739 ac_header_compiler=no
1740fi
1741rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1742{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1743$as_echo "$ac_header_compiler" >&6; }
1744
1745# Is the header present?
1746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1747$as_echo_n "checking $2 presence... " >&6; }
1748cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1749/* end confdefs.h. */
1750#include <$2>
1751_ACEOF
1752if ac_fn_c_try_cpp "$LINENO"; then :
1753 ac_header_preproc=yes
1754else
1755 ac_header_preproc=no
1756fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001757rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001758{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1759$as_echo "$ac_header_preproc" >&6; }
1760
1761# So? What about this header?
1762case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1763 yes:no: )
1764 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1765$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1766 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1767$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1768 ;;
1769 no:yes:* )
1770 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1771$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1772 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1773$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1774 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1775$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1776 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1777$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1778 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1779$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001780( $as_echo "## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001781## Report this to http://bugs.python.org/ ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001782## -------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001783 ) | sed "s/^/$as_me: WARNING: /" >&2
1784 ;;
1785esac
1786 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1787$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001788if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001789 $as_echo_n "(cached) " >&6
1790else
1791 eval "$3=\$ac_header_compiler"
1792fi
1793eval ac_res=\$$3
1794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1795$as_echo "$ac_res" >&6; }
1796fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001797 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001798
1799} # ac_fn_c_check_header_mongrel
1800
1801# ac_fn_c_try_run LINENO
1802# ----------------------
1803# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1804# that executables *can* be run.
1805ac_fn_c_try_run ()
1806{
1807 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1808 if { { ac_try="$ac_link"
1809case "(($ac_try" in
1810 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1811 *) ac_try_echo=$ac_try;;
1812esac
1813eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1814$as_echo "$ac_try_echo"; } >&5
1815 (eval "$ac_link") 2>&5
1816 ac_status=$?
1817 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1818 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1819 { { case "(($ac_try" in
1820 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1821 *) ac_try_echo=$ac_try;;
1822esac
1823eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1824$as_echo "$ac_try_echo"; } >&5
1825 (eval "$ac_try") 2>&5
1826 ac_status=$?
1827 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1828 test $ac_status = 0; }; }; then :
1829 ac_retval=0
1830else
1831 $as_echo "$as_me: program exited with status $ac_status" >&5
1832 $as_echo "$as_me: failed program was:" >&5
1833sed 's/^/| /' conftest.$ac_ext >&5
1834
1835 ac_retval=$ac_status
1836fi
1837 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001838 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001839 as_fn_set_status $ac_retval
1840
1841} # ac_fn_c_try_run
1842
1843# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1844# -------------------------------------------------------
1845# Tests whether HEADER exists and can be compiled using the include files in
1846# INCLUDES, setting the cache variable VAR accordingly.
1847ac_fn_c_check_header_compile ()
1848{
1849 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1850 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1851$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001852if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001853 $as_echo_n "(cached) " >&6
1854else
1855 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1856/* end confdefs.h. */
1857$4
1858#include <$2>
1859_ACEOF
1860if ac_fn_c_try_compile "$LINENO"; then :
1861 eval "$3=yes"
1862else
1863 eval "$3=no"
1864fi
1865rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1866fi
1867eval ac_res=\$$3
1868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1869$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001870 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001871
1872} # ac_fn_c_check_header_compile
1873
Matthias Kloseb9621712010-04-24 17:59:49 +00001874# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1875# -------------------------------------------
1876# Tests whether TYPE exists after having included INCLUDES, setting cache
1877# variable VAR accordingly.
1878ac_fn_c_check_type ()
1879{
1880 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1881 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1882$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001883if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001884 $as_echo_n "(cached) " >&6
1885else
1886 eval "$3=no"
1887 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1888/* end confdefs.h. */
1889$4
1890int
1891main ()
1892{
1893if (sizeof ($2))
1894 return 0;
1895 ;
1896 return 0;
1897}
1898_ACEOF
1899if ac_fn_c_try_compile "$LINENO"; then :
1900 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1901/* end confdefs.h. */
1902$4
1903int
1904main ()
1905{
1906if (sizeof (($2)))
1907 return 0;
1908 ;
1909 return 0;
1910}
1911_ACEOF
1912if ac_fn_c_try_compile "$LINENO"; then :
1913
1914else
1915 eval "$3=yes"
1916fi
1917rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1918fi
1919rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1920fi
1921eval ac_res=\$$3
1922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1923$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001924 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001925
1926} # ac_fn_c_check_type
1927
1928# ac_fn_c_find_uintX_t LINENO BITS VAR
1929# ------------------------------------
1930# Finds an unsigned integer type with width BITS, setting cache variable VAR
1931# accordingly.
1932ac_fn_c_find_uintX_t ()
1933{
1934 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1935 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1936$as_echo_n "checking for uint$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001937if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001938 $as_echo_n "(cached) " >&6
1939else
1940 eval "$3=no"
1941 # Order is important - never check a type that is potentially smaller
1942 # than half of the expected target width.
1943 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1944 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1945 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1946/* end confdefs.h. */
1947$ac_includes_default
1948int
1949main ()
1950{
1951static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001952test_array [0] = 0;
1953return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00001954
1955 ;
1956 return 0;
1957}
1958_ACEOF
1959if ac_fn_c_try_compile "$LINENO"; then :
1960 case $ac_type in #(
1961 uint$2_t) :
1962 eval "$3=yes" ;; #(
1963 *) :
1964 eval "$3=\$ac_type" ;;
1965esac
1966fi
1967rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001968 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001969
1970else
1971 break
1972fi
1973 done
1974fi
1975eval ac_res=\$$3
1976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1977$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001978 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001979
1980} # ac_fn_c_find_uintX_t
1981
1982# ac_fn_c_find_intX_t LINENO BITS VAR
1983# -----------------------------------
1984# Finds a signed integer type with width BITS, setting cache variable VAR
1985# accordingly.
1986ac_fn_c_find_intX_t ()
1987{
1988 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1989 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1990$as_echo_n "checking for int$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001991if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001992 $as_echo_n "(cached) " >&6
1993else
1994 eval "$3=no"
1995 # Order is important - never check a type that is potentially smaller
1996 # than half of the expected target width.
1997 for ac_type in int$2_t 'int' 'long int' \
1998 'long long int' 'short int' 'signed char'; do
1999 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2000/* end confdefs.h. */
2001$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002002 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00002003int
2004main ()
2005{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002006static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002007test_array [0] = 0;
2008return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002009
2010 ;
2011 return 0;
2012}
2013_ACEOF
2014if ac_fn_c_try_compile "$LINENO"; then :
2015 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2016/* end confdefs.h. */
2017$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002018 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00002019int
2020main ()
2021{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002022static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00002023 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002024test_array [0] = 0;
2025return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002026
2027 ;
2028 return 0;
2029}
2030_ACEOF
2031if ac_fn_c_try_compile "$LINENO"; then :
2032
2033else
2034 case $ac_type in #(
2035 int$2_t) :
2036 eval "$3=yes" ;; #(
2037 *) :
2038 eval "$3=\$ac_type" ;;
2039esac
2040fi
2041rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2042fi
2043rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002044 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002045
2046else
2047 break
2048fi
2049 done
2050fi
2051eval ac_res=\$$3
2052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2053$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002054 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002055
2056} # ac_fn_c_find_intX_t
2057
2058# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2059# --------------------------------------------
2060# Tries to find the compile-time value of EXPR in a program that includes
2061# INCLUDES, setting VAR accordingly. Returns whether the value could be
2062# computed
2063ac_fn_c_compute_int ()
2064{
2065 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2066 if test "$cross_compiling" = yes; then
2067 # Depending upon the size, compute the lo and hi bounds.
2068cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2069/* end confdefs.h. */
2070$4
2071int
2072main ()
2073{
2074static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002075test_array [0] = 0;
2076return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002077
2078 ;
2079 return 0;
2080}
2081_ACEOF
2082if ac_fn_c_try_compile "$LINENO"; then :
2083 ac_lo=0 ac_mid=0
2084 while :; do
2085 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2086/* end confdefs.h. */
2087$4
2088int
2089main ()
2090{
2091static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002092test_array [0] = 0;
2093return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002094
2095 ;
2096 return 0;
2097}
2098_ACEOF
2099if ac_fn_c_try_compile "$LINENO"; then :
2100 ac_hi=$ac_mid; break
2101else
2102 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2103 if test $ac_lo -le $ac_mid; then
2104 ac_lo= ac_hi=
2105 break
2106 fi
2107 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2108fi
2109rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2110 done
2111else
2112 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2113/* end confdefs.h. */
2114$4
2115int
2116main ()
2117{
2118static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002119test_array [0] = 0;
2120return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002121
2122 ;
2123 return 0;
2124}
2125_ACEOF
2126if ac_fn_c_try_compile "$LINENO"; then :
2127 ac_hi=-1 ac_mid=-1
2128 while :; do
2129 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2130/* end confdefs.h. */
2131$4
2132int
2133main ()
2134{
2135static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002136test_array [0] = 0;
2137return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002138
2139 ;
2140 return 0;
2141}
2142_ACEOF
2143if ac_fn_c_try_compile "$LINENO"; then :
2144 ac_lo=$ac_mid; break
2145else
2146 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2147 if test $ac_mid -le $ac_hi; then
2148 ac_lo= ac_hi=
2149 break
2150 fi
2151 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2152fi
2153rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2154 done
2155else
2156 ac_lo= ac_hi=
2157fi
2158rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2159fi
2160rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2161# Binary search between lo and hi bounds.
2162while test "x$ac_lo" != "x$ac_hi"; do
2163 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2164 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2165/* end confdefs.h. */
2166$4
2167int
2168main ()
2169{
2170static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002171test_array [0] = 0;
2172return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002173
2174 ;
2175 return 0;
2176}
2177_ACEOF
2178if ac_fn_c_try_compile "$LINENO"; then :
2179 ac_hi=$ac_mid
2180else
2181 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2182fi
2183rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2184done
2185case $ac_lo in #((
2186?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2187'') ac_retval=1 ;;
2188esac
2189 else
2190 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2191/* end confdefs.h. */
2192$4
2193static long int longval () { return $2; }
2194static unsigned long int ulongval () { return $2; }
2195#include <stdio.h>
2196#include <stdlib.h>
2197int
2198main ()
2199{
2200
2201 FILE *f = fopen ("conftest.val", "w");
2202 if (! f)
2203 return 1;
2204 if (($2) < 0)
2205 {
2206 long int i = longval ();
2207 if (i != ($2))
2208 return 1;
2209 fprintf (f, "%ld", i);
2210 }
2211 else
2212 {
2213 unsigned long int i = ulongval ();
2214 if (i != ($2))
2215 return 1;
2216 fprintf (f, "%lu", i);
2217 }
2218 /* Do not output a trailing newline, as this causes \r\n confusion
2219 on some platforms. */
2220 return ferror (f) || fclose (f) != 0;
2221
2222 ;
2223 return 0;
2224}
2225_ACEOF
2226if ac_fn_c_try_run "$LINENO"; then :
2227 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2228else
2229 ac_retval=1
2230fi
2231rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2232 conftest.$ac_objext conftest.beam conftest.$ac_ext
2233rm -f conftest.val
2234
2235 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002236 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002237 as_fn_set_status $ac_retval
2238
2239} # ac_fn_c_compute_int
2240
2241# ac_fn_c_check_func LINENO FUNC VAR
2242# ----------------------------------
2243# Tests whether FUNC exists, setting the cache variable VAR accordingly
2244ac_fn_c_check_func ()
2245{
2246 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2247 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2248$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002249if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002250 $as_echo_n "(cached) " >&6
2251else
2252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2253/* end confdefs.h. */
2254/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2255 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2256#define $2 innocuous_$2
2257
2258/* System header to define __stub macros and hopefully few prototypes,
2259 which can conflict with char $2 (); below.
2260 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2261 <limits.h> exists even on freestanding compilers. */
2262
2263#ifdef __STDC__
2264# include <limits.h>
2265#else
2266# include <assert.h>
2267#endif
2268
2269#undef $2
2270
2271/* Override any GCC internal prototype to avoid an error.
2272 Use char because int might match the return type of a GCC
2273 builtin and then its argument prototype would still apply. */
2274#ifdef __cplusplus
2275extern "C"
2276#endif
2277char $2 ();
2278/* The GNU C library defines this for functions which it implements
2279 to always fail with ENOSYS. Some functions are actually named
2280 something starting with __ and the normal name is an alias. */
2281#if defined __stub_$2 || defined __stub___$2
2282choke me
2283#endif
2284
2285int
2286main ()
2287{
2288return $2 ();
2289 ;
2290 return 0;
2291}
2292_ACEOF
2293if ac_fn_c_try_link "$LINENO"; then :
2294 eval "$3=yes"
2295else
2296 eval "$3=no"
2297fi
2298rm -f core conftest.err conftest.$ac_objext \
2299 conftest$ac_exeext conftest.$ac_ext
2300fi
2301eval ac_res=\$$3
2302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2303$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002304 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002305
2306} # ac_fn_c_check_func
2307
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002308# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2309# ---------------------------------------------
2310# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2311# accordingly.
2312ac_fn_c_check_decl ()
2313{
2314 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2315 as_decl_name=`echo $2|sed 's/ *(.*//'`
2316 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2317 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2318$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2319if eval \${$3+:} false; then :
2320 $as_echo_n "(cached) " >&6
2321else
2322 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2323/* end confdefs.h. */
2324$4
2325int
2326main ()
2327{
2328#ifndef $as_decl_name
2329#ifdef __cplusplus
2330 (void) $as_decl_use;
2331#else
2332 (void) $as_decl_name;
2333#endif
2334#endif
2335
2336 ;
2337 return 0;
2338}
2339_ACEOF
2340if ac_fn_c_try_compile "$LINENO"; then :
2341 eval "$3=yes"
2342else
2343 eval "$3=no"
2344fi
2345rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2346fi
2347eval ac_res=\$$3
2348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2349$as_echo "$ac_res" >&6; }
2350 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2351
2352} # ac_fn_c_check_decl
2353
Matthias Kloseb9621712010-04-24 17:59:49 +00002354# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2355# ----------------------------------------------------
2356# Tries to find if the field MEMBER exists in type AGGR, after including
2357# INCLUDES, setting cache variable VAR accordingly.
2358ac_fn_c_check_member ()
2359{
2360 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2361 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2362$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002363if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002364 $as_echo_n "(cached) " >&6
2365else
2366 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2367/* end confdefs.h. */
2368$5
2369int
2370main ()
2371{
2372static $2 ac_aggr;
2373if (ac_aggr.$3)
2374return 0;
2375 ;
2376 return 0;
2377}
2378_ACEOF
2379if ac_fn_c_try_compile "$LINENO"; then :
2380 eval "$4=yes"
2381else
2382 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2383/* end confdefs.h. */
2384$5
2385int
2386main ()
2387{
2388static $2 ac_aggr;
2389if (sizeof ac_aggr.$3)
2390return 0;
2391 ;
2392 return 0;
2393}
2394_ACEOF
2395if ac_fn_c_try_compile "$LINENO"; then :
2396 eval "$4=yes"
2397else
2398 eval "$4=no"
2399fi
2400rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2401fi
2402rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2403fi
2404eval ac_res=\$$4
2405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2406$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002407 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002408
2409} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002410cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002411This file contains any messages produced by compilers while
2412running configure, to aid debugging if configure makes a mistake.
2413
Georg Brandl08a90122012-09-29 09:34:13 +02002414It was created by python $as_me 3.4, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002415generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002416
2417 $ $0 $@
2418
2419_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002420exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002421{
2422cat <<_ASUNAME
2423## --------- ##
2424## Platform. ##
2425## --------- ##
2426
2427hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2428uname -m = `(uname -m) 2>/dev/null || echo unknown`
2429uname -r = `(uname -r) 2>/dev/null || echo unknown`
2430uname -s = `(uname -s) 2>/dev/null || echo unknown`
2431uname -v = `(uname -v) 2>/dev/null || echo unknown`
2432
2433/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2434/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2435
2436/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2437/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2438/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002439/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002440/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2441/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2442/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2443
2444_ASUNAME
2445
2446as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2447for as_dir in $PATH
2448do
2449 IFS=$as_save_IFS
2450 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002451 $as_echo "PATH: $as_dir"
2452 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002453IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002454
2455} >&5
2456
2457cat >&5 <<_ACEOF
2458
2459
2460## ----------- ##
2461## Core tests. ##
2462## ----------- ##
2463
2464_ACEOF
2465
2466
2467# Keep a trace of the command line.
2468# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002469# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002470# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002471# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002472ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002473ac_configure_args0=
2474ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002475ac_must_keep_next=false
2476for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002477do
Skip Montanaro6dead952003-09-25 14:50:04 +00002478 for ac_arg
2479 do
2480 case $ac_arg in
2481 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2482 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2483 | -silent | --silent | --silen | --sile | --sil)
2484 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002485 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002486 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002487 esac
2488 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002489 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002490 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002491 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002492 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002493 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002494 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002495 case $ac_arg in
2496 *=* | --config-cache | -C | -disable-* | --disable-* \
2497 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2498 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2499 | -with-* | --with-* | -without-* | --without-* | --x)
2500 case "$ac_configure_args0 " in
2501 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2502 esac
2503 ;;
2504 -* ) ac_must_keep_next=true ;;
2505 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002506 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002507 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002508 ;;
2509 esac
2510 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002511done
Matthias Kloseb9621712010-04-24 17:59:49 +00002512{ ac_configure_args0=; unset ac_configure_args0;}
2513{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002514
2515# When interrupted or exit'd, cleanup temporary files, and complete
2516# config.log. We remove comments because anyway the quotes in there
2517# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002518# WARNING: Use '\'' to represent an apostrophe within the trap.
2519# 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 +00002520trap 'exit_status=$?
2521 # Save into config.log some information that might help in debugging.
2522 {
2523 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002524
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002525 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002526## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002527## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002528 echo
2529 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002530(
2531 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2532 eval ac_val=\$$ac_var
2533 case $ac_val in #(
2534 *${as_nl}*)
2535 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002536 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2537$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002538 esac
2539 case $ac_var in #(
2540 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002541 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2542 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002543 esac ;;
2544 esac
2545 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002546 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002547 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2548 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002549 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002550 "s/'\''/'\''\\\\'\'''\''/g;
2551 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2552 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002553 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002554 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002555 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002556 esac |
2557 sort
2558)
Martin v. Löwis11437992002-04-12 09:54:03 +00002559 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002560
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002561 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002562## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002563## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002564 echo
2565 for ac_var in $ac_subst_vars
2566 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002567 eval ac_val=\$$ac_var
2568 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002569 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002570 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002571 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002572 done | sort
2573 echo
2574
2575 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002576 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002577## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002578## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002579 echo
2580 for ac_var in $ac_subst_files
2581 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002582 eval ac_val=\$$ac_var
2583 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002584 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002585 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002586 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002587 done | sort
2588 echo
2589 fi
2590
Martin v. Löwis11437992002-04-12 09:54:03 +00002591 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002592 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002593## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002594## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002595 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002596 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002597 echo
2598 fi
2599 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002600 $as_echo "$as_me: caught signal $ac_signal"
2601 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002602 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002603 rm -f core *.core core.conftest.* &&
2604 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002605 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002606' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002607for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002608 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002609done
2610ac_signal=0
2611
2612# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002613rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002614
Matthias Kloseb9621712010-04-24 17:59:49 +00002615$as_echo "/* confdefs.h */" > confdefs.h
2616
Martin v. Löwis11437992002-04-12 09:54:03 +00002617# Predefined preprocessor variables.
2618
2619cat >>confdefs.h <<_ACEOF
2620#define PACKAGE_NAME "$PACKAGE_NAME"
2621_ACEOF
2622
Martin v. Löwis11437992002-04-12 09:54:03 +00002623cat >>confdefs.h <<_ACEOF
2624#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2625_ACEOF
2626
Martin v. Löwis11437992002-04-12 09:54:03 +00002627cat >>confdefs.h <<_ACEOF
2628#define PACKAGE_VERSION "$PACKAGE_VERSION"
2629_ACEOF
2630
Martin v. Löwis11437992002-04-12 09:54:03 +00002631cat >>confdefs.h <<_ACEOF
2632#define PACKAGE_STRING "$PACKAGE_STRING"
2633_ACEOF
2634
Martin v. Löwis11437992002-04-12 09:54:03 +00002635cat >>confdefs.h <<_ACEOF
2636#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2637_ACEOF
2638
Matthias Kloseb9621712010-04-24 17:59:49 +00002639cat >>confdefs.h <<_ACEOF
2640#define PACKAGE_URL "$PACKAGE_URL"
2641_ACEOF
2642
Martin v. Löwis11437992002-04-12 09:54:03 +00002643
2644# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002645# Prefer an explicitly selected file to automatically selected ones.
2646ac_site_file1=NONE
2647ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002648if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002649 # We do not want a PATH search for config.site.
2650 case $CONFIG_SITE in #((
2651 -*) ac_site_file1=./$CONFIG_SITE;;
2652 */*) ac_site_file1=$CONFIG_SITE;;
2653 *) ac_site_file1=./$CONFIG_SITE;;
2654 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002655elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002656 ac_site_file1=$prefix/share/config.site
2657 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002658else
Matthias Kloseb9621712010-04-24 17:59:49 +00002659 ac_site_file1=$ac_default_prefix/share/config.site
2660 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002661fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002662for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002663do
Matthias Kloseb9621712010-04-24 17:59:49 +00002664 test "x$ac_site_file" = xNONE && continue
2665 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2666 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2667$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002668 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002669 . "$ac_site_file" \
2670 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2671$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2672as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002673See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002674 fi
2675done
2676
2677if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002678 # Some versions of bash will fail to source /dev/null (special files
2679 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2680 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2681 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2682$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002683 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002684 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2685 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002686 esac
2687 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002688else
Matthias Kloseb9621712010-04-24 17:59:49 +00002689 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2690$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002691 >$cache_file
2692fi
2693
2694# Check that the precious variables saved in the cache have kept the same
2695# value.
2696ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002697for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002698 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2699 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002700 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2701 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002702 case $ac_old_set,$ac_new_set in
2703 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002704 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2705$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 +00002706 ac_cache_corrupted=: ;;
2707 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002708 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2709$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002710 ac_cache_corrupted=: ;;
2711 ,);;
2712 *)
2713 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002714 # differences in whitespace do not lead to failure.
2715 ac_old_val_w=`echo x $ac_old_val`
2716 ac_new_val_w=`echo x $ac_new_val`
2717 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2718 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2719$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2720 ac_cache_corrupted=:
2721 else
2722 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2723$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2724 eval $ac_var=\$ac_old_val
2725 fi
2726 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2727$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2728 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2729$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002730 fi;;
2731 esac
2732 # Pass precious variables to config.status.
2733 if test "$ac_new_set" = set; then
2734 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002735 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002736 *) ac_arg=$ac_var=$ac_new_val ;;
2737 esac
2738 case " $ac_configure_args " in
2739 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002740 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002741 esac
2742 fi
2743done
2744if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002745 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2746$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2747 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2748$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002749 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002750fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002751## -------------------- ##
2752## Main body of script. ##
2753## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002754
Guido van Rossum7f43da71994-08-01 12:15:30 +00002755ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002756ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002757ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2758ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2759ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002760
Guido van Rossum627b2d71993-12-24 10:39:16 +00002761
Michael W. Hudson54241132001-12-07 15:38:26 +00002762
Trent Nelson4d4ec652012-10-16 08:51:24 -04002763
Trent Nelson5595ab52012-10-17 04:47:31 -04002764if test "$abs_srcdir" != "$abs_builddir"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002765 # If we're building out-of-tree, we need to make sure the following
2766 # resources get picked up before their $srcdir counterparts.
2767 # Objects/ -> typeslots.inc
2768 # Include/ -> Python-ast.h, graminit.h
2769 # Python/ -> importlib.h
2770 # (A side effect of this is that these resources will automatically be
2771 # regenerated when building out-of-tree, regardless of whether or not
2772 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2773 # off.)
2774 BASECPPFLAGS="-IObjects -IInclude -IPython"
2775else
2776 BASECPPFLAGS=""
2777fi
2778
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002779
2780
2781
2782
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002783if test -e $srcdir/.hg/dirstate
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002784then
2785# Extract the first word of "hg", so it can be a program name with args.
2786set dummy hg; ac_word=$2
2787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2788$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002789if ${ac_cv_prog_HAS_HG+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002790 $as_echo_n "(cached) " >&6
2791else
2792 if test -n "$HAS_HG"; then
2793 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
2794else
2795as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2796for as_dir in $PATH
2797do
2798 IFS=$as_save_IFS
2799 test -z "$as_dir" && as_dir=.
2800 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002801 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002802 ac_cv_prog_HAS_HG="found"
2803 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2804 break 2
2805 fi
2806done
2807 done
2808IFS=$as_save_IFS
2809
2810 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
2811fi
2812fi
2813HAS_HG=$ac_cv_prog_HAS_HG
2814if test -n "$HAS_HG"; then
2815 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
2816$as_echo "$HAS_HG" >&6; }
2817else
2818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2819$as_echo "no" >&6; }
2820fi
2821
2822
2823else
2824HAS_HG=no-repository
2825fi
2826if test $HAS_HG = found
2827then
2828 HGVERSION="hg id -i \$(srcdir)"
2829 HGTAG="hg id -t \$(srcdir)"
2830 HGBRANCH="hg id -b \$(srcdir)"
2831else
2832 HGVERSION=""
2833 HGTAG=""
2834 HGBRANCH=""
2835fi
2836
2837
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002838ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002839
2840
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002841ac_aux_dir=
2842for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2843 if test -f "$ac_dir/install-sh"; then
2844 ac_aux_dir=$ac_dir
2845 ac_install_sh="$ac_aux_dir/install-sh -c"
2846 break
2847 elif test -f "$ac_dir/install.sh"; then
2848 ac_aux_dir=$ac_dir
2849 ac_install_sh="$ac_aux_dir/install.sh -c"
2850 break
2851 elif test -f "$ac_dir/shtool"; then
2852 ac_aux_dir=$ac_dir
2853 ac_install_sh="$ac_aux_dir/shtool install -c"
2854 break
2855 fi
2856done
2857if test -z "$ac_aux_dir"; then
2858 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2859fi
2860
2861# These three variables are undocumented and unsupported,
2862# and are intended to be withdrawn in a future Autoconf release.
2863# They can cause serious problems if a builder's source tree is in a directory
2864# whose full name contains unusual characters.
2865ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2866ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2867ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2868
2869
2870# Make sure we can run config.sub.
2871$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2872 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2873
2874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2875$as_echo_n "checking build system type... " >&6; }
2876if ${ac_cv_build+:} false; then :
2877 $as_echo_n "(cached) " >&6
2878else
2879 ac_build_alias=$build_alias
2880test "x$ac_build_alias" = x &&
2881 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2882test "x$ac_build_alias" = x &&
2883 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2884ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2885 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2886
2887fi
2888{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2889$as_echo "$ac_cv_build" >&6; }
2890case $ac_cv_build in
2891*-*-*) ;;
2892*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2893esac
2894build=$ac_cv_build
2895ac_save_IFS=$IFS; IFS='-'
2896set x $ac_cv_build
2897shift
2898build_cpu=$1
2899build_vendor=$2
2900shift; shift
2901# Remember, the first character of IFS is used to create $*,
2902# except with old shells:
2903build_os=$*
2904IFS=$ac_save_IFS
2905case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2906
2907
2908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2909$as_echo_n "checking host system type... " >&6; }
2910if ${ac_cv_host+:} false; then :
2911 $as_echo_n "(cached) " >&6
2912else
2913 if test "x$host_alias" = x; then
2914 ac_cv_host=$ac_cv_build
2915else
2916 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2917 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2918fi
2919
2920fi
2921{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2922$as_echo "$ac_cv_host" >&6; }
2923case $ac_cv_host in
2924*-*-*) ;;
2925*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2926esac
2927host=$ac_cv_host
2928ac_save_IFS=$IFS; IFS='-'
2929set x $ac_cv_host
2930shift
2931host_cpu=$1
2932host_vendor=$2
2933shift; shift
2934# Remember, the first character of IFS is used to create $*,
2935# except with old shells:
2936host_os=$*
2937IFS=$ac_save_IFS
2938case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2939
2940
2941
doko@python.orga10e4a92013-01-25 18:45:12 +01002942
2943
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002944if test "$cross_compiling" = yes; then
2945 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2946$as_echo_n "checking for python interpreter for cross build... " >&6; }
2947 if test -z "$PYTHON_FOR_BUILD"; then
2948 for interp in python$PACKAGE_VERSION python3 python; do
2949 which $interp >/dev/null 2>&1 || continue
2950 if $interp -c 'import sys;sys.exit(not sys.version_info[:2] >= (3,3))'; then
2951 break
2952 fi
2953 interp=
2954 done
2955 if test x$interp = x; then
2956 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2957 fi
2958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2959$as_echo "$interp" >&6; }
doko@python.org244b6872013-01-26 12:08:25 +01002960 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@ubuntu.com1abe1c52012-06-30 20:42:45 +02002961 fi
Christian Heimes954ac032012-12-12 13:10:21 +01002962elif test "$cross_compiling" = maybe; then
2963 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002964else
2965 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2966fi
2967
2968
Martin v. Löwis11437992002-04-12 09:54:03 +00002969
Benjamin Petersond23f8222009-04-05 19:13:16 +00002970if test "$prefix" != "/"; then
2971 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2972fi
2973
2974
Martin v. Löwis11437992002-04-12 09:54:03 +00002975
2976
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002977# We don't use PACKAGE_ variables, and they cause conflicts
2978# with other autoconf-based packages that include Python.h
2979grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2980rm confdefs.h
2981mv confdefs.h.new confdefs.h
2982
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002983
Georg Brandl08a90122012-09-29 09:34:13 +02002984VERSION=3.4
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002985
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002986# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002987
2988SOVERSION=1.0
2989
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002990# The later defininition of _XOPEN_SOURCE disables certain features
2991# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2992
Matthias Kloseb9621712010-04-24 17:59:49 +00002993$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002994
2995
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002996# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2997# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2998# them.
2999
Matthias Kloseb9621712010-04-24 17:59:49 +00003000$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003001
3002
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003003# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3004# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
3005# them.
3006
Matthias Kloseb9621712010-04-24 17:59:49 +00003007$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003008
3009
Martin v. Löwisd6320502004-08-12 13:45:08 +00003010# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3011# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
3012
Matthias Kloseb9621712010-04-24 17:59:49 +00003013$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00003014
3015
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003016# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3017# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
3018# them.
3019
Matthias Kloseb9621712010-04-24 17:59:49 +00003020$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003021
3022
3023
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003024define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003025
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003026# Arguments passed to configure.
3027
3028CONFIG_ARGS="$ac_configure_args"
3029
Matthias Kloseb9621712010-04-24 17:59:49 +00003030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3031$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003032# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003033if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003034 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003035 case $enableval in
3036 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07003037 # Locate the best usable SDK, see Mac/README.txt for more
3038 # information
3039 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
3040 if test -z "${enableval}"
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003041 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003042 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3043 if test ! -d "${enableval}"
3044 then
3045 enableval=/
3046 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003047 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003048 ;;
3049 esac
3050 case $enableval in
3051 no)
3052 UNIVERSALSDK=
3053 enable_universalsdk=
3054 ;;
3055 *)
3056 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003057 if test ! -d "${UNIVERSALSDK}"
3058 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003059 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003060 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003061 ;;
3062 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003063
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003064
Thomas Wouters477c8d52006-05-27 19:21:47 +00003065else
3066
3067 UNIVERSALSDK=
3068 enable_universalsdk=
3069
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003070fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003071
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003072if test -n "${UNIVERSALSDK}"
3073then
Matthias Kloseb9621712010-04-24 17:59:49 +00003074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3075$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003076else
Matthias Kloseb9621712010-04-24 17:59:49 +00003077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3078$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003079fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003080
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003081
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003082
3083
Ned Deilycbfb9a52012-06-23 16:02:19 -07003084# For backward compatibility reasons we prefer to select '32-bit' if available,
3085# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003086UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003087if test "`uname -s`" = "Darwin"
3088then
3089 if test -n "${UNIVERSALSDK}"
3090 then
3091 if test -z "`/usr/bin/file "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
3092 then
3093 UNIVERSAL_ARCHS="intel"
3094 fi
3095 fi
3096fi
3097
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003098
Matthias Kloseb9621712010-04-24 17:59:49 +00003099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3100$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003101
3102# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003103if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003104 withval=$with_universal_archs;
Matthias Kloseb9621712010-04-24 17:59:49 +00003105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
3106$as_echo "$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003107 UNIVERSAL_ARCHS="$withval"
3108
3109else
3110
Ned Deilycbfb9a52012-06-23 16:02:19 -07003111 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3112$as_echo "${UNIVERSAL_ARCHS}" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003113
3114fi
3115
3116
3117
3118
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003119
3120# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003121if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003122 withval=$with_framework_name;
3123 PYTHONFRAMEWORK=${withval}
3124 PYTHONFRAMEWORKDIR=${withval}.framework
3125 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3126
3127else
3128
3129 PYTHONFRAMEWORK=Python
3130 PYTHONFRAMEWORKDIR=Python.framework
3131 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3132
3133fi
3134
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003135# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003136if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003137 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003138 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003139 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003140 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003141 esac
3142 case $enableval in
3143 no)
3144 PYTHONFRAMEWORK=
3145 PYTHONFRAMEWORKDIR=no-framework
3146 PYTHONFRAMEWORKPREFIX=
3147 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003148 FRAMEWORKINSTALLFIRST=
3149 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003150 FRAMEWORKALTINSTALLFIRST=
3151 FRAMEWORKALTINSTALLLAST=
3152 if test "x${prefix}" = "xNONE"; then
3153 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3154 else
3155 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3156 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003157 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003158 ;;
3159 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003160 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003161 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003162 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003163 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003164 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3165 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003166 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003167
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003168 if test "x${prefix}" = "xNONE" ; then
3169 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003170
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003171 else
3172 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3173 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003174
3175 case "${enableval}" in
3176 /System*)
3177 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3178 if test "${prefix}" = "NONE" ; then
3179 # See below
3180 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3181 fi
3182 ;;
3183
3184 /Library*)
3185 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3186 ;;
3187
3188 */Library/Frameworks)
3189 MDIR="`dirname "${enableval}"`"
3190 MDIR="`dirname "${MDIR}"`"
3191 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3192
3193 if test "${prefix}" = "NONE"; then
3194 # User hasn't specified the
3195 # --prefix option, but wants to install
3196 # the framework in a non-default location,
3197 # ensure that the compatibility links get
3198 # installed relative to that prefix as well
3199 # instead of in /usr/local.
3200 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3201 fi
3202 ;;
3203
3204 *)
3205 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3206 ;;
3207 esac
3208
Jack Jansen127e56e2001-09-11 14:41:54 +00003209 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003210
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003211 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003212 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003213 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003214
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003215 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003216
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003217 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3218
3219 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3220
Jack Jansene578a632001-08-15 01:27:14 +00003221 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003222
Guido van Rossum563e7081996-09-10 18:20:48 +00003223else
Martin v. Löwis11437992002-04-12 09:54:03 +00003224
Jack Jansene578a632001-08-15 01:27:14 +00003225 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003226 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003227 PYTHONFRAMEWORKPREFIX=
3228 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003229 FRAMEWORKINSTALLFIRST=
3230 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003231 FRAMEWORKALTINSTALLFIRST=
3232 FRAMEWORKALTINSTALLLAST=
3233 if test "x${prefix}" = "xNONE" ; then
3234 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3235 else
3236 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3237 fi
Jack Jansene578a632001-08-15 01:27:14 +00003238 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003239
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003240
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003241fi
3242
Thomas Wouters477c8d52006-05-27 19:21:47 +00003243
3244
Michael W. Hudson54241132001-12-07 15:38:26 +00003245
3246
3247
3248
Jack Jansene578a632001-08-15 01:27:14 +00003249
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003250
3251
3252
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003253
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003254
Jack Jansene578a632001-08-15 01:27:14 +00003255##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003256## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003257## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003258##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003259# Set name for machine-dependent library files
3260
Matthias Kloseb9621712010-04-24 17:59:49 +00003261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3262$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003263if test -z "$MACHDEP"
3264then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003265 # avoid using uname for cross builds
3266 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003267 # ac_sys_system and ac_sys_release are used for setting
3268 # a lot of different things including 'define_xopen_source'
3269 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003270 case "$host" in
3271 *-*-linux*)
3272 ac_sys_system=Linux
3273 ;;
3274 *-*-cygwin*)
3275 ac_sys_system=Cygwin
3276 ;;
3277 *)
3278 # for now, limit cross builds to known configurations
3279 MACHDEP="unknown"
3280 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3281 esac
3282 ac_sys_release=
3283 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003284 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003285 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003286 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003287 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003288 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003289 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003290 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003291 fi
3292 ac_md_system=`echo $ac_sys_system |
3293 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3294 ac_md_release=`echo $ac_sys_release |
3295 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3296 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003297
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003298 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003299 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003300 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003301 darwin*) MACHDEP="darwin";;
doko@ubuntu.comba015832012-06-30 16:52:05 +02003302 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003303 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003304 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003305fi
Guido van Rossum91922671997-10-09 20:24:13 +00003306
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003307
3308if test "$cross_compiling" = yes; then
3309 case "$host" in
3310 *-*-linux*)
3311 case "$host_cpu" in
3312 arm*)
3313 _host_cpu=arm
3314 ;;
3315 *)
3316 _host_cpu=$host_cpu
3317 esac
3318 ;;
3319 *-*-cygwin*)
3320 _host_cpu=
3321 ;;
3322 *)
3323 # for now, limit cross builds to known configurations
3324 MACHDEP="unknown"
3325 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3326 esac
3327 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3328fi
3329
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003330# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3331# disable features if it is defined, without any means to access these
3332# features as extensions. For these systems, we skip the definition of
3333# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3334# some feature, make sure there is no alternative way to access this
3335# feature. Also, when using wildcards, make sure you have verified the
3336# need for not defining _XOPEN_SOURCE on all systems matching the
3337# wildcard, and that the wildcard does not include future systems
3338# (which may remove their limitations).
3339case $ac_sys_system/$ac_sys_release in
3340 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3341 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003342 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003343 # In addition, Stefan Krah confirms that issue #1244610 exists through
3344 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003345 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003346 define_xopen_source=no
3347 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3348 # also defined. This can be overridden by defining _BSD_SOURCE
3349 # As this has a different meaning on Linux, only define it on OpenBSD
3350
Matthias Kloseb9621712010-04-24 17:59:49 +00003351$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003352
3353 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003354 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003355 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3356 # also defined. This can be overridden by defining _BSD_SOURCE
3357 # As this has a different meaning on Linux, only define it on OpenBSD
3358
Matthias Kloseb9621712010-04-24 17:59:49 +00003359$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003360
3361 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003362 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3363 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3364 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003365 NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6[A-S])
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003366 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003367 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3368 # request to enable features supported by the standard as a request
3369 # to disable features not supported by the standard. The best way
3370 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3371 # entirely and define __EXTENSIONS__ instead.
3372 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003373 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003374 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3375 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003376 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003377 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003378 define_xopen_source=no;;
3379 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003380 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003381 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003382 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003383 # On FreeBSD 4, the math functions C89 does not cover are never defined
3384 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3385 FreeBSD/4.*)
3386 define_xopen_source=no;;
3387 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3388 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3389 # identifies itself as Darwin/7.*
3390 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3391 # disables platform specific features beyond repair.
3392 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3393 # has no effect, don't bother defining them
3394 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003395 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003396 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003397 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003398 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3399 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3400 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003401 AIX/4)
3402 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003403 AIX/5)
3404 if test `uname -r` -eq 1; then
3405 define_xopen_source=no
3406 fi
3407 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003408 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3409 # defining NI_NUMERICHOST.
3410 QNX/6.3.2)
3411 define_xopen_source=no
3412 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003413
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003414esac
3415
3416if test $define_xopen_source = yes
3417then
Victor Stinner14d098d2011-09-07 22:29:43 +02003418 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003419
Victor Stinner14d098d2011-09-07 22:29:43 +02003420$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003421
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003422
3423 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3424 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3425 # several APIs are not declared. Since this is also needed in some
3426 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003427
Matthias Kloseb9621712010-04-24 17:59:49 +00003428$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003429
3430
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003431
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003432$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003433
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003434fi
3435
Guido van Rossum91922671997-10-09 20:24:13 +00003436#
3437# SGI compilers allow the specification of the both the ABI and the
3438# ISA on the command line. Depending on the values of these switches,
3439# different and often incompatable code will be generated.
3440#
3441# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3442# thus supply support for various ABI/ISA combinations. The MACHDEP
3443# variable is also adjusted.
3444#
3445
3446if test ! -z "$SGI_ABI"
3447then
3448 CC="cc $SGI_ABI"
3449 LDFLAGS="$SGI_ABI $LDFLAGS"
3450 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3451fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003452{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3453$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003454
Jack Jansen6b08a402004-06-03 12:41:45 +00003455# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3456# it may influence the way we can build extensions, so distutils
3457# needs to check it
3458
Thomas Wouters477c8d52006-05-27 19:21:47 +00003459
Jack Jansen6b08a402004-06-03 12:41:45 +00003460CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003461EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003462
Guido van Rossum627b2d71993-12-24 10:39:16 +00003463# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003464
3465# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3466# for debug/optimization stuff. BASECFLAGS is for flags that are required
3467# just to get things to compile and link. Users are free to override OPT
3468# when running configure or make. The build should not break if they do.
3469# BASECFLAGS should generally not be messed with, however.
3470
3471# XXX shouldn't some/most/all of this code be merged with the stuff later
3472# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3474$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003475
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003476# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003477if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003478 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003479 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003480 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003481 without_gcc=yes;;
3482 yes) CC=gcc
3483 without_gcc=no;;
3484 *) CC=$withval
3485 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003486 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003487else
Martin v. Löwis11437992002-04-12 09:54:03 +00003488
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003489 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003490 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003491 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003492 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003493 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003494fi
3495
Matthias Kloseb9621712010-04-24 17:59:49 +00003496{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3497$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003498
Guido van Rossum8b131c51995-03-09 14:10:13 +00003499# If the user switches compilers, we can't believe the cache
3500if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3501then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003502 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003503(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003504fi
3505
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003506# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3507# when the compiler supports them, but we don't always want -O2, and
3508# we set -g later.
3509if test -z "$CFLAGS"; then
3510 CFLAGS=
3511fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003512
3513if test "$ac_sys_system" = "Darwin"
3514then
3515 # Compiler selection on MacOSX is more complicated than
3516 # AC_PROG_CC can handle, see Mac/README.txt for more
3517 # information
3518 if test -z "${CC}"
3519 then
3520 found_gcc=
3521 found_clang=
3522 as_save_IFS=$IFS; IFS=:
3523 for as_dir in $PATH
3524 do
3525 IFS=$as_save_IFS
3526 if test -x $as_dir/gcc; then
3527 if test -z "${found_gcc}"; then
3528 found_gcc=$as_dir/gcc
3529 fi
3530 fi
3531 if test -x $as_dir/clang; then
3532 if test -z "${found_clang}"; then
3533 found_clang=$as_dir/clang
3534 fi
3535 fi
3536 done
3537 IFS=$as_save_IFS
3538
3539 if test -n "$found_gcc" -a -n "$found_clang"
3540 then
3541 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3542 then
3543 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3544$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3545 CC="$found_clang"
3546 CXX="$found_clang++"
3547 fi
3548
3549
3550 elif test -z "$found_gcc" -a -n "$found_clang"
3551 then
3552 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3553$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3554 CC="$found_clang"
3555 CXX="$found_clang++"
3556
3557 elif test -z "$found_gcc" -a -z "$found_clang"
3558 then
3559 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3560 if test -n "${found_clang}"
3561 then
3562 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3563$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3564 CC="${found_clang}"
3565 CXX="`/usr/bin/xcrun -find clang++`"
3566
3567 # else: use default behaviour
3568 fi
3569 fi
3570 fi
3571fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003572ac_ext=c
3573ac_cpp='$CPP $CPPFLAGS'
3574ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3575ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3576ac_compiler_gnu=$ac_cv_c_compiler_gnu
3577if test -n "$ac_tool_prefix"; then
3578 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3579set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3581$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003582if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003583 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003584else
3585 if test -n "$CC"; then
3586 ac_cv_prog_CC="$CC" # Let the user override the test.
3587else
Martin v. Löwis11437992002-04-12 09:54:03 +00003588as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3589for as_dir in $PATH
3590do
3591 IFS=$as_save_IFS
3592 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003593 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003594 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003595 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003596 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003597 break 2
3598 fi
3599done
Matthias Kloseb9621712010-04-24 17:59:49 +00003600 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003601IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003602
Jack Jansendd19cf82001-12-06 22:36:17 +00003603fi
3604fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003605CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003606if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3608$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003609else
Matthias Kloseb9621712010-04-24 17:59:49 +00003610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3611$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003612fi
3613
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003614
Martin v. Löwis11437992002-04-12 09:54:03 +00003615fi
3616if test -z "$ac_cv_prog_CC"; then
3617 ac_ct_CC=$CC
3618 # Extract the first word of "gcc", so it can be a program name with args.
3619set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3621$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003622if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003623 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003624else
3625 if test -n "$ac_ct_CC"; then
3626 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3627else
3628as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3629for as_dir in $PATH
3630do
3631 IFS=$as_save_IFS
3632 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003633 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003634 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003635 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003636 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003637 break 2
3638 fi
3639done
Matthias Kloseb9621712010-04-24 17:59:49 +00003640 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003641IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003642
3643fi
3644fi
3645ac_ct_CC=$ac_cv_prog_ac_ct_CC
3646if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3648$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003649else
Matthias Kloseb9621712010-04-24 17:59:49 +00003650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3651$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003652fi
3653
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003654 if test "x$ac_ct_CC" = x; then
3655 CC=""
3656 else
3657 case $cross_compiling:$ac_tool_warned in
3658yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003659{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3660$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003661ac_tool_warned=yes ;;
3662esac
3663 CC=$ac_ct_CC
3664 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003665else
3666 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003667fi
3668
Jack Jansendd19cf82001-12-06 22:36:17 +00003669if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003670 if test -n "$ac_tool_prefix"; then
3671 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
Martin v. Löwis11437992002-04-12 09:54:03 +00003672set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3674$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003675if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003676 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003677else
3678 if test -n "$CC"; then
3679 ac_cv_prog_CC="$CC" # Let the user override the test.
3680else
Martin v. Löwis11437992002-04-12 09:54:03 +00003681as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3682for as_dir in $PATH
3683do
3684 IFS=$as_save_IFS
3685 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003686 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003687 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003688 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003689 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003690 break 2
3691 fi
3692done
Matthias Kloseb9621712010-04-24 17:59:49 +00003693 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003694IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003695
3696fi
3697fi
3698CC=$ac_cv_prog_CC
3699if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3701$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003702else
Matthias Kloseb9621712010-04-24 17:59:49 +00003703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3704$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003705fi
3706
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003707
Martin v. Löwis11437992002-04-12 09:54:03 +00003708 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003709fi
3710if test -z "$CC"; then
3711 # Extract the first word of "cc", so it can be a program name with args.
3712set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3714$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003715if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003716 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003717else
3718 if test -n "$CC"; then
3719 ac_cv_prog_CC="$CC" # Let the user override the test.
3720else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003721 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003722as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3723for as_dir in $PATH
3724do
3725 IFS=$as_save_IFS
3726 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003727 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003728 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003729 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3730 ac_prog_rejected=yes
3731 continue
3732 fi
3733 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003734 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003735 break 2
3736 fi
3737done
Matthias Kloseb9621712010-04-24 17:59:49 +00003738 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003739IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003740
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003741if test $ac_prog_rejected = yes; then
3742 # We found a bogon in the path, so make sure we never use it.
3743 set dummy $ac_cv_prog_CC
3744 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003745 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003746 # We chose a different compiler from the bogus one.
3747 # However, it has the same basename, so the bogon will be chosen
3748 # first if we set CC to just the basename; use the full file name.
3749 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003750 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003751 fi
3752fi
3753fi
3754fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003755CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003756if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3758$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003759else
Matthias Kloseb9621712010-04-24 17:59:49 +00003760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3761$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003762fi
3763
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003764
Martin v. Löwis11437992002-04-12 09:54:03 +00003765fi
3766if test -z "$CC"; then
3767 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003768 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003769 do
3770 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3771set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3773$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003774if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003775 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003776else
3777 if test -n "$CC"; then
3778 ac_cv_prog_CC="$CC" # Let the user override the test.
3779else
Martin v. Löwis11437992002-04-12 09:54:03 +00003780as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3781for as_dir in $PATH
3782do
3783 IFS=$as_save_IFS
3784 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003785 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003786 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003787 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003788 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003789 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003790 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003791done
Matthias Kloseb9621712010-04-24 17:59:49 +00003792 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003793IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003794
3795fi
3796fi
3797CC=$ac_cv_prog_CC
3798if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3800$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003801else
Matthias Kloseb9621712010-04-24 17:59:49 +00003802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3803$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003804fi
3805
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003806
Martin v. Löwis11437992002-04-12 09:54:03 +00003807 test -n "$CC" && break
3808 done
3809fi
3810if test -z "$CC"; then
3811 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003812 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003813do
3814 # Extract the first word of "$ac_prog", so it can be a program name with args.
3815set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3817$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003818if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003819 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003820else
3821 if test -n "$ac_ct_CC"; then
3822 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3823else
3824as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3825for as_dir in $PATH
3826do
3827 IFS=$as_save_IFS
3828 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003829 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003830 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003831 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003832 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003833 break 2
3834 fi
3835done
Matthias Kloseb9621712010-04-24 17:59:49 +00003836 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003837IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003838
Martin v. Löwis11437992002-04-12 09:54:03 +00003839fi
3840fi
3841ac_ct_CC=$ac_cv_prog_ac_ct_CC
3842if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3844$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003845else
Matthias Kloseb9621712010-04-24 17:59:49 +00003846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3847$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003848fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003849
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003850
Martin v. Löwis11437992002-04-12 09:54:03 +00003851 test -n "$ac_ct_CC" && break
3852done
Michael W. Hudson54241132001-12-07 15:38:26 +00003853
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003854 if test "x$ac_ct_CC" = x; then
3855 CC=""
3856 else
3857 case $cross_compiling:$ac_tool_warned in
3858yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003859{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3860$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003861ac_tool_warned=yes ;;
3862esac
3863 CC=$ac_ct_CC
3864 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003865fi
3866
3867fi
3868
3869
Matthias Kloseb9621712010-04-24 17:59:49 +00003870test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3871$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003872as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003873See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003874
3875# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003876$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3877set X $ac_compile
3878ac_compiler=$2
3879for ac_option in --version -v -V -qversion; do
3880 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003881case "(($ac_try" in
3882 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3883 *) ac_try_echo=$ac_try;;
3884esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003885eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3886$as_echo "$ac_try_echo"; } >&5
3887 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003888 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003889 if test -s conftest.err; then
3890 sed '10a\
3891... rest of stderr output deleted ...
3892 10q' conftest.err >conftest.er1
3893 cat conftest.er1 >&5
3894 fi
3895 rm -f conftest.er1 conftest.err
3896 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3897 test $ac_status = 0; }
3898done
Martin v. Löwis11437992002-04-12 09:54:03 +00003899
Matthias Kloseb9621712010-04-24 17:59:49 +00003900cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003901/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003902
Martin v. Löwis11437992002-04-12 09:54:03 +00003903int
3904main ()
3905{
3906
3907 ;
3908 return 0;
3909}
3910_ACEOF
3911ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003912ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003913# Try to create an executable without -o first, disregard a.out.
3914# It will help us diagnose broken compilers, and finding out an intuition
3915# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3917$as_echo_n "checking whether the C compiler works... " >&6; }
3918ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3919
3920# The possible output files:
3921ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3922
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003923ac_rmfiles=
3924for ac_file in $ac_files
3925do
3926 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003927 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003928 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3929 esac
3930done
3931rm -f $ac_rmfiles
3932
Matthias Kloseb9621712010-04-24 17:59:49 +00003933if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003934case "(($ac_try" in
3935 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3936 *) ac_try_echo=$ac_try;;
3937esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003938eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3939$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003940 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003941 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003942 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3943 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003944 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3945# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3946# in a Makefile. We should not override ac_cv_exeext if it was cached,
3947# so that the user can short-circuit this test for compilers unknown to
3948# Autoconf.
3949for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003950do
3951 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003952 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003953 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003954 ;;
3955 [ab].out )
3956 # We found the default executable, but exeext='' is most
3957 # certainly right.
3958 break;;
3959 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003960 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003961 then :; else
3962 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3963 fi
3964 # We set ac_cv_exeext here because the later test for it is not
3965 # safe: cross compilers may not add the suffix if given an `-o'
3966 # argument, so we may need to know it at that point already.
3967 # Even if this section looks crufty: it has the advantage of
3968 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003969 break;;
3970 * )
3971 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003972 esac
3973done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003974test "$ac_cv_exeext" = no && ac_cv_exeext=
3975
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003976else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003977 ac_file=''
3978fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003979if test -z "$ac_file"; then :
3980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3981$as_echo "no" >&6; }
3982$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003983sed 's/^/| /' conftest.$ac_ext >&5
3984
Matthias Kloseb9621712010-04-24 17:59:49 +00003985{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3986$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003987as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02003988See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003989else
3990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3991$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003992fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3994$as_echo_n "checking for C compiler default output file name... " >&6; }
3995{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3996$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003997ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003998
Matthias Kloseb9621712010-04-24 17:59:49 +00003999rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004000ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00004001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4002$as_echo_n "checking for suffix of executables... " >&6; }
4003if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004004case "(($ac_try" in
4005 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4006 *) ac_try_echo=$ac_try;;
4007esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004008eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4009$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004010 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004011 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004012 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4013 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004014 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4015# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4016# work properly (i.e., refer to `conftest.exe'), while it won't with
4017# `rm'.
4018for ac_file in conftest.exe conftest conftest.*; do
4019 test -f "$ac_file" || continue
4020 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004021 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004022 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4023 break;;
4024 * ) break;;
4025 esac
4026done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004027else
Matthias Kloseb9621712010-04-24 17:59:49 +00004028 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4029$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004030as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004031See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004032fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004033rm -f conftest conftest$ac_cv_exeext
4034{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4035$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004036
4037rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004038EXEEXT=$ac_cv_exeext
4039ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004040cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4041/* end confdefs.h. */
4042#include <stdio.h>
4043int
4044main ()
4045{
4046FILE *f = fopen ("conftest.out", "w");
4047 return ferror (f) || fclose (f) != 0;
4048
4049 ;
4050 return 0;
4051}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004052_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004053ac_clean_files="$ac_clean_files conftest.out"
4054# Check that the compiler produces executables we can run. If not, either
4055# the compiler is broken, or we cross compile.
4056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4057$as_echo_n "checking whether we are cross compiling... " >&6; }
4058if test "$cross_compiling" != yes; then
4059 { { ac_try="$ac_link"
4060case "(($ac_try" in
4061 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4062 *) ac_try_echo=$ac_try;;
4063esac
4064eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4065$as_echo "$ac_try_echo"; } >&5
4066 (eval "$ac_link") 2>&5
4067 ac_status=$?
4068 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4069 test $ac_status = 0; }
4070 if { ac_try='./conftest$ac_cv_exeext'
4071 { { case "(($ac_try" in
4072 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4073 *) ac_try_echo=$ac_try;;
4074esac
4075eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4076$as_echo "$ac_try_echo"; } >&5
4077 (eval "$ac_try") 2>&5
4078 ac_status=$?
4079 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4080 test $ac_status = 0; }; }; then
4081 cross_compiling=no
4082 else
4083 if test "$cross_compiling" = maybe; then
4084 cross_compiling=yes
4085 else
4086 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4087$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004088as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004089If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004090See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004091 fi
4092 fi
4093fi
4094{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4095$as_echo "$cross_compiling" >&6; }
4096
4097rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4098ac_clean_files=$ac_clean_files_save
4099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4100$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004101if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004102 $as_echo_n "(cached) " >&6
4103else
4104 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004105/* end confdefs.h. */
4106
4107int
4108main ()
4109{
4110
4111 ;
4112 return 0;
4113}
4114_ACEOF
4115rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004116if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004117case "(($ac_try" in
4118 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4119 *) ac_try_echo=$ac_try;;
4120esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004121eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4122$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004123 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004124 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004125 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4126 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004127 for ac_file in conftest.o conftest.obj conftest.*; do
4128 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004129 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004130 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004131 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4132 break;;
4133 esac
4134done
4135else
Matthias Kloseb9621712010-04-24 17:59:49 +00004136 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004137sed 's/^/| /' conftest.$ac_ext >&5
4138
Matthias Kloseb9621712010-04-24 17:59:49 +00004139{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4140$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004141as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004142See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004143fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004144rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004145fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004146{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4147$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004148OBJEXT=$ac_cv_objext
4149ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4151$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004152if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004153 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004154else
Matthias Kloseb9621712010-04-24 17:59:49 +00004155 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004156/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004157
Martin v. Löwis11437992002-04-12 09:54:03 +00004158int
4159main ()
4160{
4161#ifndef __GNUC__
4162 choke me
4163#endif
4164
4165 ;
4166 return 0;
4167}
4168_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004169if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004170 ac_compiler_gnu=yes
4171else
Matthias Kloseb9621712010-04-24 17:59:49 +00004172 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004173fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004174rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004175ac_cv_c_compiler_gnu=$ac_compiler_gnu
4176
4177fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004178{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4179$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4180if test $ac_compiler_gnu = yes; then
4181 GCC=yes
4182else
4183 GCC=
4184fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004185ac_test_CFLAGS=${CFLAGS+set}
4186ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4188$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004189if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004190 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004191else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004192 ac_save_c_werror_flag=$ac_c_werror_flag
4193 ac_c_werror_flag=yes
4194 ac_cv_prog_cc_g=no
4195 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004196 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004197/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004198
Martin v. Löwis11437992002-04-12 09:54:03 +00004199int
4200main ()
4201{
4202
4203 ;
4204 return 0;
4205}
4206_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004207if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004208 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004209else
Matthias Kloseb9621712010-04-24 17:59:49 +00004210 CFLAGS=""
4211 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004212/* end confdefs.h. */
4213
4214int
4215main ()
4216{
4217
4218 ;
4219 return 0;
4220}
4221_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004222if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004223
Matthias Kloseb9621712010-04-24 17:59:49 +00004224else
4225 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004226 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004227 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004228/* end confdefs.h. */
4229
4230int
4231main ()
4232{
4233
4234 ;
4235 return 0;
4236}
4237_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004238if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004239 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004240fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004241rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004242fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004243rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4244fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004245rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4246 ac_c_werror_flag=$ac_save_c_werror_flag
4247fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004248{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4249$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004250if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004251 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004252elif test $ac_cv_prog_cc_g = yes; then
4253 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004254 CFLAGS="-g -O2"
4255 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004256 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004257 fi
4258else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004259 if test "$GCC" = yes; then
4260 CFLAGS="-O2"
4261 else
4262 CFLAGS=
4263 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004264fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4266$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004267if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004268 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004269else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004270 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004271ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004272cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004273/* end confdefs.h. */
4274#include <stdarg.h>
4275#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004276struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004277/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4278struct buf { int x; };
4279FILE * (*rcsopen) (struct buf *, struct stat *, int);
4280static char *e (p, i)
4281 char **p;
4282 int i;
4283{
4284 return p[i];
4285}
4286static char *f (char * (*g) (char **, int), char **p, ...)
4287{
4288 char *s;
4289 va_list v;
4290 va_start (v,p);
4291 s = g (p, va_arg (v,int));
4292 va_end (v);
4293 return s;
4294}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004295
4296/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4297 function prototypes and stuff, but not '\xHH' hex character constants.
4298 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004299 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004300 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4301 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004302 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004303int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4304
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004305/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4306 inside strings and character constants. */
4307#define FOO(x) 'x'
4308int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4309
Skip Montanaro6dead952003-09-25 14:50:04 +00004310int test (int i, double x);
4311struct s1 {int (*f) (int a);};
4312struct s2 {int (*f) (double a);};
4313int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4314int argc;
4315char **argv;
4316int
4317main ()
4318{
4319return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4320 ;
4321 return 0;
4322}
4323_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004324for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4325 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004326do
4327 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004328 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004329 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004330fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004331rm -f core conftest.err conftest.$ac_objext
4332 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004333done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004334rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004335CC=$ac_save_CC
4336
4337fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004338# AC_CACHE_VAL
4339case "x$ac_cv_prog_cc_c89" in
4340 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4342$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004343 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4345$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004346 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004347 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4349$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004350esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004351if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004352
Matthias Kloseb9621712010-04-24 17:59:49 +00004353fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004354
Martin v. Löwis11437992002-04-12 09:54:03 +00004355ac_ext=c
4356ac_cpp='$CPP $CPPFLAGS'
4357ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4358ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4359ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004360
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004361
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004362
4363
Matthias Kloseb9621712010-04-24 17:59:49 +00004364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4365$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004366
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004367# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004368if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004369 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004370
4371 case $withval in
4372 no) with_cxx_main=no
4373 MAINCC='$(CC)';;
4374 yes) with_cxx_main=yes
4375 MAINCC='$(CXX)';;
4376 *) with_cxx_main=yes
4377 MAINCC=$withval
4378 if test -z "$CXX"
4379 then
4380 CXX=$withval
4381 fi;;
4382 esac
4383else
4384
4385 with_cxx_main=no
4386 MAINCC='$(CC)'
4387
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004388fi
4389
Matthias Kloseb9621712010-04-24 17:59:49 +00004390{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4391$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004392
4393preset_cxx="$CXX"
4394if test -z "$CXX"
4395then
4396 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004397 gcc) if test -n "$ac_tool_prefix"; then
4398 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4399set dummy ${ac_tool_prefix}g++; ac_word=$2
4400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4401$as_echo_n "checking for $ac_word... " >&6; }
4402if ${ac_cv_path_CXX+:} false; then :
4403 $as_echo_n "(cached) " >&6
4404else
4405 case $CXX in
4406 [\\/]* | ?:[\\/]*)
4407 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4408 ;;
4409 *)
4410 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4411for as_dir in notfound
4412do
4413 IFS=$as_save_IFS
4414 test -z "$as_dir" && as_dir=.
4415 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004416 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004417 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4418 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4419 break 2
4420 fi
4421done
4422 done
4423IFS=$as_save_IFS
4424
4425 ;;
4426esac
4427fi
4428CXX=$ac_cv_path_CXX
4429if test -n "$CXX"; then
4430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4431$as_echo "$CXX" >&6; }
4432else
4433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4434$as_echo "no" >&6; }
4435fi
4436
4437
4438fi
4439if test -z "$ac_cv_path_CXX"; then
4440 ac_pt_CXX=$CXX
4441 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004442set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4444$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004445if ${ac_cv_path_ac_pt_CXX+:} false; then :
4446 $as_echo_n "(cached) " >&6
4447else
4448 case $ac_pt_CXX in
4449 [\\/]* | ?:[\\/]*)
4450 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4451 ;;
4452 *)
4453 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4454for as_dir in notfound
4455do
4456 IFS=$as_save_IFS
4457 test -z "$as_dir" && as_dir=.
4458 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004459 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004460 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4461 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4462 break 2
4463 fi
4464done
4465 done
4466IFS=$as_save_IFS
4467
4468 ;;
4469esac
4470fi
4471ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4472if test -n "$ac_pt_CXX"; then
4473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4474$as_echo "$ac_pt_CXX" >&6; }
4475else
4476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4477$as_echo "no" >&6; }
4478fi
4479
4480 if test "x$ac_pt_CXX" = x; then
4481 CXX="g++"
4482 else
4483 case $cross_compiling:$ac_tool_warned in
4484yes:)
4485{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4486$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4487ac_tool_warned=yes ;;
4488esac
4489 CXX=$ac_pt_CXX
4490 fi
4491else
4492 CXX="$ac_cv_path_CXX"
4493fi
4494 ;;
4495 cc) if test -n "$ac_tool_prefix"; then
4496 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4497set dummy ${ac_tool_prefix}c++; ac_word=$2
4498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4499$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004500if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004501 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004502else
4503 case $CXX in
4504 [\\/]* | ?:[\\/]*)
4505 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4506 ;;
4507 *)
4508 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4509for as_dir in notfound
4510do
4511 IFS=$as_save_IFS
4512 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004513 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004514 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004515 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004516 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004517 break 2
4518 fi
4519done
Matthias Kloseb9621712010-04-24 17:59:49 +00004520 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004521IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004522
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004523 ;;
4524esac
4525fi
4526CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004527if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4529$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004530else
Matthias Kloseb9621712010-04-24 17:59:49 +00004531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4532$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004533fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004534
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004535
4536fi
4537if test -z "$ac_cv_path_CXX"; then
4538 ac_pt_CXX=$CXX
4539 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004540set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4542$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004543if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004544 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004545else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004546 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004547 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004548 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004549 ;;
4550 *)
4551 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4552for as_dir in notfound
4553do
4554 IFS=$as_save_IFS
4555 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004556 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004557 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004558 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004559 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004560 break 2
4561 fi
4562done
Matthias Kloseb9621712010-04-24 17:59:49 +00004563 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004564IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004565
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004566 ;;
4567esac
4568fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004569ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4570if test -n "$ac_pt_CXX"; then
4571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4572$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004573else
Matthias Kloseb9621712010-04-24 17:59:49 +00004574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4575$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004576fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004577
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004578 if test "x$ac_pt_CXX" = x; then
4579 CXX="c++"
4580 else
4581 case $cross_compiling:$ac_tool_warned in
4582yes:)
4583{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4584$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4585ac_tool_warned=yes ;;
4586esac
4587 CXX=$ac_pt_CXX
4588 fi
4589else
4590 CXX="$ac_cv_path_CXX"
4591fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004592 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004593 clang|*/clang) if test -n "$ac_tool_prefix"; then
4594 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4595set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4597$as_echo_n "checking for $ac_word... " >&6; }
4598if ${ac_cv_path_CXX+:} false; then :
4599 $as_echo_n "(cached) " >&6
4600else
4601 case $CXX in
4602 [\\/]* | ?:[\\/]*)
4603 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4604 ;;
4605 *)
4606 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4607for as_dir in notfound
4608do
4609 IFS=$as_save_IFS
4610 test -z "$as_dir" && as_dir=.
4611 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004612 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004613 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4614 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4615 break 2
4616 fi
4617done
4618 done
4619IFS=$as_save_IFS
4620
Ned Deilycbfb9a52012-06-23 16:02:19 -07004621 ;;
4622esac
4623fi
4624CXX=$ac_cv_path_CXX
4625if test -n "$CXX"; then
4626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4627$as_echo "$CXX" >&6; }
4628else
4629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4630$as_echo "no" >&6; }
4631fi
4632
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004633
4634fi
4635if test -z "$ac_cv_path_CXX"; then
4636 ac_pt_CXX=$CXX
4637 # Extract the first word of "clang++", so it can be a program name with args.
4638set dummy clang++; ac_word=$2
4639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4640$as_echo_n "checking for $ac_word... " >&6; }
4641if ${ac_cv_path_ac_pt_CXX+:} false; then :
4642 $as_echo_n "(cached) " >&6
4643else
4644 case $ac_pt_CXX in
4645 [\\/]* | ?:[\\/]*)
4646 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4647 ;;
4648 *)
4649 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4650for as_dir in notfound
4651do
4652 IFS=$as_save_IFS
4653 test -z "$as_dir" && as_dir=.
4654 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004655 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004656 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4657 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4658 break 2
4659 fi
4660done
4661 done
4662IFS=$as_save_IFS
4663
4664 ;;
4665esac
4666fi
4667ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4668if test -n "$ac_pt_CXX"; then
4669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4670$as_echo "$ac_pt_CXX" >&6; }
4671else
4672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4673$as_echo "no" >&6; }
4674fi
4675
4676 if test "x$ac_pt_CXX" = x; then
4677 CXX="clang++"
4678 else
4679 case $cross_compiling:$ac_tool_warned in
4680yes:)
4681{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4682$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4683ac_tool_warned=yes ;;
4684esac
4685 CXX=$ac_pt_CXX
4686 fi
4687else
4688 CXX="$ac_cv_path_CXX"
4689fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004690 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004691 esac
4692 if test "$CXX" = "notfound"
4693 then
4694 CXX=""
4695 fi
4696fi
4697if test -z "$CXX"
4698then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004699 if test -n "$ac_tool_prefix"; then
4700 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4701 do
4702 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4703set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4705$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004706if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004707 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004708else
4709 if test -n "$CXX"; then
4710 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4711else
4712as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4713for as_dir in $PATH
4714do
4715 IFS=$as_save_IFS
4716 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004717 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004718 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004719 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004720 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004721 break 2
4722 fi
4723done
Matthias Kloseb9621712010-04-24 17:59:49 +00004724 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004725IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004726
4727fi
4728fi
4729CXX=$ac_cv_prog_CXX
4730if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4732$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004733else
Matthias Kloseb9621712010-04-24 17:59:49 +00004734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4735$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004736fi
4737
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004738
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004739 test -n "$CXX" && break
4740 done
4741fi
4742if test -z "$CXX"; then
4743 ac_ct_CXX=$CXX
4744 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4745do
4746 # Extract the first word of "$ac_prog", so it can be a program name with args.
4747set dummy $ac_prog; ac_word=$2
4748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4749$as_echo_n "checking for $ac_word... " >&6; }
4750if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4751 $as_echo_n "(cached) " >&6
4752else
4753 if test -n "$ac_ct_CXX"; then
4754 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4755else
4756as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4757for as_dir in $PATH
4758do
4759 IFS=$as_save_IFS
4760 test -z "$as_dir" && as_dir=.
4761 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004762 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004763 ac_cv_prog_ac_ct_CXX="$ac_prog"
4764 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4765 break 2
4766 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004767done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004768 done
4769IFS=$as_save_IFS
4770
4771fi
4772fi
4773ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4774if test -n "$ac_ct_CXX"; then
4775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4776$as_echo "$ac_ct_CXX" >&6; }
4777else
4778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4779$as_echo "no" >&6; }
4780fi
4781
4782
4783 test -n "$ac_ct_CXX" && break
4784done
4785
4786 if test "x$ac_ct_CXX" = x; then
4787 CXX="notfound"
4788 else
4789 case $cross_compiling:$ac_tool_warned in
4790yes:)
4791{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4792$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4793ac_tool_warned=yes ;;
4794esac
4795 CXX=$ac_ct_CXX
4796 fi
4797fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004798
4799 if test "$CXX" = "notfound"
4800 then
4801 CXX=""
4802 fi
4803fi
4804if test "$preset_cxx" != "$CXX"
4805then
Matthias Kloseb9621712010-04-24 17:59:49 +00004806 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004807
4808 By default, distutils will build C++ extension modules with \"$CXX\".
4809 If this is not intended, then set CXX on the configure command line.
4810 " >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004811$as_echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004812
4813 By default, distutils will build C++ extension modules with \"$CXX\".
4814 If this is not intended, then set CXX on the configure command line.
4815 " >&2;}
4816fi
4817
4818
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
4820$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
4821save_LDFLAGS="$LDFLAGS"
4822LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00004823
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004824cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4825/* end confdefs.h. */
4826
4827int
4828main ()
4829{
4830
4831 ;
4832 return 0;
4833}
4834_ACEOF
4835if ac_fn_c_try_link "$LINENO"; then :
4836 NO_AS_NEEDED="-Wl,--no-as-needed"
4837 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4838$as_echo "yes" >&6; }
4839else
4840 NO_AS_NEEDED=""
4841 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4842$as_echo "no" >&6; }
4843fi
4844rm -f core conftest.err conftest.$ac_objext \
4845 conftest$ac_exeext conftest.$ac_ext
4846LDFLAGS="$save_LDFLAGS"
4847
4848
4849
4850# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004851ac_ext=c
4852ac_cpp='$CPP $CPPFLAGS'
4853ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4854ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4855ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Kloseb9621712010-04-24 17:59:49 +00004856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4857$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004858# On Suns, sometimes $CPP names a directory.
4859if test -n "$CPP" && test -d "$CPP"; then
4860 CPP=
4861fi
4862if test -z "$CPP"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02004863 if ${ac_cv_prog_CPP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004864 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004865else
Martin v. Löwis11437992002-04-12 09:54:03 +00004866 # Double quotes because CPP needs to be expanded
4867 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4868 do
4869 ac_preproc_ok=false
4870for ac_c_preproc_warn_flag in '' yes
4871do
4872 # Use a header file that comes with gcc, so configuring glibc
4873 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004874 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4875 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004876 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004877 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004878 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004879/* end confdefs.h. */
4880#ifdef __STDC__
4881# include <limits.h>
4882#else
4883# include <assert.h>
4884#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004885 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004886_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004887if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004888
Matthias Kloseb9621712010-04-24 17:59:49 +00004889else
Martin v. Löwis11437992002-04-12 09:54:03 +00004890 # Broken: fails on valid input.
4891continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004892fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004893rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004894
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004895 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004896 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004897 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004898/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004899#include <ac_nonexistent.h>
4900_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004901if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004902 # Broken: success on invalid input.
4903continue
4904else
Martin v. Löwis11437992002-04-12 09:54:03 +00004905 # Passes both tests.
4906ac_preproc_ok=:
4907break
4908fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004909rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004910
4911done
4912# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004913rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004914if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004915 break
4916fi
4917
4918 done
4919 ac_cv_prog_CPP=$CPP
4920
4921fi
4922 CPP=$ac_cv_prog_CPP
4923else
4924 ac_cv_prog_CPP=$CPP
4925fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004926{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4927$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004928ac_preproc_ok=false
4929for ac_c_preproc_warn_flag in '' yes
4930do
4931 # Use a header file that comes with gcc, so configuring glibc
4932 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004933 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4934 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004935 # On the NeXT, cc -E runs the code through the compiler's parser,
4936 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004937 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004938/* end confdefs.h. */
4939#ifdef __STDC__
4940# include <limits.h>
4941#else
4942# include <assert.h>
4943#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004944 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004945_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004946if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004947
Matthias Kloseb9621712010-04-24 17:59:49 +00004948else
Martin v. Löwis11437992002-04-12 09:54:03 +00004949 # Broken: fails on valid input.
4950continue
4951fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004952rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004953
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004954 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004955 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004956 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004957/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004958#include <ac_nonexistent.h>
4959_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004960if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004961 # Broken: success on invalid input.
4962continue
4963else
Martin v. Löwis11437992002-04-12 09:54:03 +00004964 # Passes both tests.
4965ac_preproc_ok=:
4966break
4967fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004968rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004969
4970done
4971# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004972rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004973if $ac_preproc_ok; then :
4974
Martin v. Löwis11437992002-04-12 09:54:03 +00004975else
Matthias Kloseb9621712010-04-24 17:59:49 +00004976 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4977$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004978as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
Victor Stinnere0be4232011-10-25 13:06:09 +02004979See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004980fi
4981
4982ac_ext=c
4983ac_cpp='$CPP $CPPFLAGS'
4984ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4985ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4986ac_compiler_gnu=$ac_cv_c_compiler_gnu
4987
4988
Matthias Kloseb9621712010-04-24 17:59:49 +00004989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4990$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004991if ${ac_cv_path_GREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004992 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004993else
Matthias Kloseb9621712010-04-24 17:59:49 +00004994 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004995 ac_path_GREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004996 # Loop through the user's path and test for each of PROGNAME-LIST
4997 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004998for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4999do
5000 IFS=$as_save_IFS
5001 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005002 for ac_prog in grep ggrep; do
5003 for ac_exec_ext in '' $ac_executable_extensions; do
5004 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005005 as_fn_executable_p "$ac_path_GREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005006# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005007 # Check for GNU $ac_path_GREP
5008case `"$ac_path_GREP" --version 2>&1` in
5009*GNU*)
5010 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5011*)
5012 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005013 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005014 while :
5015 do
5016 cat "conftest.in" "conftest.in" >"conftest.tmp"
5017 mv "conftest.tmp" "conftest.in"
5018 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005019 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005020 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5021 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005022 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005023 if test $ac_count -gt ${ac_path_GREP_max-0}; then
5024 # Best one so far, save it but keep looking for a better one
5025 ac_cv_path_GREP="$ac_path_GREP"
5026 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00005027 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005028 # 10*(2^10) chars as input seems more than enough
5029 test $ac_count -gt 10 && break
5030 done
5031 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5032esac
5033
Matthias Kloseb9621712010-04-24 17:59:49 +00005034 $ac_path_GREP_found && break 3
5035 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005036 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005037 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005038IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005039 if test -z "$ac_cv_path_GREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005040 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +00005041 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005042else
5043 ac_cv_path_GREP=$GREP
5044fi
5045
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005046fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005047{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5048$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005049 GREP="$ac_cv_path_GREP"
5050
5051
Matthias Kloseb9621712010-04-24 17:59:49 +00005052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5053$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005054if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005055 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005056else
5057 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5058 then ac_cv_path_EGREP="$GREP -E"
5059 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005060 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005061 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005062 # Loop through the user's path and test for each of PROGNAME-LIST
5063 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005064for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5065do
5066 IFS=$as_save_IFS
5067 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005068 for ac_prog in egrep; do
5069 for ac_exec_ext in '' $ac_executable_extensions; do
5070 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005071 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005072# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005073 # Check for GNU $ac_path_EGREP
5074case `"$ac_path_EGREP" --version 2>&1` in
5075*GNU*)
5076 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5077*)
5078 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005079 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005080 while :
5081 do
5082 cat "conftest.in" "conftest.in" >"conftest.tmp"
5083 mv "conftest.tmp" "conftest.in"
5084 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005085 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005086 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5087 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005088 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005089 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5090 # Best one so far, save it but keep looking for a better one
5091 ac_cv_path_EGREP="$ac_path_EGREP"
5092 ac_path_EGREP_max=$ac_count
5093 fi
5094 # 10*(2^10) chars as input seems more than enough
5095 test $ac_count -gt 10 && break
5096 done
5097 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5098esac
5099
Matthias Kloseb9621712010-04-24 17:59:49 +00005100 $ac_path_EGREP_found && break 3
5101 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005102 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005103 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005104IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005105 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005106 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +00005107 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005108else
5109 ac_cv_path_EGREP=$EGREP
5110fi
5111
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005112 fi
5113fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005114{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5115$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005116 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005117
5118
Matthias Kloseb9621712010-04-24 17:59:49 +00005119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5120$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005121if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005122 $as_echo_n "(cached) " >&6
5123else
5124 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005125/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005126#include <stdlib.h>
5127#include <stdarg.h>
5128#include <string.h>
5129#include <float.h>
5130
5131int
5132main ()
5133{
5134
5135 ;
5136 return 0;
5137}
5138_ACEOF
5139if ac_fn_c_try_compile "$LINENO"; then :
5140 ac_cv_header_stdc=yes
5141else
5142 ac_cv_header_stdc=no
5143fi
5144rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5145
5146if test $ac_cv_header_stdc = yes; then
5147 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5148 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5149/* end confdefs.h. */
5150#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005151
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005152_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005153if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005154 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005155
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005156else
Matthias Kloseb9621712010-04-24 17:59:49 +00005157 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005158fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005159rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005160
Matthias Kloseb9621712010-04-24 17:59:49 +00005161fi
5162
5163if test $ac_cv_header_stdc = yes; then
5164 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5165 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5166/* end confdefs.h. */
5167#include <stdlib.h>
5168
5169_ACEOF
5170if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5171 $EGREP "free" >/dev/null 2>&1; then :
5172
5173else
5174 ac_cv_header_stdc=no
5175fi
5176rm -f conftest*
5177
5178fi
5179
5180if test $ac_cv_header_stdc = yes; then
5181 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5182 if test "$cross_compiling" = yes; then :
5183 :
5184else
5185 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5186/* end confdefs.h. */
5187#include <ctype.h>
5188#include <stdlib.h>
5189#if ((' ' & 0x0FF) == 0x020)
5190# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5191# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5192#else
5193# define ISLOWER(c) \
5194 (('a' <= (c) && (c) <= 'i') \
5195 || ('j' <= (c) && (c) <= 'r') \
5196 || ('s' <= (c) && (c) <= 'z'))
5197# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5198#endif
5199
5200#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5201int
5202main ()
5203{
5204 int i;
5205 for (i = 0; i < 256; i++)
5206 if (XOR (islower (i), ISLOWER (i))
5207 || toupper (i) != TOUPPER (i))
5208 return 2;
5209 return 0;
5210}
5211_ACEOF
5212if ac_fn_c_try_run "$LINENO"; then :
5213
5214else
5215 ac_cv_header_stdc=no
5216fi
5217rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5218 conftest.$ac_objext conftest.beam conftest.$ac_ext
5219fi
5220
5221fi
5222fi
5223{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5224$as_echo "$ac_cv_header_stdc" >&6; }
5225if test $ac_cv_header_stdc = yes; then
5226
5227$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5228
5229fi
5230
5231# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5232for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5233 inttypes.h stdint.h unistd.h
5234do :
5235 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5236ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5237"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005238if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005239 cat >>confdefs.h <<_ACEOF
5240#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5241_ACEOF
5242
5243fi
5244
5245done
5246
5247
5248
5249 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02005250if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005251 MINIX=yes
5252else
5253 MINIX=
5254fi
5255
5256
5257 if test "$MINIX" = yes; then
5258
5259$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5260
5261
5262$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5263
5264
5265$as_echo "#define _MINIX 1" >>confdefs.h
5266
5267 fi
5268
5269
5270 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5271$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005272if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005273 $as_echo_n "(cached) " >&6
5274else
5275 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5276/* end confdefs.h. */
5277
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005278# define __EXTENSIONS__ 1
5279 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005280int
5281main ()
5282{
5283
5284 ;
5285 return 0;
5286}
5287_ACEOF
5288if ac_fn_c_try_compile "$LINENO"; then :
5289 ac_cv_safe_to_define___extensions__=yes
5290else
5291 ac_cv_safe_to_define___extensions__=no
5292fi
5293rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5294fi
5295{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5296$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5297 test $ac_cv_safe_to_define___extensions__ = yes &&
5298 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5299
5300 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5301
5302 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5303
5304 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5305
5306 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5307
5308
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005309
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005310# Check for unsupported systems
5311case $ac_sys_system/$ac_sys_release in
5312atheos*|Linux*/1*)
5313 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5314 echo See README for details.
5315 exit 1;;
5316esac
5317
5318
Matthias Kloseb9621712010-04-24 17:59:49 +00005319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5320$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005321
5322# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005323if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005324 withval=$with_suffix;
5325 case $withval in
5326 no) EXEEXT=;;
5327 yes) EXEEXT=.exe;;
5328 *) EXEEXT=$withval;;
5329 esac
5330fi
5331
Matthias Kloseb9621712010-04-24 17:59:49 +00005332{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5333$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005334
5335# Test whether we're running on a non-case-sensitive system, in which
5336# case we give a warning if no ext is given
5337
Matthias Kloseb9621712010-04-24 17:59:49 +00005338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5339$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005340if test ! -d CaseSensitiveTestDir; then
5341mkdir CaseSensitiveTestDir
5342fi
5343
5344if test -d casesensitivetestdir
5345then
Matthias Kloseb9621712010-04-24 17:59:49 +00005346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5347$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005348 BUILDEXEEXT=.exe
5349else
Matthias Kloseb9621712010-04-24 17:59:49 +00005350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5351$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005352 BUILDEXEEXT=$EXEEXT
5353fi
5354rmdir CaseSensitiveTestDir
5355
5356case $MACHDEP in
5357bsdos*)
5358 case $CC in
5359 gcc) CC="$CC -D_HAVE_BSDI";;
5360 esac;;
5361esac
5362
5363case $ac_sys_system in
5364hp*|HP*)
5365 case $CC in
5366 cc|*/cc) CC="$CC -Ae";;
5367 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005368esac
5369
doko@python.org3e6e2ac2013-01-25 13:12:29 +01005370MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5371
5372
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005373
5374
Matthias Kloseb9621712010-04-24 17:59:49 +00005375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5376$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005377if test -z "$LIBRARY"
5378then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005379 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005380fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005381{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5382$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005383
5384# LDLIBRARY is the name of the library to link against (as opposed to the
5385# name of the library into which to insert object files). BLDLIBRARY is also
5386# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5387# is blank as the main program is not linked directly against LDLIBRARY.
5388# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5389# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5390# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5391# DLLLIBRARY is the shared (i.e., DLL) library.
5392#
5393# RUNSHARED is used to run shared python without installed libraries
5394#
5395# INSTSONAME is the name of the shared library that will be use to install
5396# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005397#
5398# LDVERSION is the shared library version number, normally the Python version
5399# with the ABI build flags appended.
5400
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005401
5402
5403
5404
5405
5406
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005407
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005408LDLIBRARY="$LIBRARY"
5409BLDLIBRARY='$(LDLIBRARY)'
5410INSTSONAME='$(LDLIBRARY)'
5411DLLLIBRARY=''
5412LDLIBRARYDIR=''
5413RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005414LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005415
5416# LINKCC is the command that links the python executable -- default is $(CC).
5417# If CXX is set, and if it is needed to link a main function that was
5418# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5419# python might then depend on the C++ runtime
5420# This is altered for AIX in order to build the export list before
5421# linking.
5422
Matthias Kloseb9621712010-04-24 17:59:49 +00005423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5424$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005425if test -z "$LINKCC"
5426then
5427 LINKCC='$(PURIFY) $(MAINCC)'
5428 case $ac_sys_system in
5429 AIX*)
5430 exp_extra="\"\""
5431 if test $ac_sys_release -ge 5 -o \
5432 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5433 exp_extra="."
5434 fi
5435 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005436 QNX*)
5437 # qcc must be used because the other compilers do not
5438 # support -N.
5439 LINKCC=qcc;;
5440 esac
5441fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005442{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5443$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005444
5445# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5446# make sure we default having it set to "no": this is used by
5447# distutils.unixccompiler to know if it should add --enable-new-dtags
5448# to linker command lines, and failing to detect GNU ld simply results
5449# in the same bahaviour as before.
5450
Matthias Kloseb9621712010-04-24 17:59:49 +00005451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5452$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005453ac_prog=ld
5454if test "$GCC" = yes; then
5455 ac_prog=`$CC -print-prog-name=ld`
5456fi
5457case `"$ac_prog" -V 2>&1 < /dev/null` in
5458 *GNU*)
5459 GNULD=yes;;
5460 *)
5461 GNULD=no;;
5462esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005463{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5464$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005465
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
5467$as_echo_n "checking for inline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005468if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005469 $as_echo_n "(cached) " >&6
5470else
5471 ac_cv_c_inline=no
5472for ac_kw in inline __inline__ __inline; do
5473 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5474/* end confdefs.h. */
5475#ifndef __cplusplus
5476typedef int foo_t;
5477static $ac_kw foo_t static_foo () {return 0; }
5478$ac_kw foo_t foo () {return 0; }
5479#endif
5480
5481_ACEOF
5482if ac_fn_c_try_compile "$LINENO"; then :
5483 ac_cv_c_inline=$ac_kw
5484fi
5485rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5486 test "$ac_cv_c_inline" != no && break
5487done
5488
5489fi
5490{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
5491$as_echo "$ac_cv_c_inline" >&6; }
5492
5493case $ac_cv_c_inline in
5494 inline | yes) ;;
5495 *)
5496 case $ac_cv_c_inline in
5497 no) ac_val=;;
5498 *) ac_val=$ac_cv_c_inline;;
5499 esac
5500 cat >>confdefs.h <<_ACEOF
5501#ifndef __cplusplus
5502#define inline $ac_val
5503#endif
5504_ACEOF
5505 ;;
5506esac
5507
5508if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00005509
5510$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005511
5512
5513fi
5514
5515
Matthias Kloseb9621712010-04-24 17:59:49 +00005516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5517$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005518# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005519if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005520 enableval=$enable_shared;
5521fi
5522
5523
5524if test -z "$enable_shared"
5525then
5526 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005527 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005528 enable_shared="yes";;
5529 *)
5530 enable_shared="no";;
5531 esac
5532fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005533{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5534$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005535
Matthias Kloseb9621712010-04-24 17:59:49 +00005536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5537$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005538# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005539if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005540 enableval=$enable_profiling;
5541fi
5542
5543if test "x$enable_profiling" = xyes; then
5544 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005545 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005546 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005547/* end confdefs.h. */
5548int main() { return 0; }
5549_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005550if ac_fn_c_try_link "$LINENO"; then :
5551
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005552else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005553 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005554fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005555rm -f core conftest.err conftest.$ac_objext \
5556 conftest$ac_exeext conftest.$ac_ext
5557 CC="$ac_save_cc"
5558else
5559 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005560fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005561{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5562$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005563
doko@ubuntu.comba015832012-06-30 16:52:05 +02005564if test "x$enable_profiling" = xyes; then
5565 BASECFLAGS="-pg $BASECFLAGS"
5566 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005567fi
5568
Matthias Kloseb9621712010-04-24 17:59:49 +00005569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5570$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005571
5572# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5573# library that we build, but we do not want to link against it (we
5574# will find it with a -framework option). For this reason there is an
5575# extra variable BLDLIBRARY against which Python and the extension
5576# modules are linked, BLDLIBRARY. This is normally the same as
5577# LDLIBRARY, but empty for MacOSX framework builds.
5578if test "$enable_framework"
5579then
5580 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
5581 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
5582 BLDLIBRARY=''
5583else
5584 BLDLIBRARY='$(LDLIBRARY)'
5585fi
5586
5587# Other platforms follow
5588if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005589 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005590
Matthias Kloseb9621712010-04-24 17:59:49 +00005591$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005592
5593 case $ac_sys_system in
5594 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005595 LDLIBRARY='libpython$(LDVERSION).dll.a'
5596 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005597 ;;
5598 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005599 LDLIBRARY='libpython$(LDVERSION).so'
5600 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005601 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
5602 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005603 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005604 then
5605 PY3LIBRARY=libpython3.so
5606 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005607 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005608 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005609 LDLIBRARY='libpython$(LDVERSION).so'
5610 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005611 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
5612 case $ac_sys_system in
5613 FreeBSD*)
5614 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
5615 ;;
5616 esac
5617 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005618 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005619 then
5620 PY3LIBRARY=libpython3.so
5621 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005622 ;;
5623 hp*|HP*)
5624 case `uname -m` in
5625 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005626 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005627 ;;
5628 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005629 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005630 ;;
5631 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005632 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005633 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
5634 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005635 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005636 LDLIBRARY='libpython$(LDVERSION).dylib'
5637 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005638 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
5639 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005640 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005641 LDLIBRARY='libpython$(LDVERSION).so'
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005642 RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
5643 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005644
5645 esac
5646else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005647 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005648 case $ac_sys_system in
5649 CYGWIN*)
5650 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005651 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005652 ;;
5653 esac
5654fi
5655
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005656if test "$cross_compiling" = yes; then
5657 RUNSHARED=
5658fi
5659
Matthias Kloseb9621712010-04-24 17:59:49 +00005660{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5661$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005662
5663if test -n "$ac_tool_prefix"; then
5664 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5665set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5667$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005668if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005669 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005670else
5671 if test -n "$RANLIB"; then
5672 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5673else
5674as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5675for as_dir in $PATH
5676do
5677 IFS=$as_save_IFS
5678 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005679 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005680 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005681 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005682 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005683 break 2
5684 fi
5685done
Matthias Kloseb9621712010-04-24 17:59:49 +00005686 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005687IFS=$as_save_IFS
5688
5689fi
5690fi
5691RANLIB=$ac_cv_prog_RANLIB
5692if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5694$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005695else
Matthias Kloseb9621712010-04-24 17:59:49 +00005696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5697$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005698fi
5699
5700
5701fi
5702if test -z "$ac_cv_prog_RANLIB"; then
5703 ac_ct_RANLIB=$RANLIB
5704 # Extract the first word of "ranlib", so it can be a program name with args.
5705set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5707$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005708if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005709 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005710else
5711 if test -n "$ac_ct_RANLIB"; then
5712 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5713else
5714as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5715for as_dir in $PATH
5716do
5717 IFS=$as_save_IFS
5718 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005719 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005720 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005721 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005722 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005723 break 2
5724 fi
5725done
Matthias Kloseb9621712010-04-24 17:59:49 +00005726 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005727IFS=$as_save_IFS
5728
5729fi
5730fi
5731ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5732if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5734$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005735else
Matthias Kloseb9621712010-04-24 17:59:49 +00005736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5737$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005738fi
5739
5740 if test "x$ac_ct_RANLIB" = x; then
5741 RANLIB=":"
5742 else
5743 case $cross_compiling:$ac_tool_warned in
5744yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00005745{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5746$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005747ac_tool_warned=yes ;;
5748esac
5749 RANLIB=$ac_ct_RANLIB
5750 fi
5751else
5752 RANLIB="$ac_cv_prog_RANLIB"
5753fi
5754
5755
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005756if test -n "$ac_tool_prefix"; then
5757 for ac_prog in ar aal
5758 do
5759 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5760set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5762$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005763if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005764 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005765else
5766 if test -n "$AR"; then
5767 ac_cv_prog_AR="$AR" # Let the user override the test.
5768else
5769as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5770for as_dir in $PATH
5771do
5772 IFS=$as_save_IFS
5773 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005774 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005775 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005776 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005777 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005778 break 2
5779 fi
5780done
Matthias Kloseb9621712010-04-24 17:59:49 +00005781 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005782IFS=$as_save_IFS
5783
5784fi
5785fi
5786AR=$ac_cv_prog_AR
5787if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5789$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005790else
Matthias Kloseb9621712010-04-24 17:59:49 +00005791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5792$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005793fi
5794
5795
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005796 test -n "$AR" && break
5797 done
5798fi
5799if test -z "$AR"; then
5800 ac_ct_AR=$AR
5801 for ac_prog in ar aal
5802do
5803 # Extract the first word of "$ac_prog", so it can be a program name with args.
5804set dummy $ac_prog; ac_word=$2
5805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5806$as_echo_n "checking for $ac_word... " >&6; }
5807if ${ac_cv_prog_ac_ct_AR+:} false; then :
5808 $as_echo_n "(cached) " >&6
5809else
5810 if test -n "$ac_ct_AR"; then
5811 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5812else
5813as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5814for as_dir in $PATH
5815do
5816 IFS=$as_save_IFS
5817 test -z "$as_dir" && as_dir=.
5818 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005819 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005820 ac_cv_prog_ac_ct_AR="$ac_prog"
5821 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5822 break 2
5823 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005824done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005825 done
5826IFS=$as_save_IFS
5827
5828fi
5829fi
5830ac_ct_AR=$ac_cv_prog_ac_ct_AR
5831if test -n "$ac_ct_AR"; then
5832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5833$as_echo "$ac_ct_AR" >&6; }
5834else
5835 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5836$as_echo "no" >&6; }
5837fi
5838
5839
5840 test -n "$ac_ct_AR" && break
5841done
5842
5843 if test "x$ac_ct_AR" = x; then
5844 AR="ar"
5845 else
5846 case $cross_compiling:$ac_tool_warned in
5847yes:)
5848{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5849$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5850ac_tool_warned=yes ;;
5851esac
5852 AR=$ac_ct_AR
5853 fi
5854fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005855
5856
5857# tweak ARFLAGS only if the user didn't set it on the command line
5858
5859if test -z "$ARFLAGS"
5860then
5861 ARFLAGS="rc"
5862fi
5863
doko@ubuntu.com58844492012-06-30 18:25:32 +02005864if test -n "$ac_tool_prefix"; then
5865 for ac_prog in readelf
5866 do
5867 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5868set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5870$as_echo_n "checking for $ac_word... " >&6; }
5871if ${ac_cv_prog_READELF+:} false; then :
5872 $as_echo_n "(cached) " >&6
5873else
5874 if test -n "$READELF"; then
5875 ac_cv_prog_READELF="$READELF" # Let the user override the test.
5876else
5877as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5878for as_dir in $PATH
5879do
5880 IFS=$as_save_IFS
5881 test -z "$as_dir" && as_dir=.
5882 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005883 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02005884 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
5885 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5886 break 2
5887 fi
5888done
5889 done
5890IFS=$as_save_IFS
5891
5892fi
5893fi
5894READELF=$ac_cv_prog_READELF
5895if test -n "$READELF"; then
5896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
5897$as_echo "$READELF" >&6; }
5898else
5899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5900$as_echo "no" >&6; }
5901fi
5902
5903
5904 test -n "$READELF" && break
5905 done
5906fi
5907if test -z "$READELF"; then
5908 ac_ct_READELF=$READELF
5909 for ac_prog in readelf
5910do
5911 # Extract the first word of "$ac_prog", so it can be a program name with args.
5912set dummy $ac_prog; ac_word=$2
5913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5914$as_echo_n "checking for $ac_word... " >&6; }
5915if ${ac_cv_prog_ac_ct_READELF+:} false; then :
5916 $as_echo_n "(cached) " >&6
5917else
5918 if test -n "$ac_ct_READELF"; then
5919 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
5920else
5921as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5922for as_dir in $PATH
5923do
5924 IFS=$as_save_IFS
5925 test -z "$as_dir" && as_dir=.
5926 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005927 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02005928 ac_cv_prog_ac_ct_READELF="$ac_prog"
5929 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5930 break 2
5931 fi
5932done
5933 done
5934IFS=$as_save_IFS
5935
5936fi
5937fi
5938ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
5939if test -n "$ac_ct_READELF"; then
5940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
5941$as_echo "$ac_ct_READELF" >&6; }
5942else
5943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5944$as_echo "no" >&6; }
5945fi
5946
5947
5948 test -n "$ac_ct_READELF" && break
5949done
5950
5951 if test "x$ac_ct_READELF" = x; then
5952 READELF=":"
5953 else
5954 case $cross_compiling:$ac_tool_warned in
5955yes:)
5956{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5957$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5958ac_tool_warned=yes ;;
5959esac
5960 READELF=$ac_ct_READELF
5961 fi
5962fi
5963
5964if test "$cross_compiling" = yes; then
5965 case "$READELF" in
5966 readelf|:)
5967 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
5968 ;;
5969 esac
5970fi
5971
5972
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005973
Matthias Klosec4c48422012-10-21 23:05:35 +02005974for ac_prog in python$PACKAGE_VERSION python3 python
5975do
5976 # Extract the first word of "$ac_prog", so it can be a program name with args.
5977set dummy $ac_prog; ac_word=$2
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5979$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klosec4c48422012-10-21 23:05:35 +02005980if ${ac_cv_prog_PYTHON+:} false; then :
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005981 $as_echo_n "(cached) " >&6
5982else
Matthias Klosec4c48422012-10-21 23:05:35 +02005983 if test -n "$PYTHON"; then
5984 ac_cv_prog_PYTHON="$PYTHON" # Let the user override the test.
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005985else
5986as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5987for as_dir in $PATH
5988do
5989 IFS=$as_save_IFS
5990 test -z "$as_dir" && as_dir=.
5991 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005992 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Matthias Klosec4c48422012-10-21 23:05:35 +02005993 ac_cv_prog_PYTHON="$ac_prog"
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005994 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5995 break 2
5996 fi
5997done
5998 done
5999IFS=$as_save_IFS
6000
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006001fi
6002fi
Matthias Klosec4c48422012-10-21 23:05:35 +02006003PYTHON=$ac_cv_prog_PYTHON
6004if test -n "$PYTHON"; then
6005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
6006$as_echo "$PYTHON" >&6; }
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006007else
6008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6009$as_echo "no" >&6; }
6010fi
6011
6012
Matthias Klosec4c48422012-10-21 23:05:35 +02006013 test -n "$PYTHON" && break
6014done
6015test -n "$PYTHON" || PYTHON="not-found"
6016
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006017if test "$PYTHON" = not-found; then
Matthias Klosec4c48422012-10-21 23:05:35 +02006018 ASDLGEN="@echo python: $PYTHON! cannot run \$(srcdir)/Parser/asdl_c.py #"
6019else
6020 ASDLGEN="$PYTHON"
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006021fi
6022
6023
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006024case $MACHDEP in
6025bsdos*|hp*|HP*)
6026 # install -d does not work on BSDI or HP-UX
6027 if test -z "$INSTALL"
6028 then
6029 INSTALL="${srcdir}/install-sh -c"
6030 fi
6031esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006032# Find a good install program. We prefer a C program (faster),
6033# so one script is as good as another. But avoid the broken or
6034# incompatible versions:
6035# SysV /etc/install, /usr/sbin/install
6036# SunOS /usr/etc/install
6037# IRIX /sbin/install
6038# AIX /bin/install
6039# AmigaOS /C/install, which installs bootblocks on floppy discs
6040# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6041# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6042# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6043# OS/2's system install, which has a completely different semantic
6044# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006045# Reject install programs that cannot install multiple files.
6046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6047$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006048if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006049if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006050 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006051else
6052 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6053for as_dir in $PATH
6054do
6055 IFS=$as_save_IFS
6056 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006057 # Account for people who put trailing slashes in PATH elements.
6058case $as_dir/ in #((
6059 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006060 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006061 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006062 /usr/ucb/* ) ;;
6063 *)
6064 # OSF1 and SCO ODT 3.0 have their own names for install.
6065 # Don't use installbsd from OSF since it installs stuff as root
6066 # by default.
6067 for ac_prog in ginstall scoinst install; do
6068 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006069 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006070 if test $ac_prog = install &&
6071 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6072 # AIX install. It has an incompatible calling convention.
6073 :
6074 elif test $ac_prog = install &&
6075 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6076 # program-specific install script used by HP pwplus--don't use.
6077 :
6078 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006079 rm -rf conftest.one conftest.two conftest.dir
6080 echo one > conftest.one
6081 echo two > conftest.two
6082 mkdir conftest.dir
6083 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6084 test -s conftest.one && test -s conftest.two &&
6085 test -s conftest.dir/conftest.one &&
6086 test -s conftest.dir/conftest.two
6087 then
6088 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6089 break 3
6090 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006091 fi
6092 fi
6093 done
6094 done
6095 ;;
6096esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006097
6098 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006099IFS=$as_save_IFS
6100
Matthias Kloseb9621712010-04-24 17:59:49 +00006101rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006102
6103fi
6104 if test "${ac_cv_path_install+set}" = set; then
6105 INSTALL=$ac_cv_path_install
6106 else
6107 # As a last resort, use the slow shell script. Don't cache a
6108 # value for INSTALL within a source directory, because that will
6109 # break other packages using the cache if that directory is
6110 # removed, or if the value is a relative name.
6111 INSTALL=$ac_install_sh
6112 fi
6113fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006114{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6115$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006116
6117# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6118# It thinks the first close brace ends the variable substitution.
6119test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6120
6121test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6122
6123test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6124
Matthias Klose93a0ef12012-03-15 18:08:34 +01006125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6126$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6127if test -z "$MKDIR_P"; then
6128 if ${ac_cv_path_mkdir+:} false; then :
6129 $as_echo_n "(cached) " >&6
6130else
6131 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6132for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6133do
6134 IFS=$as_save_IFS
6135 test -z "$as_dir" && as_dir=.
6136 for ac_prog in mkdir gmkdir; do
6137 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006138 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006139 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6140 'mkdir (GNU coreutils) '* | \
6141 'mkdir (coreutils) '* | \
6142 'mkdir (fileutils) '4.1*)
6143 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6144 break 3;;
6145 esac
6146 done
6147 done
6148 done
6149IFS=$as_save_IFS
6150
6151fi
6152
6153 test -d ./--version && rmdir ./--version
6154 if test "${ac_cv_path_mkdir+set}" = set; then
6155 MKDIR_P="$ac_cv_path_mkdir -p"
6156 else
6157 # As a last resort, use the slow shell script. Don't cache a
6158 # value for MKDIR_P within a source directory, because that will
6159 # break other packages using the cache if that directory is
6160 # removed, or if the value is a relative name.
6161 MKDIR_P="$ac_install_sh -d"
6162 fi
6163fi
6164{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6165$as_echo "$MKDIR_P" >&6; }
6166
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006167
6168# Not every filesystem supports hard links
6169
6170if test -z "$LN" ; then
6171 case $ac_sys_system in
6172 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006173 *) LN=ln;;
6174 esac
6175fi
6176
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006177# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006178
6179ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006180
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006181# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6183$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006184
6185# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006186if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006187 withval=$with_pydebug;
6188if test "$withval" != no
6189then
6190
Matthias Kloseb9621712010-04-24 17:59:49 +00006191$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006192
Matthias Kloseb9621712010-04-24 17:59:49 +00006193 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6194$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006195 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006196 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006197else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6198$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006199fi
6200else
Matthias Kloseb9621712010-04-24 17:59:49 +00006201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6202$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006203fi
6204
6205
6206# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6207# merged with this chunk of code?
6208
6209# Optimizer/debugger flags
6210# ------------------------
6211# (The following bit of code is complicated enough - please keep things
6212# indented properly. Just pretend you're editing Python code. ;-)
6213
6214# There are two parallel sets of case statements below, one that checks to
6215# see if OPT was set and one that does BASECFLAGS setting based upon
6216# compiler and platform. BASECFLAGS tweaks need to be made even if the
6217# user set OPT.
6218
6219# tweak OPT based on compiler and platform, only if the user didn't set
6220# it on the command line
6221
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006222if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006223then
6224 case $GCC in
6225 yes)
6226 if test "$CC" != 'g++' ; then
6227 STRICT_PROTO="-Wstrict-prototypes"
6228 fi
6229 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6230 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6231 WRAP="-fwrapv"
6232 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006233
6234 # Clang also needs -fwrapv
Stefan Krahaf04ff22011-12-08 22:20:31 +01006235 case $CC in
6236 *clang*) WRAP="-fwrapv"
6237 ;;
6238 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006239
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006240 case $ac_cv_prog_cc_g in
6241 yes)
6242 if test "$Py_DEBUG" = 'true' ; then
6243 # Optimization messes up debuggers, so turn it off for
6244 # debug builds.
Mark Dickinsonb2153e92010-05-05 22:31:36 +00006245 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006246 else
6247 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
6248 fi
6249 ;;
6250 *)
6251 OPT="-O3 -Wall $STRICT_PROTO"
6252 ;;
6253 esac
6254 case $ac_sys_system in
6255 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6256 ;;
6257 esac
6258 ;;
6259
6260 *)
6261 OPT="-O"
6262 ;;
6263 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006264fi
6265
6266
6267
6268# The -arch flags for universal builds on OSX
6269UNIVERSAL_ARCH_FLAGS=
6270
6271
6272# tweak BASECFLAGS based on compiler and platform
6273case $GCC in
6274yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006275 # Python doesn't violate C99 aliasing rules, but older versions of
6276 # GCC produce warnings for legal Python code. Enable
6277 # -fno-strict-aliasing on versions of GCC that support but produce
6278 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006279 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6280$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006281 ac_save_cc="$CC"
6282 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006283 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006284 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006285 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006286else
Matthias Kloseb9621712010-04-24 17:59:49 +00006287 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006288/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006289
Matthias Kloseb159a552010-04-25 21:00:44 +00006290
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006291int
6292main ()
6293{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006294
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006295 ;
6296 return 0;
6297}
Matthias Kloseb159a552010-04-25 21:00:44 +00006298
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006299_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006300if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006301
6302 CC="$ac_save_cc -fstrict-aliasing"
6303 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6304 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006305/* end confdefs.h. */
6306
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006307 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006308int
6309main ()
6310{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006311double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006312 ;
6313 return 0;
6314}
Matthias Kloseb159a552010-04-25 21:00:44 +00006315
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006316_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006317if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006318
6319 ac_cv_no_strict_aliasing=no
6320
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006321else
Matthias Kloseb159a552010-04-25 21:00:44 +00006322
6323 ac_cv_no_strict_aliasing=yes
6324
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006325fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006326rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006327
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006328else
Matthias Kloseb159a552010-04-25 21:00:44 +00006329
6330 ac_cv_no_strict_aliasing=no
6331
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006332fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006333rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006334fi
6335
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006336 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006337 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6339$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006340 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006341 then
6342 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6343 fi
6344
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006345 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
6346$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
6347 ac_save_cc="$CC"
6348 CC="$CC -Wunused-result -Werror"
6349 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006350 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006351 $as_echo_n "(cached) " >&6
6352else
6353 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6354/* end confdefs.h. */
6355
6356
6357int
6358main ()
6359{
6360
6361 ;
6362 return 0;
6363}
6364
6365_ACEOF
6366if ac_fn_c_try_compile "$LINENO"; then :
6367
6368 ac_cv_disable_unused_result_warning=yes
6369
6370else
6371
6372 ac_cv_disable_unused_result_warning=no
6373
6374fi
6375rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6376fi
6377
6378 CFLAGS="$save_CFLAGS"
6379 CC="$ac_save_cc"
6380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
6381$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
6382
6383 if test $ac_cv_disable_unused_result_warning = yes
6384 then
6385 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
6386 fi
6387
Benjamin Petersoncc00e012013-05-20 08:22:04 -07006388 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Werror=declaration-after-statement" >&5
6389$as_echo_n "checking for -Werror=declaration-after-statement... " >&6; }
6390 ac_save_cc="$CC"
6391 CC="$CC -Werror=declaration-after-statement"
6392 save_CFLAGS="$CFLAGS"
6393 if ${ac_cv_declaration_after_statement_warning+:} false; then :
6394 $as_echo_n "(cached) " >&6
6395else
6396 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6397/* end confdefs.h. */
6398
6399
6400int
6401main ()
6402{
6403
6404 ;
6405 return 0;
6406}
6407
6408_ACEOF
6409if ac_fn_c_try_compile "$LINENO"; then :
6410
6411 ac_cv_declaration_after_statement_warning=yes
6412
6413else
6414
6415 ac_cv_declaration_after_statement_warning=no
6416
6417fi
6418rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6419fi
6420
6421 CFLAGS="$save_CFLAGS"
6422 CC="$ac_save_cc"
6423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_declaration_after_statement_warning" >&5
6424$as_echo "$ac_cv_declaration_after_statement_warning" >&6; }
6425
6426 if test $ac_cv_declaration_after_statement_warning = yes
6427 then
6428 BASECFLAGS="$BASECFLAGS -Werror=declaration-after-statement"
6429 fi
6430
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006431 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
6432 # support. Without this, treatment of subnormals doesn't follow
6433 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01006434 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006435 alpha*)
6436 BASECFLAGS="$BASECFLAGS -mieee"
6437 ;;
6438 esac
6439
6440 case $ac_sys_system in
6441 SCO_SV*)
6442 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
6443 ;;
6444 # is there any other compiler on Darwin besides gcc?
6445 Darwin*)
6446 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
6447 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussoren666028b2010-04-18 19:07:43 +00006448 if test "${CC}" = gcc
6449 then
Matthias Kloseb9621712010-04-24 17:59:49 +00006450 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
6451$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00006452 case "${UNIVERSALSDK}" in
6453 */MacOSX10.4u.sdk)
6454 # Build using 10.4 SDK, force usage of gcc when the
6455 # compiler is gcc, otherwise the user will get very
6456 # confusing error messages when building on OSX 10.6
6457 CC=gcc-4.0
6458 CPP=cpp-4.0
6459 ;;
6460 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006461 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
6462$as_echo "$CC" >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00006463 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006464
6465
6466 if test "${enable_universalsdk}"; then
6467 UNIVERSAL_ARCH_FLAGS=""
6468 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
6469 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
6470 ARCH_RUN_32BIT=""
Benjamin Peterson99f03762010-04-11 22:15:28 +00006471 LIPO_32BIT_FLAGS=""
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006472 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
6473 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00006474 LIPO_32BIT_FLAGS=""
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00006475 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006476
6477 elif test "$UNIVERSAL_ARCHS" = "all" ; then
6478 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00006479 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00006480 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006481
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006482 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
6483 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00006484 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00006485 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006486
6487 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
6488 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00006489 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00006490 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006491
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006492 else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006493 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006494
6495 fi
6496
6497
Ronald Oussoren666028b2010-04-18 19:07:43 +00006498 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
6499 if test "${UNIVERSALSDK}" != "/"
6500 then
6501 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
6502 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren712979d2010-04-20 19:51:33 +00006503 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006504 fi
6505 fi
6506
6507 # Calculate the right deployment target for this build.
6508 #
6509 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
Ned Deily3784ff92012-06-25 05:04:28 -07006510 if test ${cur_target} '>' 10.2 && \
6511 test ${cur_target} '<' 10.6
6512 then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006513 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00006514 if test ${enable_universalsdk}; then
6515 if test "${UNIVERSAL_ARCHS}" = "all"; then
6516 # Ensure that the default platform for a
6517 # 4-way universal build is OSX 10.5,
6518 # that's the first OS release where
6519 # 4-way builds make sense.
6520 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006521
6522 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
6523 cur_target='10.5'
6524
6525 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
6526 cur_target='10.5'
6527
6528 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
6529 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00006530 fi
6531 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00006532 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00006533 # On Intel macs default to a deployment
6534 # target of 10.4, that's the first OSX
6535 # release with Intel support.
6536 cur_target="10.4"
6537 fi
6538 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006539 fi
6540 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
6541
6542 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
6543 # environment with a value that is the same as what we'll use
6544 # in the Makefile to ensure that we'll get the same compiler
6545 # environment during configure and build time.
6546 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
6547 export MACOSX_DEPLOYMENT_TARGET
6548 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
6549
6550 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006551 esac
6552 ;;
6553
6554*)
6555 case $ac_sys_system in
6556 OpenUNIX*|UnixWare*)
6557 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
6558 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006559 SCO_SV*)
6560 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
6561 ;;
6562 esac
6563 ;;
6564esac
6565
6566if test "$Py_DEBUG" = 'true'; then
6567 :
6568else
6569 OPT="-DNDEBUG $OPT"
6570fi
6571
6572if test "$ac_arch_flags"
6573then
6574 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
6575fi
6576
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006577# On some compilers, pthreads are available without further options
6578# (e.g. MacOS X). On some of these systems, the compiler will not
6579# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
6580# So we have to see first whether pthreads are available without
6581# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00006582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
6583$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006584if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006585 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006586else
Matthias Kloseb9621712010-04-24 17:59:49 +00006587 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006588 ac_cv_pthread_is_default=no
6589else
Matthias Kloseb9621712010-04-24 17:59:49 +00006590 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006591/* end confdefs.h. */
6592
Stefan Krah7dba5942012-11-22 22:49:11 +01006593#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006594#include <pthread.h>
6595
6596void* routine(void* p){return NULL;}
6597
6598int main(){
6599 pthread_t p;
6600 if(pthread_create(&p,NULL,routine,NULL)!=0)
6601 return 1;
6602 (void)pthread_detach(p);
6603 return 0;
6604}
6605
6606_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006607if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006608
6609 ac_cv_pthread_is_default=yes
6610 ac_cv_kthread=no
6611 ac_cv_pthread=no
6612
6613else
Matthias Kloseb9621712010-04-24 17:59:49 +00006614 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006615fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006616rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6617 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006618fi
6619
6620
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006621fi
6622
Matthias Kloseb9621712010-04-24 17:59:49 +00006623{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
6624$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006625
6626
6627if test $ac_cv_pthread_is_default = yes
6628then
6629 ac_cv_kpthread=no
6630else
6631# -Kpthread, if available, provides the right #defines
6632# and linker options to make pthread_create available
6633# Some compilers won't report that they do not support -Kpthread,
6634# so we need to run a program to see whether it really made the
6635# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
6637$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006638if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006639 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006640else
6641 ac_save_cc="$CC"
6642CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006643if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006644 ac_cv_kpthread=no
6645else
Matthias Kloseb9621712010-04-24 17:59:49 +00006646 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006647/* end confdefs.h. */
6648
Stefan Krah7dba5942012-11-22 22:49:11 +01006649#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006650#include <pthread.h>
6651
6652void* routine(void* p){return NULL;}
6653
6654int main(){
6655 pthread_t p;
6656 if(pthread_create(&p,NULL,routine,NULL)!=0)
6657 return 1;
6658 (void)pthread_detach(p);
6659 return 0;
6660}
6661
6662_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006663if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006664 ac_cv_kpthread=yes
6665else
Matthias Kloseb9621712010-04-24 17:59:49 +00006666 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006667fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006668rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6669 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006670fi
6671
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006672CC="$ac_save_cc"
6673fi
6674
Matthias Kloseb9621712010-04-24 17:59:49 +00006675{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
6676$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006677fi
6678
6679if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
6680then
6681# -Kthread, if available, provides the right #defines
6682# and linker options to make pthread_create available
6683# Some compilers won't report that they do not support -Kthread,
6684# so we need to run a program to see whether it really made the
6685# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
6687$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006688if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006689 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006690else
6691 ac_save_cc="$CC"
6692CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006693if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006694 ac_cv_kthread=no
6695else
Matthias Kloseb9621712010-04-24 17:59:49 +00006696 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006697/* end confdefs.h. */
6698
Stefan Krah7dba5942012-11-22 22:49:11 +01006699#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006700#include <pthread.h>
6701
6702void* routine(void* p){return NULL;}
6703
6704int main(){
6705 pthread_t p;
6706 if(pthread_create(&p,NULL,routine,NULL)!=0)
6707 return 1;
6708 (void)pthread_detach(p);
6709 return 0;
6710}
6711
6712_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006713if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006714 ac_cv_kthread=yes
6715else
Matthias Kloseb9621712010-04-24 17:59:49 +00006716 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006717fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006718rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6719 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006720fi
6721
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006722CC="$ac_save_cc"
6723fi
6724
Matthias Kloseb9621712010-04-24 17:59:49 +00006725{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
6726$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006727fi
6728
6729if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
6730then
6731# -pthread, if available, provides the right #defines
6732# and linker options to make pthread_create available
6733# Some compilers won't report that they do not support -pthread,
6734# so we need to run a program to see whether it really made the
6735# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
6737$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01006738if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006739 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006740else
6741 ac_save_cc="$CC"
6742CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006743if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006744 ac_cv_pthread=no
6745else
Matthias Kloseb9621712010-04-24 17:59:49 +00006746 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006747/* end confdefs.h. */
6748
Stefan Krah7dba5942012-11-22 22:49:11 +01006749#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006750#include <pthread.h>
6751
6752void* routine(void* p){return NULL;}
6753
6754int main(){
6755 pthread_t p;
6756 if(pthread_create(&p,NULL,routine,NULL)!=0)
6757 return 1;
6758 (void)pthread_detach(p);
6759 return 0;
6760}
6761
6762_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006763if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006764 ac_cv_pthread=yes
6765else
Matthias Kloseb9621712010-04-24 17:59:49 +00006766 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006767fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006768rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6769 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006770fi
6771
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006772CC="$ac_save_cc"
6773fi
6774
Matthias Kloseb9621712010-04-24 17:59:49 +00006775{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
6776$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006777fi
6778
6779# If we have set a CC compiler flag for thread support then
6780# check if it works for CXX, too.
6781ac_cv_cxx_thread=no
6782if test ! -z "$CXX"
6783then
Matthias Kloseb9621712010-04-24 17:59:49 +00006784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
6785$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006786ac_save_cxx="$CXX"
6787
6788if test "$ac_cv_kpthread" = "yes"
6789then
6790 CXX="$CXX -Kpthread"
6791 ac_cv_cxx_thread=yes
6792elif test "$ac_cv_kthread" = "yes"
6793then
6794 CXX="$CXX -Kthread"
6795 ac_cv_cxx_thread=yes
6796elif test "$ac_cv_pthread" = "yes"
6797then
6798 CXX="$CXX -pthread"
6799 ac_cv_cxx_thread=yes
6800fi
6801
6802if test $ac_cv_cxx_thread = yes
6803then
6804 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
6805 $CXX -c conftest.$ac_ext 2>&5
6806 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
6807 && test -s conftest$ac_exeext && ./conftest$ac_exeext
6808 then
6809 ac_cv_cxx_thread=yes
6810 else
6811 ac_cv_cxx_thread=no
6812 fi
6813 rm -fr conftest*
6814fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006815{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
6816$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006817fi
6818CXX="$ac_save_cxx"
6819
6820
6821# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00006822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6823$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006824if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006825 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006826else
Matthias Kloseb9621712010-04-24 17:59:49 +00006827 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006828/* end confdefs.h. */
6829#include <stdlib.h>
6830#include <stdarg.h>
6831#include <string.h>
6832#include <float.h>
6833
6834int
6835main ()
6836{
6837
6838 ;
6839 return 0;
6840}
6841_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006842if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006843 ac_cv_header_stdc=yes
6844else
Matthias Kloseb9621712010-04-24 17:59:49 +00006845 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006846fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006847rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6848
6849if test $ac_cv_header_stdc = yes; then
6850 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006851 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006852/* end confdefs.h. */
6853#include <string.h>
6854
6855_ACEOF
6856if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006857 $EGREP "memchr" >/dev/null 2>&1; then :
6858
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006859else
6860 ac_cv_header_stdc=no
6861fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006862rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006863
6864fi
6865
6866if test $ac_cv_header_stdc = yes; then
6867 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006868 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006869/* end confdefs.h. */
6870#include <stdlib.h>
6871
6872_ACEOF
6873if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006874 $EGREP "free" >/dev/null 2>&1; then :
6875
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006876else
6877 ac_cv_header_stdc=no
6878fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006879rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006880
6881fi
6882
6883if test $ac_cv_header_stdc = yes; then
6884 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00006885 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006886 :
6887else
Matthias Kloseb9621712010-04-24 17:59:49 +00006888 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006889/* end confdefs.h. */
6890#include <ctype.h>
6891#include <stdlib.h>
6892#if ((' ' & 0x0FF) == 0x020)
6893# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6894# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6895#else
6896# define ISLOWER(c) \
6897 (('a' <= (c) && (c) <= 'i') \
6898 || ('j' <= (c) && (c) <= 'r') \
6899 || ('s' <= (c) && (c) <= 'z'))
6900# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6901#endif
6902
6903#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6904int
6905main ()
6906{
6907 int i;
6908 for (i = 0; i < 256; i++)
6909 if (XOR (islower (i), ISLOWER (i))
6910 || toupper (i) != TOUPPER (i))
6911 return 2;
6912 return 0;
6913}
6914_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006915if ac_fn_c_try_run "$LINENO"; then :
6916
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006917else
Matthias Kloseb9621712010-04-24 17:59:49 +00006918 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006919fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006920rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6921 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006922fi
6923
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006924fi
6925fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006926{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6927$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006928if test $ac_cv_header_stdc = yes; then
6929
Matthias Kloseb9621712010-04-24 17:59:49 +00006930$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006931
6932fi
6933
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +02006934ac_save_cppflags="$CPPFLAGS"
6935CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
Benjamin Petersonb77fe172011-09-13 17:20:47 -04006936for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006937fcntl.h grp.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006938ieeefp.h io.h langinfo.h libintl.h ncurses.h process.h pthread.h \
Benjamin Peterson94b580d2011-08-02 17:30:04 -05006939sched.h shadow.h signal.h stdint.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006940unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006941poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01006942sys/audioio.h sys/xattr.h sys/bsdtty.h sys/event.h sys/file.h sys/ioctl.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01006943sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006944sys/param.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01006945sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00006946sys/times.h sys/types.h sys/uio.h sys/un.h sys/utsname.h sys/wait.h pty.h \
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07006947libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimesf0400ba2013-06-18 13:22:17 +02006948bluetooth/bluetooth.h linux/tipc.h spawn.h util.h alloca.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006949do :
6950 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6951ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006952if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006953 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006954#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006955_ACEOF
6956
6957fi
6958
Guido van Rossum627b2d71993-12-24 10:39:16 +00006959done
6960
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +02006961CPPFLAGS=$ac_save_cppflags
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006962ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006963for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00006964 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6966$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006967if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006968 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006969else
Matthias Kloseb9621712010-04-24 17:59:49 +00006970 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006971/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006972#include <sys/types.h>
6973#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006974
Martin v. Löwis11437992002-04-12 09:54:03 +00006975int
6976main ()
6977{
6978if ((DIR *) 0)
6979return 0;
6980 ;
6981 return 0;
6982}
6983_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006984if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006985 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006986else
Matthias Kloseb9621712010-04-24 17:59:49 +00006987 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006988fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006989rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006990fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006991eval ac_res=\$$as_ac_Header
6992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6993$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006994if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006995 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006996#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006997_ACEOF
6998
6999ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007000fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007001
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007002done
7003# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7004if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007005 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7006$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007007if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007008 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007009else
Martin v. Löwis11437992002-04-12 09:54:03 +00007010 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007011cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007012/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007013
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007014/* Override any GCC internal prototype to avoid an error.
7015 Use char because int might match the return type of a GCC
7016 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007017#ifdef __cplusplus
7018extern "C"
7019#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007020char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007021int
7022main ()
7023{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007024return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007025 ;
7026 return 0;
7027}
7028_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007029for ac_lib in '' dir; do
7030 if test -z "$ac_lib"; then
7031 ac_res="none required"
7032 else
7033 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007034 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007035 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007036 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007037 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007038fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007039rm -f core conftest.err conftest.$ac_objext \
7040 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007041 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007042 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007043fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007044done
Victor Stinnere0be4232011-10-25 13:06:09 +02007045if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007046
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007047else
7048 ac_cv_search_opendir=no
7049fi
7050rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007051LIBS=$ac_func_search_save_LIBS
7052fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007053{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7054$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007055ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007056if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007057 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007058
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007059fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007060
Michael W. Hudson54241132001-12-07 15:38:26 +00007061else
Matthias Kloseb9621712010-04-24 17:59:49 +00007062 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7063$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007064if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007065 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007066else
7067 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007068cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007069/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007070
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007071/* Override any GCC internal prototype to avoid an error.
7072 Use char because int might match the return type of a GCC
7073 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007074#ifdef __cplusplus
7075extern "C"
7076#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007077char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007078int
7079main ()
7080{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007081return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007082 ;
7083 return 0;
7084}
7085_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007086for ac_lib in '' x; do
7087 if test -z "$ac_lib"; then
7088 ac_res="none required"
7089 else
7090 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007091 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007092 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007093 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007094 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007095fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007096rm -f core conftest.err conftest.$ac_objext \
7097 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007098 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007099 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007100fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007101done
Victor Stinnere0be4232011-10-25 13:06:09 +02007102if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007103
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007104else
7105 ac_cv_search_opendir=no
7106fi
7107rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007108LIBS=$ac_func_search_save_LIBS
7109fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007110{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7111$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007112ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007113if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007114 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007115
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007116fi
7117
7118fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007119
Matthias Kloseb9621712010-04-24 17:59:49 +00007120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7121$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007122if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007123 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007124else
Matthias Kloseb9621712010-04-24 17:59:49 +00007125 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007126/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007127#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007128int
7129main ()
7130{
7131return makedev(0, 0);
7132 ;
7133 return 0;
7134}
7135_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007136if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007137 ac_cv_header_sys_types_h_makedev=yes
7138else
Matthias Kloseb9621712010-04-24 17:59:49 +00007139 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007140fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007141rm -f core conftest.err conftest.$ac_objext \
7142 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007143
7144fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007145{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7146$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007147
7148if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007149ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007150if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007151
Matthias Kloseb9621712010-04-24 17:59:49 +00007152$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007153
7154fi
7155
7156
7157
7158 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007159 ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007160if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007161
Matthias Kloseb9621712010-04-24 17:59:49 +00007162$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007163
7164fi
7165
7166
7167 fi
7168fi
7169
Michael W. Hudson54241132001-12-07 15:38:26 +00007170
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007171# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
7172for ac_header in net/if.h
7173do :
7174 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
7175#ifdef STDC_HEADERS
7176# include <stdlib.h>
7177# include <stddef.h>
7178#else
7179# ifdef HAVE_STDLIB_H
7180# include <stdlib.h>
7181# endif
7182#endif
7183#ifdef HAVE_SYS_SOCKET_H
7184# include <sys/socket.h>
7185#endif
7186
7187"
Victor Stinnere0be4232011-10-25 13:06:09 +02007188if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007189 cat >>confdefs.h <<_ACEOF
7190#define HAVE_NET_IF_H 1
7191_ACEOF
7192
7193fi
7194
7195done
7196
7197
7198
Martin v. Löwisae2830c2004-09-18 09:54:52 +00007199# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00007200for ac_header in term.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007201do :
7202 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00007203#ifdef HAVE_CURSES_H
7204#include <curses.h>
7205#endif
7206
Matthias Kloseb9621712010-04-24 17:59:49 +00007207"
Victor Stinnere0be4232011-10-25 13:06:09 +02007208if test "x$ac_cv_header_term_h" = xyes; then :
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00007209 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007210#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00007211_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00007212
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00007213fi
7214
7215done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00007216
7217
Martin v. Löwis11017b12006-01-14 18:12:57 +00007218# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007219for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007220do :
7221 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 +00007222#ifdef HAVE_ASM_TYPES_H
7223#include <asm/types.h>
7224#endif
7225#ifdef HAVE_SYS_SOCKET_H
7226#include <sys/socket.h>
7227#endif
7228
Matthias Kloseb9621712010-04-24 17:59:49 +00007229"
Victor Stinnere0be4232011-10-25 13:06:09 +02007230if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007231 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007232#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007233_ACEOF
7234
7235fi
7236
7237done
7238
7239
Charles-François Natali47413c12011-10-06 19:47:44 +02007240# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01007241for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02007242do :
7243 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7244ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
7245#ifdef HAVE_SYS_SOCKET_H
7246#include <sys/socket.h>
7247#endif
7248
7249"
7250if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7251 cat >>confdefs.h <<_ACEOF
7252#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7253_ACEOF
7254
7255fi
7256
7257done
7258
7259
Guido van Rossum627b2d71993-12-24 10:39:16 +00007260# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00007261was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
7263$as_echo_n "checking for clock_t in time.h... " >&6; }
7264cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007265/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007266#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007267
7268_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007269if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007270 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00007271 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007272else
Martin v. Löwis11437992002-04-12 09:54:03 +00007273
7274
Matthias Kloseb9621712010-04-24 17:59:49 +00007275$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00007276
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007277
Guido van Rossum627b2d71993-12-24 10:39:16 +00007278fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007279rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007280
Matthias Kloseb9621712010-04-24 17:59:49 +00007281{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
7282$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00007283
Matthias Kloseb9621712010-04-24 17:59:49 +00007284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
7285$as_echo_n "checking for makedev... " >&6; }
7286cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007287/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007288
Jesus Cea740f53a2010-04-28 11:35:30 +00007289#if defined(MAJOR_IN_MKDEV)
7290#include <sys/mkdev.h>
7291#elif defined(MAJOR_IN_SYSMACROS)
7292#include <sys/sysmacros.h>
7293#else
7294#include <sys/types.h>
7295#endif
7296
Neal Norwitz11690112002-07-30 01:08:28 +00007297int
7298main ()
7299{
Jesus Cea740f53a2010-04-28 11:35:30 +00007300
7301 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00007302 ;
7303 return 0;
7304}
Matthias Kloseb159a552010-04-25 21:00:44 +00007305
Neal Norwitz11690112002-07-30 01:08:28 +00007306_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007307if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007308 ac_cv_has_makedev=yes
7309else
Matthias Kloseb9621712010-04-24 17:59:49 +00007310 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007311fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007312rm -f core conftest.err conftest.$ac_objext \
7313 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007314{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
7315$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007316if test "$ac_cv_has_makedev" = "yes"; then
7317
Matthias Kloseb9621712010-04-24 17:59:49 +00007318$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007319
7320fi
7321
Martin v. Löwis399a6892002-10-04 10:22:02 +00007322# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7323# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7324# defined, but the compiler does not support pragma redefine_extname,
7325# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7326# structures (such as rlimit64) without declaring them. As a
7327# work-around, disable LFS on such configurations
7328
7329use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00007330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
7331$as_echo_n "checking Solaris LFS bug... " >&6; }
7332cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007333/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007334
7335#define _LARGEFILE_SOURCE 1
7336#define _FILE_OFFSET_BITS 64
7337#include <sys/resource.h>
7338
Martin v. Löwis399a6892002-10-04 10:22:02 +00007339int
7340main ()
7341{
7342struct rlimit foo;
7343 ;
7344 return 0;
7345}
7346_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007347if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00007348 sol_lfs_bug=no
7349else
Matthias Kloseb9621712010-04-24 17:59:49 +00007350 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00007351fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007352rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007353{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
7354$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007355if test "$sol_lfs_bug" = "yes"; then
7356 use_lfs=no
7357fi
7358
7359if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00007360# Two defines needed to enable largefile support on various platforms
7361# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00007362case $ac_sys_system/$ac_sys_release in
7363AIX*)
7364
7365$as_echo "#define _LARGE_FILES 1" >>confdefs.h
7366
7367 ;;
7368esac
Guido van Rossum810cc512001-09-09 23:51:39 +00007369
Matthias Kloseb9621712010-04-24 17:59:49 +00007370$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007371
7372
Matthias Kloseb9621712010-04-24 17:59:49 +00007373$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00007374
Martin v. Löwis399a6892002-10-04 10:22:02 +00007375fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007376
Guido van Rossum84e7b241996-08-19 21:59:00 +00007377# Add some code to confdefs.h so that the test for off_t works on SCO
7378cat >> confdefs.h <<\EOF
7379#if defined(SCO_DS)
7380#undef _OFF_T
7381#endif
7382EOF
7383
Guido van Rossumef2255b2000-03-10 22:30:29 +00007384# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00007385ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007386if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007387
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007388else
Martin v. Löwis11437992002-04-12 09:54:03 +00007389
7390cat >>confdefs.h <<_ACEOF
7391#define mode_t int
7392_ACEOF
7393
7394fi
7395
Matthias Kloseb9621712010-04-24 17:59:49 +00007396ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007397if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007398
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007399else
Martin v. Löwis11437992002-04-12 09:54:03 +00007400
7401cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007402#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00007403_ACEOF
7404
7405fi
7406
Matthias Kloseb9621712010-04-24 17:59:49 +00007407ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007408if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007409
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007410else
Martin v. Löwis11437992002-04-12 09:54:03 +00007411
7412cat >>confdefs.h <<_ACEOF
7413#define pid_t int
7414_ACEOF
7415
7416fi
7417
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007418
Martin v. Löwis11437992002-04-12 09:54:03 +00007419cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00007420#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00007421_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007422
Matthias Kloseb9621712010-04-24 17:59:49 +00007423ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007424if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007425
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007426else
Martin v. Löwis11437992002-04-12 09:54:03 +00007427
7428cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007429#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007430_ACEOF
7431
7432fi
7433
Matthias Kloseb9621712010-04-24 17:59:49 +00007434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
7435$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007436if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007437 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007438else
Matthias Kloseb9621712010-04-24 17:59:49 +00007439 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007440/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007441#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007442
7443_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007444if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007445 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007446 ac_cv_type_uid_t=yes
7447else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007448 ac_cv_type_uid_t=no
7449fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007450rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007451
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007452fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007453{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
7454$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007455if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007456
Matthias Kloseb9621712010-04-24 17:59:49 +00007457$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007458
7459
Matthias Kloseb9621712010-04-24 17:59:49 +00007460$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007461
7462fi
7463
Mark Dickinson983bc162012-12-02 12:11:38 +00007464
7465# There are two separate checks for each of the exact-width integer types we
7466# need. First we check whether the type is available using the usual
7467# AC_CHECK_TYPE macro with the default includes (which includes <inttypes.h>
7468# and <stdint.h> where available). We then also use the special type checks of
7469# the form AC_TYPE_UINT32_T, which in the case that uint32_t is not available
7470# directly, #define's uint32_t to be a suitable type.
7471
7472ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
7473if test "x$ac_cv_type_uint32_t" = xyes; then :
7474
7475$as_echo "#define HAVE_UINT32_T 1" >>confdefs.h
7476
7477fi
7478
Matthias Kloseb9621712010-04-24 17:59:49 +00007479ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
7480case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007481 no|yes) ;; #(
7482 *)
7483
Matthias Kloseb9621712010-04-24 17:59:49 +00007484$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00007485
7486
7487cat >>confdefs.h <<_ACEOF
7488#define uint32_t $ac_cv_c_uint32_t
7489_ACEOF
7490;;
7491 esac
7492
Mark Dickinson983bc162012-12-02 12:11:38 +00007493
7494ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
7495if test "x$ac_cv_type_uint64_t" = xyes; then :
7496
7497$as_echo "#define HAVE_UINT64_T 1" >>confdefs.h
7498
7499fi
7500
Matthias Kloseb9621712010-04-24 17:59:49 +00007501ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
7502case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007503 no|yes) ;; #(
7504 *)
7505
Matthias Kloseb9621712010-04-24 17:59:49 +00007506$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00007507
7508
7509cat >>confdefs.h <<_ACEOF
7510#define uint64_t $ac_cv_c_uint64_t
7511_ACEOF
7512;;
7513 esac
7514
Mark Dickinson983bc162012-12-02 12:11:38 +00007515
7516ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
7517if test "x$ac_cv_type_int32_t" = xyes; then :
7518
7519$as_echo "#define HAVE_INT32_T 1" >>confdefs.h
7520
7521fi
7522
Matthias Kloseb9621712010-04-24 17:59:49 +00007523ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
7524case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007525 no|yes) ;; #(
7526 *)
7527
7528cat >>confdefs.h <<_ACEOF
7529#define int32_t $ac_cv_c_int32_t
7530_ACEOF
7531;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00007532esac
7533
Mark Dickinson983bc162012-12-02 12:11:38 +00007534
7535ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
7536if test "x$ac_cv_type_int64_t" = xyes; then :
7537
7538$as_echo "#define HAVE_INT64_T 1" >>confdefs.h
7539
7540fi
7541
Matthias Kloseb9621712010-04-24 17:59:49 +00007542ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
7543case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007544 no|yes) ;; #(
7545 *)
7546
7547cat >>confdefs.h <<_ACEOF
7548#define int64_t $ac_cv_c_int64_t
7549_ACEOF
7550;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007551esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00007552
Mark Dickinson983bc162012-12-02 12:11:38 +00007553
Matthias Kloseb9621712010-04-24 17:59:49 +00007554ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007555if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007556
Matthias Kloseb9621712010-04-24 17:59:49 +00007557$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00007558
7559fi
7560
Stefan Krah1919b7e2012-03-21 18:25:23 +01007561ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
7562if test "x$ac_cv_type___uint128_t" = xyes; then :
7563
7564$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
7565
7566fi
7567
Jack Jansendd19cf82001-12-06 22:36:17 +00007568
Michael W. Hudson54241132001-12-07 15:38:26 +00007569# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007570# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007571# The cast to long int works around a bug in the HP C Compiler
7572# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7573# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7574# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
7576$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007577if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007578 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007579else
Matthias Kloseb9621712010-04-24 17:59:49 +00007580 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 +00007581
Martin v. Löwis11437992002-04-12 09:54:03 +00007582else
Matthias Kloseb9621712010-04-24 17:59:49 +00007583 if test "$ac_cv_type_int" = yes; then
7584 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7585$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007586as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02007587See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007588 else
7589 ac_cv_sizeof_int=0
7590 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007591fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007592
Martin v. Löwis11437992002-04-12 09:54:03 +00007593fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007594{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
7595$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007596
7597
7598
Martin v. Löwis11437992002-04-12 09:54:03 +00007599cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007600#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007601_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007602
7603
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007604# The cast to long int works around a bug in the HP C Compiler
7605# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7606# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7607# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
7609$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007610if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007611 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007612else
Matthias Kloseb9621712010-04-24 17:59:49 +00007613 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 +00007614
Martin v. Löwis11437992002-04-12 09:54:03 +00007615else
Matthias Kloseb9621712010-04-24 17:59:49 +00007616 if test "$ac_cv_type_long" = yes; then
7617 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7618$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007619as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02007620See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007621 else
7622 ac_cv_sizeof_long=0
7623 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007624fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007625
Martin v. Löwis11437992002-04-12 09:54:03 +00007626fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007627{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
7628$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007629
7630
7631
Martin v. Löwis11437992002-04-12 09:54:03 +00007632cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007633#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007634_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007635
7636
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007637# The cast to long int works around a bug in the HP C Compiler
7638# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7639# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7640# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
7642$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007643if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007644 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007645else
Matthias Kloseb9621712010-04-24 17:59:49 +00007646 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 +00007647
Martin v. Löwis11437992002-04-12 09:54:03 +00007648else
Matthias Kloseb9621712010-04-24 17:59:49 +00007649 if test "$ac_cv_type_void_p" = yes; then
7650 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7651$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007652as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02007653See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007654 else
7655 ac_cv_sizeof_void_p=0
7656 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007657fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007658
Martin v. Löwis11437992002-04-12 09:54:03 +00007659fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007660{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
7661$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007662
7663
7664
Martin v. Löwis11437992002-04-12 09:54:03 +00007665cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007666#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00007667_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007668
7669
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007670# The cast to long int works around a bug in the HP C Compiler
7671# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7672# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7673# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
7675$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007676if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007677 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007678else
Matthias Kloseb9621712010-04-24 17:59:49 +00007679 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 +00007680
Martin v. Löwis11437992002-04-12 09:54:03 +00007681else
Matthias Kloseb9621712010-04-24 17:59:49 +00007682 if test "$ac_cv_type_short" = yes; then
7683 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7684$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007685as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02007686See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007687 else
7688 ac_cv_sizeof_short=0
7689 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007690fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007691
Martin v. Löwis11437992002-04-12 09:54:03 +00007692fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007693{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
7694$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007695
7696
7697
Martin v. Löwis11437992002-04-12 09:54:03 +00007698cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007699#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007700_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007701
7702
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007703# The cast to long int works around a bug in the HP C Compiler
7704# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7705# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7706# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
7708$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007709if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007710 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007711else
Matthias Kloseb9621712010-04-24 17:59:49 +00007712 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 +00007713
Martin v. Löwis11437992002-04-12 09:54:03 +00007714else
Matthias Kloseb9621712010-04-24 17:59:49 +00007715 if test "$ac_cv_type_float" = yes; then
7716 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7717$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007718as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02007719See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007720 else
7721 ac_cv_sizeof_float=0
7722 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007723fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007724
Martin v. Löwis11437992002-04-12 09:54:03 +00007725fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007726{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
7727$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007728
7729
7730
Martin v. Löwis11437992002-04-12 09:54:03 +00007731cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007732#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007733_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007734
7735
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007736# The cast to long int works around a bug in the HP C Compiler
7737# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7738# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7739# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
7741$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007742if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007743 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007744else
Matthias Kloseb9621712010-04-24 17:59:49 +00007745 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 +00007746
Martin v. Löwis11437992002-04-12 09:54:03 +00007747else
Matthias Kloseb9621712010-04-24 17:59:49 +00007748 if test "$ac_cv_type_double" = yes; then
7749 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7750$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007751as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02007752See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007753 else
7754 ac_cv_sizeof_double=0
7755 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007756fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007757
Martin v. Löwis11437992002-04-12 09:54:03 +00007758fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007759{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
7760$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007761
7762
7763
Martin v. Löwis11437992002-04-12 09:54:03 +00007764cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007765#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007766_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007767
7768
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007769# The cast to long int works around a bug in the HP C Compiler
7770# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7771# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7772# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
7774$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007775if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007776 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007777else
Matthias Kloseb9621712010-04-24 17:59:49 +00007778 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 +00007779
Martin v. Löwis11437992002-04-12 09:54:03 +00007780else
Matthias Kloseb9621712010-04-24 17:59:49 +00007781 if test "$ac_cv_type_fpos_t" = yes; then
7782 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7783$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007784as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007785See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007786 else
7787 ac_cv_sizeof_fpos_t=0
7788 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007789fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007790
Martin v. Löwis11437992002-04-12 09:54:03 +00007791fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007792{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
7793$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007794
7795
7796
Martin v. Löwis11437992002-04-12 09:54:03 +00007797cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007798#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007799_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007800
Michael W. Hudson54241132001-12-07 15:38:26 +00007801
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007802# The cast to long int works around a bug in the HP C Compiler
7803# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7804# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7805# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
7807$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007808if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007809 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007810else
Matthias Kloseb9621712010-04-24 17:59:49 +00007811 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 +00007812
Martin v. Löwis18e16552006-02-15 17:27:45 +00007813else
Matthias Kloseb9621712010-04-24 17:59:49 +00007814 if test "$ac_cv_type_size_t" = yes; then
7815 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7816$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007817as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007818See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007819 else
7820 ac_cv_sizeof_size_t=0
7821 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00007822fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007823
Martin v. Löwis18e16552006-02-15 17:27:45 +00007824fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007825{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
7826$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007827
7828
7829
Martin v. Löwis18e16552006-02-15 17:27:45 +00007830cat >>confdefs.h <<_ACEOF
7831#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
7832_ACEOF
7833
7834
Christian Heimes400adb02008-02-01 08:12:03 +00007835# The cast to long int works around a bug in the HP C Compiler
7836# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7837# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7838# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
7840$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007841if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007842 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00007843else
Matthias Kloseb9621712010-04-24 17:59:49 +00007844 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pid_t))" "ac_cv_sizeof_pid_t" "$ac_includes_default"; then :
Christian Heimes400adb02008-02-01 08:12:03 +00007845
Christian Heimes400adb02008-02-01 08:12:03 +00007846else
Matthias Kloseb9621712010-04-24 17:59:49 +00007847 if test "$ac_cv_type_pid_t" = yes; then
7848 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7849$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007850as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007851See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00007852 else
7853 ac_cv_sizeof_pid_t=0
7854 fi
7855fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007856
Christian Heimes400adb02008-02-01 08:12:03 +00007857fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007858{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
7859$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00007860
7861
7862
7863cat >>confdefs.h <<_ACEOF
7864#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
7865_ACEOF
7866
7867
Michael W. Hudson54241132001-12-07 15:38:26 +00007868
Matthias Kloseb9621712010-04-24 17:59:49 +00007869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
7870$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007871have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007872cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007873/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007874
Martin v. Löwis11437992002-04-12 09:54:03 +00007875int
7876main ()
7877{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007878long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007879 ;
7880 return 0;
7881}
7882_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007883if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007884
7885
Matthias Kloseb9621712010-04-24 17:59:49 +00007886$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007887
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007888 have_long_long=yes
7889
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007890fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007891rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007892{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
7893$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007894if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007895# The cast to long int works around a bug in the HP C Compiler
7896# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7897# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7898# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
7900$as_echo_n "checking size of long long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007901if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007902 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007903else
Matthias Kloseb9621712010-04-24 17:59:49 +00007904 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 +00007905
Martin v. Löwis11437992002-04-12 09:54:03 +00007906else
Matthias Kloseb9621712010-04-24 17:59:49 +00007907 if test "$ac_cv_type_long_long" = yes; then
7908 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7909$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007910as_fn_error 77 "cannot compute sizeof (long long)
Victor Stinnere0be4232011-10-25 13:06:09 +02007911See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007912 else
7913 ac_cv_sizeof_long_long=0
7914 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007915fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007916
Martin v. Löwis11437992002-04-12 09:54:03 +00007917fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007918{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
7919$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007920
7921
7922
Martin v. Löwis11437992002-04-12 09:54:03 +00007923cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007924#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007925_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007926
Michael W. Hudson54241132001-12-07 15:38:26 +00007927
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007928fi
7929
Matthias Kloseb9621712010-04-24 17:59:49 +00007930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
7931$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007932have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007933cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007934/* end confdefs.h. */
7935
7936int
7937main ()
7938{
7939long double x; x = (long double)0;
7940 ;
7941 return 0;
7942}
7943_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007944if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007945
7946
Matthias Kloseb9621712010-04-24 17:59:49 +00007947$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007948
7949 have_long_double=yes
7950
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007951fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007952rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007953{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
7954$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007955if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007956# The cast to long int works around a bug in the HP C Compiler
7957# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7958# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7959# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
7961$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007962if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007963 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007964else
Matthias Kloseb9621712010-04-24 17:59:49 +00007965 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long double))" "ac_cv_sizeof_long_double" "$ac_includes_default"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007966
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007967else
Matthias Kloseb9621712010-04-24 17:59:49 +00007968 if test "$ac_cv_type_long_double" = yes; then
7969 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7970$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007971as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02007972See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007973 else
7974 ac_cv_sizeof_long_double=0
7975 fi
7976fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007977
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007978fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007979{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
7980$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007981
7982
7983
7984cat >>confdefs.h <<_ACEOF
7985#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7986_ACEOF
7987
7988
7989fi
7990
7991
Matthias Kloseb9621712010-04-24 17:59:49 +00007992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7993$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007994have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007995cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00007996/* end confdefs.h. */
7997
7998int
7999main ()
8000{
8001_Bool x; x = (_Bool)0;
8002 ;
8003 return 0;
8004}
8005_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008006if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00008007
8008
Matthias Kloseb9621712010-04-24 17:59:49 +00008009$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00008010
8011 have_c99_bool=yes
8012
Thomas Woutersb2137042007-02-01 18:02:27 +00008013fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008014rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008015{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
8016$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008017if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008018# The cast to long int works around a bug in the HP C Compiler
8019# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8020# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8021# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8023$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008024if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008025 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008026else
Matthias Kloseb9621712010-04-24 17:59:49 +00008027 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (_Bool))" "ac_cv_sizeof__Bool" "$ac_includes_default"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00008028
Thomas Woutersb2137042007-02-01 18:02:27 +00008029else
Matthias Kloseb9621712010-04-24 17:59:49 +00008030 if test "$ac_cv_type__Bool" = yes; then
8031 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8032$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008033as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008034See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008035 else
8036 ac_cv_sizeof__Bool=0
8037 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008038fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008039
Thomas Woutersb2137042007-02-01 18:02:27 +00008040fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008041{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8042$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008043
8044
8045
Thomas Woutersb2137042007-02-01 18:02:27 +00008046cat >>confdefs.h <<_ACEOF
8047#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8048_ACEOF
8049
8050
8051fi
8052
Matthias Kloseb9621712010-04-24 17:59:49 +00008053ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00008054 #include <stdint.h>
8055 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00008056 #ifdef HAVE_INTTYPES_H
8057 #include <inttypes.h>
8058 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00008059"
Victor Stinnere0be4232011-10-25 13:06:09 +02008060if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00008061
8062cat >>confdefs.h <<_ACEOF
8063#define HAVE_UINTPTR_T 1
8064_ACEOF
8065
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008066# The cast to long int works around a bug in the HP C Compiler
8067# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8068# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8069# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8071$as_echo_n "checking size of uintptr_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008072if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008073 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008074else
Matthias Kloseb9621712010-04-24 17:59:49 +00008075 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 +00008076
Martin v. Löwis11437992002-04-12 09:54:03 +00008077else
Matthias Kloseb9621712010-04-24 17:59:49 +00008078 if test "$ac_cv_type_uintptr_t" = yes; then
8079 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8080$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008081as_fn_error 77 "cannot compute sizeof (uintptr_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008082See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008083 else
8084 ac_cv_sizeof_uintptr_t=0
8085 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008086fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008087
Martin v. Löwis11437992002-04-12 09:54:03 +00008088fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008089{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8090$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008091
8092
8093
Martin v. Löwis11437992002-04-12 09:54:03 +00008094cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008095#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008096_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008097
Michael W. Hudson54241132001-12-07 15:38:26 +00008098
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008099fi
8100
Thomas Wouters89f507f2006-12-13 04:49:30 +00008101
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008102# The cast to long int works around a bug in the HP C Compiler
8103# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8104# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8105# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8107$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008108if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008109 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008110else
Matthias Kloseb9621712010-04-24 17:59:49 +00008111 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008112#ifdef HAVE_SYS_TYPES_H
8113#include <sys/types.h>
8114#endif
8115
Matthias Kloseb9621712010-04-24 17:59:49 +00008116"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008117
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008118else
Matthias Kloseb9621712010-04-24 17:59:49 +00008119 if test "$ac_cv_type_off_t" = yes; then
8120 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8121$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008122as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008123See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008124 else
8125 ac_cv_sizeof_off_t=0
8126 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008127fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008128
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008129fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008130{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8131$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008132
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008133
8134
Martin v. Löwis11437992002-04-12 09:54:03 +00008135cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008136#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008137_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008138
Michael W. Hudson54241132001-12-07 15:38:26 +00008139
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008140
Matthias Kloseb9621712010-04-24 17:59:49 +00008141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8142$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008143if test "$have_long_long" = yes
8144then
8145if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008146 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008147
Matthias Kloseb9621712010-04-24 17:59:49 +00008148$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008149
Matthias Kloseb9621712010-04-24 17:59:49 +00008150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8151$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008152else
Matthias Kloseb9621712010-04-24 17:59:49 +00008153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8154$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008155fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00008156else
Matthias Kloseb9621712010-04-24 17:59:49 +00008157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8158$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008159fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008160
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008161# The cast to long int works around a bug in the HP C Compiler
8162# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8163# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8164# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8166$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008167if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008168 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008169else
Matthias Kloseb9621712010-04-24 17:59:49 +00008170 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008171#ifdef HAVE_SYS_TYPES_H
8172#include <sys/types.h>
8173#endif
8174#ifdef HAVE_TIME_H
8175#include <time.h>
8176#endif
8177
Matthias Kloseb9621712010-04-24 17:59:49 +00008178"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008179
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008180else
Matthias Kloseb9621712010-04-24 17:59:49 +00008181 if test "$ac_cv_type_time_t" = yes; then
8182 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8183$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008184as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008185See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008186 else
8187 ac_cv_sizeof_time_t=0
8188 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008189fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008190
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008191fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008192{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8193$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008194
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008195
8196
Martin v. Löwis11437992002-04-12 09:54:03 +00008197cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008198#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008199_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008200
Michael W. Hudson54241132001-12-07 15:38:26 +00008201
8202
Trent Mick635f6fb2000-08-23 21:33:05 +00008203# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008204ac_save_cc="$CC"
8205if test "$ac_cv_kpthread" = "yes"
8206then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008207elif test "$ac_cv_kthread" = "yes"
8208then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008209elif test "$ac_cv_pthread" = "yes"
8210then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008211fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008212
Matthias Kloseb9621712010-04-24 17:59:49 +00008213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8214$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008215have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008216cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008217/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008218
8219 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008220int
8221main ()
8222{
Guido van Rossum12580492000-09-24 16:47:19 +00008223pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008224 ;
8225 return 0;
8226}
Matthias Kloseb159a552010-04-25 21:00:44 +00008227
Martin v. Löwis11437992002-04-12 09:54:03 +00008228_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008229if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008230 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008231fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008232rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008233{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8234$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008235if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008236 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008237# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8238# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8239# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8241$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008242if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008243 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008244else
Matthias Kloseb9621712010-04-24 17:59:49 +00008245 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008246#ifdef HAVE_PTHREAD_H
8247#include <pthread.h>
8248#endif
8249
Matthias Kloseb9621712010-04-24 17:59:49 +00008250"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008251
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008252else
Matthias Kloseb9621712010-04-24 17:59:49 +00008253 if test "$ac_cv_type_pthread_t" = yes; then
8254 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8255$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008256as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008257See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008258 else
8259 ac_cv_sizeof_pthread_t=0
8260 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008261fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008262
Trent Mick635f6fb2000-08-23 21:33:05 +00008263fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008264{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8265$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008266
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008267
8268
Martin v. Löwis11437992002-04-12 09:54:03 +00008269cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008270#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008271_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008272
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008273
Trent Mick635f6fb2000-08-23 21:33:05 +00008274fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008275CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008276
Michael W. Hudson54241132001-12-07 15:38:26 +00008277
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008278case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008279 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008280 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8281 ;;
8282 Darwin/*)
8283 OTHER_LIBTOOL_OPT=""
8284 ;;
8285esac
8286
8287
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008288ARCH_RUN_32BIT=""
8289
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008290case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008291 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00008292 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8293 if test "${enable_universalsdk}"; then
8294 :
8295 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008296 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008297 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008298 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008299 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008300 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00008301 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008302 if test ${gcc_version} '<' 4.0
8303 then
8304 LIBTOOL_CRUFT="-lcc_dynamic"
8305 else
8306 LIBTOOL_CRUFT=""
8307 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008308 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008309 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008310else
Matthias Kloseb9621712010-04-24 17:59:49 +00008311 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008312/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008313
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008314 #include <unistd.h>
8315 int main(int argc, char*argv[])
8316 {
8317 if (sizeof(long) == 4) {
8318 return 0;
8319 } else {
8320 return 1;
8321 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008322 }
8323
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008324_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008325if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008326 ac_osx_32bit=yes
8327else
Matthias Kloseb9621712010-04-24 17:59:49 +00008328 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008329fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008330rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8331 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008332fi
8333
8334
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008335 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008336 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008337 i386)
8338 MACOSX_DEFAULT_ARCH="i386"
8339 ;;
8340 ppc)
8341 MACOSX_DEFAULT_ARCH="ppc"
8342 ;;
8343 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008344 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008345 ;;
8346 esac
8347 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008348 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008349 i386)
8350 MACOSX_DEFAULT_ARCH="x86_64"
8351 ;;
8352 ppc)
8353 MACOSX_DEFAULT_ARCH="ppc64"
8354 ;;
8355 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008356 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008357 ;;
8358 esac
8359
8360 #ARCH_RUN_32BIT="true"
8361 fi
8362
8363 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00008364 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008365 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008366esac
8367
Matthias Kloseb9621712010-04-24 17:59:49 +00008368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
8369$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008370if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008371then
Skip Montanarodecc6a42003-01-01 20:07:49 +00008372 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00008373 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008374 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008375
Matthias Kloseb9621712010-04-24 17:59:49 +00008376$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008377
Matthias Kloseb9621712010-04-24 17:59:49 +00008378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8379$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00008380 if test $enable_shared = "yes"
8381 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008382 as_fn_error $? "Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead" "$LINENO" 5
Ronald Oussoren99aab652009-06-08 21:22:57 +00008383 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008384else
Matthias Kloseb9621712010-04-24 17:59:49 +00008385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8386$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008387fi
8388
Matthias Kloseb9621712010-04-24 17:59:49 +00008389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
8390$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008391case $ac_sys_system/$ac_sys_release in
8392 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008393
Matthias Kloseb9621712010-04-24 17:59:49 +00008394$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008395
Matthias Kloseb9621712010-04-24 17:59:49 +00008396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
8397$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008398 ;;
8399 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00008400 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8401$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008402 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008403esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008404
Guido van Rossum0a516c91994-09-12 10:58:40 +00008405# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008406
Michael W. Hudson54241132001-12-07 15:38:26 +00008407
8408
8409
8410
Benjamin Peterson99f03762010-04-11 22:15:28 +00008411
Thomas Wouters477c8d52006-05-27 19:21:47 +00008412
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07008413# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
8414# -- usually .so, .sl on HP-UX, .dll on Cygwin
8415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
8416$as_echo_n "checking the extension of shared libraries... " >&6; }
8417if test -z "$SHLIB_SUFFIX"; then
8418 case $ac_sys_system in
8419 hp*|HP*)
8420 case `uname -m` in
8421 ia64) SHLIB_SUFFIX=.so;;
8422 *) SHLIB_SUFFIX=.sl;;
8423 esac
8424 ;;
8425 CYGWIN*) SHLIB_SUFFIX=.dll;;
8426 *) SHLIB_SUFFIX=.so;;
8427 esac
8428fi
8429{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
8430$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00008431
Guido van Rossum0a516c91994-09-12 10:58:40 +00008432# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00008433# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008434# (Shared libraries in this instance are shared modules to be loaded into
8435# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00008436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
8437$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008438if test -z "$LDSHARED"
8439then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008440 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008441 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00008442 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00008443 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008444 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008445 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008446 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008447 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008448 if test "$GCC" = "yes" ; then
8449 LDSHARED='$(CC) -shared'
8450 LDCXXSHARED='$(CXX) -shared'
8451 else
8452 LDSHARED='$(CC) -G'
8453 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00008454 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008455 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008456 if test "$GCC" = "yes" ; then
8457 LDSHARED='$(CC) -shared'
8458 LDCXXSHARED='$(CXX) -shared'
8459 else
8460 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008461 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00008462 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008463 LDSHARED='$(CC) -bundle'
8464 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00008465 if test "$enable_framework" ; then
8466 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008467 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8468 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008469 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008470 else
8471 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008472 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00008473 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008474 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008475 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008476 LDSHARED='$(CC) -bundle'
8477 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00008478 if test "$enable_framework" ; then
8479 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008480 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8481 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008482 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008483 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008484 # No framework, use the Python app as bundle-loader
8485 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00008486 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008487 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008488 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008489 Darwin/*)
8490 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
8491 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00008492
Benjamin Peterson14ae9592008-07-16 02:20:15 +00008493 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00008494 then
Thomas Wouters477c8d52006-05-27 19:21:47 +00008495 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +00008496 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008497 fi
Antoine Pitroud4958c22010-10-13 17:01:10 +00008498 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
8499 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00008500 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00008501 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00008502 LDSHARED='$(CC) -bundle'
8503 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00008504 if test "$enable_framework" ; then
8505 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008506 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8507 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008508 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008509 else
8510 # No framework, use the Python app as bundle-loader
8511 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8512 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008513 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008514 fi
8515 fi
8516 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008517 Linux*|GNU*|QNX*)
8518 LDSHARED='$(CC) -shared'
8519 LDCXXSHARED='$(CXX) -shared';;
8520 BSD/OS*/4*)
8521 LDSHARED="gcc -shared"
8522 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008523 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008524 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008525 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008526 LDSHARED='$(CC) -shared'
8527 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00008528 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00008529 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00008530 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008531 OpenBSD*)
8532 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8533 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008534 LDSHARED='$(CC) -shared $(CCSHARED)'
8535 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008536 else
8537 case `uname -r` in
8538 [01].* | 2.[0-7] | 2.[0-7].*)
8539 LDSHARED="ld -Bshareable ${LDFLAGS}"
8540 ;;
8541 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008542 LDSHARED='$(CC) -shared $(CCSHARED)'
8543 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008544 ;;
8545 esac
8546 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008547 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00008548 LDSHARED='$(CC) -shared'
8549 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008550 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008551 if test "$GCC" = "yes" ; then
8552 LDSHARED='$(CC) -shared'
8553 LDCXXSHARED='$(CXX) -shared'
8554 else
8555 LDSHARED='$(CC) -G'
8556 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00008557 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008558 SCO_SV*)
8559 LDSHARED='$(CC) -Wl,-G,-Bexport'
8560 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
8561 CYGWIN*)
8562 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
8563 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008564 *) LDSHARED="ld";;
8565 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008566fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008567{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
8568$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00008569LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008570BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008571# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008572# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
8574$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008575if test -z "$CCSHARED"
8576then
Guido van Rossum07397971997-04-29 21:49:50 +00008577 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008578 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008579 then CCSHARED="-fPIC";
8580 elif test `uname -p` = sparc;
8581 then CCSHARED="-xcode=pic32";
8582 else CCSHARED="-Kpic";
8583 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00008584 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00008585 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00008586 else CCSHARED="+z";
8587 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008588 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008589 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008590 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008591 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008592 if test "$GCC" = "yes"
8593 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008594 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008595 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008596 SCO_SV*)
8597 if test "$GCC" = "yes"
8598 then CCSHARED="-fPIC"
8599 else CCSHARED="-Kpic -belf"
8600 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008601 IRIX*/6*) case $CC in
8602 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00008603 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008604 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008605 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008606fi
Matthias Kloseb9621712010-04-24 17:59:49 +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 Kloseb9621712010-04-24 17:59:49 +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/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00008624 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02008625
8626 # Issue #18075: the default maximum stack size (8MBytes) is too
8627 # small for the default recursion limit. Increase the stack size
8628 # to ensure that tests don't crash
8629 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
8630
Jack Jansene578a632001-08-15 01:27:14 +00008631 if test "$enable_framework"
8632 then
Jack Jansenda49e192005-01-07 13:08:22 +00008633 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008634 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008635 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008636 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008637 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00008638 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008639 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00008640 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8641 then
8642 LINKFORSHARED="-Wl,--export-dynamic"
8643 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008644 SunOS/5*) case $CC in
8645 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00008646 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00008647 then
8648 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008649 fi;;
8650 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00008651 CYGWIN*)
8652 if test $enable_shared = "no"
8653 then
8654 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
8655 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00008656 QNX*)
8657 # -Wl,-E causes the symbols to be added to the dynamic
8658 # symbol table so that they can be found when a module
8659 # is loaded. -N 2048K causes the stack size to be set
8660 # to 2048 kilobytes so that the stack doesn't overflow
8661 # when running test_compile.py.
8662 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008663 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008664fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008665{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
8666$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008667
Michael W. Hudson54241132001-12-07 15:38:26 +00008668
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00008669
Matthias Kloseb9621712010-04-24 17:59:49 +00008670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
8671$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008672if test ! "$LIBRARY" = "$LDLIBRARY"
8673then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00008674 case $ac_sys_system in
8675 CYGWIN*)
8676 # Cygwin needs CCSHARED when building extension DLLs
8677 # but not when building the interpreter DLL.
8678 CFLAGSFORSHARED='';;
8679 *)
8680 CFLAGSFORSHARED='$(CCSHARED)'
8681 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008682fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008683{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
8684$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008685
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008686# SHLIBS are libraries (except -lc and -lm) to link to the python shared
8687# library (with --enable-shared).
8688# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008689# symbols, this must be set to $(LIBS) (expanded by make). We do this even
8690# if it is not required, since it creates a dependency of the shared library
8691# to LIBS. This, in turn, means that applications linking the shared libpython
8692# don't need to link LIBS explicitly. The default should be only changed
8693# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008694
Matthias Kloseb9621712010-04-24 17:59:49 +00008695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
8696$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008697case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008698 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008699 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008700esac
Matthias Kloseb9621712010-04-24 17:59:49 +00008701{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
8702$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008703
8704
Guido van Rossum627b2d71993-12-24 10:39:16 +00008705# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00008706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
8707$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008708if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00008709 $as_echo_n "(cached) " >&6
8710else
8711 ac_check_lib_save_LIBS=$LIBS
8712LIBS="-lsendfile $LIBS"
8713cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8714/* end confdefs.h. */
8715
8716/* Override any GCC internal prototype to avoid an error.
8717 Use char because int might match the return type of a GCC
8718 builtin and then its argument prototype would still apply. */
8719#ifdef __cplusplus
8720extern "C"
8721#endif
8722char sendfile ();
8723int
8724main ()
8725{
8726return sendfile ();
8727 ;
8728 return 0;
8729}
8730_ACEOF
8731if ac_fn_c_try_link "$LINENO"; then :
8732 ac_cv_lib_sendfile_sendfile=yes
8733else
8734 ac_cv_lib_sendfile_sendfile=no
8735fi
8736rm -f core conftest.err conftest.$ac_objext \
8737 conftest$ac_exeext conftest.$ac_ext
8738LIBS=$ac_check_lib_save_LIBS
8739fi
8740{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
8741$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008742if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00008743 cat >>confdefs.h <<_ACEOF
8744#define HAVE_LIBSENDFILE 1
8745_ACEOF
8746
8747 LIBS="-lsendfile $LIBS"
8748
8749fi
8750
Matthias Kloseb9621712010-04-24 17:59:49 +00008751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
8752$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008753if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008754 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008755else
Martin v. Löwis11437992002-04-12 09:54:03 +00008756 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008757LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008758cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008759/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008760
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008761/* Override any GCC internal prototype to avoid an error.
8762 Use char because int might match the return type of a GCC
8763 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008764#ifdef __cplusplus
8765extern "C"
8766#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008767char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008768int
8769main ()
8770{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008771return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008772 ;
8773 return 0;
8774}
8775_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008776if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008777 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008778else
Matthias Kloseb9621712010-04-24 17:59:49 +00008779 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008780fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008781rm -f core conftest.err conftest.$ac_objext \
8782 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008783LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008784fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008785{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
8786$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008787if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008788 cat >>confdefs.h <<_ACEOF
8789#define HAVE_LIBDL 1
8790_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008791
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008792 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00008793
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008794fi
8795 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00008796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
8797$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008798if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008799 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008800else
Martin v. Löwis11437992002-04-12 09:54:03 +00008801 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008802LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008803cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008804/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008805
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008806/* Override any GCC internal prototype to avoid an error.
8807 Use char because int might match the return type of a GCC
8808 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008809#ifdef __cplusplus
8810extern "C"
8811#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008812char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008813int
8814main ()
8815{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008816return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008817 ;
8818 return 0;
8819}
8820_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008821if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008822 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008823else
Matthias Kloseb9621712010-04-24 17:59:49 +00008824 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008825fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008826rm -f core conftest.err conftest.$ac_objext \
8827 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008828LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008829fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008830{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
8831$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008832if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008833 cat >>confdefs.h <<_ACEOF
8834#define HAVE_LIBDLD 1
8835_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008836
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008837 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008838
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008839fi
8840 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00008841
Georg Brandlb1441c72009-01-03 22:33:39 +00008842# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00008843if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008844 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
8845$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008846if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008847 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008848else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008849 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008850cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008851/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008852
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008853/* Override any GCC internal prototype to avoid an error.
8854 Use char because int might match the return type of a GCC
8855 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008856#ifdef __cplusplus
8857extern "C"
8858#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008859char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008860int
8861main ()
8862{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008863return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008864 ;
8865 return 0;
8866}
8867_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008868for ac_lib in '' pthread rt posix4; do
8869 if test -z "$ac_lib"; then
8870 ac_res="none required"
8871 else
8872 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008873 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008874 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008875 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008876 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008877fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008878rm -f core conftest.err conftest.$ac_objext \
8879 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008880 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008881 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008882fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008883done
Victor Stinnere0be4232011-10-25 13:06:09 +02008884if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008885
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008886else
8887 ac_cv_search_sem_init=no
8888fi
8889rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008890LIBS=$ac_func_search_save_LIBS
8891fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008892{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
8893$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008894ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00008895if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008896 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008897
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008898fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00008899 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00008900 # posix4 on Solaris 2.6
8901 # pthread (first!) on Linux
8902fi
8903
Martin v. Löwis19d17342003-06-14 21:03:05 +00008904# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00008905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
8906$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008907if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008908 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00008909else
8910 ac_check_lib_save_LIBS=$LIBS
8911LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008912cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008913/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008914
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008915/* Override any GCC internal prototype to avoid an error.
8916 Use char because int might match the return type of a GCC
8917 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008918#ifdef __cplusplus
8919extern "C"
8920#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00008921char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008922int
8923main ()
8924{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008925return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008926 ;
8927 return 0;
8928}
8929_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008930if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008931 ac_cv_lib_intl_textdomain=yes
8932else
Matthias Kloseb9621712010-04-24 17:59:49 +00008933 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00008934fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008935rm -f core conftest.err conftest.$ac_objext \
8936 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00008937LIBS=$ac_check_lib_save_LIBS
8938fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008939{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
8940$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008941if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008942
Matthias Kloseb9621712010-04-24 17:59:49 +00008943$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00008944
Brett Cannonc6d936e2009-06-07 20:09:53 +00008945 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00008946fi
8947
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008948
8949# checks for system dependent C++ extensions support
8950case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00008951 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
8952$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
8953 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008954/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008955
Georg Brandl59e87bd2011-02-15 19:48:59 +00008956 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008957int
8958main ()
8959{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008960loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00008961 ;
8962 return 0;
8963}
Matthias Kloseb159a552010-04-25 21:00:44 +00008964
Martin v. Löwis11437992002-04-12 09:54:03 +00008965_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008966if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008967
Matthias Kloseb159a552010-04-25 21:00:44 +00008968
Matthias Kloseb9621712010-04-24 17:59:49 +00008969$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008970
Matthias Kloseb159a552010-04-25 21:00:44 +00008971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008972$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008973
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008974else
Matthias Kloseb159a552010-04-25 21:00:44 +00008975
8976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008977$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008978
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008979fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008980rm -f core conftest.err conftest.$ac_objext \
8981 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008982 *) ;;
8983esac
8984
Guido van Rossum70c7f481998-03-26 18:44:10 +00008985# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00008986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
8987$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008988if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008989 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008990else
Martin v. Löwis11437992002-04-12 09:54:03 +00008991 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008992LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008993cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008994/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008995
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008996/* Override any GCC internal prototype to avoid an error.
8997 Use char because int might match the return type of a GCC
8998 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008999#ifdef __cplusplus
9000extern "C"
9001#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009002char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009003int
9004main ()
9005{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009006return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009007 ;
9008 return 0;
9009}
9010_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009011if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009012 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009013else
Matthias Kloseb9621712010-04-24 17:59:49 +00009014 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009015fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009016rm -f core conftest.err conftest.$ac_objext \
9017 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009018LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009019fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009020{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9021$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009022if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009023 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009024fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009025 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00009026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9027$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009028if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009029 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009030else
Martin v. Löwis11437992002-04-12 09:54:03 +00009031 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009032LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +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
Thomas Wouters47b49bf2007-08-30 22:15:33 +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{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009046return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009047 ;
9048 return 0;
9049}
9050_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009051if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009052 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009053else
Matthias Kloseb9621712010-04-24 17:59:49 +00009054 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009055fi
Matthias Kloseb9621712010-04-24 17:59:49 +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 Rossumec95c7b1998-08-04 17:59:56 +00009059fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009060{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9061$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009062if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009063 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009064fi
9065 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009066
Matthias Kloseb9621712010-04-24 17:59:49 +00009067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9068$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009069
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009070# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009071if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009072 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009073{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9074$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009075LIBS="$withval $LIBS"
9076
9077else
Matthias Kloseb9621712010-04-24 17:59:49 +00009078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9079$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009080fi
9081
Guido van Rossum7f43da71994-08-01 12:15:30 +00009082
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009083if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009084 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9085set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9087$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009088if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009089 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00009090else
9091 case $PKG_CONFIG in
9092 [\\/]* | ?:[\\/]*)
9093 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9094 ;;
9095 *)
9096 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9097for as_dir in $PATH
9098do
9099 IFS=$as_save_IFS
9100 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009101 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00009102 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009103 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00009104 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00009105 break 2
9106 fi
9107done
Matthias Kloseb9621712010-04-24 17:59:49 +00009108 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00009109IFS=$as_save_IFS
9110
9111 ;;
9112esac
9113fi
9114PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9115if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9117$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009118else
Matthias Kloseb9621712010-04-24 17:59:49 +00009119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9120$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009121fi
9122
9123
9124fi
9125if test -z "$ac_cv_path_PKG_CONFIG"; then
9126 ac_pt_PKG_CONFIG=$PKG_CONFIG
9127 # Extract the first word of "pkg-config", so it can be a program name with args.
9128set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9130$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009131if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009132 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00009133else
9134 case $ac_pt_PKG_CONFIG in
9135 [\\/]* | ?:[\\/]*)
9136 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9137 ;;
9138 *)
9139 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9140for as_dir in $PATH
9141do
9142 IFS=$as_save_IFS
9143 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009144 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00009145 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009146 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00009147 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00009148 break 2
9149 fi
9150done
Matthias Kloseb9621712010-04-24 17:59:49 +00009151 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00009152IFS=$as_save_IFS
9153
9154 ;;
9155esac
9156fi
9157ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9158if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9160$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009161else
Matthias Kloseb9621712010-04-24 17:59:49 +00009162 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9163$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009164fi
9165
9166 if test "x$ac_pt_PKG_CONFIG" = x; then
9167 PKG_CONFIG=""
9168 else
9169 case $cross_compiling:$ac_tool_warned in
9170yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00009171{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9172$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00009173ac_tool_warned=yes ;;
9174esac
9175 PKG_CONFIG=$ac_pt_PKG_CONFIG
9176 fi
9177else
9178 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9179fi
9180
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009181
9182# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00009183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
9184$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009185
9186# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009187if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009188 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00009189else
9190 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009191fi
9192
9193
Matthias Kloseb9621712010-04-24 17:59:49 +00009194{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
9195$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009196
9197# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00009198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
9199$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009200
9201# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009202if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009203 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00009204else
9205 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009206fi
9207
9208
9209if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009210 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
9211else
9212 LIBFFI_INCLUDEDIR=""
9213fi
9214
9215
Matthias Kloseb9621712010-04-24 17:59:49 +00009216{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
9217$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009218
Stefan Krah60187b52012-03-23 19:06:27 +01009219# Check for use of the system libmpdec library
9220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
9221$as_echo_n "checking for --with-system-libmpdec... " >&6; }
9222
9223# Check whether --with-system_libmpdec was given.
9224if test "${with_system_libmpdec+set}" = set; then :
9225 withval=$with_system_libmpdec;
9226else
9227 with_system_libmpdec="no"
9228fi
9229
9230
9231{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
9232$as_echo "$with_system_libmpdec" >&6; }
9233
Benjamin Peterson076ed002010-10-31 17:11:02 +00009234# Check for support for loadable sqlite extensions
9235{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
9236$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
9237# Check whether --enable-loadable-sqlite-extensions was given.
9238if test "${enable_loadable_sqlite_extensions+set}" = set; then :
9239 enableval=$enable_loadable_sqlite_extensions;
9240else
9241 enable_loadable_sqlite_extensions="no"
9242fi
9243
9244
9245{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
9246$as_echo "$enable_loadable_sqlite_extensions" >&6; }
9247
Ned Deilyd819b932013-09-06 01:07:05 -07009248# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
9249
9250
9251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
9252$as_echo_n "checking for --with-tcltk-includes... " >&6; }
9253
9254# Check whether --with-tcltk-includes was given.
9255if test "${with_tcltk_includes+set}" = set; then :
9256 withval=$with_tcltk_includes;
9257else
9258 with_tcltk_includes="default"
9259fi
9260
9261{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
9262$as_echo "$with_tcltk_includes" >&6; }
9263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
9264$as_echo_n "checking for --with-tcltk-libs... " >&6; }
9265
9266# Check whether --with-tcltk-libs was given.
9267if test "${with_tcltk_libs+set}" = set; then :
9268 withval=$with_tcltk_libs;
9269else
9270 with_tcltk_libs="default"
9271fi
9272
9273{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
9274$as_echo "$with_tcltk_libs" >&6; }
9275if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
9276then
9277 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
9278 then
9279 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
9280 fi
9281 TCLTK_INCLUDES=""
9282 TCLTK_LIBS=""
9283else
9284 TCLTK_INCLUDES="$with_tcltk_includes"
9285 TCLTK_LIBS="$with_tcltk_libs"
9286fi
9287
Matthias Klose55708cc2009-04-30 08:06:49 +00009288# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00009289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
9290$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009291
9292# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009293if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00009294 withval=$with_dbmliborder;
9295if test x$with_dbmliborder = xyes
9296then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009297as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009298else
9299 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
9300 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
9301 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009302 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009303 fi
9304 done
9305fi
9306fi
9307
Matthias Kloseb9621712010-04-24 17:59:49 +00009308{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
9309$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009310
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009311# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009312
9313
Matthias Kloseb9621712010-04-24 17:59:49 +00009314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
9315$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009316
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009317# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009318if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009319 withval=$with_signal_module;
9320fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009321
9322
9323if test -z "$with_signal_module"
9324then with_signal_module="yes"
9325fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009326{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
9327$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009328
9329if test "${with_signal_module}" = "yes"; then
9330 USE_SIGNAL_MODULE=""
9331 SIGNAL_OBJS=""
9332else
9333 USE_SIGNAL_MODULE="#"
9334 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9335fi
9336
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009337# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009338
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009339USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009340
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009341
Martin v. Löwis11437992002-04-12 09:54:03 +00009342
9343# Templates for things AC_DEFINEd more than once.
9344# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009345
9346
Martin v. Löwis11437992002-04-12 09:54:03 +00009347
Matthias Kloseb9621712010-04-24 17:59:49 +00009348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
9349$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009350
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009351# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009352if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009353 withval=$with_threads;
9354fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009355
9356
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009357# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009358
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009359# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009360if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009361 withval=$with_thread; with_threads=$with_thread
9362fi
9363
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009364
9365if test -z "$with_threads"
9366then with_threads="yes"
9367fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009368{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
9369$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009370
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009371
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009372if test "$with_threads" = "no"
9373then
9374 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009375elif test "$ac_cv_pthread_is_default" = yes
9376then
Matthias Kloseb9621712010-04-24 17:59:49 +00009377 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009378
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009379 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00009380 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009381
9382 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009383 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009384elif test "$ac_cv_kpthread" = "yes"
9385then
9386 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009387 if test "$ac_cv_cxx_thread" = "yes"; then
9388 CXX="$CXX -Kpthread"
9389 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009390 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009391
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009392 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009393 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009394elif test "$ac_cv_kthread" = "yes"
9395then
9396 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009397 if test "$ac_cv_cxx_thread" = "yes"; then
9398 CXX="$CXX -Kthread"
9399 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009400 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009401
9402 posix_threads=yes
9403 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009404elif test "$ac_cv_pthread" = "yes"
9405then
9406 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009407 if test "$ac_cv_cxx_thread" = "yes"; then
9408 CXX="$CXX -pthread"
9409 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009410 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009411
9412 posix_threads=yes
9413 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009414else
9415 if test ! -z "$with_threads" -a -d "$with_threads"
9416 then LDFLAGS="$LDFLAGS -L$with_threads"
9417 fi
9418 if test ! -z "$withval" -a -d "$withval"
9419 then LDFLAGS="$LDFLAGS -L$withval"
9420 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009421
9422 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00009423 # define _POSIX_THREADS in unistd.h. Some apparently don't
9424 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00009425 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
9426$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
9427 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009428/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009429
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009430#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009431#ifdef _POSIX_THREADS
9432yes
9433#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009434
9435_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009436if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009437 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009438 unistd_defines_pthreads=yes
9439else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009440 unistd_defines_pthreads=no
9441fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009442rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009443
Matthias Kloseb9621712010-04-24 17:59:49 +00009444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
9445$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009446
Matthias Kloseb9621712010-04-24 17:59:49 +00009447 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009448
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009449 # Just looking for pthread_create in libpthread is not enough:
9450 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
9451 # So we really have to include pthread.h, and then link.
9452 _libs=$LIBS
9453 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00009454 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
9455$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
9456 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009457/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +01009458
9459#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009460#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00009461
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009462void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00009463int
9464main ()
9465{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009466
9467pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00009468 ;
9469 return 0;
9470}
9471_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009472if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009473
Matthias Kloseb9621712010-04-24 17:59:49 +00009474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9475$as_echo "yes" >&6; }
9476 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00009477
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009478 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009479 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009480else
Martin v. Löwis11437992002-04-12 09:54:03 +00009481
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009482 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00009483 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +02009484if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009485 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00009486
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009487 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009488 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00009489else
Guido van Rossumad678af1998-10-02 14:42:15 +00009490
Matthias Kloseb9621712010-04-24 17:59:49 +00009491 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
9492$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009493if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009494 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009495else
Martin v. Löwis11437992002-04-12 09:54:03 +00009496 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009497LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009498cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009499/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009500
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009501/* Override any GCC internal prototype to avoid an error.
9502 Use char because int might match the return type of a GCC
9503 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009504#ifdef __cplusplus
9505extern "C"
9506#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009507char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009508int
9509main ()
9510{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009511return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009512 ;
9513 return 0;
9514}
9515_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009516if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009517 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00009518else
Matthias Kloseb9621712010-04-24 17:59:49 +00009519 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00009520fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009521rm -f core conftest.err conftest.$ac_objext \
9522 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009523LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009524fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009525{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
9526$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009527if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009528 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00009529
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009530 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009531 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009532 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00009533else
Greg Steinadf63d62000-07-05 10:38:09 +00009534
Matthias Kloseb9621712010-04-24 17:59:49 +00009535 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
9536$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009537if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009538 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00009539else
Martin v. Löwis11437992002-04-12 09:54:03 +00009540 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009541LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009542cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009543/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009544
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009545/* Override any GCC internal prototype to avoid an error.
9546 Use char because int might match the return type of a GCC
9547 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009548#ifdef __cplusplus
9549extern "C"
9550#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009551char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009552int
9553main ()
9554{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009555return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009556 ;
9557 return 0;
9558}
9559_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009560if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009561 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00009562else
Matthias Kloseb9621712010-04-24 17:59:49 +00009563 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00009564fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009565rm -f core conftest.err conftest.$ac_objext \
9566 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009567LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00009568fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009569{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
9570$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009571if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009572 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00009573
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009574 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009575 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009576 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009577else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009578
Matthias Kloseb9621712010-04-24 17:59:49 +00009579 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
9580$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009581if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009582 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009583else
Martin v. Löwis11437992002-04-12 09:54:03 +00009584 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009585LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009586cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009587/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009588
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009589/* Override any GCC internal prototype to avoid an error.
9590 Use char because int might match the return type of a GCC
9591 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009592#ifdef __cplusplus
9593extern "C"
9594#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009595char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009596int
9597main ()
9598{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009599return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009600 ;
9601 return 0;
9602}
9603_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009604if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009605 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009606else
Matthias Kloseb9621712010-04-24 17:59:49 +00009607 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009608fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009609rm -f core conftest.err conftest.$ac_objext \
9610 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009611LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009612fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009613{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
9614$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009615if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009616 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009617
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009618 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009619 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009620 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009621else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009622
Matthias Kloseb9621712010-04-24 17:59:49 +00009623 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
9624$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009625if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009626 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00009627else
Martin v. Löwis11437992002-04-12 09:54:03 +00009628 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009629LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009630cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009631/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009632
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009633/* Override any GCC internal prototype to avoid an error.
9634 Use char because int might match the return type of a GCC
9635 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009636#ifdef __cplusplus
9637extern "C"
9638#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009639char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009640int
9641main ()
9642{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009643return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009644 ;
9645 return 0;
9646}
9647_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009648if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009649 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00009650else
Matthias Kloseb9621712010-04-24 17:59:49 +00009651 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00009652fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009653rm -f core conftest.err conftest.$ac_objext \
9654 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009655LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009656fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009657{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
9658$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009659if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009660 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00009661
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009662 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009663 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009664 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00009665else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00009666
Martin v. Löwis130fb172001-07-19 11:00:41 +00009667 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00009668fi
9669
Guido van Rossum627b2d71993-12-24 10:39:16 +00009670
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009671fi
9672
Guido van Rossum0be3e491997-05-22 20:33:33 +00009673fi
9674
Guido van Rossum49545951997-12-02 19:28:29 +00009675fi
9676
Guido van Rossumb93a8621998-05-07 13:27:32 +00009677fi
9678
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009679fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009680rm -f core conftest.err conftest.$ac_objext \
9681 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00009682
Matthias Kloseb9621712010-04-24 17:59:49 +00009683 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
9684$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009685if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009686 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009687else
Martin v. Löwis11437992002-04-12 09:54:03 +00009688 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009689LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009690cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009691/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009692
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009693/* Override any GCC internal prototype to avoid an error.
9694 Use char because int might match the return type of a GCC
9695 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009696#ifdef __cplusplus
9697extern "C"
9698#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009699char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009700int
9701main ()
9702{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009703return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009704 ;
9705 return 0;
9706}
9707_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009708if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009709 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009710else
Matthias Kloseb9621712010-04-24 17:59:49 +00009711 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009712fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009713rm -f core conftest.err conftest.$ac_objext \
9714 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009715LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009716fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009717{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
9718$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009719if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009720 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009721
Martin v. Löwis130fb172001-07-19 11:00:41 +00009722 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009723 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009724 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009725fi
9726
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009727
Neal Norwitza978ab02002-11-02 16:58:05 +00009728 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009729 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
9730$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009731if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009732 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009733else
Martin v. Löwis11437992002-04-12 09:54:03 +00009734 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009735LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009736cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009737/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009738
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009739/* Override any GCC internal prototype to avoid an error.
9740 Use char because int might match the return type of a GCC
9741 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009742#ifdef __cplusplus
9743extern "C"
9744#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009745char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009746int
9747main ()
9748{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009749return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009750 ;
9751 return 0;
9752}
9753_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009754if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009755 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009756else
Matthias Kloseb9621712010-04-24 17:59:49 +00009757 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009758fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009759rm -f core conftest.err conftest.$ac_objext \
9760 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009761LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009762fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009763{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
9764$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009765if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009766 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009767
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009768 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009769 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009770 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009771fi
9772
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009773 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009774fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009775
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009776if test "$posix_threads" = "yes"; then
9777 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009778
Matthias Kloseb9621712010-04-24 17:59:49 +00009779$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009780
9781 fi
9782
9783 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
9784 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +02009785 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00009786$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009787
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009788 ;;
9789 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00009790$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009791
9792 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +02009793 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +00009794$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00009795
9796 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009797 esac
9798
Matthias Kloseb9621712010-04-24 17:59:49 +00009799 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
9800$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009801 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009802 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009803else
Matthias Kloseb9621712010-04-24 17:59:49 +00009804 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009805 ac_cv_pthread_system_supported=no
9806else
Matthias Kloseb9621712010-04-24 17:59:49 +00009807 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009808/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +01009809
9810 #include <stdio.h>
9811 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009812 void *foo(void *parm) {
9813 return NULL;
9814 }
9815 main() {
9816 pthread_attr_t attr;
9817 pthread_t id;
9818 if (pthread_attr_init(&attr)) exit(-1);
9819 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
9820 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
9821 exit(0);
9822 }
9823_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009824if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009825 ac_cv_pthread_system_supported=yes
9826else
Matthias Kloseb9621712010-04-24 17:59:49 +00009827 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009828fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009829rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9830 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009831fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009832
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009833
Guido van Rossum627b2d71993-12-24 10:39:16 +00009834fi
9835
Matthias Kloseb9621712010-04-24 17:59:49 +00009836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
9837$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009838 if test "$ac_cv_pthread_system_supported" = "yes"; then
9839
Matthias Kloseb9621712010-04-24 17:59:49 +00009840$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009841
9842 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009843 for ac_func in pthread_sigmask
9844do :
9845 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +02009846if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009847 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009848#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009849_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00009850 case $ac_sys_system in
9851 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009852
Matthias Kloseb9621712010-04-24 17:59:49 +00009853$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00009854
9855 ;;
9856 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009857fi
9858done
9859
Christian Heimesf77b4b22013-08-21 13:26:05 +02009860 for ac_func in pthread_atfork
9861do :
9862 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
9863if test "x$ac_cv_func_pthread_atfork" = xyes; then :
9864 cat >>confdefs.h <<_ACEOF
9865#define HAVE_PTHREAD_ATFORK 1
9866_ACEOF
9867
9868fi
9869done
9870
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009871fi
9872
9873
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009874# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00009875
Matthias Kloseb9621712010-04-24 17:59:49 +00009876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
9877$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009878# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009879if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009880 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009881 no)
Matthias Kloseb9621712010-04-24 17:59:49 +00009882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9883$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009884 ipv6=no
9885 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00009886 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9887$as_echo "yes" >&6; }
9888 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009889
9890 ipv6=yes
9891 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009892 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009893else
Martin v. Löwis11437992002-04-12 09:54:03 +00009894
Matthias Kloseb9621712010-04-24 17:59:49 +00009895 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009896/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009897 /* AF_INET6 available check */
9898#include <sys/types.h>
9899#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +01009900int
9901main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009902{
Charles-François Natalif6fd7942013-01-08 19:49:42 +01009903int domain = AF_INET6;
9904 ;
9905 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009906}
Martin v. Löwis11437992002-04-12 09:54:03 +00009907_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +01009908if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009909
Matthias Kloseb9621712010-04-24 17:59:49 +00009910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9911$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009912 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +00009913
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009914else
Matthias Kloseb159a552010-04-25 21:00:44 +00009915
Matthias Kloseb9621712010-04-24 17:59:49 +00009916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9917$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009918 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +00009919
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009920fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +01009921rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009922
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009923if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009924 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
9925$as_echo_n "checking if RFC2553 API is available... " >&6; }
9926 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009927/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009928
9929 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009930#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009931int
9932main ()
9933{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009934struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +00009935 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00009936 ;
9937 return 0;
9938}
Matthias Kloseb159a552010-04-25 21:00:44 +00009939
Martin v. Löwis11437992002-04-12 09:54:03 +00009940_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009941if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009942
9943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009944$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009945 ipv6=yes
9946
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009947else
Matthias Kloseb159a552010-04-25 21:00:44 +00009948
9949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009950$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009951 ipv6=no
9952
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009953fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009954rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009955fi
9956
9957if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009958 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009959
9960fi
9961
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009962fi
9963
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009964
9965ipv6type=unknown
9966ipv6lib=none
9967ipv6trylibc=no
9968
9969if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009970 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
9971$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00009972 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
9973 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009974 case $i in
9975 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +00009976 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009977/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009978
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009979#include <netinet/in.h>
9980#ifdef IPV6_INRIA_VERSION
9981yes
9982#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009983_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009984if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009985 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009986 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009987fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009988rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009989
9990 ;;
9991 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +00009992 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009993/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009994
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009995#include <netinet/in.h>
9996#ifdef __KAME__
9997yes
9998#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009999_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010000if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010001 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010002 ipv6type=$i;
10003 ipv6lib=inet6
10004 ipv6libdir=/usr/local/v6/lib
10005 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010006fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010007rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010008
10009 ;;
10010 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000010011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010012/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010013
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010014#include <features.h>
10015#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10016yes
10017#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010018_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010019if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010020 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010021 ipv6type=$i;
10022 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010023fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010024rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010025
10026 ;;
10027 linux-inet6)
10028 if test -d /usr/inet6; then
10029 ipv6type=$i
10030 ipv6lib=inet6
10031 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010032 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010033 fi
10034 ;;
10035 solaris)
10036 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000010037 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010038 ipv6type=$i
10039 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010040 fi
10041 fi
10042 ;;
10043 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000010044 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010045/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010046
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010047#include <sys/param.h>
10048#ifdef _TOSHIBA_INET6
10049yes
10050#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010051_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010052if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010053 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010054 ipv6type=$i;
10055 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010056 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010057fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010058rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010059
10060 ;;
10061 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000010062 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010063/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010064
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010065#include </usr/local/v6/include/sys/v6config.h>
10066#ifdef __V6D__
10067yes
10068#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010069_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010070if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010071 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010072 ipv6type=$i;
10073 ipv6lib=v6;
10074 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010075 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010076fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010077rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010078
10079 ;;
10080 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010081 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010082/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010083
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010084#include <sys/param.h>
10085#ifdef _ZETA_MINAMI_INET6
10086yes
10087#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010088_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010089if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010090 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010091 ipv6type=$i;
10092 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010093 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010094fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010095rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010096
10097 ;;
10098 esac
10099 if test "$ipv6type" != "unknown"; then
10100 break
10101 fi
10102 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10104$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010105fi
10106
10107if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10108 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10109 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10110 echo "using lib$ipv6lib"
10111 else
10112 if test $ipv6trylibc = "yes"; then
10113 echo "using libc"
10114 else
10115 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10116 echo "You need to fetch lib$ipv6lib.a from appropriate"
10117 echo 'ipv6 kit and compile beforehand.'
10118 exit 1
10119 fi
10120 fi
10121fi
10122
Matthias Kloseb9621712010-04-24 17:59:49 +000010123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
10124$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
10125cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010126/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010127
10128 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010129int
10130main ()
10131{
10132FSIORefNum fRef = 0
10133 ;
10134 return 0;
10135}
Matthias Kloseb159a552010-04-25 21:00:44 +000010136
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010137_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010138if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010139
Matthias Kloseb159a552010-04-25 21:00:44 +000010140
Matthias Kloseb9621712010-04-24 17:59:49 +000010141$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010142
Matthias Kloseb9621712010-04-24 17:59:49 +000010143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10144$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010145
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010146else
Matthias Kloseb159a552010-04-25 21:00:44 +000010147
Matthias Kloseb9621712010-04-24 17:59:49 +000010148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10149$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010150
10151fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010152rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10153
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010154# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000010155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10156$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010157
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010158# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010159if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010160 withval=$with_doc_strings;
10161fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010162
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010163
10164if test -z "$with_doc_strings"
10165then with_doc_strings="yes"
10166fi
10167if test "$with_doc_strings" != "no"
10168then
10169
Matthias Kloseb9621712010-04-24 17:59:49 +000010170$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010171
10172fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010173{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10174$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010175
Antoine Pitrou042b1282010-08-13 21:15:58 +000010176# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +000010177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
10178$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010179
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010180# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010181if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010182 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010183if test "$withval" != no
10184then
10185
Matthias Kloseb9621712010-04-24 17:59:49 +000010186$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010187
Matthias Kloseb9621712010-04-24 17:59:49 +000010188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10189$as_echo "yes" >&6; }
10190else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10191$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010192fi
10193else
Matthias Kloseb9621712010-04-24 17:59:49 +000010194 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10195$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010196fi
10197
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010198
10199# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000010200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10201$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010202
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010203# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010204if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010205 withval=$with_pymalloc;
10206fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010207
Neil Schemenauera35c6882001-02-27 04:45:05 +000010208
Neil Schemenauer16c22972002-03-22 15:34:49 +000010209if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000010210then
10211 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010212fi
10213if test "$with_pymalloc" != "no"
10214then
Martin v. Löwis11437992002-04-12 09:54:03 +000010215
Matthias Kloseb9621712010-04-24 17:59:49 +000010216$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010217
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010218 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010219fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010220{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10221$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010222
Benjamin Peterson05159c42009-12-03 03:01:27 +000010223# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000010224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
10225$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010226
10227# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010228if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010229 withval=$with_valgrind;
10230else
10231 with_valgrind=no
10232fi
10233
Matthias Kloseb9621712010-04-24 17:59:49 +000010234{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
10235$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010236if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010237 ac_fn_c_check_header_mongrel "$LINENO" "valgrind/valgrind.h" "ac_cv_header_valgrind_valgrind_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020010238if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010239
Matthias Kloseb9621712010-04-24 17:59:49 +000010240$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000010241
10242else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010243 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000010244
10245fi
10246
10247
Jeffrey Yasskin39370832010-05-03 19:29:34 +000010248 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000010249fi
10250
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010251# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000010252
Guido van Rossum98935bf2001-09-05 19:13:16 +000010253DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000010254
Guido van Rossume97ee181999-12-20 21:27:22 +000010255# the dlopen() function means we might want to use dynload_shlib.o. some
10256# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000010257for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000010258do :
10259 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020010260if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010261 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010262#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010263_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000010264
Guido van Rossume97ee181999-12-20 21:27:22 +000010265fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010266done
Guido van Rossume97ee181999-12-20 21:27:22 +000010267
Michael W. Hudson54241132001-12-07 15:38:26 +000010268
Guido van Rossume97ee181999-12-20 21:27:22 +000010269# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
10270# loading of modules.
10271
Matthias Kloseb9621712010-04-24 17:59:49 +000010272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
10273$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010274if test -z "$DYNLOADFILE"
10275then
10276 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000010277 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
10278 if test "$ac_cv_func_dlopen" = yes
10279 then DYNLOADFILE="dynload_shlib.o"
10280 else DYNLOADFILE="dynload_aix.o"
10281 fi
10282 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000010283 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000010284 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
10285 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000010286 *)
10287 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
10288 # out any dynamic loading
10289 if test "$ac_cv_func_dlopen" = yes
10290 then DYNLOADFILE="dynload_shlib.o"
10291 else DYNLOADFILE="dynload_stub.o"
10292 fi
10293 ;;
10294 esac
10295fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010296{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
10297$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010298if test "$DYNLOADFILE" != "dynload_stub.o"
10299then
Martin v. Löwis11437992002-04-12 09:54:03 +000010300
Matthias Kloseb9621712010-04-24 17:59:49 +000010301$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000010302
10303fi
10304
Neil Schemenauer4e425612001-06-19 15:44:15 +000010305# MACHDEP_OBJS can be set to platform-specific object files needed by Python
10306
Michael W. Hudson54241132001-12-07 15:38:26 +000010307
Matthias Kloseb9621712010-04-24 17:59:49 +000010308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
10309$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010310if test -z "$MACHDEP_OBJS"
10311then
Jack Jansene578a632001-08-15 01:27:14 +000010312 MACHDEP_OBJS=$extra_machdep_objs
10313else
10314 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000010315fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010316if test -z "$MACHDEP_OBJS"; then
10317 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
10318$as_echo "none" >&6; }
10319else
10320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
10321$as_echo "$MACHDEP_OBJS" >&6; }
10322fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000010323
Guido van Rossum627b2d71993-12-24 10:39:16 +000010324# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000010325for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020010326 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010327 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010328 futimens futimes gai_strerror \
10329 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000010330 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070010331 if_nameindex \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010010332 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
10333 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020010334 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010335 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020010336 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +000010337 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000010338 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000010339 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010340 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
10341 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020010342 sigaction sigaltstack siginterrupt sigpending sigrelse \
10343 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000010344 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010345 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020010346 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010347do :
10348 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10349ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010350if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010351 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010352#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010353_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010354
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010355fi
10356done
10357
Michael W. Hudson54241132001-12-07 15:38:26 +000010358
Gregory P. Smithdf300d52012-01-21 18:20:15 -080010359ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
10360 #include <dirent.h>
10361"
10362if test "x$ac_cv_have_decl_dirfd" = xyes; then :
10363
10364$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
10365
10366fi
10367
10368
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010369# For some functions, having a definition is not sufficient, since
10370# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000010371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
10372$as_echo_n "checking for chroot... " >&6; }
10373cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010374/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010375#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010376int
10377main ()
10378{
10379void *x=chroot
10380 ;
10381 return 0;
10382}
10383_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010384if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010385
Matthias Kloseb9621712010-04-24 17:59:49 +000010386$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010387
Matthias Kloseb159a552010-04-25 21:00:44 +000010388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010389$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010390else
Matthias Kloseb9621712010-04-24 17:59:49 +000010391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10392$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010393
10394fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010395rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
10397$as_echo_n "checking for link... " >&6; }
10398cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010399/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010400#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010401int
10402main ()
10403{
10404void *x=link
10405 ;
10406 return 0;
10407}
10408_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010409if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010410
Matthias Kloseb9621712010-04-24 17:59:49 +000010411$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010412
Matthias Kloseb159a552010-04-25 21:00:44 +000010413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010414$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010415else
Matthias Kloseb9621712010-04-24 17:59:49 +000010416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10417$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010418
10419fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010420rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
10422$as_echo_n "checking for symlink... " >&6; }
10423cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010424/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010425#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010426int
10427main ()
10428{
10429void *x=symlink
10430 ;
10431 return 0;
10432}
10433_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010434if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010435
Matthias Kloseb9621712010-04-24 17:59:49 +000010436$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010437
Matthias Kloseb159a552010-04-25 21:00:44 +000010438 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010439$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010440else
Matthias Kloseb9621712010-04-24 17:59:49 +000010441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10442$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010443
10444fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010445rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
10447$as_echo_n "checking for fchdir... " >&6; }
10448cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010449/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010450#include <unistd.h>
10451int
10452main ()
10453{
10454void *x=fchdir
10455 ;
10456 return 0;
10457}
10458_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010459if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010460
Matthias Kloseb9621712010-04-24 17:59:49 +000010461$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010462
Matthias Kloseb159a552010-04-25 21:00:44 +000010463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010464$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010465else
Matthias Kloseb9621712010-04-24 17:59:49 +000010466 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10467$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010468
10469fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010470rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
10472$as_echo_n "checking for fsync... " >&6; }
10473cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010474/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010475#include <unistd.h>
10476int
10477main ()
10478{
10479void *x=fsync
10480 ;
10481 return 0;
10482}
10483_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010484if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010485
Matthias Kloseb9621712010-04-24 17:59:49 +000010486$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010487
Matthias Kloseb159a552010-04-25 21:00:44 +000010488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010489$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010490else
Matthias Kloseb9621712010-04-24 17:59:49 +000010491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10492$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010493
10494fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010495rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
10497$as_echo_n "checking for fdatasync... " >&6; }
10498cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010499/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010500#include <unistd.h>
10501int
10502main ()
10503{
10504void *x=fdatasync
10505 ;
10506 return 0;
10507}
10508_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010509if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010510
Matthias Kloseb9621712010-04-24 17:59:49 +000010511$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010512
Matthias Kloseb159a552010-04-25 21:00:44 +000010513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010514$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010515else
Matthias Kloseb9621712010-04-24 17:59:49 +000010516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10517$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010518
10519fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010520rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
10522$as_echo_n "checking for epoll... " >&6; }
10523cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010524/* end confdefs.h. */
10525#include <sys/epoll.h>
10526int
10527main ()
10528{
10529void *x=epoll_create
10530 ;
10531 return 0;
10532}
10533_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010534if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010535
Matthias Kloseb9621712010-04-24 17:59:49 +000010536$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010537
Matthias Kloseb159a552010-04-25 21:00:44 +000010538 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010539$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010540else
Matthias Kloseb9621712010-04-24 17:59:49 +000010541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10542$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010543
10544fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010545rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060010546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
10547$as_echo_n "checking for epoll_create1... " >&6; }
10548cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10549/* end confdefs.h. */
10550#include <sys/epoll.h>
10551int
10552main ()
10553{
10554void *x=epoll_create1
10555 ;
10556 return 0;
10557}
10558_ACEOF
10559if ac_fn_c_try_compile "$LINENO"; then :
10560
10561$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
10562
10563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10564$as_echo "yes" >&6; }
10565else
10566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10567$as_echo "no" >&6; }
10568
10569fi
10570rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
10572$as_echo_n "checking for kqueue... " >&6; }
10573cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010574/* end confdefs.h. */
10575
10576#include <sys/types.h>
10577#include <sys/event.h>
10578
10579int
10580main ()
10581{
10582int x=kqueue()
10583 ;
10584 return 0;
10585}
10586_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010587if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010588
Matthias Kloseb9621712010-04-24 17:59:49 +000010589$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010590
Matthias Kloseb159a552010-04-25 21:00:44 +000010591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010592$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010593else
Matthias Kloseb9621712010-04-24 17:59:49 +000010594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10595$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010596
10597fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010598rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010599# On some systems (eg. FreeBSD 5), we would find a definition of the
10600# functions ctermid_r, setgroups in the library, but no prototype
10601# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
10602# address to avoid compiler warnings and potential miscompilations
10603# because of the missing prototypes.
10604
Matthias Kloseb9621712010-04-24 17:59:49 +000010605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
10606$as_echo_n "checking for ctermid_r... " >&6; }
10607cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010608/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010609
Martin v. Löwisd5843682002-11-21 20:41:28 +000010610#include <stdio.h>
10611
Martin v. Löwisd5843682002-11-21 20:41:28 +000010612int
10613main ()
10614{
10615void* p = ctermid_r
10616 ;
10617 return 0;
10618}
10619_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010620if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010621
Matthias Kloseb9621712010-04-24 17:59:49 +000010622$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010623
Matthias Kloseb159a552010-04-25 21:00:44 +000010624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010625$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010626else
Matthias Kloseb9621712010-04-24 17:59:49 +000010627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10628$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010629
10630fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010631rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10632
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
10634$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010635if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010636 $as_echo_n "(cached) " >&6
10637else
10638 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010639/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010640#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010641int
10642main ()
10643{
10644void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010645
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010646 ;
10647 return 0;
10648}
10649_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010650if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010651 ac_cv_flock_decl=yes
10652else
10653 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010654
10655fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010656rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000010657
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010658fi
10659{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
10660$as_echo "$ac_cv_flock_decl" >&6; }
10661if test "x${ac_cv_flock_decl}" = xyes; then
10662 for ac_func in flock
10663do :
10664 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020010665if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010666 cat >>confdefs.h <<_ACEOF
10667#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000010668_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010669
Antoine Pitroua3000072010-09-07 14:52:42 +000010670else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010671 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000010672$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010673if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000010674 $as_echo_n "(cached) " >&6
10675else
10676 ac_check_lib_save_LIBS=$LIBS
10677LIBS="-lbsd $LIBS"
10678cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10679/* end confdefs.h. */
10680
10681/* Override any GCC internal prototype to avoid an error.
10682 Use char because int might match the return type of a GCC
10683 builtin and then its argument prototype would still apply. */
10684#ifdef __cplusplus
10685extern "C"
10686#endif
10687char flock ();
10688int
10689main ()
10690{
10691return flock ();
10692 ;
10693 return 0;
10694}
10695_ACEOF
10696if ac_fn_c_try_link "$LINENO"; then :
10697 ac_cv_lib_bsd_flock=yes
10698else
10699 ac_cv_lib_bsd_flock=no
10700fi
10701rm -f core conftest.err conftest.$ac_objext \
10702 conftest$ac_exeext conftest.$ac_ext
10703LIBS=$ac_check_lib_save_LIBS
10704fi
10705{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
10706$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010707if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010708 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000010709
10710
10711$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
10712
10713
10714fi
10715
10716
10717fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010718done
10719
Antoine Pitroua3000072010-09-07 14:52:42 +000010720fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010721
Matthias Kloseb9621712010-04-24 17:59:49 +000010722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
10723$as_echo_n "checking for getpagesize... " >&6; }
10724cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010725/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010726
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010727#include <unistd.h>
10728
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010729int
10730main ()
10731{
10732void* p = getpagesize
10733 ;
10734 return 0;
10735}
10736_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010737if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010738
Matthias Kloseb9621712010-04-24 17:59:49 +000010739$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010740
Matthias Kloseb159a552010-04-25 21:00:44 +000010741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010742$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010743else
Matthias Kloseb9621712010-04-24 17:59:49 +000010744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10745$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010746
10747fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010748rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010749
Victor Stinner984890f2011-11-24 13:53:38 +010010750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
10751$as_echo_n "checking for broken unsetenv... " >&6; }
10752cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10753/* end confdefs.h. */
10754
10755#include <stdlib.h>
10756
10757int
10758main ()
10759{
10760int res = unsetenv("DUMMY")
10761 ;
10762 return 0;
10763}
10764_ACEOF
10765if ac_fn_c_try_compile "$LINENO"; then :
10766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10767$as_echo "no" >&6; }
10768else
10769
10770$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
10771
10772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10773$as_echo "yes" >&6; }
10774
10775fi
10776rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10777
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010778for ac_prog in true
10779do
10780 # Extract the first word of "$ac_prog", so it can be a program name with args.
10781set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000010782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10783$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010784if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010785 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010786else
10787 if test -n "$TRUE"; then
10788 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
10789else
10790as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10791for as_dir in $PATH
10792do
10793 IFS=$as_save_IFS
10794 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000010795 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000010796 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010797 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000010798 $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 +000010799 break 2
10800 fi
10801done
Matthias Kloseb9621712010-04-24 17:59:49 +000010802 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010803IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010804
10805fi
10806fi
10807TRUE=$ac_cv_prog_TRUE
10808if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
10810$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010811else
Matthias Kloseb9621712010-04-24 17:59:49 +000010812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10813$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010814fi
10815
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010816
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010817 test -n "$TRUE" && break
10818done
10819test -n "$TRUE" || TRUE="/bin/true"
10820
10821
Matthias Kloseb9621712010-04-24 17:59:49 +000010822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
10823$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010824if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010825 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010826else
10827 ac_check_lib_save_LIBS=$LIBS
10828LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010829cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010830/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010831
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010832/* Override any GCC internal prototype to avoid an error.
10833 Use char because int might match the return type of a GCC
10834 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010835#ifdef __cplusplus
10836extern "C"
10837#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010838char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010839int
10840main ()
10841{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010842return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010843 ;
10844 return 0;
10845}
10846_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010847if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010848 ac_cv_lib_c_inet_aton=yes
10849else
Matthias Kloseb9621712010-04-24 17:59:49 +000010850 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010851fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010852rm -f core conftest.err conftest.$ac_objext \
10853 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010854LIBS=$ac_check_lib_save_LIBS
10855fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010856{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
10857$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010858if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010859 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010860else
Matthias Kloseb9621712010-04-24 17:59:49 +000010861 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
10862$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010863if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010864 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010865else
10866 ac_check_lib_save_LIBS=$LIBS
10867LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010868cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010869/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010870
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010871/* Override any GCC internal prototype to avoid an error.
10872 Use char because int might match the return type of a GCC
10873 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010874#ifdef __cplusplus
10875extern "C"
10876#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010877char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010878int
10879main ()
10880{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010881return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010882 ;
10883 return 0;
10884}
10885_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010886if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010887 ac_cv_lib_resolv_inet_aton=yes
10888else
Matthias Kloseb9621712010-04-24 17:59:49 +000010889 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010890fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010891rm -f core conftest.err conftest.$ac_objext \
10892 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010893LIBS=$ac_check_lib_save_LIBS
10894fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010895{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
10896$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010897if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010898 cat >>confdefs.h <<_ACEOF
10899#define HAVE_LIBRESOLV 1
10900_ACEOF
10901
10902 LIBS="-lresolv $LIBS"
10903
10904fi
10905
10906
10907fi
10908
10909
Christian Heimesd0764e22007-12-04 15:00:33 +000010910# On Tru64, chflags seems to be present, but calling it will
10911# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000010912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
10913$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010914if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010915 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010916else
Matthias Kloseb9621712010-04-24 17:59:49 +000010917 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010918 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000010919else
Matthias Kloseb9621712010-04-24 17:59:49 +000010920 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000010921/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070010922
Christian Heimesd0764e22007-12-04 15:00:33 +000010923#include <sys/stat.h>
10924#include <unistd.h>
10925int main(int argc, char*argv[])
10926{
10927 if(chflags(argv[0], 0) != 0)
10928 return 1;
10929 return 0;
10930}
Ned Deily3eb67d52011-06-28 00:00:28 -070010931
Christian Heimesd0764e22007-12-04 15:00:33 +000010932_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010933if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010934 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010935else
Matthias Kloseb9621712010-04-24 17:59:49 +000010936 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010937fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010938rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10939 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010940fi
10941
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010942
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010943fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010944{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
10945$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010946if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010947 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020010948if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010949 ac_cv_have_chflags="yes"
10950else
10951 ac_cv_have_chflags="no"
10952fi
10953
10954fi
10955if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010956
Matthias Kloseb9621712010-04-24 17:59:49 +000010957$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010958
10959fi
10960
Matthias Kloseb9621712010-04-24 17:59:49 +000010961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
10962$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010963if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010964 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010965else
Matthias Kloseb9621712010-04-24 17:59:49 +000010966 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010967 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000010968else
Matthias Kloseb9621712010-04-24 17:59:49 +000010969 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000010970/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070010971
Christian Heimesd0764e22007-12-04 15:00:33 +000010972#include <sys/stat.h>
10973#include <unistd.h>
10974int main(int argc, char*argv[])
10975{
10976 if(lchflags(argv[0], 0) != 0)
10977 return 1;
10978 return 0;
10979}
Ned Deily3eb67d52011-06-28 00:00:28 -070010980
Christian Heimesd0764e22007-12-04 15:00:33 +000010981_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010982if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010983 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010984else
Matthias Kloseb9621712010-04-24 17:59:49 +000010985 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000010986fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010987rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10988 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010989fi
10990
10991
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010992fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010993{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
10994$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010995if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010996 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020010997if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010998 ac_cv_have_lchflags="yes"
10999else
11000 ac_cv_have_lchflags="no"
11001fi
11002
11003fi
11004if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011005
Matthias Kloseb9621712010-04-24 17:59:49 +000011006$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011007
11008fi
11009
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011010case $ac_sys_system/$ac_sys_release in
11011Darwin/*)
11012 _CUR_CFLAGS="${CFLAGS}"
11013 _CUR_LDFLAGS="${LDFLAGS}"
11014 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11015 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11016 ;;
11017esac
11018
Matthias Kloseb9621712010-04-24 17:59:49 +000011019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11020$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011021if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011022 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011023else
11024 ac_check_lib_save_LIBS=$LIBS
11025LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011026cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011027/* end confdefs.h. */
11028
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011029/* Override any GCC internal prototype to avoid an error.
11030 Use char because int might match the return type of a GCC
11031 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011032#ifdef __cplusplus
11033extern "C"
11034#endif
11035char inflateCopy ();
11036int
11037main ()
11038{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011039return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011040 ;
11041 return 0;
11042}
11043_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011044if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011045 ac_cv_lib_z_inflateCopy=yes
11046else
Matthias Kloseb9621712010-04-24 17:59:49 +000011047 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011048fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011049rm -f core conftest.err conftest.$ac_objext \
11050 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011051LIBS=$ac_check_lib_save_LIBS
11052fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011053{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
11054$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011055if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011056
Matthias Kloseb9621712010-04-24 17:59:49 +000011057$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011058
11059fi
11060
11061
11062case $ac_sys_system/$ac_sys_release in
11063Darwin/*)
11064 CFLAGS="${_CUR_CFLAGS}"
11065 LDFLAGS="${_CUR_LDFLAGS}"
11066 ;;
11067esac
11068
Matthias Kloseb9621712010-04-24 17:59:49 +000011069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
11070$as_echo_n "checking for hstrerror... " >&6; }
11071cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011072/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011073
Martin v. Löwise9416172003-05-03 10:12:45 +000011074#include <netdb.h>
11075
Martin v. Löwise9416172003-05-03 10:12:45 +000011076int
11077main ()
11078{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011079void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011080 ;
11081 return 0;
11082}
11083_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011084if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011085
Matthias Kloseb9621712010-04-24 17:59:49 +000011086$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011087
Matthias Kloseb159a552010-04-25 21:00:44 +000011088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011089$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011090else
Matthias Kloseb9621712010-04-24 17:59:49 +000011091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11092$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011093
11094fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011095rm -f core conftest.err conftest.$ac_objext \
11096 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011097
Matthias Kloseb9621712010-04-24 17:59:49 +000011098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
11099$as_echo_n "checking for inet_aton... " >&6; }
11100cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011101/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011102
Martin v. Löwis86d66262006-02-17 08:40:11 +000011103#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011104#include <sys/socket.h>
11105#include <netinet/in.h>
11106#include <arpa/inet.h>
11107
Martin v. Löwise9416172003-05-03 10:12:45 +000011108int
11109main ()
11110{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011111void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011112 ;
11113 return 0;
11114}
11115_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011116if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011117
Matthias Kloseb9621712010-04-24 17:59:49 +000011118$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011119
Matthias Kloseb159a552010-04-25 21:00:44 +000011120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011121$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011122else
Matthias Kloseb9621712010-04-24 17:59:49 +000011123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11124$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011125
11126fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011127rm -f core conftest.err conftest.$ac_objext \
11128 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011129
Matthias Kloseb9621712010-04-24 17:59:49 +000011130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
11131$as_echo_n "checking for inet_pton... " >&6; }
11132cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011133/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011134
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011135#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011136#include <sys/socket.h>
11137#include <netinet/in.h>
11138#include <arpa/inet.h>
11139
Martin v. Löwise9416172003-05-03 10:12:45 +000011140int
11141main ()
11142{
11143void* p = inet_pton
11144 ;
11145 return 0;
11146}
11147_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011148if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011149
Matthias Kloseb9621712010-04-24 17:59:49 +000011150$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011151
Matthias Kloseb159a552010-04-25 21:00:44 +000011152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011153$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011154else
Matthias Kloseb9621712010-04-24 17:59:49 +000011155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11156$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011157
11158fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011159rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000011160
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011161# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000011162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
11163$as_echo_n "checking for setgroups... " >&6; }
11164cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011165/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011166
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011167#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011168#ifdef HAVE_GRP_H
11169#include <grp.h>
11170#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000011171
Martin v. Löwisd5843682002-11-21 20:41:28 +000011172int
11173main ()
11174{
11175void* p = setgroups
11176 ;
11177 return 0;
11178}
11179_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011180if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011181
Matthias Kloseb9621712010-04-24 17:59:49 +000011182$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011183
Matthias Kloseb159a552010-04-25 21:00:44 +000011184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011185$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011186else
Matthias Kloseb9621712010-04-24 17:59:49 +000011187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11188$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011189
11190fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011191rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000011192
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011193# check for openpty and forkpty
11194
11195for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011196do :
11197 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011198if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011199 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011200#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011201_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011202
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011203else
Matthias Kloseb9621712010-04-24 17:59:49 +000011204 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
11205$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011206if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011207 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011208else
Martin v. Löwis11437992002-04-12 09:54:03 +000011209 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011210LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011211cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011212/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011213
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011214/* Override any GCC internal prototype to avoid an error.
11215 Use char because int might match the return type of a GCC
11216 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011217#ifdef __cplusplus
11218extern "C"
11219#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011220char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011221int
11222main ()
11223{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011224return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011225 ;
11226 return 0;
11227}
11228_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011229if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011230 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011231else
Matthias Kloseb9621712010-04-24 17:59:49 +000011232 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011233fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011234rm -f core conftest.err conftest.$ac_objext \
11235 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011236LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011237fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011238{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
11239$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011240if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011241 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011242 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011243else
Matthias Kloseb9621712010-04-24 17:59:49 +000011244 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
11245$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011246if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011247 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011248else
11249 ac_check_lib_save_LIBS=$LIBS
11250LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011251cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011252/* end confdefs.h. */
11253
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011254/* Override any GCC internal prototype to avoid an error.
11255 Use char because int might match the return type of a GCC
11256 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011257#ifdef __cplusplus
11258extern "C"
11259#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011260char openpty ();
11261int
11262main ()
11263{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011264return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011265 ;
11266 return 0;
11267}
11268_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011269if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011270 ac_cv_lib_bsd_openpty=yes
11271else
Matthias Kloseb9621712010-04-24 17:59:49 +000011272 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011273fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011274rm -f core conftest.err conftest.$ac_objext \
11275 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011276LIBS=$ac_check_lib_save_LIBS
11277fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011278{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
11279$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011280if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011281 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011282 LIBS="$LIBS -lbsd"
11283fi
11284
11285
11286fi
11287
Fred Drake8cef4cf2000-06-28 16:40:38 +000011288
11289fi
11290done
11291
11292for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011293do :
11294 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011295if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011296 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011297#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011298_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011299
Fred Drake8cef4cf2000-06-28 16:40:38 +000011300else
Matthias Kloseb9621712010-04-24 17:59:49 +000011301 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
11302$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011303if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011304 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011305else
Martin v. Löwis11437992002-04-12 09:54:03 +000011306 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011307LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011308cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011309/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011310
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011311/* Override any GCC internal prototype to avoid an error.
11312 Use char because int might match the return type of a GCC
11313 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011314#ifdef __cplusplus
11315extern "C"
11316#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011317char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011318int
11319main ()
11320{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011321return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011322 ;
11323 return 0;
11324}
11325_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011326if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011327 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011328else
Matthias Kloseb9621712010-04-24 17:59:49 +000011329 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011330fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011331rm -f core conftest.err conftest.$ac_objext \
11332 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011333LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011334fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011335{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
11336$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011337if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011338 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011339 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011340else
Matthias Kloseb9621712010-04-24 17:59:49 +000011341 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
11342$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011343if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011344 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011345else
11346 ac_check_lib_save_LIBS=$LIBS
11347LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011348cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011349/* end confdefs.h. */
11350
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011351/* Override any GCC internal prototype to avoid an error.
11352 Use char because int might match the return type of a GCC
11353 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011354#ifdef __cplusplus
11355extern "C"
11356#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011357char forkpty ();
11358int
11359main ()
11360{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011361return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011362 ;
11363 return 0;
11364}
11365_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011366if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011367 ac_cv_lib_bsd_forkpty=yes
11368else
Matthias Kloseb9621712010-04-24 17:59:49 +000011369 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011370fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011371rm -f core conftest.err conftest.$ac_objext \
11372 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011373LIBS=$ac_check_lib_save_LIBS
11374fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011375{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
11376$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011377if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011378 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011379 LIBS="$LIBS -lbsd"
11380fi
11381
11382
11383fi
11384
Fred Drake8cef4cf2000-06-28 16:40:38 +000011385
11386fi
11387done
11388
Jack Jansendd19cf82001-12-06 22:36:17 +000011389
Christian Heimesb186d002008-03-18 15:15:01 +000011390# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000011391for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000011392do :
11393 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020011394if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000011395 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011396#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000011397_ACEOF
11398
11399fi
11400done
11401
11402
Michael W. Hudson54241132001-12-07 15:38:26 +000011403# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000011404for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000011405do :
11406 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11407ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011408if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011409 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011410#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011411_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000011412
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011413fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000011414done
11415
Michael W. Hudson54241132001-12-07 15:38:26 +000011416
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011417ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020011418if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011419 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000011420
Martin v. Löwis1142de32002-03-29 16:28:31 +000011421else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011422 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011423 *" dup2.$ac_objext "* ) ;;
11424 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011425 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011426esac
11427
Martin v. Löwis1142de32002-03-29 16:28:31 +000011428fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011429
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011430ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020011431if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011432 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
11433
11434else
11435 case " $LIBOBJS " in
11436 *" strdup.$ac_objext "* ) ;;
11437 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
11438 ;;
11439esac
11440
11441fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000011442
11443
11444for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000011445do :
11446 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020011447if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011448 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011449#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011450_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011451 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011452/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011453#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011454int
11455main ()
11456{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011457getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011458 ;
11459 return 0;
11460}
11461_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011462if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011463
Matthias Kloseb9621712010-04-24 17:59:49 +000011464$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011465
Guido van Rossum627b2d71993-12-24 10:39:16 +000011466fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011467rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011468
Guido van Rossum627b2d71993-12-24 10:39:16 +000011469fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011470done
Guido van Rossum627b2d71993-12-24 10:39:16 +000011471
Jack Jansen150753c2003-03-29 22:07:47 +000011472for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000011473do :
11474 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020011475if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000011476 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011477#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000011478_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011479 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011480/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000011481#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000011482int
11483main ()
11484{
11485setpgrp(0,0);
11486 ;
11487 return 0;
11488}
11489_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011490if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011491
Matthias Kloseb9621712010-04-24 17:59:49 +000011492$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011493
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011494fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011495rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000011496
11497fi
11498done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011499
Thomas Wouters3a584202000-08-05 23:28:51 +000011500for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000011501do :
11502 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020011503if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011504 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011505#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011506_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011507 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011508/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011509#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011510int
11511main ()
11512{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011513gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011514 ;
11515 return 0;
11516}
11517_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011518if ac_fn_c_try_compile "$LINENO"; then :
11519
Guido van Rossum627b2d71993-12-24 10:39:16 +000011520else
Skip Montanaro6dead952003-09-25 14:50:04 +000011521
Matthias Kloseb9621712010-04-24 17:59:49 +000011522$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011523
Martin v. Löwis11437992002-04-12 09:54:03 +000011524
Guido van Rossum627b2d71993-12-24 10:39:16 +000011525fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011526rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011527
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011528fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011529done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011530
Michael W. Hudson54241132001-12-07 15:38:26 +000011531
Victor Stinnere0be4232011-10-25 13:06:09 +020011532for ac_func in clock_gettime
11533do :
11534 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
11535if test "x$ac_cv_func_clock_gettime" = xyes; then :
11536 cat >>confdefs.h <<_ACEOF
11537#define HAVE_CLOCK_GETTIME 1
11538_ACEOF
11539
11540else
11541
11542 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
11543$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
11544if ${ac_cv_lib_rt_clock_gettime+:} false; then :
11545 $as_echo_n "(cached) " >&6
11546else
11547 ac_check_lib_save_LIBS=$LIBS
11548LIBS="-lrt $LIBS"
11549cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11550/* end confdefs.h. */
11551
11552/* Override any GCC internal prototype to avoid an error.
11553 Use char because int might match the return type of a GCC
11554 builtin and then its argument prototype would still apply. */
11555#ifdef __cplusplus
11556extern "C"
11557#endif
11558char clock_gettime ();
11559int
11560main ()
11561{
11562return clock_gettime ();
11563 ;
11564 return 0;
11565}
11566_ACEOF
11567if ac_fn_c_try_link "$LINENO"; then :
11568 ac_cv_lib_rt_clock_gettime=yes
11569else
11570 ac_cv_lib_rt_clock_gettime=no
11571fi
11572rm -f core conftest.err conftest.$ac_objext \
11573 conftest$ac_exeext conftest.$ac_ext
11574LIBS=$ac_check_lib_save_LIBS
11575fi
11576{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
11577$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
11578if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
11579
11580 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
11581
11582
11583$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
11584
11585
11586fi
11587
11588
11589fi
11590done
11591
11592
11593for ac_func in clock_getres
11594do :
11595 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
11596if test "x$ac_cv_func_clock_getres" = xyes; then :
11597 cat >>confdefs.h <<_ACEOF
11598#define HAVE_CLOCK_GETRES 1
11599_ACEOF
11600
11601else
11602
11603 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
11604$as_echo_n "checking for clock_getres in -lrt... " >&6; }
11605if ${ac_cv_lib_rt_clock_getres+:} false; then :
11606 $as_echo_n "(cached) " >&6
11607else
11608 ac_check_lib_save_LIBS=$LIBS
11609LIBS="-lrt $LIBS"
11610cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11611/* end confdefs.h. */
11612
11613/* Override any GCC internal prototype to avoid an error.
11614 Use char because int might match the return type of a GCC
11615 builtin and then its argument prototype would still apply. */
11616#ifdef __cplusplus
11617extern "C"
11618#endif
11619char clock_getres ();
11620int
11621main ()
11622{
11623return clock_getres ();
11624 ;
11625 return 0;
11626}
11627_ACEOF
11628if ac_fn_c_try_link "$LINENO"; then :
11629 ac_cv_lib_rt_clock_getres=yes
11630else
11631 ac_cv_lib_rt_clock_getres=no
11632fi
11633rm -f core conftest.err conftest.$ac_objext \
11634 conftest$ac_exeext conftest.$ac_ext
11635LIBS=$ac_check_lib_save_LIBS
11636fi
11637{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
11638$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
11639if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
11640
11641 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
11642
11643
11644fi
11645
11646
11647fi
11648done
11649
11650
Matthias Kloseb9621712010-04-24 17:59:49 +000011651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
11652$as_echo_n "checking for major... " >&6; }
11653cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011654/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011655
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011656#if defined(MAJOR_IN_MKDEV)
11657#include <sys/mkdev.h>
11658#elif defined(MAJOR_IN_SYSMACROS)
11659#include <sys/sysmacros.h>
11660#else
11661#include <sys/types.h>
11662#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011663
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011664int
11665main ()
11666{
11667
11668 makedev(major(0),minor(0));
11669
11670 ;
11671 return 0;
11672}
11673_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011674if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011675
11676
Matthias Kloseb9621712010-04-24 17:59:49 +000011677$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011678
Matthias Kloseb9621712010-04-24 17:59:49 +000011679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11680$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011681
11682else
Skip Montanaro6dead952003-09-25 14:50:04 +000011683
Matthias Kloseb9621712010-04-24 17:59:49 +000011684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11685$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011686
11687fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011688rm -f core conftest.err conftest.$ac_objext \
11689 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011690
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011691# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000011692# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000011693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
11694$as_echo_n "checking for getaddrinfo... " >&6; }
11695cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011696/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011697
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011698#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011699#include <sys/socket.h>
11700#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011701#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011702
Martin v. Löwis11437992002-04-12 09:54:03 +000011703int
11704main ()
11705{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011706getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000011707 ;
11708 return 0;
11709}
11710_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011711if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011712 have_getaddrinfo=yes
11713else
Matthias Kloseb9621712010-04-24 17:59:49 +000011714 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011715fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011716rm -f core conftest.err conftest.$ac_objext \
11717 conftest$ac_exeext conftest.$ac_ext
11718{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
11719$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011720if test $have_getaddrinfo = yes
11721then
Matthias Kloseb9621712010-04-24 17:59:49 +000011722 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
11723$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011724 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011725 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011726else
Matthias Kloseb9621712010-04-24 17:59:49 +000011727 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010011728
11729if test "${enable_ipv6+set}" = set; then
11730 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
11731else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011732 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010011733fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011734else
Matthias Kloseb9621712010-04-24 17:59:49 +000011735 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011736/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011737
Stefan Krah19c21392012-11-22 23:47:32 +010011738#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011739#include <sys/types.h>
11740#include <netdb.h>
11741#include <string.h>
11742#include <sys/socket.h>
11743#include <netinet/in.h>
11744
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011745int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011746{
11747 int passive, gaierr, inet4 = 0, inet6 = 0;
11748 struct addrinfo hints, *ai, *aitop;
11749 char straddr[INET6_ADDRSTRLEN], strport[16];
11750
11751 for (passive = 0; passive <= 1; passive++) {
11752 memset(&hints, 0, sizeof(hints));
11753 hints.ai_family = AF_UNSPEC;
11754 hints.ai_flags = passive ? AI_PASSIVE : 0;
11755 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000011756 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011757 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
11758 (void)gai_strerror(gaierr);
11759 goto bad;
11760 }
11761 for (ai = aitop; ai; ai = ai->ai_next) {
11762 if (ai->ai_addr == NULL ||
11763 ai->ai_addrlen == 0 ||
11764 getnameinfo(ai->ai_addr, ai->ai_addrlen,
11765 straddr, sizeof(straddr), strport, sizeof(strport),
11766 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
11767 goto bad;
11768 }
11769 switch (ai->ai_family) {
11770 case AF_INET:
11771 if (strcmp(strport, "54321") != 0) {
11772 goto bad;
11773 }
11774 if (passive) {
11775 if (strcmp(straddr, "0.0.0.0") != 0) {
11776 goto bad;
11777 }
11778 } else {
11779 if (strcmp(straddr, "127.0.0.1") != 0) {
11780 goto bad;
11781 }
11782 }
11783 inet4++;
11784 break;
11785 case AF_INET6:
11786 if (strcmp(strport, "54321") != 0) {
11787 goto bad;
11788 }
11789 if (passive) {
11790 if (strcmp(straddr, "::") != 0) {
11791 goto bad;
11792 }
11793 } else {
11794 if (strcmp(straddr, "::1") != 0) {
11795 goto bad;
11796 }
11797 }
11798 inet6++;
11799 break;
11800 case AF_UNSPEC:
11801 goto bad;
11802 break;
11803 default:
11804 /* another family support? */
11805 break;
11806 }
11807 }
11808 }
11809
11810 if (!(inet4 == 0 || inet4 == 2))
11811 goto bad;
11812 if (!(inet6 == 0 || inet6 == 2))
11813 goto bad;
11814
11815 if (aitop)
11816 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011817 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011818
11819 bad:
11820 if (aitop)
11821 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011822 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011823}
11824
Martin v. Löwis11437992002-04-12 09:54:03 +000011825_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011826if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011827 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011828else
Matthias Kloseb9621712010-04-24 17:59:49 +000011829 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011830fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011831rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11832 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011833fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011834
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011835fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011836
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011837fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011838
Benjamin Petersond4694ed2010-11-01 01:44:30 +000011839{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
11840$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
11841
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011842if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011843then
11844 if test $ipv6 = yes
11845 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011846 echo 'Fatal: You must get working getaddrinfo() function.'
11847 echo ' or you can specify "--disable-ipv6"'.
11848 exit 1
11849 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011850else
Martin v. Löwis11437992002-04-12 09:54:03 +000011851
Matthias Kloseb9621712010-04-24 17:59:49 +000011852$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011853
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011854fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000011855
Jack Jansen9a66b6d2001-08-08 13:56:14 +000011856for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000011857do :
11858 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020011859if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011860 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011861#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011862_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011863
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011864fi
11865done
11866
Michael W. Hudson54241132001-12-07 15:38:26 +000011867
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011868# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000011869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
11870$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011871if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011872 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011873else
Matthias Kloseb9621712010-04-24 17:59:49 +000011874 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011875/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011876#include <sys/types.h>
11877#include <sys/time.h>
11878#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011879
Martin v. Löwis11437992002-04-12 09:54:03 +000011880int
11881main ()
11882{
11883if ((struct tm *) 0)
11884return 0;
11885 ;
11886 return 0;
11887}
11888_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011889if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011890 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011891else
Matthias Kloseb9621712010-04-24 17:59:49 +000011892 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011893fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011894rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011895fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011896{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
11897$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011898if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011899
Matthias Kloseb9621712010-04-24 17:59:49 +000011900$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011901
11902fi
11903
Matthias Kloseb9621712010-04-24 17:59:49 +000011904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
11905$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011906if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011907 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011908else
Matthias Kloseb9621712010-04-24 17:59:49 +000011909 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011910/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011911#include <sys/types.h>
11912#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011913
Martin v. Löwis11437992002-04-12 09:54:03 +000011914int
11915main ()
11916{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011917struct tm tm;
11918 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000011919 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000011920 ;
11921 return 0;
11922}
11923_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011924if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011925 ac_cv_struct_tm=time.h
11926else
Matthias Kloseb9621712010-04-24 17:59:49 +000011927 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011928fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011929rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011930fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011931{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
11932$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011933if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011934
Matthias Kloseb9621712010-04-24 17:59:49 +000011935$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011936
11937fi
11938
Matthias Kloseb9621712010-04-24 17:59:49 +000011939ac_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 +000011940#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000011941
Matthias Kloseb9621712010-04-24 17:59:49 +000011942"
Victor Stinnere0be4232011-10-25 13:06:09 +020011943if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011944
11945cat >>confdefs.h <<_ACEOF
11946#define HAVE_STRUCT_TM_TM_ZONE 1
11947_ACEOF
11948
11949
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011950fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011951
Martin v. Löwis11437992002-04-12 09:54:03 +000011952if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
11953
Matthias Kloseb9621712010-04-24 17:59:49 +000011954$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011955
11956else
Matthias Kloseb9621712010-04-24 17:59:49 +000011957 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
11958"
Victor Stinnere0be4232011-10-25 13:06:09 +020011959if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011960 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011961else
Matthias Kloseb9621712010-04-24 17:59:49 +000011962 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011963fi
11964
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011965cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011966#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011967_ACEOF
11968
Matthias Kloseb9621712010-04-24 17:59:49 +000011969 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
11970$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011971if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011972 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011973else
Matthias Kloseb9621712010-04-24 17:59:49 +000011974 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011975/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011976#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011977#if !HAVE_DECL_TZNAME
11978extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000011979#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011980
Martin v. Löwis11437992002-04-12 09:54:03 +000011981int
11982main ()
11983{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011984return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000011985 ;
11986 return 0;
11987}
11988_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011989if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011990 ac_cv_var_tzname=yes
11991else
Matthias Kloseb9621712010-04-24 17:59:49 +000011992 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011993fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011994rm -f core conftest.err conftest.$ac_objext \
11995 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000011996fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011997{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
11998$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011999 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012000
Matthias Kloseb9621712010-04-24 17:59:49 +000012001$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012002
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012003 fi
12004fi
12005
Matthias Kloseb9621712010-04-24 17:59:49 +000012006ac_fn_c_check_member "$LINENO" "struct stat" "st_rdev" "ac_cv_member_struct_stat_st_rdev" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020012007if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012008
12009cat >>confdefs.h <<_ACEOF
12010#define HAVE_STRUCT_STAT_ST_RDEV 1
12011_ACEOF
12012
12013
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012014fi
12015
Matthias Kloseb9621712010-04-24 17:59:49 +000012016ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020012017if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012018
Martin v. Löwis11437992002-04-12 09:54:03 +000012019cat >>confdefs.h <<_ACEOF
12020#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12021_ACEOF
12022
12023
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012024fi
12025
Matthias Kloseb9621712010-04-24 17:59:49 +000012026ac_fn_c_check_member "$LINENO" "struct stat" "st_flags" "ac_cv_member_struct_stat_st_flags" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020012027if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000012028
12029cat >>confdefs.h <<_ACEOF
12030#define HAVE_STRUCT_STAT_ST_FLAGS 1
12031_ACEOF
12032
12033
12034fi
12035
Matthias Kloseb9621712010-04-24 17:59:49 +000012036ac_fn_c_check_member "$LINENO" "struct stat" "st_gen" "ac_cv_member_struct_stat_st_gen" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020012037if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012038
12039cat >>confdefs.h <<_ACEOF
12040#define HAVE_STRUCT_STAT_ST_GEN 1
12041_ACEOF
12042
12043
12044fi
12045
Matthias Kloseb9621712010-04-24 17:59:49 +000012046ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtime" "ac_cv_member_struct_stat_st_birthtime" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020012047if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012048
12049cat >>confdefs.h <<_ACEOF
12050#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
12051_ACEOF
12052
12053
12054fi
12055
Matthias Kloseb9621712010-04-24 17:59:49 +000012056ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020012057if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012058
Martin v. Löwis11437992002-04-12 09:54:03 +000012059cat >>confdefs.h <<_ACEOF
12060#define HAVE_STRUCT_STAT_ST_BLOCKS 1
12061_ACEOF
12062
12063
Matthias Kloseb9621712010-04-24 17:59:49 +000012064$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012065
12066else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012067 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000012068 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012069 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
12070 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012071esac
12072
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012073fi
12074
Michael W. Hudson54241132001-12-07 15:38:26 +000012075
Martin v. Löwis11437992002-04-12 09:54:03 +000012076
Matthias Kloseb9621712010-04-24 17:59:49 +000012077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
12078$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012079if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012080 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012081else
Matthias Kloseb159a552010-04-25 21:00:44 +000012082
Matthias Kloseb9621712010-04-24 17:59:49 +000012083 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012084/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012085#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012086int
12087main ()
12088{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012089return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000012090 ;
12091 return 0;
12092}
12093_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012094if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012095 ac_cv_header_time_altzone=yes
12096else
Matthias Kloseb9621712010-04-24 17:59:49 +000012097 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000012098fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012099rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000012100
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012101fi
12102
Matthias Kloseb9621712010-04-24 17:59:49 +000012103{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
12104$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012105if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012106
Matthias Kloseb9621712010-04-24 17:59:49 +000012107$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012108
12109fi
12110
Guido van Rossumda88dad1995-01-26 00:46:29 +000012111was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
12113$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
12114cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012115/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012116
12117#include <sys/types.h>
12118#include <sys/select.h>
12119#include <sys/time.h>
12120
Martin v. Löwis11437992002-04-12 09:54:03 +000012121int
12122main ()
12123{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012124;
Martin v. Löwis11437992002-04-12 09:54:03 +000012125 ;
12126 return 0;
12127}
12128_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012129if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012130
12131
Matthias Kloseb9621712010-04-24 17:59:49 +000012132$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012133
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012134 was_it_defined=yes
12135
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012136fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012137rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012138{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
12139$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012140
Matthias Kloseb9621712010-04-24 17:59:49 +000012141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
12142$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012143if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012144 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012145else
Matthias Kloseb9621712010-04-24 17:59:49 +000012146 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012147/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000012148#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012149int
12150main ()
12151{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012152struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000012153 ;
12154 return 0;
12155}
12156_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012157if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012158 ac_cv_struct_addrinfo=yes
12159else
Matthias Kloseb9621712010-04-24 17:59:49 +000012160 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012161fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012162rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12163fi
12164
Matthias Kloseb9621712010-04-24 17:59:49 +000012165{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
12166$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012167if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012168
Matthias Kloseb9621712010-04-24 17:59:49 +000012169$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012170
12171fi
12172
Matthias Kloseb9621712010-04-24 17:59:49 +000012173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
12174$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012175if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012176 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012177else
Matthias Kloseb9621712010-04-24 17:59:49 +000012178 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012179/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012180
12181# include <sys/types.h>
12182# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012183int
12184main ()
12185{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012186struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000012187 ;
12188 return 0;
12189}
12190_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012191if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012192 ac_cv_struct_sockaddr_storage=yes
12193else
Matthias Kloseb9621712010-04-24 17:59:49 +000012194 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012195fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012196rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12197fi
12198
Matthias Kloseb9621712010-04-24 17:59:49 +000012199{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
12200$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012201if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012202
Matthias Kloseb9621712010-04-24 17:59:49 +000012203$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012204
12205fi
12206
Guido van Rossum627b2d71993-12-24 10:39:16 +000012207# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000012208
Matthias Kloseb9621712010-04-24 17:59:49 +000012209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
12210$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012211if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012212 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000012213else
Matthias Kloseb9621712010-04-24 17:59:49 +000012214 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012215/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012216$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012217int
12218main ()
12219{
12220static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012221test_array [0] = 0;
12222return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012223
12224 ;
12225 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000012226}
Martin v. Löwis11437992002-04-12 09:54:03 +000012227_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012228if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012229 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012230else
Matthias Kloseb9621712010-04-24 17:59:49 +000012231 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012232fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012233rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012234fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012235{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
12236$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012237if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012238 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012239
12240fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000012241
Matthias Kloseb9621712010-04-24 17:59:49 +000012242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12243$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012244if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012245 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012246else
Matthias Kloseb9621712010-04-24 17:59:49 +000012247 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012248/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012249
Martin v. Löwis11437992002-04-12 09:54:03 +000012250int
12251main ()
12252{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012253
Martin v. Löwis11437992002-04-12 09:54:03 +000012254#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012255 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012256 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012257 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000012258 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012259 char const *const *pcpcc;
12260 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000012261 /* NEC SVR4.0.2 mips cc rejects this. */
12262 struct point {int x, y;};
12263 static struct point const zero = {0,0};
12264 /* AIX XL C 1.02.0.0 rejects this.
12265 It does not let you subtract one const X* pointer from another in
12266 an arm of an if-expression whose if-part is not a constant
12267 expression */
12268 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012269 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012270 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012271 ++pcpcc;
12272 ppc = (char**) pcpcc;
12273 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012274 { /* SCO 3.2v4 cc rejects this sort of thing. */
12275 char tx;
12276 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000012277 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012278
Martin v. Löwis11437992002-04-12 09:54:03 +000012279 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012280 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012281 }
12282 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12283 int x[] = {25, 17};
12284 const int *foo = &x[0];
12285 ++foo;
12286 }
12287 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12288 typedef const int *iptr;
12289 iptr p = 0;
12290 ++p;
12291 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012292 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000012293 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012294 struct s { int j; const int *ap[3]; } bx;
12295 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000012296 }
12297 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12298 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012299 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012300 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012301 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000012302#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000012303
Martin v. Löwis11437992002-04-12 09:54:03 +000012304 ;
12305 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012306}
Martin v. Löwis11437992002-04-12 09:54:03 +000012307_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012308if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012309 ac_cv_c_const=yes
12310else
Matthias Kloseb9621712010-04-24 17:59:49 +000012311 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012312fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012313rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012314fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012315{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12316$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012317if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012318
Matthias Kloseb9621712010-04-24 17:59:49 +000012319$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012320
12321fi
12322
Michael W. Hudson54241132001-12-07 15:38:26 +000012323
Guido van Rossumda88dad1995-01-26 00:46:29 +000012324works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
12326$as_echo_n "checking for working volatile... " >&6; }
12327cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012328/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012329
Martin v. Löwis11437992002-04-12 09:54:03 +000012330int
12331main ()
12332{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012333volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012334 ;
12335 return 0;
12336}
12337_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012338if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012339 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012340else
Skip Montanaro6dead952003-09-25 14:50:04 +000012341
Matthias Kloseb9621712010-04-24 17:59:49 +000012342$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012343
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012344
Guido van Rossum627b2d71993-12-24 10:39:16 +000012345fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012346rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012347{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12348$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012349
Guido van Rossumda88dad1995-01-26 00:46:29 +000012350works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
12352$as_echo_n "checking for working signed char... " >&6; }
12353cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012354/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012355
Martin v. Löwis11437992002-04-12 09:54:03 +000012356int
12357main ()
12358{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012359signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000012360 ;
12361 return 0;
12362}
12363_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012364if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012365 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012366else
Skip Montanaro6dead952003-09-25 14:50:04 +000012367
Matthias Kloseb9621712010-04-24 17:59:49 +000012368$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000012369
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012370
Guido van Rossum7f43da71994-08-01 12:15:30 +000012371fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012372rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012373{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12374$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012375
Guido van Rossumda88dad1995-01-26 00:46:29 +000012376have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
12378$as_echo_n "checking for prototypes... " >&6; }
12379cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012380/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012381int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012382int
12383main ()
12384{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012385return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000012386 ;
12387 return 0;
12388}
12389_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012390if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012391
Matthias Kloseb9621712010-04-24 17:59:49 +000012392$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012393
Matthias Kloseb159a552010-04-25 21:00:44 +000012394 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012395fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012396rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012397{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
12398$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012399
Guido van Rossumda88dad1995-01-26 00:46:29 +000012400works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
12402$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
12403cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012404/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012405
12406#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000012407int foo(int x, ...) {
12408 va_list va;
12409 va_start(va, x);
12410 va_arg(va, int);
12411 va_arg(va, char *);
12412 va_arg(va, double);
12413 return 0;
12414}
Guido van Rossum7f43da71994-08-01 12:15:30 +000012415
Martin v. Löwis11437992002-04-12 09:54:03 +000012416int
12417main ()
12418{
Guido van Rossum90eea071996-08-30 20:58:57 +000012419return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000012420 ;
12421 return 0;
12422}
12423_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012424if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012425
12426
Matthias Kloseb9621712010-04-24 17:59:49 +000012427$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012428
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012429 works=yes
12430
Guido van Rossum627b2d71993-12-24 10:39:16 +000012431fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012432rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012433{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12434$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012435
Martin v. Löwisd6320502004-08-12 13:45:08 +000012436# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000012437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
12438$as_echo_n "checking for socketpair... " >&6; }
12439cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012440/* end confdefs.h. */
12441
12442#include <sys/types.h>
12443#include <sys/socket.h>
12444
12445int
12446main ()
12447{
12448void *x=socketpair
12449 ;
12450 return 0;
12451}
12452_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012453if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000012454
Matthias Kloseb9621712010-04-24 17:59:49 +000012455$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000012456
Matthias Kloseb159a552010-04-25 21:00:44 +000012457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012458$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012459else
Matthias Kloseb9621712010-04-24 17:59:49 +000012460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12461$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012462
12463fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012464rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012465
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012466# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000012467{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
12468$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
12469cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012470/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012471#include <sys/types.h>
12472#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012473int
12474main ()
12475{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012476struct sockaddr x;
12477x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012478 ;
12479 return 0;
12480}
12481_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012482if ac_fn_c_try_compile "$LINENO"; then :
12483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12484$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012485
Matthias Kloseb9621712010-04-24 17:59:49 +000012486$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012487
12488else
Matthias Kloseb9621712010-04-24 17:59:49 +000012489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12490$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000012491
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012492fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012493rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012494
Guido van Rossumda88dad1995-01-26 00:46:29 +000012495va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
12497$as_echo_n "checking whether va_list is an array... " >&6; }
12498cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012499/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012500
12501#ifdef HAVE_STDARG_PROTOTYPES
12502#include <stdarg.h>
12503#else
12504#include <varargs.h>
12505#endif
12506
Martin v. Löwis11437992002-04-12 09:54:03 +000012507int
12508main ()
12509{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012510va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000012511 ;
12512 return 0;
12513}
12514_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012515if ac_fn_c_try_compile "$LINENO"; then :
12516
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012517else
Skip Montanaro6dead952003-09-25 14:50:04 +000012518
Martin v. Löwis11437992002-04-12 09:54:03 +000012519
Matthias Kloseb9621712010-04-24 17:59:49 +000012520$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012521
Guido van Rossumda88dad1995-01-26 00:46:29 +000012522 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012523
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012524fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012525rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012526{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
12527$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012528
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012529# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000012530
12531
Matthias Kloseb9621712010-04-24 17:59:49 +000012532ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020012533if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012534
Matthias Kloseb9621712010-04-24 17:59:49 +000012535 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000012536
Matthias Kloseb9621712010-04-24 17:59:49 +000012537 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
12538$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012539 OLD_CFLAGS=$CFLAGS
12540 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012541 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012542/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012543
12544# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012545
Martin v. Löwis11437992002-04-12 09:54:03 +000012546int
12547main ()
12548{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012549
12550 char *name;
12551 struct hostent *he, *res;
12552 char buffer[2048];
12553 int buflen = 2048;
12554 int h_errnop;
12555
12556 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012557
12558 ;
12559 return 0;
12560}
12561_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012562if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012563
Matthias Kloseb9621712010-04-24 17:59:49 +000012564 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012565
Martin v. Löwis11437992002-04-12 09:54:03 +000012566
Matthias Kloseb9621712010-04-24 17:59:49 +000012567$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012568
Matthias Kloseb9621712010-04-24 17:59:49 +000012569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12570$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012571
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012572else
Skip Montanaro6dead952003-09-25 14:50:04 +000012573
Matthias Kloseb9621712010-04-24 17:59:49 +000012574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12575$as_echo "no" >&6; }
12576 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
12577$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
12578 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012579/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012580
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012581# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012582
Martin v. Löwis11437992002-04-12 09:54:03 +000012583int
12584main ()
12585{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012586
12587 char *name;
12588 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000012589 char buffer[2048];
12590 int buflen = 2048;
12591 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012592
Matthias Kloseb159a552010-04-25 21:00:44 +000012593 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012594
12595 ;
12596 return 0;
12597}
12598_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012599if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012600
Matthias Kloseb9621712010-04-24 17:59:49 +000012601 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012602
Martin v. Löwis11437992002-04-12 09:54:03 +000012603
Matthias Kloseb159a552010-04-25 21:00:44 +000012604$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012605
Matthias Kloseb9621712010-04-24 17:59:49 +000012606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12607$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012608
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012609else
Skip Montanaro6dead952003-09-25 14:50:04 +000012610
Matthias Kloseb9621712010-04-24 17:59:49 +000012611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12612$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000012613 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
12614$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
12615 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12616/* end confdefs.h. */
12617
12618# include <netdb.h>
12619
12620int
12621main ()
12622{
12623
12624 char *name;
12625 struct hostent *he;
12626 struct hostent_data data;
12627
12628 (void) gethostbyname_r(name, he, &data);
12629
12630 ;
12631 return 0;
12632}
12633_ACEOF
12634if ac_fn_c_try_compile "$LINENO"; then :
12635
12636 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
12637
12638
12639$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
12640
12641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12642$as_echo "yes" >&6; }
12643
12644else
12645
12646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12647$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012648
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012649fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012650rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012651
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012652fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012653rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012654
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012655fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012656rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012657 CFLAGS=$OLD_CFLAGS
12658
12659else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012660
Matthias Kloseb9621712010-04-24 17:59:49 +000012661 for ac_func in gethostbyname
12662do :
12663 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020012664if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012665 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012666#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012667_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012668
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012669fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012670done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012671
Michael W. Hudson54241132001-12-07 15:38:26 +000012672
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012673fi
12674
Michael W. Hudson54241132001-12-07 15:38:26 +000012675
12676
12677
12678
12679
12680
Guido van Rossum627b2d71993-12-24 10:39:16 +000012681# checks for system services
12682# (none yet)
12683
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012684# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000012685ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020012686if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012687
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012688else
Matthias Kloseb9621712010-04-24 17:59:49 +000012689 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
12690$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012691if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012692 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012693else
Martin v. Löwis11437992002-04-12 09:54:03 +000012694 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012695LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012696cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012697/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012698
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012699/* Override any GCC internal prototype to avoid an error.
12700 Use char because int might match the return type of a GCC
12701 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012702#ifdef __cplusplus
12703extern "C"
12704#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012705char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012706int
12707main ()
12708{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012709return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012710 ;
12711 return 0;
12712}
12713_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012714if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012715 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012716else
Matthias Kloseb9621712010-04-24 17:59:49 +000012717 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012718fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012719rm -f core conftest.err conftest.$ac_objext \
12720 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012721LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012722fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012723{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
12724$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012725if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012726 cat >>confdefs.h <<_ACEOF
12727#define HAVE_LIBIEEE 1
12728_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012729
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012730 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012731
Guido van Rossum627b2d71993-12-24 10:39:16 +000012732fi
12733
Michael W. Hudson54241132001-12-07 15:38:26 +000012734
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012735fi
12736
Michael W. Hudson54241132001-12-07 15:38:26 +000012737
Guido van Rossum7f253911997-05-09 02:42:48 +000012738# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000012739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
12740$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012741
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012742# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012743if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012744 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000012745if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000012746then
12747
Matthias Kloseb9621712010-04-24 17:59:49 +000012748$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012749
Matthias Kloseb9621712010-04-24 17:59:49 +000012750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12751$as_echo "yes" >&6; }
12752else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12753$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012754fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000012755else
Matthias Kloseb9621712010-04-24 17:59:49 +000012756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12757$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012758fi
12759
Guido van Rossum7f253911997-05-09 02:42:48 +000012760
Guido van Rossum7f43da71994-08-01 12:15:30 +000012761# check for --with-libm=...
12762
Guido van Rossum563e7081996-09-10 18:20:48 +000012763case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000012764Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000012765*) LIBM=-lm
12766esac
Matthias Kloseb9621712010-04-24 17:59:49 +000012767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
12768$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012769
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012770# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012771if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012772 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000012773if test "$withval" = no
12774then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000012775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
12776$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012777elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012778then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000012779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
12780$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012781else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012782fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012783else
Matthias Kloseb9621712010-04-24 17:59:49 +000012784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
12785$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012786fi
12787
Guido van Rossum7f43da71994-08-01 12:15:30 +000012788
12789# check for --with-libc=...
12790
Matthias Kloseb9621712010-04-24 17:59:49 +000012791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
12792$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012793
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012794# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012795if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012796 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000012797if test "$withval" = no
12798then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000012799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
12800$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012801elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012802then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000012803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
12804$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012805else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012806fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012807else
Matthias Kloseb9621712010-04-24 17:59:49 +000012808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
12809$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012810fi
12811
Guido van Rossum7f43da71994-08-01 12:15:30 +000012812
Stefan Krah1919b7e2012-03-21 18:25:23 +010012813# **************************************
12814# * Check for gcc x64 inline assembler *
12815# **************************************
12816
12817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
12818$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
12819cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12820/* end confdefs.h. */
12821
12822int
12823main ()
12824{
12825
12826 __asm__ __volatile__ ("movq %rcx, %rax");
12827
12828 ;
12829 return 0;
12830}
12831_ACEOF
12832if ac_fn_c_try_compile "$LINENO"; then :
12833 have_gcc_asm_for_x64=yes
12834else
12835 have_gcc_asm_for_x64=no
12836fi
12837rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12838{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
12839$as_echo "$have_gcc_asm_for_x64" >&6; }
12840if test "$have_gcc_asm_for_x64" = yes
12841then
12842
12843$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
12844
12845fi
12846
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012847# **************************************************
12848# * Check for various properties of floating point *
12849# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012850
Matthias Kloseb9621712010-04-24 17:59:49 +000012851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
12852$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012853if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012854 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012855else
12856
Matthias Kloseb9621712010-04-24 17:59:49 +000012857if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012858 ac_cv_little_endian_double=no
12859else
Matthias Kloseb9621712010-04-24 17:59:49 +000012860 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012861/* end confdefs.h. */
12862
12863#include <string.h>
12864int main() {
12865 double x = 9006104071832581.0;
12866 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
12867 return 0;
12868 else
12869 return 1;
12870}
12871
12872_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012873if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012874 ac_cv_little_endian_double=yes
12875else
Matthias Kloseb9621712010-04-24 17:59:49 +000012876 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012877fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012878rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12879 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012880fi
12881
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012882fi
12883
Matthias Kloseb9621712010-04-24 17:59:49 +000012884{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
12885$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012886if test "$ac_cv_little_endian_double" = yes
12887then
12888
Matthias Kloseb9621712010-04-24 17:59:49 +000012889$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012890
12891fi
12892
Matthias Kloseb9621712010-04-24 17:59:49 +000012893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
12894$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012895if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012896 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012897else
12898
Matthias Kloseb9621712010-04-24 17:59:49 +000012899if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012900 ac_cv_big_endian_double=no
12901else
Matthias Kloseb9621712010-04-24 17:59:49 +000012902 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012903/* end confdefs.h. */
12904
12905#include <string.h>
12906int main() {
12907 double x = 9006104071832581.0;
12908 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
12909 return 0;
12910 else
12911 return 1;
12912}
12913
12914_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012915if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012916 ac_cv_big_endian_double=yes
12917else
Matthias Kloseb9621712010-04-24 17:59:49 +000012918 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012919fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012920rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12921 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012922fi
12923
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012924fi
12925
Matthias Kloseb9621712010-04-24 17:59:49 +000012926{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
12927$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012928if test "$ac_cv_big_endian_double" = yes
12929then
12930
Matthias Kloseb9621712010-04-24 17:59:49 +000012931$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012932
12933fi
12934
12935# Some ARM platforms use a mixed-endian representation for doubles.
12936# While Python doesn't currently have full support for these platforms
12937# (see e.g., issue 1762561), we can at least make sure that float <-> string
12938# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000012939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
12940$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012941if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012942 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012943else
12944
Matthias Kloseb9621712010-04-24 17:59:49 +000012945if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012946 ac_cv_mixed_endian_double=no
12947else
Matthias Kloseb9621712010-04-24 17:59:49 +000012948 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012949/* end confdefs.h. */
12950
12951#include <string.h>
12952int main() {
12953 double x = 9006104071832581.0;
12954 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
12955 return 0;
12956 else
12957 return 1;
12958}
12959
12960_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012961if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012962 ac_cv_mixed_endian_double=yes
12963else
Matthias Kloseb9621712010-04-24 17:59:49 +000012964 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012965fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012966rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12967 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012968fi
12969
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012970fi
12971
Matthias Kloseb9621712010-04-24 17:59:49 +000012972{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
12973$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012974if test "$ac_cv_mixed_endian_double" = yes
12975then
12976
Matthias Kloseb9621712010-04-24 17:59:49 +000012977$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012978
12979fi
12980
Mark Dickinson7abf8d42009-04-18 20:17:52 +000012981# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000012982# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000012983# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000012984# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012985# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000012986# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012987
12988# This inline assembler syntax may also work for suncc and icc,
12989# so we try it on all platforms.
12990
Matthias Kloseb9621712010-04-24 17:59:49 +000012991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
12992$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
12993cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012994/* end confdefs.h. */
12995
12996int
12997main ()
12998{
12999
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013000 unsigned short cw;
13001 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
13002 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013003
13004 ;
13005 return 0;
13006}
13007_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013008if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013009 have_gcc_asm_for_x87=yes
13010else
Matthias Kloseb9621712010-04-24 17:59:49 +000013011 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013012fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013013rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013014{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
13015$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013016if test "$have_gcc_asm_for_x87" = yes
13017then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013018
Matthias Kloseb9621712010-04-24 17:59:49 +000013019$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013020
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013021fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013022
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013023# Detect whether system arithmetic is subject to x87-style double
13024# rounding issues. The result of this test has little meaning on non
13025# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
13026# mode is round-to-nearest and double rounding issues are present, and
13027# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000013028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
13029$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013030# $BASECFLAGS may affect the result
13031ac_save_cc="$CC"
13032CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013033if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013034 ac_cv_x87_double_rounding=no
13035else
Matthias Kloseb9621712010-04-24 17:59:49 +000013036 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013037/* end confdefs.h. */
13038
13039#include <stdlib.h>
13040#include <math.h>
13041int main() {
13042 volatile double x, y, z;
13043 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
13044 x = 0.99999999999999989; /* 1-2**-53 */
13045 y = 1./x;
13046 if (y != 1.)
13047 exit(0);
13048 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
13049 x = 1e16;
13050 y = 2.99999;
13051 z = x + y;
13052 if (z != 1e16+4.)
13053 exit(0);
13054 /* both tests show evidence of double rounding */
13055 exit(1);
13056}
13057
13058_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013059if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013060 ac_cv_x87_double_rounding=no
13061else
Matthias Kloseb9621712010-04-24 17:59:49 +000013062 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013063fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013064rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13065 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013066fi
13067
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013068CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000013069{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
13070$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013071if test "$ac_cv_x87_double_rounding" = yes
13072then
13073
Matthias Kloseb9621712010-04-24 17:59:49 +000013074$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013075
13076fi
13077
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013078# ************************************
13079# * Check for mathematical functions *
13080# ************************************
13081
13082LIBS_SAVE=$LIBS
13083LIBS="$LIBS $LIBM"
13084
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013085for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
13086do :
13087 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13088ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013089if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013090 cat >>confdefs.h <<_ACEOF
13091#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13092_ACEOF
13093
13094fi
13095done
13096
Victor Stinner8f9f8d62011-05-09 12:45:41 +020013097for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013098do :
13099 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13100ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013101if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013102 cat >>confdefs.h <<_ACEOF
13103#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13104_ACEOF
13105
13106fi
13107done
13108
13109ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
13110"
Victor Stinnere0be4232011-10-25 13:06:09 +020013111if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013112 ac_have_decl=1
13113else
13114 ac_have_decl=0
13115fi
13116
13117cat >>confdefs.h <<_ACEOF
13118#define HAVE_DECL_ISINF $ac_have_decl
13119_ACEOF
13120ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
13121"
Victor Stinnere0be4232011-10-25 13:06:09 +020013122if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013123 ac_have_decl=1
13124else
13125 ac_have_decl=0
13126fi
13127
13128cat >>confdefs.h <<_ACEOF
13129#define HAVE_DECL_ISNAN $ac_have_decl
13130_ACEOF
13131ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
13132"
Victor Stinnere0be4232011-10-25 13:06:09 +020013133if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013134 ac_have_decl=1
13135else
13136 ac_have_decl=0
13137fi
13138
13139cat >>confdefs.h <<_ACEOF
13140#define HAVE_DECL_ISFINITE $ac_have_decl
13141_ACEOF
13142
13143
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013144# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
13145# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000013146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
13147$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013148if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013149 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013150else
13151
Matthias Kloseb9621712010-04-24 17:59:49 +000013152if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013153 ac_cv_tanh_preserves_zero_sign=no
13154else
Matthias Kloseb9621712010-04-24 17:59:49 +000013155 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013156/* end confdefs.h. */
13157
13158#include <math.h>
13159#include <stdlib.h>
13160int main() {
13161 /* return 0 if either negative zeros don't exist
13162 on this platform or if negative zeros exist
13163 and tanh(-0.) == -0. */
13164 if (atan2(0., -1.) == atan2(-0., -1.) ||
13165 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
13166 else exit(1);
13167}
13168
13169_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013170if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013171 ac_cv_tanh_preserves_zero_sign=yes
13172else
Matthias Kloseb9621712010-04-24 17:59:49 +000013173 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013174fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013175rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13176 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013177fi
13178
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013179fi
13180
Matthias Kloseb9621712010-04-24 17:59:49 +000013181{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
13182$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013183if test "$ac_cv_tanh_preserves_zero_sign" = yes
13184then
13185
Matthias Kloseb9621712010-04-24 17:59:49 +000013186$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013187
13188fi
13189
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013190if test "$ac_cv_func_log1p" = yes
13191then
13192 # On some versions of AIX, log1p(-0.) returns 0. instead of
13193 # -0. See issue #9920.
13194 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
13195$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013196 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013197 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013198else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013199
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013200 if test "$cross_compiling" = yes; then :
13201 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013202else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013203 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13204/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013205
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013206 #include <math.h>
13207 #include <stdlib.h>
13208 int main() {
13209 /* Fail if the signs of log1p(-0.) and -0. can be
13210 distinguished. */
13211 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
13212 return 0;
13213 else
13214 return 1;
13215 }
13216
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013217_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013218if ac_fn_c_try_run "$LINENO"; then :
13219 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013220else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013221 ac_cv_log1p_drops_zero_sign=yes
13222fi
13223rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13224 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013225fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013226
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013227fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013228
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013229 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
13230$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
13231fi
13232if test "$ac_cv_log1p_drops_zero_sign" = yes
13233then
13234
13235$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
13236
13237fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013238
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000013239LIBS=$LIBS_SAVE
13240
Mark Dickinsona614f042009-11-28 12:48:43 +000013241# For multiprocessing module, check that sem_open
13242# actually works. For FreeBSD versions <= 7.2,
13243# the kernel module that provides POSIX semaphores
13244# isn't loaded by default, so an attempt to call
13245# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000013246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
13247$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013248if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013249 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000013250else
Matthias Kloseb9621712010-04-24 17:59:49 +000013251 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013252 ac_cv_posix_semaphores_enabled=yes
13253else
Matthias Kloseb9621712010-04-24 17:59:49 +000013254 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013255/* end confdefs.h. */
13256
13257#include <unistd.h>
13258#include <fcntl.h>
13259#include <stdio.h>
13260#include <semaphore.h>
13261#include <sys/stat.h>
13262
13263int main(void) {
13264 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
13265 if (a == SEM_FAILED) {
13266 perror("sem_open");
13267 return 1;
13268 }
13269 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013270 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000013271 return 0;
13272}
13273
13274_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013275if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013276 ac_cv_posix_semaphores_enabled=yes
13277else
Matthias Kloseb9621712010-04-24 17:59:49 +000013278 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000013279fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013280rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13281 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013282fi
13283
13284
Mark Dickinsona614f042009-11-28 12:48:43 +000013285fi
13286
Matthias Kloseb9621712010-04-24 17:59:49 +000013287{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
13288$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000013289if test $ac_cv_posix_semaphores_enabled = no
13290then
13291
Matthias Kloseb9621712010-04-24 17:59:49 +000013292$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000013293
13294fi
13295
Mark Dickinson10683072009-04-18 21:18:19 +000013296# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000013297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
13298$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013299if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013300 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013301else
Matthias Kloseb9621712010-04-24 17:59:49 +000013302 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013303 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000013304else
Matthias Kloseb9621712010-04-24 17:59:49 +000013305 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000013306/* end confdefs.h. */
13307
13308#include <unistd.h>
13309#include <fcntl.h>
13310#include <stdio.h>
13311#include <semaphore.h>
13312#include <sys/stat.h>
13313
13314int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000013315 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000013316 int count;
13317 int res;
13318 if(a==SEM_FAILED){
13319 perror("sem_open");
13320 return 1;
13321
13322 }
13323 res = sem_getvalue(a, &count);
13324 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013325 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000013326 return res==-1 ? 1 : 0;
13327}
13328
Mark Dickinson10683072009-04-18 21:18:19 +000013329_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013330if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013331 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000013332else
Matthias Kloseb9621712010-04-24 17:59:49 +000013333 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013334fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013335rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13336 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013337fi
13338
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013339
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013340fi
13341
Matthias Kloseb9621712010-04-24 17:59:49 +000013342{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
13343$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013344if test $ac_cv_broken_sem_getvalue = yes
13345then
13346
Matthias Kloseb9621712010-04-24 17:59:49 +000013347$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013348
13349fi
13350
Mark Dickinsonbd792642009-03-18 20:06:12 +000013351# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000013352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
13353$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013354# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013355if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000013356 enableval=$enable_big_digits; case $enable_big_digits in
13357yes)
13358 enable_big_digits=30 ;;
13359no)
13360 enable_big_digits=15 ;;
1336115|30)
13362 ;;
13363*)
Victor Stinnere0be4232011-10-25 13:06:09 +020013364 as_fn_error $? "bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" "$LINENO" 5 ;;
Mark Dickinsonbd792642009-03-18 20:06:12 +000013365esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013366{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
13367$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013368
13369cat >>confdefs.h <<_ACEOF
13370#define PYLONG_BITS_IN_DIGIT $enable_big_digits
13371_ACEOF
13372
13373
13374else
Matthias Kloseb9621712010-04-24 17:59:49 +000013375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13376$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013377fi
13378
13379
Guido van Rossumef2255b2000-03-10 22:30:29 +000013380# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000013381ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020013382if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013383
13384
Matthias Kloseb9621712010-04-24 17:59:49 +000013385$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013386
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013387 wchar_h="yes"
13388
Guido van Rossumef2255b2000-03-10 22:30:29 +000013389else
Martin v. Löwis11437992002-04-12 09:54:03 +000013390 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000013391
13392fi
13393
Michael W. Hudson54241132001-12-07 15:38:26 +000013394
Martin v. Löwis11437992002-04-12 09:54:03 +000013395
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013396# determine wchar_t size
13397if test "$wchar_h" = yes
13398then
Matthias Kloseb9621712010-04-24 17:59:49 +000013399 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013400# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13401# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13402# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000013403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
13404$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013405if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013406 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013407else
Matthias Kloseb9621712010-04-24 17:59:49 +000013408 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
13409"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013410
Martin v. Löwis11437992002-04-12 09:54:03 +000013411else
Matthias Kloseb9621712010-04-24 17:59:49 +000013412 if test "$ac_cv_type_wchar_t" = yes; then
13413 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13414$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013415as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020013416See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013417 else
13418 ac_cv_sizeof_wchar_t=0
13419 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013420fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013421
Martin v. Löwis11437992002-04-12 09:54:03 +000013422fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013423{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
13424$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013425
13426
13427
Martin v. Löwis11437992002-04-12 09:54:03 +000013428cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013429#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013430_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013431
Michael W. Hudson54241132001-12-07 15:38:26 +000013432
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013433fi
13434
Matthias Kloseb9621712010-04-24 17:59:49 +000013435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
13436$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013437have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013438cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013439/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013440
13441#include <tcl.h>
13442#if TCL_UTF_MAX != 6
13443# error "NOT UCS4_TCL"
13444#endif
13445int
13446main ()
13447{
13448
13449 ;
13450 return 0;
13451}
13452_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013453if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013454
13455
Matthias Kloseb9621712010-04-24 17:59:49 +000013456$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013457
13458 have_ucs4_tcl=yes
13459
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013460fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013461rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013462{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
13463$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013464
Skip Montanaro6dead952003-09-25 14:50:04 +000013465# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013466if test "$wchar_h" = yes
13467then
13468 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000013469 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
13470$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013471 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013472 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013473else
13474
Matthias Kloseb9621712010-04-24 17:59:49 +000013475 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013476 ac_cv_wchar_t_signed=yes
13477else
Matthias Kloseb9621712010-04-24 17:59:49 +000013478 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013479/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013480
13481 #include <wchar.h>
13482 int main()
13483 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000013484 /* Success: exit code 0 */
13485 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013486 }
13487
13488_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013489if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013490 ac_cv_wchar_t_signed=yes
13491else
Matthias Kloseb9621712010-04-24 17:59:49 +000013492 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013493fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013494rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13495 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013496fi
13497
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013498fi
13499
Matthias Kloseb9621712010-04-24 17:59:49 +000013500 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
13501$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013502fi
13503
Georg Brandl52d168a2008-01-07 18:10:24 +000013504# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013505if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000013506 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000013507then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013508 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013509
Matthias Kloseb9621712010-04-24 17:59:49 +000013510$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013511
Georg Brandl52d168a2008-01-07 18:10:24 +000013512else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013513 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013514fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013515{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
13516$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000013517
13518# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000013519 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13520$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013521if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013522 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000013523else
Matthias Kloseb9621712010-04-24 17:59:49 +000013524 ac_cv_c_bigendian=unknown
13525 # See if we're dealing with a universal compiler.
13526 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13527/* end confdefs.h. */
13528#ifndef __APPLE_CC__
13529 not a universal capable compiler
13530 #endif
13531 typedef int dummy;
13532
Skip Montanaro6dead952003-09-25 14:50:04 +000013533_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013534if ac_fn_c_try_compile "$LINENO"; then :
13535
13536 # Check for potential -arch flags. It is not universal unless
13537 # there are at least two -arch flags with different values.
13538 ac_arch=
13539 ac_prev=
13540 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13541 if test -n "$ac_prev"; then
13542 case $ac_word in
13543 i?86 | x86_64 | ppc | ppc64)
13544 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13545 ac_arch=$ac_word
13546 else
13547 ac_cv_c_bigendian=universal
13548 break
13549 fi
13550 ;;
13551 esac
13552 ac_prev=
13553 elif test "x$ac_word" = "x-arch"; then
13554 ac_prev=arch
13555 fi
13556 done
13557fi
13558rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13559 if test $ac_cv_c_bigendian = unknown; then
13560 # See if sys/param.h defines the BYTE_ORDER macro.
13561 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013562/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013563#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000013564 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013565
Martin v. Löwis11437992002-04-12 09:54:03 +000013566int
13567main ()
13568{
Matthias Kloseb9621712010-04-24 17:59:49 +000013569#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13570 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13571 && LITTLE_ENDIAN)
13572 bogus endian macros
13573 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013574
13575 ;
13576 return 0;
13577}
13578_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013579if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013580 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000013581 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013582/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013583#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000013584 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013585
Martin v. Löwis11437992002-04-12 09:54:03 +000013586int
13587main ()
13588{
Guido van Rossumef2255b2000-03-10 22:30:29 +000013589#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000013590 not big endian
13591 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013592
13593 ;
13594 return 0;
13595}
13596_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013597if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013598 ac_cv_c_bigendian=yes
13599else
Matthias Kloseb9621712010-04-24 17:59:49 +000013600 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000013601fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013602rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013603fi
13604rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13605 fi
13606 if test $ac_cv_c_bigendian = unknown; then
13607 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13608 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013609/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000013610#include <limits.h>
13611
Martin v. Löwis11437992002-04-12 09:54:03 +000013612int
13613main ()
13614{
Matthias Kloseb9621712010-04-24 17:59:49 +000013615#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13616 bogus endian macros
13617 #endif
13618
Martin v. Löwis11437992002-04-12 09:54:03 +000013619 ;
13620 return 0;
13621}
13622_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013623if ac_fn_c_try_compile "$LINENO"; then :
13624 # It does; now see whether it defined to _BIG_ENDIAN or not.
13625 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13626/* end confdefs.h. */
13627#include <limits.h>
13628
13629int
13630main ()
13631{
13632#ifndef _BIG_ENDIAN
13633 not big endian
13634 #endif
13635
13636 ;
13637 return 0;
13638}
13639_ACEOF
13640if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013641 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013642else
Matthias Kloseb9621712010-04-24 17:59:49 +000013643 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013644fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013645rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13646fi
13647rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13648 fi
13649 if test $ac_cv_c_bigendian = unknown; then
13650 # Compile a test program.
13651 if test "$cross_compiling" = yes; then :
13652 # Try to guess by grepping values from an object file.
13653 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13654/* end confdefs.h. */
13655short int ascii_mm[] =
13656 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13657 short int ascii_ii[] =
13658 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13659 int use_ascii (int i) {
13660 return ascii_mm[i] + ascii_ii[i];
13661 }
13662 short int ebcdic_ii[] =
13663 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13664 short int ebcdic_mm[] =
13665 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13666 int use_ebcdic (int i) {
13667 return ebcdic_mm[i] + ebcdic_ii[i];
13668 }
13669 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013670
Matthias Kloseb9621712010-04-24 17:59:49 +000013671int
13672main ()
13673{
13674return use_ascii (foo) == use_ebcdic (foo);
13675 ;
13676 return 0;
13677}
13678_ACEOF
13679if ac_fn_c_try_compile "$LINENO"; then :
13680 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13681 ac_cv_c_bigendian=yes
13682 fi
13683 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13684 if test "$ac_cv_c_bigendian" = unknown; then
13685 ac_cv_c_bigendian=no
13686 else
13687 # finding both strings is unlikely to happen, but who knows?
13688 ac_cv_c_bigendian=unknown
13689 fi
13690 fi
13691fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013692rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013693else
Matthias Kloseb9621712010-04-24 17:59:49 +000013694 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013695/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013696$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013697int
13698main ()
13699{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013700
Matthias Kloseb9621712010-04-24 17:59:49 +000013701 /* Are we little or big endian? From Harbison&Steele. */
13702 union
13703 {
13704 long int l;
13705 char c[sizeof (long int)];
13706 } u;
13707 u.l = 1;
13708 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013709
13710 ;
13711 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000013712}
Martin v. Löwis11437992002-04-12 09:54:03 +000013713_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013714if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013715 ac_cv_c_bigendian=no
13716else
Matthias Kloseb9621712010-04-24 17:59:49 +000013717 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000013718fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013719rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13720 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000013721fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013722
Matthias Kloseb9621712010-04-24 17:59:49 +000013723 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013724fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013725{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
13726$as_echo "$ac_cv_c_bigendian" >&6; }
13727 case $ac_cv_c_bigendian in #(
13728 yes)
13729 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
13730;; #(
13731 no)
13732 ;; #(
13733 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013734
Matthias Kloseb9621712010-04-24 17:59:49 +000013735$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013736
Matthias Kloseb9621712010-04-24 17:59:49 +000013737 ;; #(
13738 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013739 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020013740 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000013741 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000013742
Michael W. Hudson54241132001-12-07 15:38:26 +000013743
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013744# ABI version string for Python extension modules. This appears between the
13745# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
13746# from the following attributes which affect the ABI of this Python build (in
13747# this order):
13748#
13749# * The Python implementation (always 'cpython-' for us)
13750# * The major and minor version numbers
13751# * --with-pydebug (adds a 'd')
13752# * --with-pymalloc (adds a 'm')
13753# * --with-wide-unicode (adds a 'u')
13754#
13755# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000013756# would get a shared library ABI version tag of 'cpython-32dmu' and shared
13757# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013758
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
13760$as_echo_n "checking ABIFLAGS... " >&6; }
13761{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
13762$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
13764$as_echo_n "checking SOABI... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013765SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013766{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
13767$as_echo "$SOABI" >&6; }
13768
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070013769
13770case $ac_sys_system in
13771 Linux*|GNU*)
13772 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
13773 *)
13774 EXT_SUFFIX=${SHLIB_SUFFIX};;
13775esac
13776
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
13778$as_echo_n "checking LDVERSION... " >&6; }
13779LDVERSION='$(VERSION)$(ABIFLAGS)'
13780{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
13781$as_echo "$LDVERSION" >&6; }
13782
doko@python.org87421192013-01-26 11:39:31 +010013783
13784LIBPL="${prefix}/lib/python${VERSION}/config-${LDVERSION}"
13785
13786
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013787# Check whether right shifting a negative integer extends the sign bit
13788# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000013789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
13790$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013791if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013792 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000013793else
Martin v. Löwis11437992002-04-12 09:54:03 +000013794
Matthias Kloseb9621712010-04-24 17:59:49 +000013795if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013796 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013797else
Matthias Kloseb9621712010-04-24 17:59:49 +000013798 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013799/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013800
13801int main()
13802{
Vladimir Marangozova6180282000-07-12 05:05:06 +000013803 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013804}
13805
Martin v. Löwis11437992002-04-12 09:54:03 +000013806_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013807if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000013808 ac_cv_rshift_extends_sign=yes
13809else
Matthias Kloseb9621712010-04-24 17:59:49 +000013810 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000013811fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013812rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13813 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000013814fi
13815
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013816fi
13817
Matthias Kloseb9621712010-04-24 17:59:49 +000013818{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
13819$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000013820if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013821then
Martin v. Löwis11437992002-04-12 09:54:03 +000013822
Matthias Kloseb9621712010-04-24 17:59:49 +000013823$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013824
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013825fi
13826
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013827# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000013828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
13829$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013830if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013831 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013832else
Martin v. Löwis11437992002-04-12 09:54:03 +000013833
Matthias Kloseb9621712010-04-24 17:59:49 +000013834cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013835/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013836#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013837int
13838main ()
13839{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013840
13841 FILE *f = fopen("/dev/null", "r");
13842 flockfile(f);
13843 getc_unlocked(f);
13844 funlockfile(f);
13845
Martin v. Löwis11437992002-04-12 09:54:03 +000013846 ;
13847 return 0;
13848}
13849_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013850if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013851 ac_cv_have_getc_unlocked=yes
13852else
Matthias Kloseb9621712010-04-24 17:59:49 +000013853 ac_cv_have_getc_unlocked=no
13854fi
13855rm -f core conftest.err conftest.$ac_objext \
13856 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013857fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013858
Matthias Kloseb9621712010-04-24 17:59:49 +000013859{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
13860$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013861if test "$ac_cv_have_getc_unlocked" = yes
13862then
Martin v. Löwis11437992002-04-12 09:54:03 +000013863
Matthias Kloseb9621712010-04-24 17:59:49 +000013864$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013865
13866fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013867
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013868# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000013869# save the value of LIBS so we don't actually link Python with readline
13870LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013871
Gregory P. Smith18820942008-09-07 06:24:49 +000013872# On some systems we need to link readline to a termcap compatible
13873# library. NOTE: Keep the precedence of listed libraries synchronised
13874# with setup.py.
13875py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
13877$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020013878for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000013879 if test -z "$py_libtermcap"; then
13880 READLINE_LIBS="-lreadline"
13881 else
13882 READLINE_LIBS="-lreadline -l$py_libtermcap"
13883 fi
13884 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000013885 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013886/* end confdefs.h. */
13887
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013888/* Override any GCC internal prototype to avoid an error.
13889 Use char because int might match the return type of a GCC
13890 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013891#ifdef __cplusplus
13892extern "C"
13893#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013894char readline ();
13895int
13896main ()
13897{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013898return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013899 ;
13900 return 0;
13901}
13902_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013903if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000013904 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013905fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013906rm -f core conftest.err conftest.$ac_objext \
13907 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000013908 if test $py_cv_lib_readline = yes; then
13909 break
13910 fi
13911done
13912# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
13913#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000013914if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
13916$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000013917else
Matthias Kloseb9621712010-04-24 17:59:49 +000013918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
13919$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000013920
Matthias Kloseb9621712010-04-24 17:59:49 +000013921$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013922
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013923fi
13924
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013925# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000013926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
13927$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013928if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013929 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013930else
13931 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013932LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013933cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013934/* end confdefs.h. */
13935
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013936/* Override any GCC internal prototype to avoid an error.
13937 Use char because int might match the return type of a GCC
13938 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013939#ifdef __cplusplus
13940extern "C"
13941#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013942char rl_callback_handler_install ();
13943int
13944main ()
13945{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013946return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013947 ;
13948 return 0;
13949}
13950_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013951if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013952 ac_cv_lib_readline_rl_callback_handler_install=yes
13953else
Matthias Kloseb9621712010-04-24 17:59:49 +000013954 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013955fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013956rm -f core conftest.err conftest.$ac_objext \
13957 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013958LIBS=$ac_check_lib_save_LIBS
13959fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013960{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
13961$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013962if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013963
Matthias Kloseb9621712010-04-24 17:59:49 +000013964$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013965
13966fi
13967
13968
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013969# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013970cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013971/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013972#include <readline/readline.h>
13973_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013974if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013975 have_readline=yes
13976else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013977 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000013978
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013979fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013980rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013981if test $have_readline = yes
13982then
Matthias Kloseb9621712010-04-24 17:59:49 +000013983 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013984/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013985#include <readline/readline.h>
13986
13987_ACEOF
13988if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013989 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013990
Matthias Kloseb9621712010-04-24 17:59:49 +000013991$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013992
13993fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013994rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013995
Matthias Kloseb9621712010-04-24 17:59:49 +000013996 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000013997/* end confdefs.h. */
13998#include <readline/readline.h>
13999
14000_ACEOF
14001if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014002 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000014003
Matthias Kloseb9621712010-04-24 17:59:49 +000014004$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000014005
14006fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014007rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000014008
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014009fi
14010
Martin v. Löwis0daad592001-09-30 21:09:59 +000014011# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
14013$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014014if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014015 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000014016else
Martin v. Löwis11437992002-04-12 09:54:03 +000014017 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014018LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014019cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014020/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014021
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014022/* Override any GCC internal prototype to avoid an error.
14023 Use char because int might match the return type of a GCC
14024 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014025#ifdef __cplusplus
14026extern "C"
14027#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014028char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014029int
14030main ()
14031{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014032return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014033 ;
14034 return 0;
14035}
14036_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014037if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014038 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000014039else
Matthias Kloseb9621712010-04-24 17:59:49 +000014040 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000014041fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014042rm -f core conftest.err conftest.$ac_objext \
14043 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014044LIBS=$ac_check_lib_save_LIBS
14045fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014046{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
14047$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014048if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014049
Matthias Kloseb9621712010-04-24 17:59:49 +000014050$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000014051
Martin v. Löwis0daad592001-09-30 21:09:59 +000014052fi
14053
Michael W. Hudson54241132001-12-07 15:38:26 +000014054
Thomas Wouters89d996e2007-09-08 17:39:28 +000014055# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
14057$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014058if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014059 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000014060else
14061 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014062LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014063cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014064/* end confdefs.h. */
14065
14066/* Override any GCC internal prototype to avoid an error.
14067 Use char because int might match the return type of a GCC
14068 builtin and then its argument prototype would still apply. */
14069#ifdef __cplusplus
14070extern "C"
14071#endif
14072char rl_completion_display_matches_hook ();
14073int
14074main ()
14075{
14076return rl_completion_display_matches_hook ();
14077 ;
14078 return 0;
14079}
14080_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014081if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014082 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
14083else
Matthias Kloseb9621712010-04-24 17:59:49 +000014084 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000014085fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014086rm -f core conftest.err conftest.$ac_objext \
14087 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014088LIBS=$ac_check_lib_save_LIBS
14089fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014090{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
14091$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014092if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014093
Matthias Kloseb9621712010-04-24 17:59:49 +000014094$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000014095
14096fi
14097
14098
Martin v. Löwis0daad592001-09-30 21:09:59 +000014099# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
14101$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014102if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014103 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000014104else
Martin v. Löwis11437992002-04-12 09:54:03 +000014105 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014106LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014107cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014108/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014109
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014110/* Override any GCC internal prototype to avoid an error.
14111 Use char because int might match the return type of a GCC
14112 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014113#ifdef __cplusplus
14114extern "C"
14115#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014116char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014117int
14118main ()
14119{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014120return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014121 ;
14122 return 0;
14123}
14124_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014125if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014126 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000014127else
Matthias Kloseb9621712010-04-24 17:59:49 +000014128 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000014129fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014130rm -f core conftest.err conftest.$ac_objext \
14131 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014132LIBS=$ac_check_lib_save_LIBS
14133fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014134{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
14135$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014136if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014137
Matthias Kloseb9621712010-04-24 17:59:49 +000014138$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000014139
Guido van Rossum353ae582001-07-10 16:45:32 +000014140fi
14141
Jack Jansendd19cf82001-12-06 22:36:17 +000014142
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014143# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014144cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014145/* end confdefs.h. */
14146#include <readline/readline.h>
14147_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014148if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014149 have_readline=yes
14150else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014151 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014152
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014153fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014154rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014155if test $have_readline = yes
14156then
Matthias Kloseb9621712010-04-24 17:59:49 +000014157 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014158/* end confdefs.h. */
14159#include <readline/readline.h>
14160
14161_ACEOF
14162if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014163 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014164
Matthias Kloseb9621712010-04-24 17:59:49 +000014165$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014166
14167fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014168rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014169
14170fi
14171
Martin v. Löwis82bca632006-02-10 20:49:30 +000014172# End of readline checks: restore LIBS
14173LIBS=$LIBS_no_readline
14174
Matthias Kloseb9621712010-04-24 17:59:49 +000014175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
14176$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014177if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014178 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014179else
Martin v. Löwis11437992002-04-12 09:54:03 +000014180
Matthias Kloseb9621712010-04-24 17:59:49 +000014181if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014182 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014183else
Matthias Kloseb9621712010-04-24 17:59:49 +000014184 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014185/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014186
14187int main()
14188{
14189 int val1 = nice(1);
14190 if (val1 != -1 && val1 == nice(2))
14191 exit(0);
14192 exit(1);
14193}
14194
Martin v. Löwis11437992002-04-12 09:54:03 +000014195_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014196if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014197 ac_cv_broken_nice=yes
14198else
Matthias Kloseb9621712010-04-24 17:59:49 +000014199 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014200fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014201rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14202 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014203fi
14204
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014205fi
14206
Matthias Kloseb9621712010-04-24 17:59:49 +000014207{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
14208$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014209if test "$ac_cv_broken_nice" = yes
14210then
Martin v. Löwis11437992002-04-12 09:54:03 +000014211
Matthias Kloseb9621712010-04-24 17:59:49 +000014212$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014213
14214fi
14215
Matthias Kloseb9621712010-04-24 17:59:49 +000014216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
14217$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014218if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014219 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014220else
Matthias Kloseb9621712010-04-24 17:59:49 +000014221 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014222 ac_cv_broken_poll=no
14223else
Matthias Kloseb9621712010-04-24 17:59:49 +000014224 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014225/* end confdefs.h. */
14226
14227#include <poll.h>
14228
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014229int main()
14230{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014231 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014232 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014233
14234 close (42);
14235
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014236 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014237 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014238 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014239 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014240 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014241 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014242 return 1;
14243}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014244
14245_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014246if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014247 ac_cv_broken_poll=yes
14248else
Matthias Kloseb9621712010-04-24 17:59:49 +000014249 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014250fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014251rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14252 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014253fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014254
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014255fi
14256
Matthias Kloseb9621712010-04-24 17:59:49 +000014257{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
14258$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014259if test "$ac_cv_broken_poll" = yes
14260then
14261
Matthias Kloseb9621712010-04-24 17:59:49 +000014262$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014263
14264fi
14265
Brett Cannon43802422005-02-10 20:48:03 +000014266# 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 +000014267# (which is not required by ISO C or UNIX spec) and/or if we support
14268# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000014269ac_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 +000014270#include <$ac_cv_struct_tm>
14271
Matthias Kloseb9621712010-04-24 17:59:49 +000014272"
Victor Stinnere0be4232011-10-25 13:06:09 +020014273if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000014274
14275cat >>confdefs.h <<_ACEOF
14276#define HAVE_STRUCT_TM_TM_ZONE 1
14277_ACEOF
14278
14279
14280fi
14281
14282if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14283
Matthias Kloseb9621712010-04-24 17:59:49 +000014284$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014285
14286else
Matthias Kloseb9621712010-04-24 17:59:49 +000014287 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
14288"
Victor Stinnere0be4232011-10-25 13:06:09 +020014289if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014290 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014291else
Matthias Kloseb9621712010-04-24 17:59:49 +000014292 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014293fi
14294
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014295cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014296#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014297_ACEOF
14298
Matthias Kloseb9621712010-04-24 17:59:49 +000014299 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
14300$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014301if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014302 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014303else
Matthias Kloseb9621712010-04-24 17:59:49 +000014304 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014305/* end confdefs.h. */
14306#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014307#if !HAVE_DECL_TZNAME
14308extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000014309#endif
14310
14311int
14312main ()
14313{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014314return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000014315 ;
14316 return 0;
14317}
14318_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014319if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000014320 ac_cv_var_tzname=yes
14321else
Matthias Kloseb9621712010-04-24 17:59:49 +000014322 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000014323fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014324rm -f core conftest.err conftest.$ac_objext \
14325 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014326fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014327{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
14328$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000014329 if test $ac_cv_var_tzname = yes; then
14330
Matthias Kloseb9621712010-04-24 17:59:49 +000014331$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014332
14333 fi
14334fi
14335
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014336
Martin v. Löwis1d459062005-03-14 21:23:33 +000014337# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000014338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
14339$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014340if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014341 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014342else
14343
Matthias Kloseb9621712010-04-24 17:59:49 +000014344if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014345 ac_cv_working_tzset=no
14346else
Matthias Kloseb9621712010-04-24 17:59:49 +000014347 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014348/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014349
14350#include <stdlib.h>
14351#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000014352#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000014353
14354#if HAVE_TZNAME
14355extern char *tzname[];
14356#endif
14357
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014358int main()
14359{
Brett Cannon18367812003-09-19 00:59:16 +000014360 /* Note that we need to ensure that not only does tzset(3)
14361 do 'something' with localtime, but it works as documented
14362 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000014363 This includes making sure that tzname is set properly if
14364 tm->tm_zone does not exist since it is the alternative way
14365 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000014366
14367 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000014368 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000014369 */
14370
Martin v. Löwis1d459062005-03-14 21:23:33 +000014371 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000014372 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
14373
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014374 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014375 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014376 if (localtime(&groundhogday)->tm_hour != 0)
14377 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014378#if HAVE_TZNAME
14379 /* For UTC, tzname[1] is sometimes "", sometimes " " */
14380 if (strcmp(tzname[0], "UTC") ||
14381 (tzname[1][0] != 0 && tzname[1][0] != ' '))
14382 exit(1);
14383#endif
Brett Cannon18367812003-09-19 00:59:16 +000014384
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014385 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014386 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014387 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014388 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014389#if HAVE_TZNAME
14390 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
14391 exit(1);
14392#endif
Brett Cannon18367812003-09-19 00:59:16 +000014393
14394 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
14395 tzset();
14396 if (localtime(&groundhogday)->tm_hour != 11)
14397 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014398#if HAVE_TZNAME
14399 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
14400 exit(1);
14401#endif
14402
14403#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000014404 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
14405 exit(1);
14406 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
14407 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014408#endif
Brett Cannon18367812003-09-19 00:59:16 +000014409
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014410 exit(0);
14411}
14412
14413_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014414if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014415 ac_cv_working_tzset=yes
14416else
Matthias Kloseb9621712010-04-24 17:59:49 +000014417 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014418fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014419rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14420 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014421fi
14422
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014423fi
14424
Matthias Kloseb9621712010-04-24 17:59:49 +000014425{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
14426$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014427if test "$ac_cv_working_tzset" = yes
14428then
14429
Matthias Kloseb9621712010-04-24 17:59:49 +000014430$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014431
14432fi
14433
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014434# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000014435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
14436$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014437if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014438 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014439else
Matthias Kloseb9621712010-04-24 17:59:49 +000014440 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014441/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014442#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014443int
14444main ()
14445{
14446
14447struct stat st;
14448st.st_mtim.tv_nsec = 1;
14449
14450 ;
14451 return 0;
14452}
14453_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014454if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000014455 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014456else
Matthias Kloseb9621712010-04-24 17:59:49 +000014457 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014458fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014459rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14460fi
14461
Matthias Kloseb9621712010-04-24 17:59:49 +000014462{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
14463$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014464if test "$ac_cv_stat_tv_nsec" = yes
14465then
14466
Matthias Kloseb9621712010-04-24 17:59:49 +000014467$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014468
14469fi
14470
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014471# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000014472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
14473$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014474if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014475 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014476else
Matthias Kloseb9621712010-04-24 17:59:49 +000014477 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014478/* end confdefs.h. */
14479#include <sys/stat.h>
14480int
14481main ()
14482{
14483
14484struct stat st;
14485st.st_mtimespec.tv_nsec = 1;
14486
14487 ;
14488 return 0;
14489}
14490_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014491if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014492 ac_cv_stat_tv_nsec2=yes
14493else
Matthias Kloseb9621712010-04-24 17:59:49 +000014494 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014495fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014496rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14497fi
14498
Matthias Kloseb9621712010-04-24 17:59:49 +000014499{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
14500$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014501if test "$ac_cv_stat_tv_nsec2" = yes
14502then
14503
Matthias Kloseb9621712010-04-24 17:59:49 +000014504$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014505
14506fi
14507
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020014508ac_save_cppflags="$CPPFLAGS"
14509CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
Jack Jansen666b1e72001-10-31 12:11:48 +000014510# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000014511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
14512$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014513if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014514 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014515else
Matthias Kloseb9621712010-04-24 17:59:49 +000014516 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014517/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014518#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014519int
14520main ()
14521{
Jack Jansen666b1e72001-10-31 12:11:48 +000014522
14523 int rtn;
14524 rtn = mvwdelch(0,0,0);
14525
Martin v. Löwis11437992002-04-12 09:54:03 +000014526 ;
14527 return 0;
14528}
14529_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014530if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014531 ac_cv_mvwdelch_is_expression=yes
14532else
Matthias Kloseb9621712010-04-24 17:59:49 +000014533 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014534fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014535rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14536fi
14537
Matthias Kloseb9621712010-04-24 17:59:49 +000014538{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
14539$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000014540
14541if test "$ac_cv_mvwdelch_is_expression" = yes
14542then
Martin v. Löwis11437992002-04-12 09:54:03 +000014543
Matthias Kloseb9621712010-04-24 17:59:49 +000014544$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014545
14546fi
14547
Matthias Kloseb9621712010-04-24 17:59:49 +000014548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
14549$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014550if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014551 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014552else
Matthias Kloseb9621712010-04-24 17:59:49 +000014553 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014554/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014555#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014556int
14557main ()
14558{
Jack Jansen666b1e72001-10-31 12:11:48 +000014559
14560 WINDOW *w;
14561 w->_flags = 0;
14562
Martin v. Löwis11437992002-04-12 09:54:03 +000014563 ;
14564 return 0;
14565}
14566_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014567if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014568 ac_cv_window_has_flags=yes
14569else
Matthias Kloseb9621712010-04-24 17:59:49 +000014570 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014571fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014572rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14573fi
14574
Matthias Kloseb9621712010-04-24 17:59:49 +000014575{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
14576$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000014577
Jack Jansen666b1e72001-10-31 12:11:48 +000014578
14579if test "$ac_cv_window_has_flags" = yes
14580then
Martin v. Löwis11437992002-04-12 09:54:03 +000014581
Matthias Kloseb9621712010-04-24 17:59:49 +000014582$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014583
14584fi
14585
Matthias Kloseb9621712010-04-24 17:59:49 +000014586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
14587$as_echo_n "checking for is_term_resized... " >&6; }
14588cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014589/* end confdefs.h. */
14590#include <curses.h>
14591int
14592main ()
14593{
14594void *x=is_term_resized
14595 ;
14596 return 0;
14597}
14598_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014599if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014600
Matthias Kloseb9621712010-04-24 17:59:49 +000014601$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014602
Matthias Kloseb159a552010-04-25 21:00:44 +000014603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014604$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014605else
Matthias Kloseb9621712010-04-24 17:59:49 +000014606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14607$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014608
14609fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014610rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14611
Matthias Kloseb9621712010-04-24 17:59:49 +000014612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
14613$as_echo_n "checking for resize_term... " >&6; }
14614cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014615/* end confdefs.h. */
14616#include <curses.h>
14617int
14618main ()
14619{
14620void *x=resize_term
14621 ;
14622 return 0;
14623}
14624_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014625if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014626
Matthias Kloseb9621712010-04-24 17:59:49 +000014627$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014628
Matthias Kloseb159a552010-04-25 21:00:44 +000014629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014630$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014631else
Matthias Kloseb9621712010-04-24 17:59:49 +000014632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14633$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014634
14635fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014636rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14637
Matthias Kloseb9621712010-04-24 17:59:49 +000014638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
14639$as_echo_n "checking for resizeterm... " >&6; }
14640cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014641/* end confdefs.h. */
14642#include <curses.h>
14643int
14644main ()
14645{
14646void *x=resizeterm
14647 ;
14648 return 0;
14649}
14650_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014651if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014652
Matthias Kloseb9621712010-04-24 17:59:49 +000014653$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014654
Matthias Kloseb159a552010-04-25 21:00:44 +000014655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014656$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014657else
Matthias Kloseb9621712010-04-24 17:59:49 +000014658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14659$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014660
14661fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014662rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020014663# last curses configure check
14664CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014665
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
14667$as_echo "$as_me: checking for device files" >&6;}
14668
14669if test "x$cross_compiling" = xyes; then
14670 if test "${ac_cv_file__dev_ptmx+set}" != set; then
14671 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14672$as_echo_n "checking for /dev/ptmx... " >&6; }
14673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14674$as_echo "not set" >&6; }
14675 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14676 fi
14677 if test "${ac_cv_file__dev_ptc+set}" != set; then
14678 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14679$as_echo_n "checking for /dev/ptc... " >&6; }
14680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14681$as_echo "not set" >&6; }
14682 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14683 fi
14684fi
14685
Matthias Kloseb9621712010-04-24 17:59:49 +000014686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14687$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014688if ${ac_cv_file__dev_ptmx+:} false; then :
14689 $as_echo_n "(cached) " >&6
14690else
14691 test "$cross_compiling" = yes &&
14692 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14693if test -r "/dev/ptmx"; then
14694 ac_cv_file__dev_ptmx=yes
14695else
14696 ac_cv_file__dev_ptmx=no
14697fi
14698fi
14699{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
14700$as_echo "$ac_cv_file__dev_ptmx" >&6; }
14701if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000014702
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014703fi
14704
14705if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014706
Matthias Kloseb9621712010-04-24 17:59:49 +000014707$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014708
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014709fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14711$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014712if ${ac_cv_file__dev_ptc+:} false; then :
14713 $as_echo_n "(cached) " >&6
14714else
14715 test "$cross_compiling" = yes &&
14716 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14717if test -r "/dev/ptc"; then
14718 ac_cv_file__dev_ptc=yes
14719else
14720 ac_cv_file__dev_ptc=no
14721fi
14722fi
14723{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
14724$as_echo "$ac_cv_file__dev_ptc" >&6; }
14725if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000014726
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014727fi
14728
14729if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000014730
Matthias Kloseb9621712010-04-24 17:59:49 +000014731$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000014732
Neal Norwitz865400f2003-03-21 01:42:58 +000014733fi
14734
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014735if test "$have_long_long" = yes
14736then
Matthias Kloseb9621712010-04-24 17:59:49 +000014737 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
14738$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014739 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014740 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014741else
Matthias Kloseb9621712010-04-24 17:59:49 +000014742 if test "$cross_compiling" = yes; then :
Matthias Klose3b739b12012-03-15 19:31:06 +010014743 ac_cv_have_long_long_format="cross -- assuming no"
14744 if test x$GCC = xyes; then
14745 save_CFLAGS=$CFLAGS
14746 CFLAGS="$CFLAGS -Werror -Wformat"
14747 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14748/* end confdefs.h. */
14749
14750 #include <stdio.h>
14751 #include <stddef.h>
14752
14753int
14754main ()
14755{
14756
14757 char *buffer;
14758 sprintf(buffer, "%lld", (long long)123);
14759 sprintf(buffer, "%lld", (long long)-123);
14760 sprintf(buffer, "%llu", (unsigned long long)123);
14761
14762 ;
14763 return 0;
14764}
14765_ACEOF
14766if ac_fn_c_try_compile "$LINENO"; then :
14767 ac_cv_have_long_long_format=yes
14768
14769fi
14770rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14771 CFLAGS=$save_CFLAGS
14772 fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014773else
Matthias Kloseb9621712010-04-24 17:59:49 +000014774 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014775/* end confdefs.h. */
14776
14777 #include <stdio.h>
14778 #include <stddef.h>
14779 #include <string.h>
14780
14781 #ifdef HAVE_SYS_TYPES_H
14782 #include <sys/types.h>
14783 #endif
14784
14785 int main()
14786 {
14787 char buffer[256];
14788
14789 if (sprintf(buffer, "%lld", (long long)123) < 0)
14790 return 1;
14791 if (strcmp(buffer, "123"))
14792 return 1;
14793
14794 if (sprintf(buffer, "%lld", (long long)-123) < 0)
14795 return 1;
14796 if (strcmp(buffer, "-123"))
14797 return 1;
14798
14799 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
14800 return 1;
14801 if (strcmp(buffer, "123"))
14802 return 1;
14803
14804 return 0;
14805 }
14806
14807_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014808if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014809 ac_cv_have_long_long_format=yes
14810else
Matthias Kloseb9621712010-04-24 17:59:49 +000014811 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014812fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014813rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14814 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014815fi
14816
14817
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014818fi
14819
Matthias Kloseb9621712010-04-24 17:59:49 +000014820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
14821$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014822fi
14823
Mark Dickinson89d7d412009-12-31 20:50:59 +000014824if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014825then
14826
Matthias Kloseb9621712010-04-24 17:59:49 +000014827$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014828
14829fi
14830
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000014831if test $ac_sys_system = Darwin
14832then
14833 LIBS="$LIBS -framework CoreFoundation"
14834fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014835
Matthias Kloseb9621712010-04-24 17:59:49 +000014836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
14837$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014838if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014839 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014840else
Matthias Kloseb9621712010-04-24 17:59:49 +000014841 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000014842 ac_cv_have_size_t_format="cross -- assuming yes"
14843
Thomas Wouters477c8d52006-05-27 19:21:47 +000014844else
Matthias Kloseb9621712010-04-24 17:59:49 +000014845 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000014846/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014847
Thomas Wouters477c8d52006-05-27 19:21:47 +000014848#include <stdio.h>
14849#include <stddef.h>
14850#include <string.h>
14851
Christian Heimes2c181612007-12-17 20:04:13 +000014852#ifdef HAVE_SYS_TYPES_H
14853#include <sys/types.h>
14854#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000014855
14856#ifdef HAVE_SSIZE_T
14857typedef ssize_t Py_ssize_t;
14858#elif SIZEOF_VOID_P == SIZEOF_LONG
14859typedef long Py_ssize_t;
14860#else
14861typedef int Py_ssize_t;
14862#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000014863
Christian Heimes2c181612007-12-17 20:04:13 +000014864int main()
14865{
14866 char buffer[256];
14867
Thomas Wouters477c8d52006-05-27 19:21:47 +000014868 if(sprintf(buffer, "%zd", (size_t)123) < 0)
14869 return 1;
14870
Thomas Wouters89f507f2006-12-13 04:49:30 +000014871 if (strcmp(buffer, "123"))
14872 return 1;
14873
14874 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
14875 return 1;
14876
14877 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000014878 return 1;
14879
14880 return 0;
14881}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014882
Thomas Wouters477c8d52006-05-27 19:21:47 +000014883_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014884if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014885 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014886else
Matthias Kloseb9621712010-04-24 17:59:49 +000014887 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014888fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014889rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14890 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014891fi
14892
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014893fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014894{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
14895$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000014896if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014897
Matthias Kloseb9621712010-04-24 17:59:49 +000014898$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014899
14900fi
14901
Matthias Kloseb9621712010-04-24 17:59:49 +000014902ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000014903#ifdef HAVE_SYS_TYPES_H
14904#include <sys/types.h>
14905#endif
14906#ifdef HAVE_SYS_SOCKET_H
14907#include <sys/socket.h>
14908#endif
14909
Matthias Kloseb9621712010-04-24 17:59:49 +000014910"
Victor Stinnere0be4232011-10-25 13:06:09 +020014911if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000014912
Martin v. Löwis11437992002-04-12 09:54:03 +000014913else
Guido van Rossum95713eb2000-05-18 20:53:31 +000014914
Matthias Kloseb9621712010-04-24 17:59:49 +000014915$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000014916
14917fi
14918
Michael W. Hudson54241132001-12-07 15:38:26 +000014919
Matthias Kloseb9621712010-04-24 17:59:49 +000014920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
14921$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014922if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014923 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014924else
Matthias Kloseb9621712010-04-24 17:59:49 +000014925 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000014926 ac_cv_broken_mbstowcs=no
14927else
Matthias Kloseb9621712010-04-24 17:59:49 +000014928 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000014929/* end confdefs.h. */
14930
Stefan Krah19c21392012-11-22 23:47:32 +010014931#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000014932#include<stdlib.h>
14933int main() {
14934 size_t len = -1;
14935 const char *str = "text";
14936 len = mbstowcs(NULL, str, 0);
14937 return (len != 4);
14938}
14939
14940_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014941if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000014942 ac_cv_broken_mbstowcs=no
14943else
Matthias Kloseb9621712010-04-24 17:59:49 +000014944 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000014945fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014946rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14947 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000014948fi
14949
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014950fi
14951
Matthias Kloseb9621712010-04-24 17:59:49 +000014952{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
14953$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000014954if test "$ac_cv_broken_mbstowcs" = yes
14955then
14956
Matthias Kloseb9621712010-04-24 17:59:49 +000014957$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000014958
14959fi
14960
Antoine Pitroub52ec782009-01-25 16:34:23 +000014961# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000014962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
14963$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014964
14965# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014966if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000014967 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000014968if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000014969then
14970
Matthias Kloseb9621712010-04-24 17:59:49 +000014971$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000014972
Matthias Kloseb9621712010-04-24 17:59:49 +000014973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14974$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014975fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000014976if test "$withval" = no
14977then
14978
14979$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
14980
Matthias Kloseb9621712010-04-24 17:59:49 +000014981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14982$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014983fi
14984
Antoine Pitrou042b1282010-08-13 21:15:58 +000014985else
14986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14987$as_echo "no value specified" >&6; }
14988fi
14989
Antoine Pitroub52ec782009-01-25 16:34:23 +000014990
Matthias Kloseb17289e2012-03-15 19:51:34 +010014991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
14992$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
14993if ${ac_cv_computed_gotos+:} false; then :
14994 $as_echo_n "(cached) " >&6
14995else
14996 if test "$cross_compiling" = yes; then :
14997 if test "${with_computed_gotos+set}" = set; then
14998 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
14999 else
15000 ac_cv_computed_gotos=no
15001 fi
15002else
15003 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15004/* end confdefs.h. */
15005
15006int main(int argc, char **argv)
15007{
15008 static void *targets[1] = { &&LABEL1 };
15009 goto LABEL2;
15010LABEL1:
15011 return 0;
15012LABEL2:
15013 goto *targets[0];
15014 return 1;
15015}
15016
15017_ACEOF
15018if ac_fn_c_try_run "$LINENO"; then :
15019 ac_cv_computed_gotos=yes
15020else
15021 ac_cv_computed_gotos=no
15022fi
15023rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15024 conftest.$ac_objext conftest.beam conftest.$ac_ext
15025fi
15026
15027fi
15028
15029{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
15030$as_echo "$ac_cv_computed_gotos" >&6; }
15031case "$ac_cv_computed_gotos" in yes*)
15032
15033$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
15034
15035esac
15036
Benjamin Petersond8d835b2010-10-15 23:14:46 +000015037case $ac_sys_system in
15038AIX*)
15039
15040$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
15041 ;;
15042esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000015043
Michael W. Hudson54241132001-12-07 15:38:26 +000015044
Mark Dickinsonb2153e92010-05-05 22:31:36 +000015045
15046
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000015047for h in `(cd $srcdir;echo Python/thread_*.h)`
15048do
15049 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
15050done
15051
Michael W. Hudson54241132001-12-07 15:38:26 +000015052
Neal Norwitzd24499d2005-12-18 21:36:39 +000015053SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000015054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
15055$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015056for dir in $SRCDIRS; do
15057 if test ! -d $dir; then
15058 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000015059 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015060done
Matthias Kloseb9621712010-04-24 17:59:49 +000015061{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
15062$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000015063
Stefan Krah1919b7e2012-03-21 18:25:23 +010015064# Availability of -O2:
15065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
15066$as_echo_n "checking for -O2... " >&6; }
15067saved_cflags="$CFLAGS"
15068CFLAGS="-O2"
15069cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15070/* end confdefs.h. */
15071
15072int
15073main ()
15074{
15075
15076
15077 ;
15078 return 0;
15079}
15080_ACEOF
15081if ac_fn_c_try_compile "$LINENO"; then :
15082 have_O2=yes
15083else
15084 have_O2=no
15085fi
15086rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15087{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
15088$as_echo "$have_O2" >&6; }
15089CFLAGS="$saved_cflags"
15090
15091# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
15092# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
15093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
15094$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
15095saved_cflags="$CFLAGS"
15096CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
15097if test "$have_O2" = no; then
15098 CFLAGS=""
15099fi
15100if test "$cross_compiling" = yes; then :
15101 have_glibc_memmove_bug=undefined
15102else
15103 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15104/* end confdefs.h. */
15105
15106#include <stdio.h>
15107#include <stdlib.h>
15108#include <string.h>
15109void foo(void *p, void *q) { memmove(p, q, 19); }
15110int main() {
15111 char a[32] = "123456789000000000";
15112 foo(&a[9], a);
15113 if (strcmp(a, "123456789123456789000000000") != 0)
15114 return 1;
15115 foo(a, &a[9]);
15116 if (strcmp(a, "123456789000000000") != 0)
15117 return 1;
15118 return 0;
15119}
15120
15121_ACEOF
15122if ac_fn_c_try_run "$LINENO"; then :
15123 have_glibc_memmove_bug=no
15124else
15125 have_glibc_memmove_bug=yes
15126fi
15127rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15128 conftest.$ac_objext conftest.beam conftest.$ac_ext
15129fi
15130
15131CFLAGS="$saved_cflags"
15132{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
15133$as_echo "$have_glibc_memmove_bug" >&6; }
15134if test "$have_glibc_memmove_bug" = yes; then
15135
15136$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
15137
15138fi
15139
15140if test "$have_gcc_asm_for_x87" = yes; then
15141 # Some versions of gcc miscompile inline asm:
15142 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
15143 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
15144 case $CC in
15145 *gcc*)
15146 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
15147$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
15148 saved_cflags="$CFLAGS"
15149 CFLAGS="-O2"
15150 if test "$cross_compiling" = yes; then :
15151 have_ipa_pure_const_bug=undefined
15152else
15153 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15154/* end confdefs.h. */
15155
15156 __attribute__((noinline)) int
15157 foo(int *p) {
15158 int r;
15159 asm ( "movl \$6, (%1)\n\t"
15160 "xorl %0, %0\n\t"
15161 : "=r" (r) : "r" (p) : "memory"
15162 );
15163 return r;
15164 }
15165 int main() {
15166 int p = 8;
15167 if ((foo(&p) ? : p) != 6)
15168 return 1;
15169 return 0;
15170 }
15171
15172_ACEOF
15173if ac_fn_c_try_run "$LINENO"; then :
15174 have_ipa_pure_const_bug=no
15175else
15176 have_ipa_pure_const_bug=yes
15177fi
15178rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15179 conftest.$ac_objext conftest.beam conftest.$ac_ext
15180fi
15181
15182 CFLAGS="$saved_cflags"
15183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
15184$as_echo "$have_ipa_pure_const_bug" >&6; }
15185 if test "$have_ipa_pure_const_bug" = yes; then
15186
15187$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
15188
15189 fi
15190 ;;
15191 esac
15192fi
15193
Guido van Rossum627b2d71993-12-24 10:39:16 +000015194# generate output files
doko@python.org87421192013-01-26 11:39:31 +010015195ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc Misc/python-config.sh"
Martin v. Löwis88afe662002-10-26 13:47:44 +000015196
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015197ac_config_files="$ac_config_files Modules/ld_so_aix"
15198
Martin v. Löwis11437992002-04-12 09:54:03 +000015199cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015200# This file is a shell script that caches the results of configure
15201# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000015202# scripts and configure runs, see configure's option --config-cache.
15203# It is not useful on other systems. If it contains results you don't
15204# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015205#
Martin v. Löwis11437992002-04-12 09:54:03 +000015206# config.status only pays attention to the cache file if you give it
15207# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015208#
Skip Montanaro6dead952003-09-25 14:50:04 +000015209# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000015210# loading this file, other *unset* `ac_cv_foo' will be assigned the
15211# following values.
15212
15213_ACEOF
15214
Guido van Rossumf78abae1997-01-21 22:02:36 +000015215# The following way of writing the cache mishandles newlines in values,
15216# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015217# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015218# Ultrix sh set writes to stderr and can't be redirected directly,
15219# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015220(
15221 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
15222 eval ac_val=\$$ac_var
15223 case $ac_val in #(
15224 *${as_nl}*)
15225 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000015226 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
15227$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015228 esac
15229 case $ac_var in #(
15230 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000015231 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
15232 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015233 esac ;;
15234 esac
15235 done
15236
Martin v. Löwis11437992002-04-12 09:54:03 +000015237 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015238 case $as_nl`(ac_space=' '; set) 2>&1` in #(
15239 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000015240 # `set' does not quote correctly, so add quotes: double-quote
15241 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000015242 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015243 "s/'/'\\\\''/g;
15244 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015245 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000015246 *)
15247 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015248 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000015249 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015250 esac |
15251 sort
15252) |
Martin v. Löwis11437992002-04-12 09:54:03 +000015253 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015254 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000015255 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015256 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000015257 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15258 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015259 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15260 :end' >>confcache
15261if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
15262 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020015263 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015264 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
15265$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020015266 if test ! -f "$cache_file" || test -h "$cache_file"; then
15267 cat confcache >"$cache_file"
15268 else
15269 case $cache_file in #(
15270 */* | ?:*)
15271 mv -f confcache "$cache_file"$$ &&
15272 mv -f "$cache_file"$$ "$cache_file" ;; #(
15273 *)
15274 mv -f confcache "$cache_file" ;;
15275 esac
15276 fi
15277 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015278 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015279 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
15280$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015281 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015282fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015283rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000015284
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015285test "x$prefix" = xNONE && prefix=$ac_default_prefix
15286# Let make expand exec_prefix.
15287test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000015288
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015289DEFS=-DHAVE_CONFIG_H
15290
Skip Montanaro6dead952003-09-25 14:50:04 +000015291ac_libobjs=
15292ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015293U=
Skip Montanaro6dead952003-09-25 14:50:04 +000015294for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
15295 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015296 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000015297 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015298 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
15299 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000015300 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
15301 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000015302done
15303LIBOBJS=$ac_libobjs
15304
15305LTLIBOBJS=$ac_ltlibobjs
15306
15307
Martin v. Löwis11437992002-04-12 09:54:03 +000015308
Matthias Kloseb9621712010-04-24 17:59:49 +000015309
Victor Stinnere0be4232011-10-25 13:06:09 +020015310: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000015311ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000015312ac_clean_files_save=$ac_clean_files
15313ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015314{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
15315$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
15316as_write_fail=0
15317cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015318#! $SHELL
15319# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015320# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015321# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000015322# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015323
Martin v. Löwis11437992002-04-12 09:54:03 +000015324debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000015325ac_cs_recheck=false
15326ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000015327
Matthias Kloseb9621712010-04-24 17:59:49 +000015328SHELL=\${CONFIG_SHELL-$SHELL}
15329export SHELL
15330_ASEOF
15331cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
15332## -------------------- ##
15333## M4sh Initialization. ##
15334## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000015335
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015336# Be more Bourne compatible
15337DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000015338if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015339 emulate sh
15340 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000015341 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000015342 # is contrary to our usage. Disable this feature.
15343 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015344 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015345else
Matthias Kloseb9621712010-04-24 17:59:49 +000015346 case `(set -o) 2>/dev/null` in #(
15347 *posix*) :
15348 set -o posix ;; #(
15349 *) :
15350 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015351esac
Michael W. Hudson54241132001-12-07 15:38:26 +000015352fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000015353
15354
Matthias Kloseb9621712010-04-24 17:59:49 +000015355as_nl='
15356'
15357export as_nl
15358# Printing a long string crashes Solaris 7 /usr/bin/printf.
15359as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
15360as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
15361as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
15362# Prefer a ksh shell builtin over an external printf program on Solaris,
15363# but without wasting forks for bash or zsh.
15364if test -z "$BASH_VERSION$ZSH_VERSION" \
15365 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
15366 as_echo='print -r --'
15367 as_echo_n='print -rn --'
15368elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
15369 as_echo='printf %s\n'
15370 as_echo_n='printf %s'
15371else
15372 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
15373 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
15374 as_echo_n='/usr/ucb/echo -n'
15375 else
15376 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
15377 as_echo_n_body='eval
15378 arg=$1;
15379 case $arg in #(
15380 *"$as_nl"*)
15381 expr "X$arg" : "X\\(.*\\)$as_nl";
15382 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
15383 esac;
15384 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
15385 '
15386 export as_echo_n_body
15387 as_echo_n='sh -c $as_echo_n_body as_echo'
15388 fi
15389 export as_echo_body
15390 as_echo='sh -c $as_echo_body as_echo'
15391fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015392
15393# The user is always right.
15394if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015395 PATH_SEPARATOR=:
15396 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
15397 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
15398 PATH_SEPARATOR=';'
15399 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015400fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015401
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015402
15403# IFS
15404# We need space, tab and new line, in precisely that order. Quoting is
15405# there to prevent editors from complaining about space-tab.
15406# (If _AS_PATH_WALK were called with IFS unset, it would disable word
15407# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015408IFS=" "" $as_nl"
15409
15410# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020015411as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000015412case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015413 *[\\/]* ) as_myself=$0 ;;
15414 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000015415for as_dir in $PATH
15416do
15417 IFS=$as_save_IFS
15418 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000015419 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15420 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015421IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000015422
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015423 ;;
15424esac
15425# We did not find ourselves, most probably we were run as `sh COMMAND'
15426# in which case we are not to be found in the path.
15427if test "x$as_myself" = x; then
15428 as_myself=$0
15429fi
15430if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015431 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
15432 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015433fi
15434
Matthias Kloseb9621712010-04-24 17:59:49 +000015435# Unset variables that we do not need and which cause bugs (e.g. in
15436# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
15437# suppresses any "Segmentation fault" message there. '((' could
15438# trigger a bug in pdksh 5.2.14.
15439for as_var in BASH_ENV ENV MAIL MAILPATH
15440do eval test x\${$as_var+set} = xset \
15441 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015442done
15443PS1='$ '
15444PS2='> '
15445PS4='+ '
15446
15447# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000015448LC_ALL=C
15449export LC_ALL
15450LANGUAGE=C
15451export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015452
Matthias Kloseb9621712010-04-24 17:59:49 +000015453# CDPATH.
15454(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
15455
15456
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015457# as_fn_error STATUS ERROR [LINENO LOG_FD]
15458# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000015459# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
15460# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015461# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000015462as_fn_error ()
15463{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015464 as_status=$1; test $as_status -eq 0 && as_status=1
15465 if test "$4"; then
15466 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
15467 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000015468 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015469 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000015470 as_fn_exit $as_status
15471} # as_fn_error
15472
15473
15474# as_fn_set_status STATUS
15475# -----------------------
15476# Set $? to STATUS, without forking.
15477as_fn_set_status ()
15478{
15479 return $1
15480} # as_fn_set_status
15481
15482# as_fn_exit STATUS
15483# -----------------
15484# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
15485as_fn_exit ()
15486{
15487 set +e
15488 as_fn_set_status $1
15489 exit $1
15490} # as_fn_exit
15491
15492# as_fn_unset VAR
15493# ---------------
15494# Portably unset VAR.
15495as_fn_unset ()
15496{
15497 { eval $1=; unset $1;}
15498}
15499as_unset=as_fn_unset
15500# as_fn_append VAR VALUE
15501# ----------------------
15502# Append the text in VALUE to the end of the definition contained in VAR. Take
15503# advantage of any shell optimizations that allow amortized linear growth over
15504# repeated appends, instead of the typical quadratic growth present in naive
15505# implementations.
15506if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
15507 eval 'as_fn_append ()
15508 {
15509 eval $1+=\$2
15510 }'
15511else
15512 as_fn_append ()
15513 {
15514 eval $1=\$$1\$2
15515 }
15516fi # as_fn_append
15517
15518# as_fn_arith ARG...
15519# ------------------
15520# Perform arithmetic evaluation on the ARGs, and store the result in the
15521# global $as_val. Take advantage of shells that can avoid forks. The arguments
15522# must be portable across $(()) and expr.
15523if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
15524 eval 'as_fn_arith ()
15525 {
15526 as_val=$(( $* ))
15527 }'
15528else
15529 as_fn_arith ()
15530 {
15531 as_val=`expr "$@" || test $? -eq 1`
15532 }
15533fi # as_fn_arith
15534
15535
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015536if expr a : '\(a\)' >/dev/null 2>&1 &&
15537 test "X`expr 00001 : '.*\(...\)'`" = X001; then
15538 as_expr=expr
15539else
15540 as_expr=false
15541fi
15542
15543if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
15544 as_basename=basename
15545else
15546 as_basename=false
15547fi
15548
Matthias Kloseb9621712010-04-24 17:59:49 +000015549if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
15550 as_dirname=dirname
15551else
15552 as_dirname=false
15553fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015554
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015555as_me=`$as_basename -- "$0" ||
15556$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15557 X"$0" : 'X\(//\)$' \| \
15558 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000015559$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015560 sed '/^.*\/\([^/][^/]*\)\/*$/{
15561 s//\1/
15562 q
15563 }
15564 /^X\/\(\/\/\)$/{
15565 s//\1/
15566 q
15567 }
15568 /^X\/\(\/\).*/{
15569 s//\1/
15570 q
15571 }
15572 s/.*/./; q'`
15573
Matthias Kloseb9621712010-04-24 17:59:49 +000015574# Avoid depending upon Character Ranges.
15575as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15576as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15577as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15578as_cr_digits='0123456789'
15579as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015580
15581ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000015582case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015583-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015584 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015585 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000015586 xy) ECHO_C='\c';;
15587 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
15588 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015589 esac;;
15590*)
15591 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000015592esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015593
Martin v. Löwis11437992002-04-12 09:54:03 +000015594rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015595if test -d conf$$.dir; then
15596 rm -f conf$$.dir/conf$$.file
15597else
15598 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000015599 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015600fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015601if (echo >conf$$.file) 2>/dev/null; then
15602 if ln -s conf$$.file conf$$ 2>/dev/null; then
15603 as_ln_s='ln -s'
15604 # ... but there are two gotchas:
15605 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
15606 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015607 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000015608 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015609 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000015610 elif ln conf$$.file conf$$ 2>/dev/null; then
15611 as_ln_s=ln
15612 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015613 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000015614 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015615else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015616 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000015617fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015618rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
15619rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000015620
Matthias Kloseb9621712010-04-24 17:59:49 +000015621
15622# as_fn_mkdir_p
15623# -------------
15624# Create "$as_dir" as a directory, including parents if necessary.
15625as_fn_mkdir_p ()
15626{
15627
15628 case $as_dir in #(
15629 -*) as_dir=./$as_dir;;
15630 esac
15631 test -d "$as_dir" || eval $as_mkdir_p || {
15632 as_dirs=
15633 while :; do
15634 case $as_dir in #(
15635 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
15636 *) as_qdir=$as_dir;;
15637 esac
15638 as_dirs="'$as_qdir' $as_dirs"
15639 as_dir=`$as_dirname -- "$as_dir" ||
15640$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15641 X"$as_dir" : 'X\(//\)[^/]' \| \
15642 X"$as_dir" : 'X\(//\)$' \| \
15643 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
15644$as_echo X"$as_dir" |
15645 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15646 s//\1/
15647 q
15648 }
15649 /^X\(\/\/\)[^/].*/{
15650 s//\1/
15651 q
15652 }
15653 /^X\(\/\/\)$/{
15654 s//\1/
15655 q
15656 }
15657 /^X\(\/\).*/{
15658 s//\1/
15659 q
15660 }
15661 s/.*/./; q'`
15662 test -d "$as_dir" && break
15663 done
15664 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015665 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000015666
15667
15668} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000015669if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015670 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000015671else
Skip Montanarof0d5f792004-08-15 14:08:23 +000015672 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000015673 as_mkdir_p=false
15674fi
15675
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015676
15677# as_fn_executable_p FILE
15678# -----------------------
15679# Test if FILE is an executable regular file.
15680as_fn_executable_p ()
15681{
15682 test -f "$1" && test -x "$1"
15683} # as_fn_executable_p
15684as_test_x='test -x'
15685as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015686
15687# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015688as_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 +000015689
15690# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015691as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015692
15693
Martin v. Löwis11437992002-04-12 09:54:03 +000015694exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000015695## ----------------------------------- ##
15696## Main body of $CONFIG_STATUS script. ##
15697## ----------------------------------- ##
15698_ASEOF
15699test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015700
Matthias Kloseb9621712010-04-24 17:59:49 +000015701cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15702# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000015703# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015704# values after options handling.
15705ac_log="
Georg Brandl08a90122012-09-29 09:34:13 +020015706This file was extended by python $as_me 3.4, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015707generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000015708
15709 CONFIG_FILES = $CONFIG_FILES
15710 CONFIG_HEADERS = $CONFIG_HEADERS
15711 CONFIG_LINKS = $CONFIG_LINKS
15712 CONFIG_COMMANDS = $CONFIG_COMMANDS
15713 $ $0 $@
15714
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015715on `(hostname || uname -n) 2>/dev/null | sed 1q`
15716"
15717
Martin v. Löwis11437992002-04-12 09:54:03 +000015718_ACEOF
15719
Matthias Kloseb9621712010-04-24 17:59:49 +000015720case $ac_config_files in *"
15721"*) set x $ac_config_files; shift; ac_config_files=$*;;
15722esac
15723
15724case $ac_config_headers in *"
15725"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
15726esac
15727
15728
15729cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015730# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010015731config_files="$ac_config_files"
15732config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000015733
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015734_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015735
Matthias Kloseb9621712010-04-24 17:59:49 +000015736cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015737ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000015738\`$as_me' instantiates files and other configuration actions
15739from templates according to the current configuration. Unless the files
15740and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000015741
Matthias Kloseb9621712010-04-24 17:59:49 +000015742Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000015743
15744 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015745 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000015746 --config print configuration, then exit
15747 -q, --quiet, --silent
15748 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000015749 -d, --debug don't remove temporary files
15750 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000015751 --file=FILE[:TEMPLATE]
15752 instantiate the configuration file FILE
15753 --header=FILE[:TEMPLATE]
15754 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000015755
15756Configuration files:
15757$config_files
15758
15759Configuration headers:
15760$config_headers
15761
Matthias Kloseb9621712010-04-24 17:59:49 +000015762Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015763
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015764_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015765cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15766ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000015767ac_cs_version="\\
Georg Brandl08a90122012-09-29 09:34:13 +020015768python config.status 3.4
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015769configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000015770 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000015771
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015772Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000015773This config.status script is free software; the Free Software Foundation
15774gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015775
15776ac_pwd='$ac_pwd'
15777srcdir='$srcdir'
15778INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010015779MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000015780test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000015781_ACEOF
15782
Matthias Kloseb9621712010-04-24 17:59:49 +000015783cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15784# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000015785ac_need_defaults=:
15786while test $# != 0
15787do
15788 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015789 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015790 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15791 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000015792 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000015793 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015794 --*=)
15795 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15796 ac_optarg=
15797 ac_shift=:
15798 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015799 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000015800 ac_option=$1
15801 ac_optarg=$2
15802 ac_shift=shift
15803 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015804 esac
15805
Skip Montanaro6dead952003-09-25 14:50:04 +000015806 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000015807 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000015808 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15809 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015810 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000015811 $as_echo "$ac_cs_version"; exit ;;
15812 --config | --confi | --conf | --con | --co | --c )
15813 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015814 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000015815 debug=: ;;
15816 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000015817 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000015818 case $ac_optarg in
15819 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015820 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000015821 esac
15822 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015823 ac_need_defaults=false;;
15824 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000015825 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000015826 case $ac_optarg in
15827 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15828 esac
15829 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015830 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015831 --he | --h)
15832 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015833 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000015834Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015835 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000015836 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000015837 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
15838 | -silent | --silent | --silen | --sile | --sil | --si | --s)
15839 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015840
15841 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015842 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000015843Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015844
Matthias Kloseb9621712010-04-24 17:59:49 +000015845 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015846 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015847
15848 esac
15849 shift
15850done
15851
Skip Montanaro6dead952003-09-25 14:50:04 +000015852ac_configure_extra_args=
15853
15854if $ac_cs_silent; then
15855 exec 6>/dev/null
15856 ac_configure_extra_args="$ac_configure_extra_args --silent"
15857fi
15858
15859_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015860cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000015861if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015862 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000015863 shift
15864 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
15865 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015866 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000015867 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000015868fi
15869
Martin v. Löwis11437992002-04-12 09:54:03 +000015870_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015871cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015872exec 5>>config.log
15873{
15874 echo
15875 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
15876## Running $as_me. ##
15877_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000015878 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015879} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015880
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015881_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015882cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015883_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015884
Matthias Kloseb9621712010-04-24 17:59:49 +000015885cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015886
15887# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000015888for ac_config_target in $ac_config_targets
15889do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015890 case $ac_config_target in
15891 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
15892 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
15893 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000015894 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
15895 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015896 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
15897 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000015898 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010015899 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015900 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015901
Victor Stinnere0be4232011-10-25 13:06:09 +020015902 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015903 esac
15904done
15905
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015906
Martin v. Löwis11437992002-04-12 09:54:03 +000015907# If the user did not use the arguments to specify the items to instantiate,
15908# then the envvar interface is used. Set only those that are not.
15909# We use the long form for the default assignment because of an extremely
15910# bizarre bug on SunOS 4.1.3.
15911if $ac_need_defaults; then
15912 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15913 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15914fi
15915
Skip Montanaro6dead952003-09-25 14:50:04 +000015916# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015917# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000015918# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015919# Hook for its removal unless debugging.
15920# Note that there is a small window in which the directory will not be cleaned:
15921# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000015922$debug ||
15923{
Victor Stinnere0be4232011-10-25 13:06:09 +020015924 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015925 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020015926 : "${ac_tmp:=$tmp}"
15927 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015928' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000015929 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000015930}
Martin v. Löwis11437992002-04-12 09:54:03 +000015931# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000015932
Martin v. Löwis11437992002-04-12 09:54:03 +000015933{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015934 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020015935 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000015936} ||
15937{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015938 tmp=./conf$$-$RANDOM
15939 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015940} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020015941ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000015942
Matthias Kloseb9621712010-04-24 17:59:49 +000015943# Set up the scripts for CONFIG_FILES section.
15944# No need to generate them if there are no CONFIG_FILES.
15945# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015946if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015947
Matthias Kloseb9621712010-04-24 17:59:49 +000015948
15949ac_cr=`echo X | tr X '\015'`
15950# On cygwin, bash can eat \r inside `` if the user requested igncr.
15951# But we know of no other shell where ac_cr would be empty at this
15952# point, so we can use a bashism as a fallback.
15953if test "x$ac_cr" = x; then
15954 eval ac_cr=\$\'\\r\'
15955fi
15956ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
15957if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015958 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000015959else
15960 ac_cs_awk_cr=$ac_cr
15961fi
15962
Victor Stinnere0be4232011-10-25 13:06:09 +020015963echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000015964_ACEOF
15965
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015966
Matthias Kloseb9621712010-04-24 17:59:49 +000015967{
15968 echo "cat >conf$$subs.awk <<_ACEOF" &&
15969 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
15970 echo "_ACEOF"
15971} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015972 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15973ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015974ac_delim='%!_!# '
15975for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000015976 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015977 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015978
Matthias Kloseb9621712010-04-24 17:59:49 +000015979 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
15980 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015981 break
15982 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015983 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015984 else
15985 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000015986 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015987done
Matthias Kloseb9621712010-04-24 17:59:49 +000015988rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015989
Matthias Kloseb9621712010-04-24 17:59:49 +000015990cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020015991cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015992_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015993sed -n '
15994h
15995s/^/S["/; s/!.*/"]=/
15996p
15997g
15998s/^[^!]*!//
15999:repl
16000t repl
16001s/'"$ac_delim"'$//
16002t delim
16003:nl
16004h
16005s/\(.\{148\}\)..*/\1/
16006t more1
16007s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
16008p
16009n
16010b repl
16011:more1
16012s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16013p
16014g
16015s/.\{148\}//
16016t nl
16017:delim
16018h
16019s/\(.\{148\}\)..*/\1/
16020t more2
16021s/["\\]/\\&/g; s/^/"/; s/$/"/
16022p
16023b
16024:more2
16025s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16026p
16027g
16028s/.\{148\}//
16029t delim
16030' <conf$$subs.awk | sed '
16031/^[^""]/{
16032 N
16033 s/\n//
16034}
16035' >>$CONFIG_STATUS || ac_write_fail=1
16036rm -f conf$$subs.awk
16037cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16038_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020016039cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000016040 for (key in S) S_is_set[key] = 1
16041 FS = ""
16042
16043}
16044{
16045 line = $ 0
16046 nfields = split(line, field, "@")
16047 substed = 0
16048 len = length(field[1])
16049 for (i = 2; i < nfields; i++) {
16050 key = field[i]
16051 keylen = length(key)
16052 if (S_is_set[key]) {
16053 value = S[key]
16054 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
16055 len += length(value) + length(field[++i])
16056 substed = 1
16057 } else
16058 len += 1 + keylen
16059 }
16060
16061 print line
16062}
16063
16064_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016065_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016066cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16067if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
16068 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
16069else
16070 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020016071fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016072 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016073_ACEOF
16074
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016075# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
16076# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016077# trailing colons and then remove the whole line if VPATH becomes empty
16078# (actually we leave an empty line to preserve line numbers).
16079if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016080 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
16081h
16082s///
16083s/^/:/
16084s/[ ]*$/:/
16085s/:\$(srcdir):/:/g
16086s/:\${srcdir}:/:/g
16087s/:@srcdir@:/:/g
16088s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016089s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016090x
16091s/\(=[ ]*\).*/\1/
16092G
16093s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016094s/^[^=]*=[ ]*$//
16095}'
16096fi
16097
Matthias Kloseb9621712010-04-24 17:59:49 +000016098cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016099fi # test -n "$CONFIG_FILES"
16100
Matthias Kloseb9621712010-04-24 17:59:49 +000016101# Set up the scripts for CONFIG_HEADERS section.
16102# No need to generate them if there are no CONFIG_HEADERS.
16103# This happens for instance with `./config.status Makefile'.
16104if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016105cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016106BEGIN {
16107_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016108
Matthias Kloseb9621712010-04-24 17:59:49 +000016109# Transform confdefs.h into an awk script `defines.awk', embedded as
16110# here-document in config.status, that substitutes the proper values into
16111# config.h.in to produce config.h.
16112
16113# Create a delimiter string that does not exist in confdefs.h, to ease
16114# handling of long lines.
16115ac_delim='%!_!# '
16116for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020016117 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
16118 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016119 break
16120 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016121 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016122 else
16123 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16124 fi
16125done
16126
16127# For the awk script, D is an array of macro values keyed by name,
16128# likewise P contains macro parameters if any. Preserve backslash
16129# newline sequences.
16130
16131ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
16132sed -n '
16133s/.\{148\}/&'"$ac_delim"'/g
16134t rset
16135:rset
16136s/^[ ]*#[ ]*define[ ][ ]*/ /
16137t def
16138d
16139:def
16140s/\\$//
16141t bsnl
16142s/["\\]/\\&/g
16143s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16144D["\1"]=" \3"/p
16145s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
16146d
16147:bsnl
16148s/["\\]/\\&/g
16149s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16150D["\1"]=" \3\\\\\\n"\\/p
16151t cont
16152s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
16153t cont
16154d
16155:cont
16156n
16157s/.\{148\}/&'"$ac_delim"'/g
16158t clear
16159:clear
16160s/\\$//
16161t bsnlc
16162s/["\\]/\\&/g; s/^/"/; s/$/"/p
16163d
16164:bsnlc
16165s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
16166b cont
16167' <confdefs.h | sed '
16168s/'"$ac_delim"'/"\\\
16169"/g' >>$CONFIG_STATUS || ac_write_fail=1
16170
16171cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16172 for (key in D) D_is_set[key] = 1
16173 FS = ""
16174}
16175/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
16176 line = \$ 0
16177 split(line, arg, " ")
16178 if (arg[1] == "#") {
16179 defundef = arg[2]
16180 mac1 = arg[3]
16181 } else {
16182 defundef = substr(arg[1], 2)
16183 mac1 = arg[2]
16184 }
16185 split(mac1, mac2, "(") #)
16186 macro = mac2[1]
16187 prefix = substr(line, 1, index(line, defundef) - 1)
16188 if (D_is_set[macro]) {
16189 # Preserve the white space surrounding the "#".
16190 print prefix "define", macro P[macro] D[macro]
16191 next
16192 } else {
16193 # Replace #undef with comments. This is necessary, for example,
16194 # in the case of _POSIX_SOURCE, which is predefined and required
16195 # on some systems where configure will not decide to define it.
16196 if (defundef == "undef") {
16197 print "/*", prefix defundef, macro, "*/"
16198 next
16199 }
16200 }
16201}
16202{ print }
16203_ACAWK
16204_ACEOF
16205cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016206 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016207fi # test -n "$CONFIG_HEADERS"
16208
16209
16210eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
16211shift
16212for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016213do
16214 case $ac_tag in
16215 :[FHLC]) ac_mode=$ac_tag; continue;;
16216 esac
16217 case $ac_mode$ac_tag in
16218 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020016219 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016220 :[FH]-) ac_tag=-:-;;
16221 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
16222 esac
16223 ac_save_IFS=$IFS
16224 IFS=:
16225 set x $ac_tag
16226 IFS=$ac_save_IFS
16227 shift
16228 ac_file=$1
16229 shift
16230
16231 case $ac_mode in
16232 :L) ac_source=$1;;
16233 :[FH])
16234 ac_file_inputs=
16235 for ac_f
16236 do
16237 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020016238 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016239 *) # Look for the file first in the build tree, then in the source tree
16240 # (if the path is not absolute). The absolute path cannot be DOS-style,
16241 # because $ac_f cannot contain `:'.
16242 test -f "$ac_f" ||
16243 case $ac_f in
16244 [\\/$]*) false;;
16245 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
16246 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020016247 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016248 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000016249 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
16250 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016251 done
16252
16253 # Let's still pretend it is `configure' which instantiates (i.e., don't
16254 # use $as_me), people would be surprised to read:
16255 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000016256 configure_input='Generated from '`
16257 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
16258 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016259 if test x"$ac_file" != x-; then
16260 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000016261 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
16262$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016263 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016264 # Neutralize special characters interpreted by sed in replacement strings.
16265 case $configure_input in #(
16266 *\&* | *\|* | *\\* )
16267 ac_sed_conf_input=`$as_echo "$configure_input" |
16268 sed 's/[\\\\&|]/\\\\&/g'`;; #(
16269 *) ac_sed_conf_input=$configure_input;;
16270 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016271
16272 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020016273 *:-:* | *:-) cat >"$ac_tmp/stdin" \
16274 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016275 esac
16276 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016277 esac
16278
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016279 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000016280$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016281 X"$ac_file" : 'X\(//\)[^/]' \| \
16282 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016283 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016284$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016285 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16286 s//\1/
16287 q
16288 }
16289 /^X\(\/\/\)[^/].*/{
16290 s//\1/
16291 q
16292 }
16293 /^X\(\/\/\)$/{
16294 s//\1/
16295 q
16296 }
16297 /^X\(\/\).*/{
16298 s//\1/
16299 q
16300 }
16301 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000016302 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000016303 ac_builddir=.
16304
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016305case "$ac_dir" in
16306.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
16307*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016308 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016309 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000016310 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016311 case $ac_top_builddir_sub in
16312 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
16313 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
16314 esac ;;
16315esac
16316ac_abs_top_builddir=$ac_pwd
16317ac_abs_builddir=$ac_pwd$ac_dir_suffix
16318# for backward compatibility:
16319ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000016320
16321case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016322 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000016323 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016324 ac_top_srcdir=$ac_top_builddir_sub
16325 ac_abs_top_srcdir=$ac_pwd ;;
16326 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000016327 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016328 ac_top_srcdir=$srcdir
16329 ac_abs_top_srcdir=$srcdir ;;
16330 *) # Relative name.
16331 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
16332 ac_top_srcdir=$ac_top_build_prefix$srcdir
16333 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016334esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016335ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000016336
Martin v. Löwis11437992002-04-12 09:54:03 +000016337
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016338 case $ac_mode in
16339 :F)
16340 #
16341 # CONFIG_FILE
16342 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016343
16344 case $INSTALL in
16345 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016346 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016347 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010016348 ac_MKDIR_P=$MKDIR_P
16349 case $MKDIR_P in
16350 [\\/$]* | ?:[\\/]* ) ;;
16351 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
16352 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000016353_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016354
Matthias Kloseb9621712010-04-24 17:59:49 +000016355cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016356# If the template does not know about datarootdir, expand it.
16357# FIXME: This hack should be removed a few years after 2.60.
16358ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000016359ac_sed_dataroot='
16360/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016361 p
16362 q
16363}
16364/@datadir@/p
16365/@docdir@/p
16366/@infodir@/p
16367/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000016368/@mandir@/p'
16369case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016370*datarootdir*) ac_datarootdir_seen=yes;;
16371*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016372 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
16373$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016374_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016375cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016376 ac_datarootdir_hack='
16377 s&@datadir@&$datadir&g
16378 s&@docdir@&$docdir&g
16379 s&@infodir@&$infodir&g
16380 s&@localedir@&$localedir&g
16381 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000016382 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016383esac
16384_ACEOF
16385
16386# Neutralize VPATH when `$srcdir' = `.'.
16387# Shell code in configure.ac might set extrasub.
16388# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000016389cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16390ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000016391$extrasub
16392_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016393cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016394:t
16395/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000016396s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016397s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000016398s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016399s&@srcdir@&$ac_srcdir&;t t
16400s&@abs_srcdir@&$ac_abs_srcdir&;t t
16401s&@top_srcdir@&$ac_top_srcdir&;t t
16402s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
16403s&@builddir@&$ac_builddir&;t t
16404s&@abs_builddir@&$ac_abs_builddir&;t t
16405s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
16406s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010016407s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016408$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000016409"
Victor Stinnere0be4232011-10-25 13:06:09 +020016410eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
16411 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016412
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016413test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020016414 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
16415 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
16416 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000016417 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016418which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016419$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016420which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016421
Victor Stinnere0be4232011-10-25 13:06:09 +020016422 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000016423 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020016424 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
16425 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000016426 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016427 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016428 ;;
16429 :H)
16430 #
16431 # CONFIG_HEADER
16432 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016433 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016434 {
16435 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020016436 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
16437 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016438 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020016439 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016440 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
16441$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016442 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016443 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020016444 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016445 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016446 fi
16447 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016448 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020016449 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016450 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016451 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016452 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000016453
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016454
16455 esac
16456
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016457
16458 case $ac_file$ac_mode in
16459 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
16460
16461 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016462done # for ac_tag
16463
Guido van Rossum627b2d71993-12-24 10:39:16 +000016464
Matthias Kloseb9621712010-04-24 17:59:49 +000016465as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000016466_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016467ac_clean_files=$ac_clean_files_save
16468
Matthias Kloseb9621712010-04-24 17:59:49 +000016469test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016470 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016471
Martin v. Löwis11437992002-04-12 09:54:03 +000016472
16473# configure is writing to config.log, and then calls config.status.
16474# config.status does its own redirection, appending to config.log.
16475# Unfortunately, on DOS this fails, as config.log is still kept open
16476# by configure, so config.status won't be able to write to it; its
16477# output is simply discarded. So we exec the FD to /dev/null,
16478# effectively closing config.log, so it can be properly (re)opened and
16479# appended to by config.status. When coming back to configure, we
16480# need to make the FD available again.
16481if test "$no_create" != yes; then
16482 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000016483 ac_config_status_args=
16484 test "$silent" = yes &&
16485 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000016486 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000016487 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000016488 exec 5>>config.log
16489 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16490 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016491 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000016492fi
16493if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
16494 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
16495$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016496fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000016497
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016498
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000016499echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016500if test ! -f Modules/Setup
16501then
16502 cp $srcdir/Modules/Setup.dist Modules/Setup
16503fi
16504
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000016505echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016506if test ! -f Modules/Setup.local
16507then
16508 echo "# Edit this file for local setup changes" >Modules/Setup.local
16509fi
16510
16511echo "creating Makefile"
16512$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
16513 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000016514 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000016515mv config.c Modules