blob: 6be41f506c9a9f298bc5aa7208cb9c8b77ba93a7 [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 Lagerwall646eb1e2012-10-29 17:35:57 +00003# Generated by GNU Autoconf 2.69 for python 3.3.
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 Brandl3ebb6b32011-02-20 10:37:07 +0000583PACKAGE_VERSION='3.3'
584PACKAGE_STRING='python 3.3'
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@ubuntu.comd5537d02013-03-21 13:21:49 -0700628EXT_SUFFIX
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000629SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000630LIBC
631LIBM
632HAVE_GETHOSTBYNAME
633HAVE_GETHOSTBYNAME_R
634HAVE_GETHOSTBYNAME_R_3_ARG
635HAVE_GETHOSTBYNAME_R_5_ARG
636HAVE_GETHOSTBYNAME_R_6_ARG
637LIBOBJS
638TRUE
639MACHDEP_OBJS
640DYNLOADFILE
641DLINCLDIR
642THREADOBJ
643LDLAST
644USE_THREAD_MODULE
645SIGNAL_OBJS
646USE_SIGNAL_MODULE
Ned Deily65657c22013-10-25 00:34:44 -0700647TCLTK_LIBS
648TCLTK_INCLUDES
Matthias Kloseb9621712010-04-24 17:59:49 +0000649LIBFFI_INCLUDEDIR
650PKG_CONFIG
651SHLIBS
652CFLAGSFORSHARED
653LINKFORSHARED
654CCSHARED
655BLDSHARED
656LDCXXSHARED
657LDSHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700658SHLIB_SUFFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000659LIBTOOL_CRUFT
660OTHER_LIBTOOL_OPT
661UNIVERSAL_ARCH_FLAGS
662BASECFLAGS
663OPT
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000664ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000665LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100666MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000667INSTALL_DATA
668INSTALL_SCRIPT
669INSTALL_PROGRAM
Matthias Klosec4c48422012-10-21 23:05:35 +0200670PYTHON
671ASDLGEN
doko@ubuntu.com58844492012-06-30 18:25:32 +0200672ac_ct_READELF
673READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000674ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200675ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000676AR
677RANLIB
Daniel Stutzbacha606faa2010-08-31 19:51:07 +0000678USE_INLINE
Matthias Kloseb9621712010-04-24 17:59:49 +0000679GNULD
680LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000681LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000682RUNSHARED
683INSTSONAME
684LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000685PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000686BLDLIBRARY
687DLLLIBRARY
688LDLIBRARY
689LIBRARY
doko@python.org3e6e2ac2013-01-25 13:12:29 +0100690MULTIARCH
Matthias Kloseb9621712010-04-24 17:59:49 +0000691BUILDEXEEXT
692EGREP
693GREP
694CPP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200695NO_AS_NEEDED
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200696ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000697MAINCC
698CXX
699OBJEXT
700EXEEXT
701ac_ct_CC
702CPPFLAGS
703LDFLAGS
704CFLAGS
705CC
706EXPORT_MACOSX_DEPLOYMENT_TARGET
707CONFIGURE_MACOSX_DEPLOYMENT_TARGET
708SGI_ABI
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200709_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000710MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000711FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000712FRAMEWORKUNIXTOOLSPREFIX
713FRAMEWORKALTINSTALLLAST
714FRAMEWORKALTINSTALLFIRST
715FRAMEWORKINSTALLLAST
716FRAMEWORKINSTALLFIRST
717PYTHONFRAMEWORKINSTALLDIR
718PYTHONFRAMEWORKPREFIX
719PYTHONFRAMEWORKDIR
720PYTHONFRAMEWORKIDENTIFIER
721PYTHONFRAMEWORK
722LIPO_32BIT_FLAGS
723ARCH_RUN_32BIT
724UNIVERSALSDK
725CONFIG_ARGS
726SOVERSION
727VERSION
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200728PYTHON_FOR_BUILD
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100729host_os
730host_vendor
731host_cpu
732host
733build_os
734build_vendor
735build_cpu
736build
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -0500737HAS_HG
738HGBRANCH
739HGTAG
740HGVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400741BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000742target_alias
743host_alias
744build_alias
745LIBS
746ECHO_T
747ECHO_N
748ECHO_C
749DEFS
750mandir
751localedir
752libdir
753psdir
754pdfdir
755dvidir
756htmldir
757infodir
758docdir
759oldincludedir
760includedir
761localstatedir
762sharedstatedir
763sysconfdir
764datadir
765datarootdir
766libexecdir
767sbindir
768bindir
769program_transform_name
770prefix
771exec_prefix
772PACKAGE_URL
773PACKAGE_BUGREPORT
774PACKAGE_STRING
775PACKAGE_VERSION
776PACKAGE_TARNAME
777PACKAGE_NAME
778PATH_SEPARATOR
779SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000780ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000781ac_user_opts='
782enable_option_checking
783enable_universalsdk
784with_universal_archs
785with_framework_name
786enable_framework
787with_gcc
788with_cxx_main
789with_suffix
790enable_shared
791enable_profiling
792with_pydebug
793with_libs
794with_system_expat
795with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100796with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000797enable_loadable_sqlite_extensions
Ned Deily65657c22013-10-25 00:34:44 -0700798with_tcltk_includes
799with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000800with_dbmliborder
801with_signal_module
Matthias Kloseb9621712010-04-24 17:59:49 +0000802with_threads
803with_thread
804enable_ipv6
805with_doc_strings
806with_tsc
807with_pymalloc
808with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000809with_fpectl
810with_libm
811with_libc
812enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000813with_computed_gotos
814'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000815 ac_precious_vars='build_alias
816host_alias
817target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100818MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000819CC
820CFLAGS
821LDFLAGS
822LIBS
823CPPFLAGS
Charles-François Natali47413c12011-10-06 19:47:44 +0200824CPP'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000825
Guido van Rossum627b2d71993-12-24 10:39:16 +0000826
Guido van Rossum7f43da71994-08-01 12:15:30 +0000827# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000828ac_init_help=
829ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000830ac_unrecognized_opts=
831ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000832# The variables have the same names as the options, with
833# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000834cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000835exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000836no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000837no_recursion=
838prefix=NONE
839program_prefix=NONE
840program_suffix=NONE
841program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000842silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000843site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000844srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000845verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000846x_includes=NONE
847x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000848
849# Installation directory options.
850# These are left unexpanded so users can "make install exec_prefix=/foo"
851# and all the variables that are supposed to be based on exec_prefix
852# by default will actually change.
853# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000854# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000855bindir='${exec_prefix}/bin'
856sbindir='${exec_prefix}/sbin'
857libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000858datarootdir='${prefix}/share'
859datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000860sysconfdir='${prefix}/etc'
861sharedstatedir='${prefix}/com'
862localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000863includedir='${prefix}/include'
864oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000865docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
866infodir='${datarootdir}/info'
867htmldir='${docdir}'
868dvidir='${docdir}'
869pdfdir='${docdir}'
870psdir='${docdir}'
871libdir='${exec_prefix}/lib'
872localedir='${datarootdir}/locale'
873mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000874
Guido van Rossum7f43da71994-08-01 12:15:30 +0000875ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000876ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000877for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000878do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000879 # If the previous option needs an argument, assign it.
880 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000881 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000882 ac_prev=
883 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000884 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000885
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000886 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200887 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
888 *=) ac_optarg= ;;
889 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000890 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000891
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000892 # Accept the important Cygnus configure options, so we can diagnose typos.
893
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000894 case $ac_dashdash$ac_option in
895 --)
896 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000897
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000898 -bindir | --bindir | --bindi | --bind | --bin | --bi)
899 ac_prev=bindir ;;
900 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000901 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000902
903 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000904 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000905 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000906 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000907
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000908 -cache-file | --cache-file | --cache-fil | --cache-fi \
909 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
910 ac_prev=cache_file ;;
911 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
912 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000913 cache_file=$ac_optarg ;;
914
915 --config-cache | -C)
916 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000917
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000918 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000919 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000920 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000921 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000922
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000923 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
924 | --dataroo | --dataro | --datar)
925 ac_prev=datarootdir ;;
926 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
927 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
928 datarootdir=$ac_optarg ;;
929
Guido van Rossum7f43da71994-08-01 12:15:30 +0000930 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000931 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000932 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000933 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200934 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000935 ac_useropt_orig=$ac_useropt
936 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
937 case $ac_user_opts in
938 *"
939"enable_$ac_useropt"
940"*) ;;
941 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
942 ac_unrecognized_sep=', ';;
943 esac
944 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000945
946 -docdir | --docdir | --docdi | --doc | --do)
947 ac_prev=docdir ;;
948 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
949 docdir=$ac_optarg ;;
950
951 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
952 ac_prev=dvidir ;;
953 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
954 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000955
956 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000957 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000958 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000959 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200960 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000961 ac_useropt_orig=$ac_useropt
962 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
963 case $ac_user_opts in
964 *"
965"enable_$ac_useropt"
966"*) ;;
967 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
968 ac_unrecognized_sep=', ';;
969 esac
970 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000971
Guido van Rossum7f43da71994-08-01 12:15:30 +0000972 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
973 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
974 | --exec | --exe | --ex)
975 ac_prev=exec_prefix ;;
976 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
977 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
978 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000979 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000980
981 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000982 # Obsolete; use --with-gas.
983 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000984
Martin v. Löwis11437992002-04-12 09:54:03 +0000985 -help | --help | --hel | --he | -h)
986 ac_init_help=long ;;
987 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
988 ac_init_help=recursive ;;
989 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
990 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000991
992 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000993 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000994 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000995 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000996
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000997 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
998 ac_prev=htmldir ;;
999 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1000 | --ht=*)
1001 htmldir=$ac_optarg ;;
1002
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001003 -includedir | --includedir | --includedi | --included | --include \
1004 | --includ | --inclu | --incl | --inc)
1005 ac_prev=includedir ;;
1006 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1007 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001008 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001009
1010 -infodir | --infodir | --infodi | --infod | --info | --inf)
1011 ac_prev=infodir ;;
1012 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001013 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001014
1015 -libdir | --libdir | --libdi | --libd)
1016 ac_prev=libdir ;;
1017 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001018 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001019
1020 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1021 | --libexe | --libex | --libe)
1022 ac_prev=libexecdir ;;
1023 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1024 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001025 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001026
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001027 -localedir | --localedir | --localedi | --localed | --locale)
1028 ac_prev=localedir ;;
1029 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1030 localedir=$ac_optarg ;;
1031
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001032 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001033 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001034 ac_prev=localstatedir ;;
1035 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001036 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001037 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001038
1039 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1040 ac_prev=mandir ;;
1041 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001042 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001043
Guido van Rossum7f43da71994-08-01 12:15:30 +00001044 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001045 # Obsolete; use --without-fp.
1046 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001047
1048 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001049 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001050 no_create=yes ;;
1051
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001052 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1053 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1054 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001055
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001056 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1057 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1058 | --oldin | --oldi | --old | --ol | --o)
1059 ac_prev=oldincludedir ;;
1060 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1061 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1062 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001063 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001064
Guido van Rossum7f43da71994-08-01 12:15:30 +00001065 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1066 ac_prev=prefix ;;
1067 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001068 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001069
1070 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1071 | --program-pre | --program-pr | --program-p)
1072 ac_prev=program_prefix ;;
1073 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1074 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001075 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001076
1077 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1078 | --program-suf | --program-su | --program-s)
1079 ac_prev=program_suffix ;;
1080 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1081 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001082 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001083
1084 -program-transform-name | --program-transform-name \
1085 | --program-transform-nam | --program-transform-na \
1086 | --program-transform-n | --program-transform- \
1087 | --program-transform | --program-transfor \
1088 | --program-transfo | --program-transf \
1089 | --program-trans | --program-tran \
1090 | --progr-tra | --program-tr | --program-t)
1091 ac_prev=program_transform_name ;;
1092 -program-transform-name=* | --program-transform-name=* \
1093 | --program-transform-nam=* | --program-transform-na=* \
1094 | --program-transform-n=* | --program-transform-=* \
1095 | --program-transform=* | --program-transfor=* \
1096 | --program-transfo=* | --program-transf=* \
1097 | --program-trans=* | --program-tran=* \
1098 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001099 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001100
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001101 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1102 ac_prev=pdfdir ;;
1103 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1104 pdfdir=$ac_optarg ;;
1105
1106 -psdir | --psdir | --psdi | --psd | --ps)
1107 ac_prev=psdir ;;
1108 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1109 psdir=$ac_optarg ;;
1110
Guido van Rossum7f43da71994-08-01 12:15:30 +00001111 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1112 | -silent | --silent | --silen | --sile | --sil)
1113 silent=yes ;;
1114
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001115 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1116 ac_prev=sbindir ;;
1117 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1118 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001119 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001120
1121 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1122 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1123 | --sharedst | --shareds | --shared | --share | --shar \
1124 | --sha | --sh)
1125 ac_prev=sharedstatedir ;;
1126 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1127 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1128 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1129 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001130 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001131
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001132 -site | --site | --sit)
1133 ac_prev=site ;;
1134 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001135 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001136
Guido van Rossum7f43da71994-08-01 12:15:30 +00001137 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1138 ac_prev=srcdir ;;
1139 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001140 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001141
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001142 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1143 | --syscon | --sysco | --sysc | --sys | --sy)
1144 ac_prev=sysconfdir ;;
1145 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1146 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001147 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001148
Guido van Rossum7f43da71994-08-01 12:15:30 +00001149 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001150 ac_prev=target_alias ;;
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 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001153
1154 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1155 verbose=yes ;;
1156
Martin v. Löwis11437992002-04-12 09:54:03 +00001157 -version | --version | --versio | --versi | --vers | -V)
1158 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001159
1160 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001161 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001162 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001163 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001164 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001165 ac_useropt_orig=$ac_useropt
1166 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1167 case $ac_user_opts in
1168 *"
1169"with_$ac_useropt"
1170"*) ;;
1171 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1172 ac_unrecognized_sep=', ';;
1173 esac
1174 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001175
1176 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001177 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001178 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001179 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001180 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001181 ac_useropt_orig=$ac_useropt
1182 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1183 case $ac_user_opts in
1184 *"
1185"with_$ac_useropt"
1186"*) ;;
1187 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1188 ac_unrecognized_sep=', ';;
1189 esac
1190 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001191
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001192 --x)
1193 # Obsolete; use --with-x.
1194 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001195
1196 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1197 | --x-incl | --x-inc | --x-in | --x-i)
1198 ac_prev=x_includes ;;
1199 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1200 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001201 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001202
1203 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1204 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1205 ac_prev=x_libraries ;;
1206 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1207 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001208 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001209
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001210 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1211Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001212 ;;
1213
Martin v. Löwis11437992002-04-12 09:54:03 +00001214 *=*)
1215 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1216 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001217 case $ac_envvar in #(
1218 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001219 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001220 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001221 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001222 export $ac_envvar ;;
1223
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001224 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001225 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001226 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001227 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001228 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001229 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001230 ;;
1231
1232 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001233done
1234
Guido van Rossum7f43da71994-08-01 12:15:30 +00001235if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001236 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001237 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001238fi
1239
Matthias Kloseb9621712010-04-24 17:59:49 +00001240if test -n "$ac_unrecognized_opts"; then
1241 case $enable_option_checking in
1242 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001243 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001244 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1245 esac
1246fi
1247
1248# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001249for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1250 datadir sysconfdir sharedstatedir localstatedir includedir \
1251 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1252 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001253do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001254 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001255 # Remove trailing slashes.
1256 case $ac_val in
1257 */ )
1258 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1259 eval $ac_var=\$ac_val;;
1260 esac
1261 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001262 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001263 [\\/$]* | ?:[\\/]* ) continue;;
1264 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001265 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001266 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001267done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001268
Martin v. Löwis11437992002-04-12 09:54:03 +00001269# There might be people who depend on the old broken behavior: `$host'
1270# used to hold the argument of --host etc.
1271# FIXME: To remove some day.
1272build=$build_alias
1273host=$host_alias
1274target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001275
Martin v. Löwis11437992002-04-12 09:54:03 +00001276# FIXME: To remove some day.
1277if test "x$host_alias" != x; then
1278 if test "x$build_alias" = x; then
1279 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001280 elif test "x$build_alias" != "x$host_alias"; then
1281 cross_compiling=yes
1282 fi
1283fi
1284
1285ac_tool_prefix=
1286test -n "$host_alias" && ac_tool_prefix=$host_alias-
1287
1288test "$silent" = yes && exec 6>/dev/null
1289
Guido van Rossum627b2d71993-12-24 10:39:16 +00001290
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001291ac_pwd=`pwd` && test -n "$ac_pwd" &&
1292ac_ls_di=`ls -di .` &&
1293ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001294 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001295test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001296 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001297
1298
Guido van Rossum627b2d71993-12-24 10:39:16 +00001299# Find the source files, if location was not specified.
1300if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001301 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001302 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001303 ac_confdir=`$as_dirname -- "$as_myself" ||
1304$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1305 X"$as_myself" : 'X\(//\)[^/]' \| \
1306 X"$as_myself" : 'X\(//\)$' \| \
1307 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1308$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001309 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1310 s//\1/
1311 q
1312 }
1313 /^X\(\/\/\)[^/].*/{
1314 s//\1/
1315 q
1316 }
1317 /^X\(\/\/\)$/{
1318 s//\1/
1319 q
1320 }
1321 /^X\(\/\).*/{
1322 s//\1/
1323 q
1324 }
1325 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001326 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001327 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001328 srcdir=..
1329 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001330else
1331 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001332fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001333if test ! -r "$srcdir/$ac_unique_file"; then
1334 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001335 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001336fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001337ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1338ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001339 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001340 pwd)`
1341# When building in place, set srcdir=.
1342if test "$ac_abs_confdir" = "$ac_pwd"; then
1343 srcdir=.
1344fi
1345# Remove unnecessary trailing slashes from srcdir.
1346# Double slashes in file names in object file debugging info
1347# mess up M-x gdb in Emacs.
1348case $srcdir in
1349*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1350esac
1351for ac_var in $ac_precious_vars; do
1352 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1353 eval ac_env_${ac_var}_value=\$${ac_var}
1354 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1355 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1356done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001357
Martin v. Löwis11437992002-04-12 09:54:03 +00001358#
1359# Report the --help message.
1360#
1361if test "$ac_init_help" = "long"; then
1362 # Omit some internal or obsolete options to make the list less imposing.
1363 # This message is too long to be a string in the A/UX 3.1 sh.
1364 cat <<_ACEOF
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001365\`configure' configures python 3.3 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001366
1367Usage: $0 [OPTION]... [VAR=VALUE]...
1368
1369To assign environment variables (e.g., CC, CFLAGS...), specify them as
1370VAR=VALUE. See below for descriptions of some of the useful variables.
1371
1372Defaults for the options are specified in brackets.
1373
1374Configuration:
1375 -h, --help display this help and exit
1376 --help=short display options specific to this package
1377 --help=recursive display the short help of all the included packages
1378 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001379 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001380 --cache-file=FILE cache test results in FILE [disabled]
1381 -C, --config-cache alias for \`--cache-file=config.cache'
1382 -n, --no-create do not create output files
1383 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1384
Martin v. Löwis11437992002-04-12 09:54:03 +00001385Installation directories:
1386 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001387 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001388 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001389 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001390
1391By default, \`make install' will install all the files in
1392\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1393an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1394for instance \`--prefix=\$HOME'.
1395
1396For better control, use the options below.
1397
1398Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001399 --bindir=DIR user executables [EPREFIX/bin]
1400 --sbindir=DIR system admin executables [EPREFIX/sbin]
1401 --libexecdir=DIR program executables [EPREFIX/libexec]
1402 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1403 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1404 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1405 --libdir=DIR object code libraries [EPREFIX/lib]
1406 --includedir=DIR C header files [PREFIX/include]
1407 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1408 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1409 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1410 --infodir=DIR info documentation [DATAROOTDIR/info]
1411 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1412 --mandir=DIR man documentation [DATAROOTDIR/man]
1413 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1414 --htmldir=DIR html documentation [DOCDIR]
1415 --dvidir=DIR dvi documentation [DOCDIR]
1416 --pdfdir=DIR pdf documentation [DOCDIR]
1417 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001418_ACEOF
1419
1420 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001421
1422System types:
1423 --build=BUILD configure for building on BUILD [guessed]
1424 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001425_ACEOF
1426fi
1427
1428if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001429 case $ac_init_help in
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001430 short | recursive ) echo "Configuration of python 3.3:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001431 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001432 cat <<\_ACEOF
1433
1434Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001435 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001436 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1437 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001438 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001439 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001440 --enable-framework[=INSTALLDIR]
1441 Build (MacOSX|Darwin) framework
1442 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001443 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001444 --enable-loadable-sqlite-extensions
1445 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001446 --enable-ipv6 Enable ipv6 (with ipv4) support
1447 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001448 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001449 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001450
1451Optional Packages:
1452 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1453 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001454 --with-universal-archs=ARCH
1455 select architectures for universal build ("32-bit",
Ronald Oussoren3c064c12009-09-08 07:12:42 +00001456 "64-bit", "3-way", "intel" or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001457 --with-framework-name=FRAMEWORK
1458 specify an alternate name of the framework built
1459 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001460 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001461 --with-cxx-main=<compiler>
1462 compile main() and link python executable with C++
1463 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001464 --with-suffix=.exe set executable suffix
1465 --with-pydebug build with Py_DEBUG defined
1466 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001467 --with-system-expat build pyexpat module using an installed expat
1468 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001469 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001470 --with-system-libmpdec build _decimal module using an installed libmpdec
1471 library
Ned Deily65657c22013-10-25 00:34:44 -07001472 --with-tcltk-includes='-I...'
1473 override search for Tcl and Tk include files
1474 --with-tcltk-libs='-L...'
1475 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001476 --with-dbmliborder=db1:db2:...
1477 order to check db backends for dbm. Valid value is a
1478 colon separated string with the backend names
1479 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001480 --with-signal-module disable/enable signal module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001481 --with(out)-threads[=DIRECTORY]
1482 disable/enable thread support
1483 --with(out)-thread[=DIRECTORY]
1484 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001485 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001486 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001487 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001488 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001489 --with-fpectl enable SIGFPE catching
1490 --with-libm=STRING math library
1491 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001492 --with(out)-computed-gotos
1493 Use computed gotos in evaluation loop (enabled by
1494 default on supported compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001495
1496Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001497 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001498 CC C compiler command
1499 CFLAGS C compiler flags
1500 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1501 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001502 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001503 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001504 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001505 CPP C preprocessor
1506
1507Use these variables to override the choices made by `configure' or to help
1508it to find libraries and programs with nonstandard names/locations.
1509
Georg Brandle2e15612009-05-20 18:25:10 +00001510Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001511_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001512ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001513fi
1514
1515if test "$ac_init_help" = "recursive"; then
1516 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001517 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001518 test -d "$ac_dir" ||
1519 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1520 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001521 ac_builddir=.
1522
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001523case "$ac_dir" in
1524.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1525*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001526 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001527 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001528 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001529 case $ac_top_builddir_sub in
1530 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1531 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1532 esac ;;
1533esac
1534ac_abs_top_builddir=$ac_pwd
1535ac_abs_builddir=$ac_pwd$ac_dir_suffix
1536# for backward compatibility:
1537ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001538
1539case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001540 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001541 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001542 ac_top_srcdir=$ac_top_builddir_sub
1543 ac_abs_top_srcdir=$ac_pwd ;;
1544 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001545 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001546 ac_top_srcdir=$srcdir
1547 ac_abs_top_srcdir=$srcdir ;;
1548 *) # Relative name.
1549 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1550 ac_top_srcdir=$ac_top_build_prefix$srcdir
1551 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001552esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001553ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001554
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001555 cd "$ac_dir" || { ac_status=$?; continue; }
1556 # Check for guested configure.
1557 if test -f "$ac_srcdir/configure.gnu"; then
1558 echo &&
1559 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1560 elif test -f "$ac_srcdir/configure"; then
1561 echo &&
1562 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001563 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001564 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001565 fi || ac_status=$?
1566 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001567 done
1568fi
1569
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001570test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001571if $ac_init_version; then
1572 cat <<\_ACEOF
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001573python configure 3.3
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001574generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001575
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001576Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001577This configure script is free software; the Free Software Foundation
1578gives unlimited permission to copy, distribute and modify it.
1579_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001580 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001581fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001582
1583## ------------------------ ##
1584## Autoconf initialization. ##
1585## ------------------------ ##
1586
1587# ac_fn_c_try_compile LINENO
1588# --------------------------
1589# Try to compile conftest.$ac_ext, and return whether this succeeded.
1590ac_fn_c_try_compile ()
1591{
1592 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1593 rm -f conftest.$ac_objext
1594 if { { ac_try="$ac_compile"
1595case "(($ac_try" in
1596 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1597 *) ac_try_echo=$ac_try;;
1598esac
1599eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1600$as_echo "$ac_try_echo"; } >&5
1601 (eval "$ac_compile") 2>conftest.err
1602 ac_status=$?
1603 if test -s conftest.err; then
1604 grep -v '^ *+' conftest.err >conftest.er1
1605 cat conftest.er1 >&5
1606 mv -f conftest.er1 conftest.err
1607 fi
1608 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1609 test $ac_status = 0; } && {
1610 test -z "$ac_c_werror_flag" ||
1611 test ! -s conftest.err
1612 } && test -s conftest.$ac_objext; then :
1613 ac_retval=0
1614else
1615 $as_echo "$as_me: failed program was:" >&5
1616sed 's/^/| /' conftest.$ac_ext >&5
1617
1618 ac_retval=1
1619fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001620 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001621 as_fn_set_status $ac_retval
1622
1623} # ac_fn_c_try_compile
1624
Matthias Kloseb9621712010-04-24 17:59:49 +00001625# ac_fn_c_try_link LINENO
1626# -----------------------
1627# Try to link conftest.$ac_ext, and return whether this succeeded.
1628ac_fn_c_try_link ()
1629{
1630 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1631 rm -f conftest.$ac_objext conftest$ac_exeext
1632 if { { ac_try="$ac_link"
1633case "(($ac_try" in
1634 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1635 *) ac_try_echo=$ac_try;;
1636esac
1637eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1638$as_echo "$ac_try_echo"; } >&5
1639 (eval "$ac_link") 2>conftest.err
1640 ac_status=$?
1641 if test -s conftest.err; then
1642 grep -v '^ *+' conftest.err >conftest.er1
1643 cat conftest.er1 >&5
1644 mv -f conftest.er1 conftest.err
1645 fi
1646 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1647 test $ac_status = 0; } && {
1648 test -z "$ac_c_werror_flag" ||
1649 test ! -s conftest.err
1650 } && test -s conftest$ac_exeext && {
1651 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001652 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001653 }; then :
1654 ac_retval=0
1655else
1656 $as_echo "$as_me: failed program was:" >&5
1657sed 's/^/| /' conftest.$ac_ext >&5
1658
1659 ac_retval=1
1660fi
1661 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1662 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1663 # interfere with the next link command; also delete a directory that is
1664 # left behind by Apple's compiler. We do this before executing the actions.
1665 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001666 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001667 as_fn_set_status $ac_retval
1668
1669} # ac_fn_c_try_link
1670
Matthias Kloseb9621712010-04-24 17:59:49 +00001671# ac_fn_c_try_cpp LINENO
1672# ----------------------
1673# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1674ac_fn_c_try_cpp ()
1675{
1676 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1677 if { { ac_try="$ac_cpp conftest.$ac_ext"
1678case "(($ac_try" in
1679 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1680 *) ac_try_echo=$ac_try;;
1681esac
1682eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1683$as_echo "$ac_try_echo"; } >&5
1684 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1685 ac_status=$?
1686 if test -s conftest.err; then
1687 grep -v '^ *+' conftest.err >conftest.er1
1688 cat conftest.er1 >&5
1689 mv -f conftest.er1 conftest.err
1690 fi
1691 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001692 test $ac_status = 0; } > conftest.i && {
Matthias Kloseb9621712010-04-24 17:59:49 +00001693 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1694 test ! -s conftest.err
1695 }; then :
1696 ac_retval=0
1697else
1698 $as_echo "$as_me: failed program was:" >&5
1699sed 's/^/| /' conftest.$ac_ext >&5
1700
1701 ac_retval=1
1702fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001703 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001704 as_fn_set_status $ac_retval
1705
1706} # ac_fn_c_try_cpp
1707
1708# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1709# -------------------------------------------------------
1710# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1711# the include files in INCLUDES and setting the cache variable VAR
1712# accordingly.
1713ac_fn_c_check_header_mongrel ()
1714{
1715 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001716 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001717 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1718$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001719if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001720 $as_echo_n "(cached) " >&6
1721fi
1722eval ac_res=\$$3
1723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1724$as_echo "$ac_res" >&6; }
1725else
1726 # Is the header compilable?
1727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1728$as_echo_n "checking $2 usability... " >&6; }
1729cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1730/* end confdefs.h. */
1731$4
1732#include <$2>
1733_ACEOF
1734if ac_fn_c_try_compile "$LINENO"; then :
1735 ac_header_compiler=yes
1736else
1737 ac_header_compiler=no
1738fi
1739rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1740{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1741$as_echo "$ac_header_compiler" >&6; }
1742
1743# Is the header present?
1744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1745$as_echo_n "checking $2 presence... " >&6; }
1746cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1747/* end confdefs.h. */
1748#include <$2>
1749_ACEOF
1750if ac_fn_c_try_cpp "$LINENO"; then :
1751 ac_header_preproc=yes
1752else
1753 ac_header_preproc=no
1754fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001755rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001756{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1757$as_echo "$ac_header_preproc" >&6; }
1758
1759# So? What about this header?
1760case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1761 yes:no: )
1762 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1763$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1764 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1765$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1766 ;;
1767 no:yes:* )
1768 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1769$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1770 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1771$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1772 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1773$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1774 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1775$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1776 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1777$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001778( $as_echo "## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001779## Report this to http://bugs.python.org/ ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001780## -------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001781 ) | sed "s/^/$as_me: WARNING: /" >&2
1782 ;;
1783esac
1784 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1785$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001786if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001787 $as_echo_n "(cached) " >&6
1788else
1789 eval "$3=\$ac_header_compiler"
1790fi
1791eval ac_res=\$$3
1792 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1793$as_echo "$ac_res" >&6; }
1794fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001795 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001796
1797} # ac_fn_c_check_header_mongrel
1798
1799# ac_fn_c_try_run LINENO
1800# ----------------------
1801# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1802# that executables *can* be run.
1803ac_fn_c_try_run ()
1804{
1805 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1806 if { { ac_try="$ac_link"
1807case "(($ac_try" in
1808 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1809 *) ac_try_echo=$ac_try;;
1810esac
1811eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1812$as_echo "$ac_try_echo"; } >&5
1813 (eval "$ac_link") 2>&5
1814 ac_status=$?
1815 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1816 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1817 { { case "(($ac_try" in
1818 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1819 *) ac_try_echo=$ac_try;;
1820esac
1821eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1822$as_echo "$ac_try_echo"; } >&5
1823 (eval "$ac_try") 2>&5
1824 ac_status=$?
1825 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1826 test $ac_status = 0; }; }; then :
1827 ac_retval=0
1828else
1829 $as_echo "$as_me: program exited with status $ac_status" >&5
1830 $as_echo "$as_me: failed program was:" >&5
1831sed 's/^/| /' conftest.$ac_ext >&5
1832
1833 ac_retval=$ac_status
1834fi
1835 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001836 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001837 as_fn_set_status $ac_retval
1838
1839} # ac_fn_c_try_run
1840
1841# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1842# -------------------------------------------------------
1843# Tests whether HEADER exists and can be compiled using the include files in
1844# INCLUDES, setting the cache variable VAR accordingly.
1845ac_fn_c_check_header_compile ()
1846{
1847 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1848 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1849$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001850if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001851 $as_echo_n "(cached) " >&6
1852else
1853 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1854/* end confdefs.h. */
1855$4
1856#include <$2>
1857_ACEOF
1858if ac_fn_c_try_compile "$LINENO"; then :
1859 eval "$3=yes"
1860else
1861 eval "$3=no"
1862fi
1863rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1864fi
1865eval ac_res=\$$3
1866 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1867$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001868 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001869
1870} # ac_fn_c_check_header_compile
1871
Matthias Kloseb9621712010-04-24 17:59:49 +00001872# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1873# -------------------------------------------
1874# Tests whether TYPE exists after having included INCLUDES, setting cache
1875# variable VAR accordingly.
1876ac_fn_c_check_type ()
1877{
1878 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1879 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1880$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001881if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001882 $as_echo_n "(cached) " >&6
1883else
1884 eval "$3=no"
1885 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1886/* end confdefs.h. */
1887$4
1888int
1889main ()
1890{
1891if (sizeof ($2))
1892 return 0;
1893 ;
1894 return 0;
1895}
1896_ACEOF
1897if ac_fn_c_try_compile "$LINENO"; then :
1898 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1899/* end confdefs.h. */
1900$4
1901int
1902main ()
1903{
1904if (sizeof (($2)))
1905 return 0;
1906 ;
1907 return 0;
1908}
1909_ACEOF
1910if ac_fn_c_try_compile "$LINENO"; then :
1911
1912else
1913 eval "$3=yes"
1914fi
1915rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1916fi
1917rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1918fi
1919eval ac_res=\$$3
1920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1921$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001922 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001923
1924} # ac_fn_c_check_type
1925
1926# ac_fn_c_find_uintX_t LINENO BITS VAR
1927# ------------------------------------
1928# Finds an unsigned integer type with width BITS, setting cache variable VAR
1929# accordingly.
1930ac_fn_c_find_uintX_t ()
1931{
1932 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1933 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1934$as_echo_n "checking for uint$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001935if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001936 $as_echo_n "(cached) " >&6
1937else
1938 eval "$3=no"
1939 # Order is important - never check a type that is potentially smaller
1940 # than half of the expected target width.
1941 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1942 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1943 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1944/* end confdefs.h. */
1945$ac_includes_default
1946int
1947main ()
1948{
1949static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001950test_array [0] = 0;
1951return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00001952
1953 ;
1954 return 0;
1955}
1956_ACEOF
1957if ac_fn_c_try_compile "$LINENO"; then :
1958 case $ac_type in #(
1959 uint$2_t) :
1960 eval "$3=yes" ;; #(
1961 *) :
1962 eval "$3=\$ac_type" ;;
1963esac
1964fi
1965rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001966 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001967
1968else
1969 break
1970fi
1971 done
1972fi
1973eval ac_res=\$$3
1974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1975$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001976 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001977
1978} # ac_fn_c_find_uintX_t
1979
1980# ac_fn_c_find_intX_t LINENO BITS VAR
1981# -----------------------------------
1982# Finds a signed integer type with width BITS, setting cache variable VAR
1983# accordingly.
1984ac_fn_c_find_intX_t ()
1985{
1986 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1987 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1988$as_echo_n "checking for int$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001989if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001990 $as_echo_n "(cached) " >&6
1991else
1992 eval "$3=no"
1993 # Order is important - never check a type that is potentially smaller
1994 # than half of the expected target width.
1995 for ac_type in int$2_t 'int' 'long int' \
1996 'long long int' 'short int' 'signed char'; do
1997 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1998/* end confdefs.h. */
1999$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002000 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00002001int
2002main ()
2003{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002004static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002005test_array [0] = 0;
2006return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002007
2008 ;
2009 return 0;
2010}
2011_ACEOF
2012if ac_fn_c_try_compile "$LINENO"; then :
2013 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2014/* end confdefs.h. */
2015$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002016 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00002017int
2018main ()
2019{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002020static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00002021 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002022test_array [0] = 0;
2023return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002024
2025 ;
2026 return 0;
2027}
2028_ACEOF
2029if ac_fn_c_try_compile "$LINENO"; then :
2030
2031else
2032 case $ac_type in #(
2033 int$2_t) :
2034 eval "$3=yes" ;; #(
2035 *) :
2036 eval "$3=\$ac_type" ;;
2037esac
2038fi
2039rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2040fi
2041rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002042 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002043
2044else
2045 break
2046fi
2047 done
2048fi
2049eval ac_res=\$$3
2050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2051$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002052 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002053
2054} # ac_fn_c_find_intX_t
2055
2056# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2057# --------------------------------------------
2058# Tries to find the compile-time value of EXPR in a program that includes
2059# INCLUDES, setting VAR accordingly. Returns whether the value could be
2060# computed
2061ac_fn_c_compute_int ()
2062{
2063 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2064 if test "$cross_compiling" = yes; then
2065 # Depending upon the size, compute the lo and hi bounds.
2066cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2067/* end confdefs.h. */
2068$4
2069int
2070main ()
2071{
2072static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002073test_array [0] = 0;
2074return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002075
2076 ;
2077 return 0;
2078}
2079_ACEOF
2080if ac_fn_c_try_compile "$LINENO"; then :
2081 ac_lo=0 ac_mid=0
2082 while :; do
2083 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2084/* end confdefs.h. */
2085$4
2086int
2087main ()
2088{
2089static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002090test_array [0] = 0;
2091return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002092
2093 ;
2094 return 0;
2095}
2096_ACEOF
2097if ac_fn_c_try_compile "$LINENO"; then :
2098 ac_hi=$ac_mid; break
2099else
2100 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2101 if test $ac_lo -le $ac_mid; then
2102 ac_lo= ac_hi=
2103 break
2104 fi
2105 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2106fi
2107rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2108 done
2109else
2110 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2111/* end confdefs.h. */
2112$4
2113int
2114main ()
2115{
2116static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002117test_array [0] = 0;
2118return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002119
2120 ;
2121 return 0;
2122}
2123_ACEOF
2124if ac_fn_c_try_compile "$LINENO"; then :
2125 ac_hi=-1 ac_mid=-1
2126 while :; do
2127 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2128/* end confdefs.h. */
2129$4
2130int
2131main ()
2132{
2133static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002134test_array [0] = 0;
2135return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002136
2137 ;
2138 return 0;
2139}
2140_ACEOF
2141if ac_fn_c_try_compile "$LINENO"; then :
2142 ac_lo=$ac_mid; break
2143else
2144 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2145 if test $ac_mid -le $ac_hi; then
2146 ac_lo= ac_hi=
2147 break
2148 fi
2149 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2150fi
2151rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2152 done
2153else
2154 ac_lo= ac_hi=
2155fi
2156rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2157fi
2158rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2159# Binary search between lo and hi bounds.
2160while test "x$ac_lo" != "x$ac_hi"; do
2161 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2162 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2163/* end confdefs.h. */
2164$4
2165int
2166main ()
2167{
2168static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002169test_array [0] = 0;
2170return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002171
2172 ;
2173 return 0;
2174}
2175_ACEOF
2176if ac_fn_c_try_compile "$LINENO"; then :
2177 ac_hi=$ac_mid
2178else
2179 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2180fi
2181rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2182done
2183case $ac_lo in #((
2184?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2185'') ac_retval=1 ;;
2186esac
2187 else
2188 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2189/* end confdefs.h. */
2190$4
2191static long int longval () { return $2; }
2192static unsigned long int ulongval () { return $2; }
2193#include <stdio.h>
2194#include <stdlib.h>
2195int
2196main ()
2197{
2198
2199 FILE *f = fopen ("conftest.val", "w");
2200 if (! f)
2201 return 1;
2202 if (($2) < 0)
2203 {
2204 long int i = longval ();
2205 if (i != ($2))
2206 return 1;
2207 fprintf (f, "%ld", i);
2208 }
2209 else
2210 {
2211 unsigned long int i = ulongval ();
2212 if (i != ($2))
2213 return 1;
2214 fprintf (f, "%lu", i);
2215 }
2216 /* Do not output a trailing newline, as this causes \r\n confusion
2217 on some platforms. */
2218 return ferror (f) || fclose (f) != 0;
2219
2220 ;
2221 return 0;
2222}
2223_ACEOF
2224if ac_fn_c_try_run "$LINENO"; then :
2225 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2226else
2227 ac_retval=1
2228fi
2229rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2230 conftest.$ac_objext conftest.beam conftest.$ac_ext
2231rm -f conftest.val
2232
2233 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002234 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002235 as_fn_set_status $ac_retval
2236
2237} # ac_fn_c_compute_int
2238
2239# ac_fn_c_check_func LINENO FUNC VAR
2240# ----------------------------------
2241# Tests whether FUNC exists, setting the cache variable VAR accordingly
2242ac_fn_c_check_func ()
2243{
2244 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2245 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2246$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002247if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002248 $as_echo_n "(cached) " >&6
2249else
2250 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2251/* end confdefs.h. */
2252/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2253 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2254#define $2 innocuous_$2
2255
2256/* System header to define __stub macros and hopefully few prototypes,
2257 which can conflict with char $2 (); below.
2258 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2259 <limits.h> exists even on freestanding compilers. */
2260
2261#ifdef __STDC__
2262# include <limits.h>
2263#else
2264# include <assert.h>
2265#endif
2266
2267#undef $2
2268
2269/* Override any GCC internal prototype to avoid an error.
2270 Use char because int might match the return type of a GCC
2271 builtin and then its argument prototype would still apply. */
2272#ifdef __cplusplus
2273extern "C"
2274#endif
2275char $2 ();
2276/* The GNU C library defines this for functions which it implements
2277 to always fail with ENOSYS. Some functions are actually named
2278 something starting with __ and the normal name is an alias. */
2279#if defined __stub_$2 || defined __stub___$2
2280choke me
2281#endif
2282
2283int
2284main ()
2285{
2286return $2 ();
2287 ;
2288 return 0;
2289}
2290_ACEOF
2291if ac_fn_c_try_link "$LINENO"; then :
2292 eval "$3=yes"
2293else
2294 eval "$3=no"
2295fi
2296rm -f core conftest.err conftest.$ac_objext \
2297 conftest$ac_exeext conftest.$ac_ext
2298fi
2299eval ac_res=\$$3
2300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2301$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002302 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002303
2304} # ac_fn_c_check_func
2305
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002306# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2307# ---------------------------------------------
2308# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2309# accordingly.
2310ac_fn_c_check_decl ()
2311{
2312 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2313 as_decl_name=`echo $2|sed 's/ *(.*//'`
2314 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2315 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2316$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2317if eval \${$3+:} false; then :
2318 $as_echo_n "(cached) " >&6
2319else
2320 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2321/* end confdefs.h. */
2322$4
2323int
2324main ()
2325{
2326#ifndef $as_decl_name
2327#ifdef __cplusplus
2328 (void) $as_decl_use;
2329#else
2330 (void) $as_decl_name;
2331#endif
2332#endif
2333
2334 ;
2335 return 0;
2336}
2337_ACEOF
2338if ac_fn_c_try_compile "$LINENO"; then :
2339 eval "$3=yes"
2340else
2341 eval "$3=no"
2342fi
2343rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2344fi
2345eval ac_res=\$$3
2346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2347$as_echo "$ac_res" >&6; }
2348 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2349
2350} # ac_fn_c_check_decl
2351
Matthias Kloseb9621712010-04-24 17:59:49 +00002352# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2353# ----------------------------------------------------
2354# Tries to find if the field MEMBER exists in type AGGR, after including
2355# INCLUDES, setting cache variable VAR accordingly.
2356ac_fn_c_check_member ()
2357{
2358 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2359 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2360$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002361if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002362 $as_echo_n "(cached) " >&6
2363else
2364 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2365/* end confdefs.h. */
2366$5
2367int
2368main ()
2369{
2370static $2 ac_aggr;
2371if (ac_aggr.$3)
2372return 0;
2373 ;
2374 return 0;
2375}
2376_ACEOF
2377if ac_fn_c_try_compile "$LINENO"; then :
2378 eval "$4=yes"
2379else
2380 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2381/* end confdefs.h. */
2382$5
2383int
2384main ()
2385{
2386static $2 ac_aggr;
2387if (sizeof ac_aggr.$3)
2388return 0;
2389 ;
2390 return 0;
2391}
2392_ACEOF
2393if ac_fn_c_try_compile "$LINENO"; then :
2394 eval "$4=yes"
2395else
2396 eval "$4=no"
2397fi
2398rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2399fi
2400rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2401fi
2402eval ac_res=\$$4
2403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2404$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002405 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002406
2407} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002408cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002409This file contains any messages produced by compilers while
2410running configure, to aid debugging if configure makes a mistake.
2411
Georg Brandl3ebb6b32011-02-20 10:37:07 +00002412It was created by python $as_me 3.3, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002413generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002414
2415 $ $0 $@
2416
2417_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002418exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002419{
2420cat <<_ASUNAME
2421## --------- ##
2422## Platform. ##
2423## --------- ##
2424
2425hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2426uname -m = `(uname -m) 2>/dev/null || echo unknown`
2427uname -r = `(uname -r) 2>/dev/null || echo unknown`
2428uname -s = `(uname -s) 2>/dev/null || echo unknown`
2429uname -v = `(uname -v) 2>/dev/null || echo unknown`
2430
2431/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2432/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2433
2434/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2435/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2436/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002437/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002438/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2439/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2440/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2441
2442_ASUNAME
2443
2444as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2445for as_dir in $PATH
2446do
2447 IFS=$as_save_IFS
2448 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002449 $as_echo "PATH: $as_dir"
2450 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002451IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002452
2453} >&5
2454
2455cat >&5 <<_ACEOF
2456
2457
2458## ----------- ##
2459## Core tests. ##
2460## ----------- ##
2461
2462_ACEOF
2463
2464
2465# Keep a trace of the command line.
2466# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002467# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002468# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002469# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002470ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002471ac_configure_args0=
2472ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002473ac_must_keep_next=false
2474for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002475do
Skip Montanaro6dead952003-09-25 14:50:04 +00002476 for ac_arg
2477 do
2478 case $ac_arg in
2479 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2480 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2481 | -silent | --silent | --silen | --sile | --sil)
2482 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002483 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002484 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002485 esac
2486 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002487 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002488 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002489 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002490 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002491 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002492 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002493 case $ac_arg in
2494 *=* | --config-cache | -C | -disable-* | --disable-* \
2495 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2496 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2497 | -with-* | --with-* | -without-* | --without-* | --x)
2498 case "$ac_configure_args0 " in
2499 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2500 esac
2501 ;;
2502 -* ) ac_must_keep_next=true ;;
2503 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002504 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002505 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002506 ;;
2507 esac
2508 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002509done
Matthias Kloseb9621712010-04-24 17:59:49 +00002510{ ac_configure_args0=; unset ac_configure_args0;}
2511{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002512
2513# When interrupted or exit'd, cleanup temporary files, and complete
2514# config.log. We remove comments because anyway the quotes in there
2515# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002516# WARNING: Use '\'' to represent an apostrophe within the trap.
2517# 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 +00002518trap 'exit_status=$?
2519 # Save into config.log some information that might help in debugging.
2520 {
2521 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002522
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002523 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002524## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002525## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002526 echo
2527 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002528(
2529 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2530 eval ac_val=\$$ac_var
2531 case $ac_val in #(
2532 *${as_nl}*)
2533 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002534 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2535$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002536 esac
2537 case $ac_var in #(
2538 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002539 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2540 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002541 esac ;;
2542 esac
2543 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002544 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002545 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2546 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002547 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002548 "s/'\''/'\''\\\\'\'''\''/g;
2549 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2550 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002551 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002552 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002553 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002554 esac |
2555 sort
2556)
Martin v. Löwis11437992002-04-12 09:54:03 +00002557 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002558
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002559 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002560## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002561## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002562 echo
2563 for ac_var in $ac_subst_vars
2564 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002565 eval ac_val=\$$ac_var
2566 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002567 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002568 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002569 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002570 done | sort
2571 echo
2572
2573 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002574 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002575## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002576## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002577 echo
2578 for ac_var in $ac_subst_files
2579 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002580 eval ac_val=\$$ac_var
2581 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002582 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002583 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002584 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002585 done | sort
2586 echo
2587 fi
2588
Martin v. Löwis11437992002-04-12 09:54:03 +00002589 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002590 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002591## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002592## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002593 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002594 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002595 echo
2596 fi
2597 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002598 $as_echo "$as_me: caught signal $ac_signal"
2599 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002600 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002601 rm -f core *.core core.conftest.* &&
2602 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002603 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002604' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002605for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002606 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002607done
2608ac_signal=0
2609
2610# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002611rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002612
Matthias Kloseb9621712010-04-24 17:59:49 +00002613$as_echo "/* confdefs.h */" > confdefs.h
2614
Martin v. Löwis11437992002-04-12 09:54:03 +00002615# Predefined preprocessor variables.
2616
2617cat >>confdefs.h <<_ACEOF
2618#define PACKAGE_NAME "$PACKAGE_NAME"
2619_ACEOF
2620
Martin v. Löwis11437992002-04-12 09:54:03 +00002621cat >>confdefs.h <<_ACEOF
2622#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2623_ACEOF
2624
Martin v. Löwis11437992002-04-12 09:54:03 +00002625cat >>confdefs.h <<_ACEOF
2626#define PACKAGE_VERSION "$PACKAGE_VERSION"
2627_ACEOF
2628
Martin v. Löwis11437992002-04-12 09:54:03 +00002629cat >>confdefs.h <<_ACEOF
2630#define PACKAGE_STRING "$PACKAGE_STRING"
2631_ACEOF
2632
Martin v. Löwis11437992002-04-12 09:54:03 +00002633cat >>confdefs.h <<_ACEOF
2634#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2635_ACEOF
2636
Matthias Kloseb9621712010-04-24 17:59:49 +00002637cat >>confdefs.h <<_ACEOF
2638#define PACKAGE_URL "$PACKAGE_URL"
2639_ACEOF
2640
Martin v. Löwis11437992002-04-12 09:54:03 +00002641
2642# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002643# Prefer an explicitly selected file to automatically selected ones.
2644ac_site_file1=NONE
2645ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002646if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002647 # We do not want a PATH search for config.site.
2648 case $CONFIG_SITE in #((
2649 -*) ac_site_file1=./$CONFIG_SITE;;
2650 */*) ac_site_file1=$CONFIG_SITE;;
2651 *) ac_site_file1=./$CONFIG_SITE;;
2652 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002653elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002654 ac_site_file1=$prefix/share/config.site
2655 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002656else
Matthias Kloseb9621712010-04-24 17:59:49 +00002657 ac_site_file1=$ac_default_prefix/share/config.site
2658 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002659fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002660for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002661do
Matthias Kloseb9621712010-04-24 17:59:49 +00002662 test "x$ac_site_file" = xNONE && continue
2663 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2664 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2665$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002666 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002667 . "$ac_site_file" \
2668 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2669$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2670as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002671See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002672 fi
2673done
2674
2675if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002676 # Some versions of bash will fail to source /dev/null (special files
2677 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2678 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2679 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2680$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002681 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002682 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2683 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002684 esac
2685 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002686else
Matthias Kloseb9621712010-04-24 17:59:49 +00002687 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2688$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002689 >$cache_file
2690fi
2691
2692# Check that the precious variables saved in the cache have kept the same
2693# value.
2694ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002695for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002696 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2697 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002698 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2699 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002700 case $ac_old_set,$ac_new_set in
2701 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002702 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2703$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 +00002704 ac_cache_corrupted=: ;;
2705 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002706 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2707$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002708 ac_cache_corrupted=: ;;
2709 ,);;
2710 *)
2711 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002712 # differences in whitespace do not lead to failure.
2713 ac_old_val_w=`echo x $ac_old_val`
2714 ac_new_val_w=`echo x $ac_new_val`
2715 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2716 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2717$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2718 ac_cache_corrupted=:
2719 else
2720 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2721$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2722 eval $ac_var=\$ac_old_val
2723 fi
2724 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2725$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2726 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2727$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002728 fi;;
2729 esac
2730 # Pass precious variables to config.status.
2731 if test "$ac_new_set" = set; then
2732 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002733 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002734 *) ac_arg=$ac_var=$ac_new_val ;;
2735 esac
2736 case " $ac_configure_args " in
2737 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002738 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002739 esac
2740 fi
2741done
2742if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002743 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2744$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2745 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2746$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002747 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002748fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002749## -------------------- ##
2750## Main body of script. ##
2751## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002752
Guido van Rossum7f43da71994-08-01 12:15:30 +00002753ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002754ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002755ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2756ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2757ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002758
Guido van Rossum627b2d71993-12-24 10:39:16 +00002759
Michael W. Hudson54241132001-12-07 15:38:26 +00002760
Trent Nelson4d4ec652012-10-16 08:51:24 -04002761
Trent Nelson5595ab52012-10-17 04:47:31 -04002762if test "$abs_srcdir" != "$abs_builddir"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002763 # If we're building out-of-tree, we need to make sure the following
2764 # resources get picked up before their $srcdir counterparts.
2765 # Objects/ -> typeslots.inc
2766 # Include/ -> Python-ast.h, graminit.h
2767 # Python/ -> importlib.h
2768 # (A side effect of this is that these resources will automatically be
2769 # regenerated when building out-of-tree, regardless of whether or not
2770 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2771 # off.)
2772 BASECPPFLAGS="-IObjects -IInclude -IPython"
2773else
2774 BASECPPFLAGS=""
2775fi
2776
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002777
2778
2779
2780
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002781if test -e $srcdir/.hg/dirstate
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002782then
2783# Extract the first word of "hg", so it can be a program name with args.
2784set dummy hg; ac_word=$2
2785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2786$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002787if ${ac_cv_prog_HAS_HG+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002788 $as_echo_n "(cached) " >&6
2789else
2790 if test -n "$HAS_HG"; then
2791 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
2792else
2793as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2794for as_dir in $PATH
2795do
2796 IFS=$as_save_IFS
2797 test -z "$as_dir" && as_dir=.
2798 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002799 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002800 ac_cv_prog_HAS_HG="found"
2801 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2802 break 2
2803 fi
2804done
2805 done
2806IFS=$as_save_IFS
2807
2808 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
2809fi
2810fi
2811HAS_HG=$ac_cv_prog_HAS_HG
2812if test -n "$HAS_HG"; then
2813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
2814$as_echo "$HAS_HG" >&6; }
2815else
2816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2817$as_echo "no" >&6; }
2818fi
2819
2820
2821else
2822HAS_HG=no-repository
2823fi
2824if test $HAS_HG = found
2825then
2826 HGVERSION="hg id -i \$(srcdir)"
2827 HGTAG="hg id -t \$(srcdir)"
2828 HGBRANCH="hg id -b \$(srcdir)"
2829else
2830 HGVERSION=""
2831 HGTAG=""
2832 HGBRANCH=""
2833fi
2834
2835
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002836ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002837
2838
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002839ac_aux_dir=
2840for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2841 if test -f "$ac_dir/install-sh"; then
2842 ac_aux_dir=$ac_dir
2843 ac_install_sh="$ac_aux_dir/install-sh -c"
2844 break
2845 elif test -f "$ac_dir/install.sh"; then
2846 ac_aux_dir=$ac_dir
2847 ac_install_sh="$ac_aux_dir/install.sh -c"
2848 break
2849 elif test -f "$ac_dir/shtool"; then
2850 ac_aux_dir=$ac_dir
2851 ac_install_sh="$ac_aux_dir/shtool install -c"
2852 break
2853 fi
2854done
2855if test -z "$ac_aux_dir"; then
2856 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2857fi
2858
2859# These three variables are undocumented and unsupported,
2860# and are intended to be withdrawn in a future Autoconf release.
2861# They can cause serious problems if a builder's source tree is in a directory
2862# whose full name contains unusual characters.
2863ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2864ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2865ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2866
2867
2868# Make sure we can run config.sub.
2869$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2870 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2871
2872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2873$as_echo_n "checking build system type... " >&6; }
2874if ${ac_cv_build+:} false; then :
2875 $as_echo_n "(cached) " >&6
2876else
2877 ac_build_alias=$build_alias
2878test "x$ac_build_alias" = x &&
2879 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2880test "x$ac_build_alias" = x &&
2881 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2882ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2883 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2884
2885fi
2886{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2887$as_echo "$ac_cv_build" >&6; }
2888case $ac_cv_build in
2889*-*-*) ;;
2890*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2891esac
2892build=$ac_cv_build
2893ac_save_IFS=$IFS; IFS='-'
2894set x $ac_cv_build
2895shift
2896build_cpu=$1
2897build_vendor=$2
2898shift; shift
2899# Remember, the first character of IFS is used to create $*,
2900# except with old shells:
2901build_os=$*
2902IFS=$ac_save_IFS
2903case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2904
2905
2906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2907$as_echo_n "checking host system type... " >&6; }
2908if ${ac_cv_host+:} false; then :
2909 $as_echo_n "(cached) " >&6
2910else
2911 if test "x$host_alias" = x; then
2912 ac_cv_host=$ac_cv_build
2913else
2914 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2915 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2916fi
2917
2918fi
2919{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2920$as_echo "$ac_cv_host" >&6; }
2921case $ac_cv_host in
2922*-*-*) ;;
2923*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2924esac
2925host=$ac_cv_host
2926ac_save_IFS=$IFS; IFS='-'
2927set x $ac_cv_host
2928shift
2929host_cpu=$1
2930host_vendor=$2
2931shift; shift
2932# Remember, the first character of IFS is used to create $*,
2933# except with old shells:
2934host_os=$*
2935IFS=$ac_save_IFS
2936case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2937
2938
2939
doko@python.orga10e4a92013-01-25 18:45:12 +01002940
2941
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002942if test "$cross_compiling" = yes; then
2943 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2944$as_echo_n "checking for python interpreter for cross build... " >&6; }
2945 if test -z "$PYTHON_FOR_BUILD"; then
2946 for interp in python$PACKAGE_VERSION python3 python; do
2947 which $interp >/dev/null 2>&1 || continue
2948 if $interp -c 'import sys;sys.exit(not sys.version_info[:2] >= (3,3))'; then
2949 break
2950 fi
2951 interp=
2952 done
2953 if test x$interp = x; then
2954 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2955 fi
2956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2957$as_echo "$interp" >&6; }
doko@python.org244b6872013-01-26 12:08:25 +01002958 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 +02002959 fi
Christian Heimes954ac032012-12-12 13:10:21 +01002960elif test "$cross_compiling" = maybe; then
2961 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002962else
2963 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2964fi
2965
2966
Martin v. Löwis11437992002-04-12 09:54:03 +00002967
Benjamin Petersond23f8222009-04-05 19:13:16 +00002968if test "$prefix" != "/"; then
2969 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2970fi
2971
2972
Martin v. Löwis11437992002-04-12 09:54:03 +00002973
2974
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002975# We don't use PACKAGE_ variables, and they cause conflicts
2976# with other autoconf-based packages that include Python.h
2977grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2978rm confdefs.h
2979mv confdefs.h.new confdefs.h
2980
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002981
Georg Brandl3ebb6b32011-02-20 10:37:07 +00002982VERSION=3.3
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002983
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002984# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002985
2986SOVERSION=1.0
2987
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002988# The later defininition of _XOPEN_SOURCE disables certain features
2989# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2990
Matthias Kloseb9621712010-04-24 17:59:49 +00002991$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002992
2993
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002994# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2995# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2996# them.
2997
Matthias Kloseb9621712010-04-24 17:59:49 +00002998$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002999
3000
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003001# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3002# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
3003# them.
3004
Matthias Kloseb9621712010-04-24 17:59:49 +00003005$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003006
3007
Martin v. Löwisd6320502004-08-12 13:45:08 +00003008# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3009# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
3010
Matthias Kloseb9621712010-04-24 17:59:49 +00003011$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00003012
3013
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003014# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3015# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
3016# them.
3017
Matthias Kloseb9621712010-04-24 17:59:49 +00003018$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003019
3020
3021
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003022define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003023
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003024# Arguments passed to configure.
3025
3026CONFIG_ARGS="$ac_configure_args"
3027
Matthias Kloseb9621712010-04-24 17:59:49 +00003028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3029$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003030# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003031if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003032 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003033 case $enableval in
3034 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07003035 # Locate the best usable SDK, see Mac/README.txt for more
3036 # information
3037 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
3038 if test -z "${enableval}"
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003039 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003040 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3041 if test ! -d "${enableval}"
3042 then
3043 enableval=/
3044 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003045 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003046 ;;
3047 esac
3048 case $enableval in
3049 no)
3050 UNIVERSALSDK=
3051 enable_universalsdk=
3052 ;;
3053 *)
3054 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003055 if test ! -d "${UNIVERSALSDK}"
3056 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003057 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003058 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003059 ;;
3060 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003061
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003062
Thomas Wouters477c8d52006-05-27 19:21:47 +00003063else
3064
3065 UNIVERSALSDK=
3066 enable_universalsdk=
3067
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003068fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003069
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003070if test -n "${UNIVERSALSDK}"
3071then
Matthias Kloseb9621712010-04-24 17:59:49 +00003072 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3073$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003074else
Matthias Kloseb9621712010-04-24 17:59:49 +00003075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3076$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003077fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003078
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003079
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003080
3081
Ned Deilycbfb9a52012-06-23 16:02:19 -07003082# For backward compatibility reasons we prefer to select '32-bit' if available,
3083# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003084UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003085if test "`uname -s`" = "Darwin"
3086then
3087 if test -n "${UNIVERSALSDK}"
3088 then
3089 if test -z "`/usr/bin/file "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
3090 then
3091 UNIVERSAL_ARCHS="intel"
3092 fi
3093 fi
3094fi
3095
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003096
Matthias Kloseb9621712010-04-24 17:59:49 +00003097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3098$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003099
3100# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003101if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003102 withval=$with_universal_archs;
Matthias Kloseb9621712010-04-24 17:59:49 +00003103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
3104$as_echo "$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003105 UNIVERSAL_ARCHS="$withval"
3106
3107else
3108
Ned Deilycbfb9a52012-06-23 16:02:19 -07003109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3110$as_echo "${UNIVERSAL_ARCHS}" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003111
3112fi
3113
3114
3115
3116
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003117
3118# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003119if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003120 withval=$with_framework_name;
3121 PYTHONFRAMEWORK=${withval}
3122 PYTHONFRAMEWORKDIR=${withval}.framework
3123 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3124
3125else
3126
3127 PYTHONFRAMEWORK=Python
3128 PYTHONFRAMEWORKDIR=Python.framework
3129 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3130
3131fi
3132
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003133# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003134if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003135 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003136 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003137 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003138 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003139 esac
3140 case $enableval in
3141 no)
3142 PYTHONFRAMEWORK=
3143 PYTHONFRAMEWORKDIR=no-framework
3144 PYTHONFRAMEWORKPREFIX=
3145 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003146 FRAMEWORKINSTALLFIRST=
3147 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003148 FRAMEWORKALTINSTALLFIRST=
3149 FRAMEWORKALTINSTALLLAST=
3150 if test "x${prefix}" = "xNONE"; then
3151 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3152 else
3153 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3154 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003155 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003156 ;;
3157 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003158 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003159 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003160 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003161 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003162 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3163 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003164 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003165
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003166 if test "x${prefix}" = "xNONE" ; then
3167 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003168
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003169 else
3170 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3171 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003172
3173 case "${enableval}" in
3174 /System*)
3175 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3176 if test "${prefix}" = "NONE" ; then
3177 # See below
3178 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3179 fi
3180 ;;
3181
3182 /Library*)
3183 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3184 ;;
3185
3186 */Library/Frameworks)
3187 MDIR="`dirname "${enableval}"`"
3188 MDIR="`dirname "${MDIR}"`"
3189 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3190
3191 if test "${prefix}" = "NONE"; then
3192 # User hasn't specified the
3193 # --prefix option, but wants to install
3194 # the framework in a non-default location,
3195 # ensure that the compatibility links get
3196 # installed relative to that prefix as well
3197 # instead of in /usr/local.
3198 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3199 fi
3200 ;;
3201
3202 *)
3203 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3204 ;;
3205 esac
3206
Jack Jansen127e56e2001-09-11 14:41:54 +00003207 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003208
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003209 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003210 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003211 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003212
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003213 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003214
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003215 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3216
3217 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3218
Jack Jansene578a632001-08-15 01:27:14 +00003219 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003220
Guido van Rossum563e7081996-09-10 18:20:48 +00003221else
Martin v. Löwis11437992002-04-12 09:54:03 +00003222
Jack Jansene578a632001-08-15 01:27:14 +00003223 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003224 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003225 PYTHONFRAMEWORKPREFIX=
3226 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003227 FRAMEWORKINSTALLFIRST=
3228 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003229 FRAMEWORKALTINSTALLFIRST=
3230 FRAMEWORKALTINSTALLLAST=
3231 if test "x${prefix}" = "xNONE" ; then
3232 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3233 else
3234 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3235 fi
Jack Jansene578a632001-08-15 01:27:14 +00003236 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003237
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003238
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003239fi
3240
Thomas Wouters477c8d52006-05-27 19:21:47 +00003241
3242
Michael W. Hudson54241132001-12-07 15:38:26 +00003243
3244
3245
3246
Jack Jansene578a632001-08-15 01:27:14 +00003247
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003248
3249
3250
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003251
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003252
Jack Jansene578a632001-08-15 01:27:14 +00003253##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003254## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003255## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003256##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003257# Set name for machine-dependent library files
3258
Matthias Kloseb9621712010-04-24 17:59:49 +00003259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3260$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003261if test -z "$MACHDEP"
3262then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003263 # avoid using uname for cross builds
3264 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003265 # ac_sys_system and ac_sys_release are used for setting
3266 # a lot of different things including 'define_xopen_source'
3267 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003268 case "$host" in
3269 *-*-linux*)
3270 ac_sys_system=Linux
3271 ;;
3272 *-*-cygwin*)
3273 ac_sys_system=Cygwin
3274 ;;
3275 *)
3276 # for now, limit cross builds to known configurations
3277 MACHDEP="unknown"
3278 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3279 esac
3280 ac_sys_release=
3281 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003282 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003283 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003284 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003285 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003286 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003287 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003288 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003289 fi
3290 ac_md_system=`echo $ac_sys_system |
3291 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3292 ac_md_release=`echo $ac_sys_release |
3293 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3294 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003295
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003296 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003297 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003298 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003299 darwin*) MACHDEP="darwin";;
doko@ubuntu.comba015832012-06-30 16:52:05 +02003300 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003301 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003302 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003303fi
Guido van Rossum91922671997-10-09 20:24:13 +00003304
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003305
3306if test "$cross_compiling" = yes; then
3307 case "$host" in
3308 *-*-linux*)
3309 case "$host_cpu" in
3310 arm*)
3311 _host_cpu=arm
3312 ;;
3313 *)
3314 _host_cpu=$host_cpu
3315 esac
3316 ;;
3317 *-*-cygwin*)
3318 _host_cpu=
3319 ;;
3320 *)
3321 # for now, limit cross builds to known configurations
3322 MACHDEP="unknown"
3323 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3324 esac
3325 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3326fi
3327
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003328# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3329# disable features if it is defined, without any means to access these
3330# features as extensions. For these systems, we skip the definition of
3331# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3332# some feature, make sure there is no alternative way to access this
3333# feature. Also, when using wildcards, make sure you have verified the
3334# need for not defining _XOPEN_SOURCE on all systems matching the
3335# wildcard, and that the wildcard does not include future systems
3336# (which may remove their limitations).
3337case $ac_sys_system/$ac_sys_release in
3338 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3339 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003340 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003341 # In addition, Stefan Krah confirms that issue #1244610 exists through
3342 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003343 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003344 define_xopen_source=no
3345 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3346 # also defined. This can be overridden by defining _BSD_SOURCE
3347 # As this has a different meaning on Linux, only define it on OpenBSD
3348
Matthias Kloseb9621712010-04-24 17:59:49 +00003349$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003350
3351 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003352 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003353 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3354 # also defined. This can be overridden by defining _BSD_SOURCE
3355 # As this has a different meaning on Linux, only define it on OpenBSD
3356
Matthias Kloseb9621712010-04-24 17:59:49 +00003357$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003358
3359 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003360 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3361 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3362 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003363 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 +00003364 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003365 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3366 # request to enable features supported by the standard as a request
3367 # to disable features not supported by the standard. The best way
3368 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3369 # entirely and define __EXTENSIONS__ instead.
3370 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003371 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003372 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3373 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003374 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003375 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003376 define_xopen_source=no;;
3377 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003378 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003379 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003380 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003381 # On FreeBSD 4, the math functions C89 does not cover are never defined
3382 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3383 FreeBSD/4.*)
3384 define_xopen_source=no;;
3385 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3386 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3387 # identifies itself as Darwin/7.*
3388 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3389 # disables platform specific features beyond repair.
3390 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3391 # has no effect, don't bother defining them
3392 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003393 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003394 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003395 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003396 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3397 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3398 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003399 AIX/4)
3400 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003401 AIX/5)
3402 if test `uname -r` -eq 1; then
3403 define_xopen_source=no
3404 fi
3405 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003406 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3407 # defining NI_NUMERICHOST.
3408 QNX/6.3.2)
3409 define_xopen_source=no
3410 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003411
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003412esac
3413
3414if test $define_xopen_source = yes
3415then
Victor Stinner14d098d2011-09-07 22:29:43 +02003416 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003417
Victor Stinner14d098d2011-09-07 22:29:43 +02003418$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003419
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003420
3421 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3422 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3423 # several APIs are not declared. Since this is also needed in some
3424 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003425
Matthias Kloseb9621712010-04-24 17:59:49 +00003426$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003427
3428
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003429
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003430$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003431
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003432fi
3433
Guido van Rossum91922671997-10-09 20:24:13 +00003434#
3435# SGI compilers allow the specification of the both the ABI and the
3436# ISA on the command line. Depending on the values of these switches,
3437# different and often incompatable code will be generated.
3438#
3439# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3440# thus supply support for various ABI/ISA combinations. The MACHDEP
3441# variable is also adjusted.
3442#
3443
3444if test ! -z "$SGI_ABI"
3445then
3446 CC="cc $SGI_ABI"
3447 LDFLAGS="$SGI_ABI $LDFLAGS"
3448 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3449fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003450{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3451$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003452
Jack Jansen6b08a402004-06-03 12:41:45 +00003453# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3454# it may influence the way we can build extensions, so distutils
3455# needs to check it
3456
Thomas Wouters477c8d52006-05-27 19:21:47 +00003457
Jack Jansen6b08a402004-06-03 12:41:45 +00003458CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003459EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003460
Guido van Rossum627b2d71993-12-24 10:39:16 +00003461# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003462
3463# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3464# for debug/optimization stuff. BASECFLAGS is for flags that are required
3465# just to get things to compile and link. Users are free to override OPT
3466# when running configure or make. The build should not break if they do.
3467# BASECFLAGS should generally not be messed with, however.
3468
3469# XXX shouldn't some/most/all of this code be merged with the stuff later
3470# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3472$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003473
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003474# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003475if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003476 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003477 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003478 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003479 without_gcc=yes;;
3480 yes) CC=gcc
3481 without_gcc=no;;
3482 *) CC=$withval
3483 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003484 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003485else
Martin v. Löwis11437992002-04-12 09:54:03 +00003486
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003487 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003488 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003489 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003490 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003491 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003492fi
3493
Matthias Kloseb9621712010-04-24 17:59:49 +00003494{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3495$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003496
Guido van Rossum8b131c51995-03-09 14:10:13 +00003497# If the user switches compilers, we can't believe the cache
3498if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3499then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003500 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003501(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003502fi
3503
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003504# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3505# when the compiler supports them, but we don't always want -O2, and
3506# we set -g later.
3507if test -z "$CFLAGS"; then
3508 CFLAGS=
3509fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003510
3511if test "$ac_sys_system" = "Darwin"
3512then
3513 # Compiler selection on MacOSX is more complicated than
3514 # AC_PROG_CC can handle, see Mac/README.txt for more
3515 # information
3516 if test -z "${CC}"
3517 then
3518 found_gcc=
3519 found_clang=
3520 as_save_IFS=$IFS; IFS=:
3521 for as_dir in $PATH
3522 do
3523 IFS=$as_save_IFS
3524 if test -x $as_dir/gcc; then
3525 if test -z "${found_gcc}"; then
3526 found_gcc=$as_dir/gcc
3527 fi
3528 fi
3529 if test -x $as_dir/clang; then
3530 if test -z "${found_clang}"; then
3531 found_clang=$as_dir/clang
3532 fi
3533 fi
3534 done
3535 IFS=$as_save_IFS
3536
3537 if test -n "$found_gcc" -a -n "$found_clang"
3538 then
3539 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3540 then
3541 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3542$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3543 CC="$found_clang"
3544 CXX="$found_clang++"
3545 fi
3546
3547
3548 elif test -z "$found_gcc" -a -n "$found_clang"
3549 then
3550 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3551$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3552 CC="$found_clang"
3553 CXX="$found_clang++"
3554
3555 elif test -z "$found_gcc" -a -z "$found_clang"
3556 then
3557 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3558 if test -n "${found_clang}"
3559 then
3560 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3561$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3562 CC="${found_clang}"
3563 CXX="`/usr/bin/xcrun -find clang++`"
3564
3565 # else: use default behaviour
3566 fi
3567 fi
3568 fi
3569fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003570ac_ext=c
3571ac_cpp='$CPP $CPPFLAGS'
3572ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3573ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3574ac_compiler_gnu=$ac_cv_c_compiler_gnu
3575if test -n "$ac_tool_prefix"; then
3576 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3577set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3579$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003580if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003581 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003582else
3583 if test -n "$CC"; then
3584 ac_cv_prog_CC="$CC" # Let the user override the test.
3585else
Martin v. Löwis11437992002-04-12 09:54:03 +00003586as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3587for as_dir in $PATH
3588do
3589 IFS=$as_save_IFS
3590 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003591 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003592 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003593 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003594 $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 +00003595 break 2
3596 fi
3597done
Matthias Kloseb9621712010-04-24 17:59:49 +00003598 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003599IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003600
Jack Jansendd19cf82001-12-06 22:36:17 +00003601fi
3602fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003603CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003604if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3606$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003607else
Matthias Kloseb9621712010-04-24 17:59:49 +00003608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3609$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003610fi
3611
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003612
Martin v. Löwis11437992002-04-12 09:54:03 +00003613fi
3614if test -z "$ac_cv_prog_CC"; then
3615 ac_ct_CC=$CC
3616 # Extract the first word of "gcc", so it can be a program name with args.
3617set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3619$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003620if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003621 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003622else
3623 if test -n "$ac_ct_CC"; then
3624 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3625else
3626as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3627for as_dir in $PATH
3628do
3629 IFS=$as_save_IFS
3630 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003631 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003632 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003633 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003634 $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 +00003635 break 2
3636 fi
3637done
Matthias Kloseb9621712010-04-24 17:59:49 +00003638 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003639IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003640
3641fi
3642fi
3643ac_ct_CC=$ac_cv_prog_ac_ct_CC
3644if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3646$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003647else
Matthias Kloseb9621712010-04-24 17:59:49 +00003648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3649$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003650fi
3651
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003652 if test "x$ac_ct_CC" = x; then
3653 CC=""
3654 else
3655 case $cross_compiling:$ac_tool_warned in
3656yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003657{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3658$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003659ac_tool_warned=yes ;;
3660esac
3661 CC=$ac_ct_CC
3662 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003663else
3664 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003665fi
3666
Jack Jansendd19cf82001-12-06 22:36:17 +00003667if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003668 if test -n "$ac_tool_prefix"; then
3669 # 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 +00003670set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3672$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003673if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003674 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003675else
3676 if test -n "$CC"; then
3677 ac_cv_prog_CC="$CC" # Let the user override the test.
3678else
Martin v. Löwis11437992002-04-12 09:54:03 +00003679as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3680for as_dir in $PATH
3681do
3682 IFS=$as_save_IFS
3683 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003684 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003685 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003686 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003687 $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 +00003688 break 2
3689 fi
3690done
Matthias Kloseb9621712010-04-24 17:59:49 +00003691 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003692IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003693
3694fi
3695fi
3696CC=$ac_cv_prog_CC
3697if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3699$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003700else
Matthias Kloseb9621712010-04-24 17:59:49 +00003701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3702$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003703fi
3704
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003705
Martin v. Löwis11437992002-04-12 09:54:03 +00003706 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003707fi
3708if test -z "$CC"; then
3709 # Extract the first word of "cc", so it can be a program name with args.
3710set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3712$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003713if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003714 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003715else
3716 if test -n "$CC"; then
3717 ac_cv_prog_CC="$CC" # Let the user override the test.
3718else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003719 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003720as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3721for as_dir in $PATH
3722do
3723 IFS=$as_save_IFS
3724 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003725 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003726 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003727 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3728 ac_prog_rejected=yes
3729 continue
3730 fi
3731 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003732 $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 +00003733 break 2
3734 fi
3735done
Matthias Kloseb9621712010-04-24 17:59:49 +00003736 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003737IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003738
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003739if test $ac_prog_rejected = yes; then
3740 # We found a bogon in the path, so make sure we never use it.
3741 set dummy $ac_cv_prog_CC
3742 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003743 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003744 # We chose a different compiler from the bogus one.
3745 # However, it has the same basename, so the bogon will be chosen
3746 # first if we set CC to just the basename; use the full file name.
3747 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003748 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003749 fi
3750fi
3751fi
3752fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003753CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003754if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3756$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003757else
Matthias Kloseb9621712010-04-24 17:59:49 +00003758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3759$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003760fi
3761
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003762
Martin v. Löwis11437992002-04-12 09:54:03 +00003763fi
3764if test -z "$CC"; then
3765 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003766 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003767 do
3768 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3769set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3771$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003772if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003773 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003774else
3775 if test -n "$CC"; then
3776 ac_cv_prog_CC="$CC" # Let the user override the test.
3777else
Martin v. Löwis11437992002-04-12 09:54:03 +00003778as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3779for as_dir in $PATH
3780do
3781 IFS=$as_save_IFS
3782 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003783 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003784 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003785 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003786 $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 +00003787 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003788 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003789done
Matthias Kloseb9621712010-04-24 17:59:49 +00003790 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003791IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003792
3793fi
3794fi
3795CC=$ac_cv_prog_CC
3796if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3798$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003799else
Matthias Kloseb9621712010-04-24 17:59:49 +00003800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3801$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003802fi
3803
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003804
Martin v. Löwis11437992002-04-12 09:54:03 +00003805 test -n "$CC" && break
3806 done
3807fi
3808if test -z "$CC"; then
3809 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003810 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003811do
3812 # Extract the first word of "$ac_prog", so it can be a program name with args.
3813set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3815$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003816if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003817 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003818else
3819 if test -n "$ac_ct_CC"; then
3820 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3821else
3822as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3823for as_dir in $PATH
3824do
3825 IFS=$as_save_IFS
3826 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003827 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003828 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003829 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003830 $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 +00003831 break 2
3832 fi
3833done
Matthias Kloseb9621712010-04-24 17:59:49 +00003834 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003835IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003836
Martin v. Löwis11437992002-04-12 09:54:03 +00003837fi
3838fi
3839ac_ct_CC=$ac_cv_prog_ac_ct_CC
3840if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003841 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3842$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003843else
Matthias Kloseb9621712010-04-24 17:59:49 +00003844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3845$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003846fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003847
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003848
Martin v. Löwis11437992002-04-12 09:54:03 +00003849 test -n "$ac_ct_CC" && break
3850done
Michael W. Hudson54241132001-12-07 15:38:26 +00003851
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003852 if test "x$ac_ct_CC" = x; then
3853 CC=""
3854 else
3855 case $cross_compiling:$ac_tool_warned in
3856yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003857{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3858$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003859ac_tool_warned=yes ;;
3860esac
3861 CC=$ac_ct_CC
3862 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003863fi
3864
3865fi
3866
3867
Matthias Kloseb9621712010-04-24 17:59:49 +00003868test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3869$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003870as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003871See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003872
3873# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003874$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3875set X $ac_compile
3876ac_compiler=$2
3877for ac_option in --version -v -V -qversion; do
3878 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003879case "(($ac_try" in
3880 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3881 *) ac_try_echo=$ac_try;;
3882esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003883eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3884$as_echo "$ac_try_echo"; } >&5
3885 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003886 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003887 if test -s conftest.err; then
3888 sed '10a\
3889... rest of stderr output deleted ...
3890 10q' conftest.err >conftest.er1
3891 cat conftest.er1 >&5
3892 fi
3893 rm -f conftest.er1 conftest.err
3894 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3895 test $ac_status = 0; }
3896done
Martin v. Löwis11437992002-04-12 09:54:03 +00003897
Matthias Kloseb9621712010-04-24 17:59:49 +00003898cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003899/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003900
Martin v. Löwis11437992002-04-12 09:54:03 +00003901int
3902main ()
3903{
3904
3905 ;
3906 return 0;
3907}
3908_ACEOF
3909ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003910ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003911# Try to create an executable without -o first, disregard a.out.
3912# It will help us diagnose broken compilers, and finding out an intuition
3913# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3915$as_echo_n "checking whether the C compiler works... " >&6; }
3916ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3917
3918# The possible output files:
3919ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3920
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003921ac_rmfiles=
3922for ac_file in $ac_files
3923do
3924 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003925 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003926 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3927 esac
3928done
3929rm -f $ac_rmfiles
3930
Matthias Kloseb9621712010-04-24 17:59:49 +00003931if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003932case "(($ac_try" in
3933 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3934 *) ac_try_echo=$ac_try;;
3935esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003936eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3937$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003938 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003939 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003940 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3941 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003942 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3943# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3944# in a Makefile. We should not override ac_cv_exeext if it was cached,
3945# so that the user can short-circuit this test for compilers unknown to
3946# Autoconf.
3947for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003948do
3949 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003950 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003951 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003952 ;;
3953 [ab].out )
3954 # We found the default executable, but exeext='' is most
3955 # certainly right.
3956 break;;
3957 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003958 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003959 then :; else
3960 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3961 fi
3962 # We set ac_cv_exeext here because the later test for it is not
3963 # safe: cross compilers may not add the suffix if given an `-o'
3964 # argument, so we may need to know it at that point already.
3965 # Even if this section looks crufty: it has the advantage of
3966 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003967 break;;
3968 * )
3969 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003970 esac
3971done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003972test "$ac_cv_exeext" = no && ac_cv_exeext=
3973
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003974else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003975 ac_file=''
3976fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003977if test -z "$ac_file"; then :
3978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3979$as_echo "no" >&6; }
3980$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003981sed 's/^/| /' conftest.$ac_ext >&5
3982
Matthias Kloseb9621712010-04-24 17:59:49 +00003983{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3984$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003985as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02003986See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003987else
3988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3989$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003990fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3992$as_echo_n "checking for C compiler default output file name... " >&6; }
3993{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3994$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003995ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003996
Matthias Kloseb9621712010-04-24 17:59:49 +00003997rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003998ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4000$as_echo_n "checking for suffix of executables... " >&6; }
4001if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004002case "(($ac_try" in
4003 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4004 *) ac_try_echo=$ac_try;;
4005esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004006eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4007$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004008 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004009 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004010 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4011 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004012 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4013# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4014# work properly (i.e., refer to `conftest.exe'), while it won't with
4015# `rm'.
4016for ac_file in conftest.exe conftest conftest.*; do
4017 test -f "$ac_file" || continue
4018 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004019 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004020 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4021 break;;
4022 * ) break;;
4023 esac
4024done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004025else
Matthias Kloseb9621712010-04-24 17:59:49 +00004026 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4027$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004028as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004029See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004030fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004031rm -f conftest conftest$ac_cv_exeext
4032{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4033$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004034
4035rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004036EXEEXT=$ac_cv_exeext
4037ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004038cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4039/* end confdefs.h. */
4040#include <stdio.h>
4041int
4042main ()
4043{
4044FILE *f = fopen ("conftest.out", "w");
4045 return ferror (f) || fclose (f) != 0;
4046
4047 ;
4048 return 0;
4049}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004050_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004051ac_clean_files="$ac_clean_files conftest.out"
4052# Check that the compiler produces executables we can run. If not, either
4053# the compiler is broken, or we cross compile.
4054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4055$as_echo_n "checking whether we are cross compiling... " >&6; }
4056if test "$cross_compiling" != yes; then
4057 { { ac_try="$ac_link"
4058case "(($ac_try" in
4059 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4060 *) ac_try_echo=$ac_try;;
4061esac
4062eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4063$as_echo "$ac_try_echo"; } >&5
4064 (eval "$ac_link") 2>&5
4065 ac_status=$?
4066 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4067 test $ac_status = 0; }
4068 if { ac_try='./conftest$ac_cv_exeext'
4069 { { case "(($ac_try" in
4070 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4071 *) ac_try_echo=$ac_try;;
4072esac
4073eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4074$as_echo "$ac_try_echo"; } >&5
4075 (eval "$ac_try") 2>&5
4076 ac_status=$?
4077 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4078 test $ac_status = 0; }; }; then
4079 cross_compiling=no
4080 else
4081 if test "$cross_compiling" = maybe; then
4082 cross_compiling=yes
4083 else
4084 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4085$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004086as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004087If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004088See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004089 fi
4090 fi
4091fi
4092{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4093$as_echo "$cross_compiling" >&6; }
4094
4095rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4096ac_clean_files=$ac_clean_files_save
4097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4098$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004099if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004100 $as_echo_n "(cached) " >&6
4101else
4102 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004103/* end confdefs.h. */
4104
4105int
4106main ()
4107{
4108
4109 ;
4110 return 0;
4111}
4112_ACEOF
4113rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004114if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004115case "(($ac_try" in
4116 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4117 *) ac_try_echo=$ac_try;;
4118esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004119eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4120$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004121 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004122 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004123 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4124 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004125 for ac_file in conftest.o conftest.obj conftest.*; do
4126 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004127 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004128 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004129 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4130 break;;
4131 esac
4132done
4133else
Matthias Kloseb9621712010-04-24 17:59:49 +00004134 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004135sed 's/^/| /' conftest.$ac_ext >&5
4136
Matthias Kloseb9621712010-04-24 17:59:49 +00004137{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4138$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004139as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004140See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004141fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004142rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004143fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004144{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4145$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004146OBJEXT=$ac_cv_objext
4147ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4149$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004150if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004151 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004152else
Matthias Kloseb9621712010-04-24 17:59:49 +00004153 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004154/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004155
Martin v. Löwis11437992002-04-12 09:54:03 +00004156int
4157main ()
4158{
4159#ifndef __GNUC__
4160 choke me
4161#endif
4162
4163 ;
4164 return 0;
4165}
4166_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004167if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004168 ac_compiler_gnu=yes
4169else
Matthias Kloseb9621712010-04-24 17:59:49 +00004170 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004171fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004172rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004173ac_cv_c_compiler_gnu=$ac_compiler_gnu
4174
4175fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004176{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4177$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4178if test $ac_compiler_gnu = yes; then
4179 GCC=yes
4180else
4181 GCC=
4182fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004183ac_test_CFLAGS=${CFLAGS+set}
4184ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4186$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004187if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004188 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004189else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004190 ac_save_c_werror_flag=$ac_c_werror_flag
4191 ac_c_werror_flag=yes
4192 ac_cv_prog_cc_g=no
4193 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004194 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004195/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004196
Martin v. Löwis11437992002-04-12 09:54:03 +00004197int
4198main ()
4199{
4200
4201 ;
4202 return 0;
4203}
4204_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004205if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004206 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004207else
Matthias Kloseb9621712010-04-24 17:59:49 +00004208 CFLAGS=""
4209 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004210/* end confdefs.h. */
4211
4212int
4213main ()
4214{
4215
4216 ;
4217 return 0;
4218}
4219_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004220if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004221
Matthias Kloseb9621712010-04-24 17:59:49 +00004222else
4223 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004224 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004225 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004226/* end confdefs.h. */
4227
4228int
4229main ()
4230{
4231
4232 ;
4233 return 0;
4234}
4235_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004236if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004237 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004238fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004239rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004240fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004241rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4242fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004243rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4244 ac_c_werror_flag=$ac_save_c_werror_flag
4245fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004246{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4247$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004248if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004249 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004250elif test $ac_cv_prog_cc_g = yes; then
4251 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004252 CFLAGS="-g -O2"
4253 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004254 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004255 fi
4256else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004257 if test "$GCC" = yes; then
4258 CFLAGS="-O2"
4259 else
4260 CFLAGS=
4261 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004262fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4264$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004265if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004266 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004267else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004268 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004269ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004270cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004271/* end confdefs.h. */
4272#include <stdarg.h>
4273#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004274struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004275/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4276struct buf { int x; };
4277FILE * (*rcsopen) (struct buf *, struct stat *, int);
4278static char *e (p, i)
4279 char **p;
4280 int i;
4281{
4282 return p[i];
4283}
4284static char *f (char * (*g) (char **, int), char **p, ...)
4285{
4286 char *s;
4287 va_list v;
4288 va_start (v,p);
4289 s = g (p, va_arg (v,int));
4290 va_end (v);
4291 return s;
4292}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004293
4294/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4295 function prototypes and stuff, but not '\xHH' hex character constants.
4296 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004297 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004298 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4299 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004300 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004301int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4302
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004303/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4304 inside strings and character constants. */
4305#define FOO(x) 'x'
4306int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4307
Skip Montanaro6dead952003-09-25 14:50:04 +00004308int test (int i, double x);
4309struct s1 {int (*f) (int a);};
4310struct s2 {int (*f) (double a);};
4311int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4312int argc;
4313char **argv;
4314int
4315main ()
4316{
4317return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4318 ;
4319 return 0;
4320}
4321_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004322for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4323 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004324do
4325 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004326 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004327 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004328fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004329rm -f core conftest.err conftest.$ac_objext
4330 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004331done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004332rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004333CC=$ac_save_CC
4334
4335fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004336# AC_CACHE_VAL
4337case "x$ac_cv_prog_cc_c89" in
4338 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4340$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004341 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4343$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004344 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004345 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4347$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004348esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004349if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004350
Matthias Kloseb9621712010-04-24 17:59:49 +00004351fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004352
Martin v. Löwis11437992002-04-12 09:54:03 +00004353ac_ext=c
4354ac_cpp='$CPP $CPPFLAGS'
4355ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4356ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4357ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004358
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004359
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004360
4361
Matthias Kloseb9621712010-04-24 17:59:49 +00004362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4363$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004364
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004365# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004366if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004367 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004368
4369 case $withval in
4370 no) with_cxx_main=no
4371 MAINCC='$(CC)';;
4372 yes) with_cxx_main=yes
4373 MAINCC='$(CXX)';;
4374 *) with_cxx_main=yes
4375 MAINCC=$withval
4376 if test -z "$CXX"
4377 then
4378 CXX=$withval
4379 fi;;
4380 esac
4381else
4382
4383 with_cxx_main=no
4384 MAINCC='$(CC)'
4385
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004386fi
4387
Matthias Kloseb9621712010-04-24 17:59:49 +00004388{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4389$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004390
4391preset_cxx="$CXX"
4392if test -z "$CXX"
4393then
4394 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004395 gcc) if test -n "$ac_tool_prefix"; then
4396 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4397set dummy ${ac_tool_prefix}g++; ac_word=$2
4398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4399$as_echo_n "checking for $ac_word... " >&6; }
4400if ${ac_cv_path_CXX+:} false; then :
4401 $as_echo_n "(cached) " >&6
4402else
4403 case $CXX in
4404 [\\/]* | ?:[\\/]*)
4405 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4406 ;;
4407 *)
4408 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4409for as_dir in notfound
4410do
4411 IFS=$as_save_IFS
4412 test -z "$as_dir" && as_dir=.
4413 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004414 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004415 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4416 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4417 break 2
4418 fi
4419done
4420 done
4421IFS=$as_save_IFS
4422
4423 ;;
4424esac
4425fi
4426CXX=$ac_cv_path_CXX
4427if test -n "$CXX"; then
4428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4429$as_echo "$CXX" >&6; }
4430else
4431 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4432$as_echo "no" >&6; }
4433fi
4434
4435
4436fi
4437if test -z "$ac_cv_path_CXX"; then
4438 ac_pt_CXX=$CXX
4439 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004440set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4442$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004443if ${ac_cv_path_ac_pt_CXX+:} false; then :
4444 $as_echo_n "(cached) " >&6
4445else
4446 case $ac_pt_CXX in
4447 [\\/]* | ?:[\\/]*)
4448 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4449 ;;
4450 *)
4451 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4452for as_dir in notfound
4453do
4454 IFS=$as_save_IFS
4455 test -z "$as_dir" && as_dir=.
4456 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004457 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004458 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4459 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4460 break 2
4461 fi
4462done
4463 done
4464IFS=$as_save_IFS
4465
4466 ;;
4467esac
4468fi
4469ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4470if test -n "$ac_pt_CXX"; then
4471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4472$as_echo "$ac_pt_CXX" >&6; }
4473else
4474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4475$as_echo "no" >&6; }
4476fi
4477
4478 if test "x$ac_pt_CXX" = x; then
4479 CXX="g++"
4480 else
4481 case $cross_compiling:$ac_tool_warned in
4482yes:)
4483{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4484$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4485ac_tool_warned=yes ;;
4486esac
4487 CXX=$ac_pt_CXX
4488 fi
4489else
4490 CXX="$ac_cv_path_CXX"
4491fi
4492 ;;
4493 cc) if test -n "$ac_tool_prefix"; then
4494 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4495set dummy ${ac_tool_prefix}c++; ac_word=$2
4496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4497$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004498if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004499 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004500else
4501 case $CXX in
4502 [\\/]* | ?:[\\/]*)
4503 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4504 ;;
4505 *)
4506 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4507for as_dir in notfound
4508do
4509 IFS=$as_save_IFS
4510 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004511 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004512 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004513 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004514 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004515 break 2
4516 fi
4517done
Matthias Kloseb9621712010-04-24 17:59:49 +00004518 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004519IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004520
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004521 ;;
4522esac
4523fi
4524CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004525if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4527$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004528else
Matthias Kloseb9621712010-04-24 17:59:49 +00004529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4530$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004531fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004532
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004533
4534fi
4535if test -z "$ac_cv_path_CXX"; then
4536 ac_pt_CXX=$CXX
4537 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004538set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4540$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004541if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004542 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004543else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004544 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004545 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004546 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 +00004547 ;;
4548 *)
4549 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4550for as_dir in notfound
4551do
4552 IFS=$as_save_IFS
4553 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004554 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004555 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004556 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004557 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004558 break 2
4559 fi
4560done
Matthias Kloseb9621712010-04-24 17:59:49 +00004561 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004562IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004563
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004564 ;;
4565esac
4566fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004567ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4568if test -n "$ac_pt_CXX"; then
4569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4570$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004571else
Matthias Kloseb9621712010-04-24 17:59:49 +00004572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4573$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004574fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004575
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004576 if test "x$ac_pt_CXX" = x; then
4577 CXX="c++"
4578 else
4579 case $cross_compiling:$ac_tool_warned in
4580yes:)
4581{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4582$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4583ac_tool_warned=yes ;;
4584esac
4585 CXX=$ac_pt_CXX
4586 fi
4587else
4588 CXX="$ac_cv_path_CXX"
4589fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004590 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004591 clang|*/clang) if test -n "$ac_tool_prefix"; then
4592 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4593set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4595$as_echo_n "checking for $ac_word... " >&6; }
4596if ${ac_cv_path_CXX+:} false; then :
4597 $as_echo_n "(cached) " >&6
4598else
4599 case $CXX in
4600 [\\/]* | ?:[\\/]*)
4601 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4602 ;;
4603 *)
4604 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4605for as_dir in notfound
4606do
4607 IFS=$as_save_IFS
4608 test -z "$as_dir" && as_dir=.
4609 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004610 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004611 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4612 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4613 break 2
4614 fi
4615done
4616 done
4617IFS=$as_save_IFS
4618
Ned Deilycbfb9a52012-06-23 16:02:19 -07004619 ;;
4620esac
4621fi
4622CXX=$ac_cv_path_CXX
4623if test -n "$CXX"; then
4624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4625$as_echo "$CXX" >&6; }
4626else
4627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4628$as_echo "no" >&6; }
4629fi
4630
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004631
4632fi
4633if test -z "$ac_cv_path_CXX"; then
4634 ac_pt_CXX=$CXX
4635 # Extract the first word of "clang++", so it can be a program name with args.
4636set dummy clang++; ac_word=$2
4637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4638$as_echo_n "checking for $ac_word... " >&6; }
4639if ${ac_cv_path_ac_pt_CXX+:} false; then :
4640 $as_echo_n "(cached) " >&6
4641else
4642 case $ac_pt_CXX in
4643 [\\/]* | ?:[\\/]*)
4644 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4645 ;;
4646 *)
4647 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4648for as_dir in notfound
4649do
4650 IFS=$as_save_IFS
4651 test -z "$as_dir" && as_dir=.
4652 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004653 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004654 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4655 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4656 break 2
4657 fi
4658done
4659 done
4660IFS=$as_save_IFS
4661
4662 ;;
4663esac
4664fi
4665ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4666if test -n "$ac_pt_CXX"; then
4667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4668$as_echo "$ac_pt_CXX" >&6; }
4669else
4670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4671$as_echo "no" >&6; }
4672fi
4673
4674 if test "x$ac_pt_CXX" = x; then
4675 CXX="clang++"
4676 else
4677 case $cross_compiling:$ac_tool_warned in
4678yes:)
4679{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4680$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4681ac_tool_warned=yes ;;
4682esac
4683 CXX=$ac_pt_CXX
4684 fi
4685else
4686 CXX="$ac_cv_path_CXX"
4687fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004688 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004689 esac
4690 if test "$CXX" = "notfound"
4691 then
4692 CXX=""
4693 fi
4694fi
4695if test -z "$CXX"
4696then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004697 if test -n "$ac_tool_prefix"; then
4698 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4699 do
4700 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4701set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4703$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004704if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004705 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004706else
4707 if test -n "$CXX"; then
4708 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4709else
4710as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4711for as_dir in $PATH
4712do
4713 IFS=$as_save_IFS
4714 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004715 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004716 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004717 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004718 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004719 break 2
4720 fi
4721done
Matthias Kloseb9621712010-04-24 17:59:49 +00004722 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004723IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004724
4725fi
4726fi
4727CXX=$ac_cv_prog_CXX
4728if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4730$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004731else
Matthias Kloseb9621712010-04-24 17:59:49 +00004732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4733$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004734fi
4735
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004736
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004737 test -n "$CXX" && break
4738 done
4739fi
4740if test -z "$CXX"; then
4741 ac_ct_CXX=$CXX
4742 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4743do
4744 # Extract the first word of "$ac_prog", so it can be a program name with args.
4745set dummy $ac_prog; ac_word=$2
4746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4747$as_echo_n "checking for $ac_word... " >&6; }
4748if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4749 $as_echo_n "(cached) " >&6
4750else
4751 if test -n "$ac_ct_CXX"; then
4752 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4753else
4754as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4755for as_dir in $PATH
4756do
4757 IFS=$as_save_IFS
4758 test -z "$as_dir" && as_dir=.
4759 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004760 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004761 ac_cv_prog_ac_ct_CXX="$ac_prog"
4762 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4763 break 2
4764 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004765done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004766 done
4767IFS=$as_save_IFS
4768
4769fi
4770fi
4771ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4772if test -n "$ac_ct_CXX"; then
4773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4774$as_echo "$ac_ct_CXX" >&6; }
4775else
4776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4777$as_echo "no" >&6; }
4778fi
4779
4780
4781 test -n "$ac_ct_CXX" && break
4782done
4783
4784 if test "x$ac_ct_CXX" = x; then
4785 CXX="notfound"
4786 else
4787 case $cross_compiling:$ac_tool_warned in
4788yes:)
4789{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4790$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4791ac_tool_warned=yes ;;
4792esac
4793 CXX=$ac_ct_CXX
4794 fi
4795fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004796
4797 if test "$CXX" = "notfound"
4798 then
4799 CXX=""
4800 fi
4801fi
4802if test "$preset_cxx" != "$CXX"
4803then
Matthias Kloseb9621712010-04-24 17:59:49 +00004804 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004805
4806 By default, distutils will build C++ extension modules with \"$CXX\".
4807 If this is not intended, then set CXX on the configure command line.
4808 " >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004809$as_echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004810
4811 By default, distutils will build C++ extension modules with \"$CXX\".
4812 If this is not intended, then set CXX on the configure command line.
4813 " >&2;}
4814fi
4815
4816
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
4818$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
4819save_LDFLAGS="$LDFLAGS"
4820LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00004821
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004822cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4823/* end confdefs.h. */
4824
4825int
4826main ()
4827{
4828
4829 ;
4830 return 0;
4831}
4832_ACEOF
4833if ac_fn_c_try_link "$LINENO"; then :
4834 NO_AS_NEEDED="-Wl,--no-as-needed"
4835 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4836$as_echo "yes" >&6; }
4837else
4838 NO_AS_NEEDED=""
4839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4840$as_echo "no" >&6; }
4841fi
4842rm -f core conftest.err conftest.$ac_objext \
4843 conftest$ac_exeext conftest.$ac_ext
4844LDFLAGS="$save_LDFLAGS"
4845
4846
4847
4848# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004849ac_ext=c
4850ac_cpp='$CPP $CPPFLAGS'
4851ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4852ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4853ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Kloseb9621712010-04-24 17:59:49 +00004854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4855$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004856# On Suns, sometimes $CPP names a directory.
4857if test -n "$CPP" && test -d "$CPP"; then
4858 CPP=
4859fi
4860if test -z "$CPP"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02004861 if ${ac_cv_prog_CPP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004862 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004863else
Martin v. Löwis11437992002-04-12 09:54:03 +00004864 # Double quotes because CPP needs to be expanded
4865 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4866 do
4867 ac_preproc_ok=false
4868for ac_c_preproc_warn_flag in '' yes
4869do
4870 # Use a header file that comes with gcc, so configuring glibc
4871 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004872 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4873 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004874 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004875 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004876 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004877/* end confdefs.h. */
4878#ifdef __STDC__
4879# include <limits.h>
4880#else
4881# include <assert.h>
4882#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004883 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004884_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004885if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004886
Matthias Kloseb9621712010-04-24 17:59:49 +00004887else
Martin v. Löwis11437992002-04-12 09:54:03 +00004888 # Broken: fails on valid input.
4889continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004890fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004891rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004892
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004893 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004894 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004895 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004896/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004897#include <ac_nonexistent.h>
4898_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004899if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004900 # Broken: success on invalid input.
4901continue
4902else
Martin v. Löwis11437992002-04-12 09:54:03 +00004903 # Passes both tests.
4904ac_preproc_ok=:
4905break
4906fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004907rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004908
4909done
4910# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004911rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004912if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004913 break
4914fi
4915
4916 done
4917 ac_cv_prog_CPP=$CPP
4918
4919fi
4920 CPP=$ac_cv_prog_CPP
4921else
4922 ac_cv_prog_CPP=$CPP
4923fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004924{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4925$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004926ac_preproc_ok=false
4927for ac_c_preproc_warn_flag in '' yes
4928do
4929 # Use a header file that comes with gcc, so configuring glibc
4930 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004931 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4932 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004933 # On the NeXT, cc -E runs the code through the compiler's parser,
4934 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004935 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004936/* end confdefs.h. */
4937#ifdef __STDC__
4938# include <limits.h>
4939#else
4940# include <assert.h>
4941#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004942 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004943_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004944if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004945
Matthias Kloseb9621712010-04-24 17:59:49 +00004946else
Martin v. Löwis11437992002-04-12 09:54:03 +00004947 # Broken: fails on valid input.
4948continue
4949fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004950rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004951
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004952 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004953 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004954 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004955/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004956#include <ac_nonexistent.h>
4957_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004958if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004959 # Broken: success on invalid input.
4960continue
4961else
Martin v. Löwis11437992002-04-12 09:54:03 +00004962 # Passes both tests.
4963ac_preproc_ok=:
4964break
4965fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004966rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004967
4968done
4969# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004970rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004971if $ac_preproc_ok; then :
4972
Martin v. Löwis11437992002-04-12 09:54:03 +00004973else
Matthias Kloseb9621712010-04-24 17:59:49 +00004974 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4975$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004976as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
Victor Stinnere0be4232011-10-25 13:06:09 +02004977See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004978fi
4979
4980ac_ext=c
4981ac_cpp='$CPP $CPPFLAGS'
4982ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4983ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4984ac_compiler_gnu=$ac_cv_c_compiler_gnu
4985
4986
Matthias Kloseb9621712010-04-24 17:59:49 +00004987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4988$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004989if ${ac_cv_path_GREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004990 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004991else
Matthias Kloseb9621712010-04-24 17:59:49 +00004992 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004993 ac_path_GREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004994 # Loop through the user's path and test for each of PROGNAME-LIST
4995 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004996for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4997do
4998 IFS=$as_save_IFS
4999 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005000 for ac_prog in grep ggrep; do
5001 for ac_exec_ext in '' $ac_executable_extensions; do
5002 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005003 as_fn_executable_p "$ac_path_GREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005004# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005005 # Check for GNU $ac_path_GREP
5006case `"$ac_path_GREP" --version 2>&1` in
5007*GNU*)
5008 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5009*)
5010 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005011 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005012 while :
5013 do
5014 cat "conftest.in" "conftest.in" >"conftest.tmp"
5015 mv "conftest.tmp" "conftest.in"
5016 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005017 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005018 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5019 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005020 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005021 if test $ac_count -gt ${ac_path_GREP_max-0}; then
5022 # Best one so far, save it but keep looking for a better one
5023 ac_cv_path_GREP="$ac_path_GREP"
5024 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00005025 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005026 # 10*(2^10) chars as input seems more than enough
5027 test $ac_count -gt 10 && break
5028 done
5029 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5030esac
5031
Matthias Kloseb9621712010-04-24 17:59:49 +00005032 $ac_path_GREP_found && break 3
5033 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005034 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005035 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005036IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005037 if test -z "$ac_cv_path_GREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005038 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 +00005039 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005040else
5041 ac_cv_path_GREP=$GREP
5042fi
5043
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005044fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005045{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5046$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005047 GREP="$ac_cv_path_GREP"
5048
5049
Matthias Kloseb9621712010-04-24 17:59:49 +00005050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5051$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005052if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005053 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005054else
5055 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5056 then ac_cv_path_EGREP="$GREP -E"
5057 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005058 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005059 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005060 # Loop through the user's path and test for each of PROGNAME-LIST
5061 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005062for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5063do
5064 IFS=$as_save_IFS
5065 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005066 for ac_prog in egrep; do
5067 for ac_exec_ext in '' $ac_executable_extensions; do
5068 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005069 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005070# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005071 # Check for GNU $ac_path_EGREP
5072case `"$ac_path_EGREP" --version 2>&1` in
5073*GNU*)
5074 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5075*)
5076 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005077 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005078 while :
5079 do
5080 cat "conftest.in" "conftest.in" >"conftest.tmp"
5081 mv "conftest.tmp" "conftest.in"
5082 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005083 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005084 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5085 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005086 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005087 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5088 # Best one so far, save it but keep looking for a better one
5089 ac_cv_path_EGREP="$ac_path_EGREP"
5090 ac_path_EGREP_max=$ac_count
5091 fi
5092 # 10*(2^10) chars as input seems more than enough
5093 test $ac_count -gt 10 && break
5094 done
5095 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5096esac
5097
Matthias Kloseb9621712010-04-24 17:59:49 +00005098 $ac_path_EGREP_found && break 3
5099 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005100 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005101 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005102IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005103 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005104 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 +00005105 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005106else
5107 ac_cv_path_EGREP=$EGREP
5108fi
5109
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005110 fi
5111fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005112{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5113$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005114 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005115
5116
Matthias Kloseb9621712010-04-24 17:59:49 +00005117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5118$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005119if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005120 $as_echo_n "(cached) " >&6
5121else
5122 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005123/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005124#include <stdlib.h>
5125#include <stdarg.h>
5126#include <string.h>
5127#include <float.h>
5128
5129int
5130main ()
5131{
5132
5133 ;
5134 return 0;
5135}
5136_ACEOF
5137if ac_fn_c_try_compile "$LINENO"; then :
5138 ac_cv_header_stdc=yes
5139else
5140 ac_cv_header_stdc=no
5141fi
5142rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5143
5144if test $ac_cv_header_stdc = yes; then
5145 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5146 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5147/* end confdefs.h. */
5148#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005149
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005150_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005151if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005152 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005153
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005154else
Matthias Kloseb9621712010-04-24 17:59:49 +00005155 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005156fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005157rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005158
Matthias Kloseb9621712010-04-24 17:59:49 +00005159fi
5160
5161if test $ac_cv_header_stdc = yes; then
5162 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5163 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5164/* end confdefs.h. */
5165#include <stdlib.h>
5166
5167_ACEOF
5168if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5169 $EGREP "free" >/dev/null 2>&1; then :
5170
5171else
5172 ac_cv_header_stdc=no
5173fi
5174rm -f conftest*
5175
5176fi
5177
5178if test $ac_cv_header_stdc = yes; then
5179 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5180 if test "$cross_compiling" = yes; then :
5181 :
5182else
5183 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5184/* end confdefs.h. */
5185#include <ctype.h>
5186#include <stdlib.h>
5187#if ((' ' & 0x0FF) == 0x020)
5188# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5189# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5190#else
5191# define ISLOWER(c) \
5192 (('a' <= (c) && (c) <= 'i') \
5193 || ('j' <= (c) && (c) <= 'r') \
5194 || ('s' <= (c) && (c) <= 'z'))
5195# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5196#endif
5197
5198#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5199int
5200main ()
5201{
5202 int i;
5203 for (i = 0; i < 256; i++)
5204 if (XOR (islower (i), ISLOWER (i))
5205 || toupper (i) != TOUPPER (i))
5206 return 2;
5207 return 0;
5208}
5209_ACEOF
5210if ac_fn_c_try_run "$LINENO"; then :
5211
5212else
5213 ac_cv_header_stdc=no
5214fi
5215rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5216 conftest.$ac_objext conftest.beam conftest.$ac_ext
5217fi
5218
5219fi
5220fi
5221{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5222$as_echo "$ac_cv_header_stdc" >&6; }
5223if test $ac_cv_header_stdc = yes; then
5224
5225$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5226
5227fi
5228
5229# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5230for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5231 inttypes.h stdint.h unistd.h
5232do :
5233 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5234ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5235"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005236if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005237 cat >>confdefs.h <<_ACEOF
5238#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5239_ACEOF
5240
5241fi
5242
5243done
5244
5245
5246
5247 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 +02005248if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005249 MINIX=yes
5250else
5251 MINIX=
5252fi
5253
5254
5255 if test "$MINIX" = yes; then
5256
5257$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5258
5259
5260$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5261
5262
5263$as_echo "#define _MINIX 1" >>confdefs.h
5264
5265 fi
5266
5267
5268 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5269$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005270if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005271 $as_echo_n "(cached) " >&6
5272else
5273 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5274/* end confdefs.h. */
5275
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005276# define __EXTENSIONS__ 1
5277 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005278int
5279main ()
5280{
5281
5282 ;
5283 return 0;
5284}
5285_ACEOF
5286if ac_fn_c_try_compile "$LINENO"; then :
5287 ac_cv_safe_to_define___extensions__=yes
5288else
5289 ac_cv_safe_to_define___extensions__=no
5290fi
5291rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5292fi
5293{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5294$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5295 test $ac_cv_safe_to_define___extensions__ = yes &&
5296 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5297
5298 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5299
5300 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5301
5302 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5303
5304 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5305
5306
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005307
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005308# Check for unsupported systems
5309case $ac_sys_system/$ac_sys_release in
5310atheos*|Linux*/1*)
5311 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5312 echo See README for details.
5313 exit 1;;
5314esac
5315
5316
Matthias Kloseb9621712010-04-24 17:59:49 +00005317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5318$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005319
5320# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005321if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005322 withval=$with_suffix;
5323 case $withval in
5324 no) EXEEXT=;;
5325 yes) EXEEXT=.exe;;
5326 *) EXEEXT=$withval;;
5327 esac
5328fi
5329
Matthias Kloseb9621712010-04-24 17:59:49 +00005330{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5331$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005332
5333# Test whether we're running on a non-case-sensitive system, in which
5334# case we give a warning if no ext is given
5335
Matthias Kloseb9621712010-04-24 17:59:49 +00005336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5337$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005338if test ! -d CaseSensitiveTestDir; then
5339mkdir CaseSensitiveTestDir
5340fi
5341
5342if test -d casesensitivetestdir
5343then
Matthias Kloseb9621712010-04-24 17:59:49 +00005344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5345$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005346 BUILDEXEEXT=.exe
5347else
Matthias Kloseb9621712010-04-24 17:59:49 +00005348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5349$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005350 BUILDEXEEXT=$EXEEXT
5351fi
5352rmdir CaseSensitiveTestDir
5353
5354case $MACHDEP in
5355bsdos*)
5356 case $CC in
5357 gcc) CC="$CC -D_HAVE_BSDI";;
5358 esac;;
5359esac
5360
5361case $ac_sys_system in
5362hp*|HP*)
5363 case $CC in
5364 cc|*/cc) CC="$CC -Ae";;
5365 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005366esac
5367
doko@python.org3e6e2ac2013-01-25 13:12:29 +01005368MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5369
5370
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005371
5372
Matthias Kloseb9621712010-04-24 17:59:49 +00005373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5374$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005375if test -z "$LIBRARY"
5376then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005377 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005378fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005379{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5380$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005381
5382# LDLIBRARY is the name of the library to link against (as opposed to the
5383# name of the library into which to insert object files). BLDLIBRARY is also
5384# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5385# is blank as the main program is not linked directly against LDLIBRARY.
5386# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5387# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5388# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5389# DLLLIBRARY is the shared (i.e., DLL) library.
5390#
5391# RUNSHARED is used to run shared python without installed libraries
5392#
5393# INSTSONAME is the name of the shared library that will be use to install
5394# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005395#
5396# LDVERSION is the shared library version number, normally the Python version
5397# with the ABI build flags appended.
5398
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005399
5400
5401
5402
5403
5404
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005405
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005406LDLIBRARY="$LIBRARY"
5407BLDLIBRARY='$(LDLIBRARY)'
5408INSTSONAME='$(LDLIBRARY)'
5409DLLLIBRARY=''
5410LDLIBRARYDIR=''
5411RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005412LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005413
5414# LINKCC is the command that links the python executable -- default is $(CC).
5415# If CXX is set, and if it is needed to link a main function that was
5416# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5417# python might then depend on the C++ runtime
5418# This is altered for AIX in order to build the export list before
5419# linking.
5420
Matthias Kloseb9621712010-04-24 17:59:49 +00005421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5422$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005423if test -z "$LINKCC"
5424then
5425 LINKCC='$(PURIFY) $(MAINCC)'
5426 case $ac_sys_system in
5427 AIX*)
5428 exp_extra="\"\""
5429 if test $ac_sys_release -ge 5 -o \
5430 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5431 exp_extra="."
5432 fi
5433 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005434 QNX*)
5435 # qcc must be used because the other compilers do not
5436 # support -N.
5437 LINKCC=qcc;;
5438 esac
5439fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005440{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5441$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005442
5443# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5444# make sure we default having it set to "no": this is used by
5445# distutils.unixccompiler to know if it should add --enable-new-dtags
5446# to linker command lines, and failing to detect GNU ld simply results
5447# in the same bahaviour as before.
5448
Matthias Kloseb9621712010-04-24 17:59:49 +00005449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5450$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005451ac_prog=ld
5452if test "$GCC" = yes; then
5453 ac_prog=`$CC -print-prog-name=ld`
5454fi
5455case `"$ac_prog" -V 2>&1 < /dev/null` in
5456 *GNU*)
5457 GNULD=yes;;
5458 *)
5459 GNULD=no;;
5460esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005461{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5462$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005463
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
5465$as_echo_n "checking for inline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005466if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005467 $as_echo_n "(cached) " >&6
5468else
5469 ac_cv_c_inline=no
5470for ac_kw in inline __inline__ __inline; do
5471 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5472/* end confdefs.h. */
5473#ifndef __cplusplus
5474typedef int foo_t;
5475static $ac_kw foo_t static_foo () {return 0; }
5476$ac_kw foo_t foo () {return 0; }
5477#endif
5478
5479_ACEOF
5480if ac_fn_c_try_compile "$LINENO"; then :
5481 ac_cv_c_inline=$ac_kw
5482fi
5483rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5484 test "$ac_cv_c_inline" != no && break
5485done
5486
5487fi
5488{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
5489$as_echo "$ac_cv_c_inline" >&6; }
5490
5491case $ac_cv_c_inline in
5492 inline | yes) ;;
5493 *)
5494 case $ac_cv_c_inline in
5495 no) ac_val=;;
5496 *) ac_val=$ac_cv_c_inline;;
5497 esac
5498 cat >>confdefs.h <<_ACEOF
5499#ifndef __cplusplus
5500#define inline $ac_val
5501#endif
5502_ACEOF
5503 ;;
5504esac
5505
5506if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00005507
5508$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005509
5510
5511fi
5512
5513
Matthias Kloseb9621712010-04-24 17:59:49 +00005514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5515$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005516# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005517if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005518 enableval=$enable_shared;
5519fi
5520
5521
5522if test -z "$enable_shared"
5523then
5524 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005525 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005526 enable_shared="yes";;
5527 *)
5528 enable_shared="no";;
5529 esac
5530fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005531{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5532$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005533
Matthias Kloseb9621712010-04-24 17:59:49 +00005534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5535$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005536# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005537if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005538 enableval=$enable_profiling;
5539fi
5540
5541if test "x$enable_profiling" = xyes; then
5542 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005543 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005544 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005545/* end confdefs.h. */
5546int main() { return 0; }
5547_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005548if ac_fn_c_try_link "$LINENO"; then :
5549
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005550else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005551 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005552fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005553rm -f core conftest.err conftest.$ac_objext \
5554 conftest$ac_exeext conftest.$ac_ext
5555 CC="$ac_save_cc"
5556else
5557 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005558fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005559{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5560$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005561
doko@ubuntu.comba015832012-06-30 16:52:05 +02005562if test "x$enable_profiling" = xyes; then
5563 BASECFLAGS="-pg $BASECFLAGS"
5564 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005565fi
5566
Matthias Kloseb9621712010-04-24 17:59:49 +00005567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5568$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005569
5570# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5571# library that we build, but we do not want to link against it (we
5572# will find it with a -framework option). For this reason there is an
5573# extra variable BLDLIBRARY against which Python and the extension
5574# modules are linked, BLDLIBRARY. This is normally the same as
5575# LDLIBRARY, but empty for MacOSX framework builds.
5576if test "$enable_framework"
5577then
5578 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
5579 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
5580 BLDLIBRARY=''
5581else
5582 BLDLIBRARY='$(LDLIBRARY)'
5583fi
5584
5585# Other platforms follow
5586if test $enable_shared = "yes"; then
5587
Matthias Kloseb9621712010-04-24 17:59:49 +00005588$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005589
5590 case $ac_sys_system in
5591 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005592 LDLIBRARY='libpython$(LDVERSION).dll.a'
5593 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005594 ;;
5595 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005596 LDLIBRARY='libpython$(LDVERSION).so'
5597 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005598 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
5599 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005600 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005601 then
5602 PY3LIBRARY=libpython3.so
5603 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005604 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005605 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005606 LDLIBRARY='libpython$(LDVERSION).so'
5607 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005608 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
5609 case $ac_sys_system in
5610 FreeBSD*)
5611 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
5612 ;;
5613 esac
5614 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005615 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005616 then
5617 PY3LIBRARY=libpython3.so
5618 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005619 ;;
5620 hp*|HP*)
5621 case `uname -m` in
5622 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005623 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005624 ;;
5625 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005626 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005627 ;;
5628 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005629 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005630 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
5631 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005632 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005633 LDLIBRARY='libpython$(LDVERSION).dylib'
5634 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005635 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
5636 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005637 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005638 LDLIBRARY='libpython$(LDVERSION).so'
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005639 RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
5640 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005641
5642 esac
5643else # shared is disabled
5644 case $ac_sys_system in
5645 CYGWIN*)
5646 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005647 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005648 ;;
5649 esac
5650fi
5651
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005652if test "$cross_compiling" = yes; then
5653 RUNSHARED=
5654fi
5655
Matthias Kloseb9621712010-04-24 17:59:49 +00005656{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5657$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005658
5659if test -n "$ac_tool_prefix"; then
5660 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5661set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5663$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005664if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005665 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005666else
5667 if test -n "$RANLIB"; then
5668 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5669else
5670as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5671for as_dir in $PATH
5672do
5673 IFS=$as_save_IFS
5674 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005675 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005676 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005677 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005678 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005679 break 2
5680 fi
5681done
Matthias Kloseb9621712010-04-24 17:59:49 +00005682 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005683IFS=$as_save_IFS
5684
5685fi
5686fi
5687RANLIB=$ac_cv_prog_RANLIB
5688if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005689 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5690$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005691else
Matthias Kloseb9621712010-04-24 17:59:49 +00005692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5693$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005694fi
5695
5696
5697fi
5698if test -z "$ac_cv_prog_RANLIB"; then
5699 ac_ct_RANLIB=$RANLIB
5700 # Extract the first word of "ranlib", so it can be a program name with args.
5701set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5703$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005704if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005705 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005706else
5707 if test -n "$ac_ct_RANLIB"; then
5708 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5709else
5710as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5711for as_dir in $PATH
5712do
5713 IFS=$as_save_IFS
5714 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005715 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005716 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005717 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005718 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005719 break 2
5720 fi
5721done
Matthias Kloseb9621712010-04-24 17:59:49 +00005722 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005723IFS=$as_save_IFS
5724
5725fi
5726fi
5727ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5728if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5730$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005731else
Matthias Kloseb9621712010-04-24 17:59:49 +00005732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5733$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005734fi
5735
5736 if test "x$ac_ct_RANLIB" = x; then
5737 RANLIB=":"
5738 else
5739 case $cross_compiling:$ac_tool_warned in
5740yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00005741{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5742$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005743ac_tool_warned=yes ;;
5744esac
5745 RANLIB=$ac_ct_RANLIB
5746 fi
5747else
5748 RANLIB="$ac_cv_prog_RANLIB"
5749fi
5750
5751
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005752if test -n "$ac_tool_prefix"; then
5753 for ac_prog in ar aal
5754 do
5755 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5756set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5758$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005759if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005760 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005761else
5762 if test -n "$AR"; then
5763 ac_cv_prog_AR="$AR" # Let the user override the test.
5764else
5765as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5766for as_dir in $PATH
5767do
5768 IFS=$as_save_IFS
5769 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005770 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005771 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005772 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005773 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005774 break 2
5775 fi
5776done
Matthias Kloseb9621712010-04-24 17:59:49 +00005777 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005778IFS=$as_save_IFS
5779
5780fi
5781fi
5782AR=$ac_cv_prog_AR
5783if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5785$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005786else
Matthias Kloseb9621712010-04-24 17:59:49 +00005787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5788$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005789fi
5790
5791
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005792 test -n "$AR" && break
5793 done
5794fi
5795if test -z "$AR"; then
5796 ac_ct_AR=$AR
5797 for ac_prog in ar aal
5798do
5799 # Extract the first word of "$ac_prog", so it can be a program name with args.
5800set dummy $ac_prog; ac_word=$2
5801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5802$as_echo_n "checking for $ac_word... " >&6; }
5803if ${ac_cv_prog_ac_ct_AR+:} false; then :
5804 $as_echo_n "(cached) " >&6
5805else
5806 if test -n "$ac_ct_AR"; then
5807 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5808else
5809as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5810for as_dir in $PATH
5811do
5812 IFS=$as_save_IFS
5813 test -z "$as_dir" && as_dir=.
5814 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005815 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005816 ac_cv_prog_ac_ct_AR="$ac_prog"
5817 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5818 break 2
5819 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005820done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005821 done
5822IFS=$as_save_IFS
5823
5824fi
5825fi
5826ac_ct_AR=$ac_cv_prog_ac_ct_AR
5827if test -n "$ac_ct_AR"; then
5828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5829$as_echo "$ac_ct_AR" >&6; }
5830else
5831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5832$as_echo "no" >&6; }
5833fi
5834
5835
5836 test -n "$ac_ct_AR" && break
5837done
5838
5839 if test "x$ac_ct_AR" = x; then
5840 AR="ar"
5841 else
5842 case $cross_compiling:$ac_tool_warned in
5843yes:)
5844{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5845$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5846ac_tool_warned=yes ;;
5847esac
5848 AR=$ac_ct_AR
5849 fi
5850fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005851
5852
5853# tweak ARFLAGS only if the user didn't set it on the command line
5854
5855if test -z "$ARFLAGS"
5856then
5857 ARFLAGS="rc"
5858fi
5859
doko@ubuntu.com58844492012-06-30 18:25:32 +02005860if test -n "$ac_tool_prefix"; then
5861 for ac_prog in readelf
5862 do
5863 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5864set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5866$as_echo_n "checking for $ac_word... " >&6; }
5867if ${ac_cv_prog_READELF+:} false; then :
5868 $as_echo_n "(cached) " >&6
5869else
5870 if test -n "$READELF"; then
5871 ac_cv_prog_READELF="$READELF" # Let the user override the test.
5872else
5873as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5874for as_dir in $PATH
5875do
5876 IFS=$as_save_IFS
5877 test -z "$as_dir" && as_dir=.
5878 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005879 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02005880 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
5881 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5882 break 2
5883 fi
5884done
5885 done
5886IFS=$as_save_IFS
5887
5888fi
5889fi
5890READELF=$ac_cv_prog_READELF
5891if test -n "$READELF"; then
5892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
5893$as_echo "$READELF" >&6; }
5894else
5895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5896$as_echo "no" >&6; }
5897fi
5898
5899
5900 test -n "$READELF" && break
5901 done
5902fi
5903if test -z "$READELF"; then
5904 ac_ct_READELF=$READELF
5905 for ac_prog in readelf
5906do
5907 # Extract the first word of "$ac_prog", so it can be a program name with args.
5908set dummy $ac_prog; ac_word=$2
5909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5910$as_echo_n "checking for $ac_word... " >&6; }
5911if ${ac_cv_prog_ac_ct_READELF+:} false; then :
5912 $as_echo_n "(cached) " >&6
5913else
5914 if test -n "$ac_ct_READELF"; then
5915 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
5916else
5917as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5918for as_dir in $PATH
5919do
5920 IFS=$as_save_IFS
5921 test -z "$as_dir" && as_dir=.
5922 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005923 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02005924 ac_cv_prog_ac_ct_READELF="$ac_prog"
5925 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5926 break 2
5927 fi
5928done
5929 done
5930IFS=$as_save_IFS
5931
5932fi
5933fi
5934ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
5935if test -n "$ac_ct_READELF"; then
5936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
5937$as_echo "$ac_ct_READELF" >&6; }
5938else
5939 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5940$as_echo "no" >&6; }
5941fi
5942
5943
5944 test -n "$ac_ct_READELF" && break
5945done
5946
5947 if test "x$ac_ct_READELF" = x; then
5948 READELF=":"
5949 else
5950 case $cross_compiling:$ac_tool_warned in
5951yes:)
5952{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5953$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5954ac_tool_warned=yes ;;
5955esac
5956 READELF=$ac_ct_READELF
5957 fi
5958fi
5959
5960if test "$cross_compiling" = yes; then
5961 case "$READELF" in
5962 readelf|:)
5963 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
5964 ;;
5965 esac
5966fi
5967
5968
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005969
Matthias Klosec4c48422012-10-21 23:05:35 +02005970for ac_prog in python$PACKAGE_VERSION python3 python
5971do
5972 # Extract the first word of "$ac_prog", so it can be a program name with args.
5973set dummy $ac_prog; ac_word=$2
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005974{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5975$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klosec4c48422012-10-21 23:05:35 +02005976if ${ac_cv_prog_PYTHON+:} false; then :
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005977 $as_echo_n "(cached) " >&6
5978else
Matthias Klosec4c48422012-10-21 23:05:35 +02005979 if test -n "$PYTHON"; then
5980 ac_cv_prog_PYTHON="$PYTHON" # Let the user override the test.
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005981else
5982as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5983for as_dir in $PATH
5984do
5985 IFS=$as_save_IFS
5986 test -z "$as_dir" && as_dir=.
5987 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005988 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Matthias Klosec4c48422012-10-21 23:05:35 +02005989 ac_cv_prog_PYTHON="$ac_prog"
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005990 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5991 break 2
5992 fi
5993done
5994 done
5995IFS=$as_save_IFS
5996
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005997fi
5998fi
Matthias Klosec4c48422012-10-21 23:05:35 +02005999PYTHON=$ac_cv_prog_PYTHON
6000if test -n "$PYTHON"; then
6001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
6002$as_echo "$PYTHON" >&6; }
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006003else
6004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6005$as_echo "no" >&6; }
6006fi
6007
6008
Matthias Klosec4c48422012-10-21 23:05:35 +02006009 test -n "$PYTHON" && break
6010done
6011test -n "$PYTHON" || PYTHON="not-found"
6012
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006013if test "$PYTHON" = not-found; then
Matthias Klosec4c48422012-10-21 23:05:35 +02006014 ASDLGEN="@echo python: $PYTHON! cannot run \$(srcdir)/Parser/asdl_c.py #"
6015else
6016 ASDLGEN="$PYTHON"
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006017fi
6018
6019
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006020case $MACHDEP in
6021bsdos*|hp*|HP*)
6022 # install -d does not work on BSDI or HP-UX
6023 if test -z "$INSTALL"
6024 then
6025 INSTALL="${srcdir}/install-sh -c"
6026 fi
6027esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006028# Find a good install program. We prefer a C program (faster),
6029# so one script is as good as another. But avoid the broken or
6030# incompatible versions:
6031# SysV /etc/install, /usr/sbin/install
6032# SunOS /usr/etc/install
6033# IRIX /sbin/install
6034# AIX /bin/install
6035# AmigaOS /C/install, which installs bootblocks on floppy discs
6036# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6037# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6038# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6039# OS/2's system install, which has a completely different semantic
6040# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006041# Reject install programs that cannot install multiple files.
6042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6043$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006044if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006045if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006046 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006047else
6048 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6049for as_dir in $PATH
6050do
6051 IFS=$as_save_IFS
6052 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006053 # Account for people who put trailing slashes in PATH elements.
6054case $as_dir/ in #((
6055 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006056 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006057 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006058 /usr/ucb/* ) ;;
6059 *)
6060 # OSF1 and SCO ODT 3.0 have their own names for install.
6061 # Don't use installbsd from OSF since it installs stuff as root
6062 # by default.
6063 for ac_prog in ginstall scoinst install; do
6064 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006065 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006066 if test $ac_prog = install &&
6067 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6068 # AIX install. It has an incompatible calling convention.
6069 :
6070 elif test $ac_prog = install &&
6071 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6072 # program-specific install script used by HP pwplus--don't use.
6073 :
6074 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006075 rm -rf conftest.one conftest.two conftest.dir
6076 echo one > conftest.one
6077 echo two > conftest.two
6078 mkdir conftest.dir
6079 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6080 test -s conftest.one && test -s conftest.two &&
6081 test -s conftest.dir/conftest.one &&
6082 test -s conftest.dir/conftest.two
6083 then
6084 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6085 break 3
6086 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006087 fi
6088 fi
6089 done
6090 done
6091 ;;
6092esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006093
6094 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006095IFS=$as_save_IFS
6096
Matthias Kloseb9621712010-04-24 17:59:49 +00006097rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006098
6099fi
6100 if test "${ac_cv_path_install+set}" = set; then
6101 INSTALL=$ac_cv_path_install
6102 else
6103 # As a last resort, use the slow shell script. Don't cache a
6104 # value for INSTALL within a source directory, because that will
6105 # break other packages using the cache if that directory is
6106 # removed, or if the value is a relative name.
6107 INSTALL=$ac_install_sh
6108 fi
6109fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006110{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6111$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006112
6113# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6114# It thinks the first close brace ends the variable substitution.
6115test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6116
6117test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6118
6119test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6120
Matthias Klose93a0ef12012-03-15 18:08:34 +01006121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6122$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6123if test -z "$MKDIR_P"; then
6124 if ${ac_cv_path_mkdir+:} false; then :
6125 $as_echo_n "(cached) " >&6
6126else
6127 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6128for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6129do
6130 IFS=$as_save_IFS
6131 test -z "$as_dir" && as_dir=.
6132 for ac_prog in mkdir gmkdir; do
6133 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006134 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006135 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6136 'mkdir (GNU coreutils) '* | \
6137 'mkdir (coreutils) '* | \
6138 'mkdir (fileutils) '4.1*)
6139 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6140 break 3;;
6141 esac
6142 done
6143 done
6144 done
6145IFS=$as_save_IFS
6146
6147fi
6148
6149 test -d ./--version && rmdir ./--version
6150 if test "${ac_cv_path_mkdir+set}" = set; then
6151 MKDIR_P="$ac_cv_path_mkdir -p"
6152 else
6153 # As a last resort, use the slow shell script. Don't cache a
6154 # value for MKDIR_P within a source directory, because that will
6155 # break other packages using the cache if that directory is
6156 # removed, or if the value is a relative name.
6157 MKDIR_P="$ac_install_sh -d"
6158 fi
6159fi
6160{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6161$as_echo "$MKDIR_P" >&6; }
6162
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006163
6164# Not every filesystem supports hard links
6165
6166if test -z "$LN" ; then
6167 case $ac_sys_system in
6168 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006169 *) LN=ln;;
6170 esac
6171fi
6172
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006173# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006174
6175ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006176
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006177# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6179$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006180
6181# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006182if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006183 withval=$with_pydebug;
6184if test "$withval" != no
6185then
6186
Matthias Kloseb9621712010-04-24 17:59:49 +00006187$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006188
Matthias Kloseb9621712010-04-24 17:59:49 +00006189 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6190$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006191 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006192 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006193else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6194$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006195fi
6196else
Matthias Kloseb9621712010-04-24 17:59:49 +00006197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6198$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006199fi
6200
6201
6202# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6203# merged with this chunk of code?
6204
6205# Optimizer/debugger flags
6206# ------------------------
6207# (The following bit of code is complicated enough - please keep things
6208# indented properly. Just pretend you're editing Python code. ;-)
6209
6210# There are two parallel sets of case statements below, one that checks to
6211# see if OPT was set and one that does BASECFLAGS setting based upon
6212# compiler and platform. BASECFLAGS tweaks need to be made even if the
6213# user set OPT.
6214
6215# tweak OPT based on compiler and platform, only if the user didn't set
6216# it on the command line
6217
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006218if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006219then
6220 case $GCC in
6221 yes)
6222 if test "$CC" != 'g++' ; then
6223 STRICT_PROTO="-Wstrict-prototypes"
6224 fi
6225 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6226 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6227 WRAP="-fwrapv"
6228 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006229
6230 # Clang also needs -fwrapv
Stefan Krahaf04ff22011-12-08 22:20:31 +01006231 case $CC in
6232 *clang*) WRAP="-fwrapv"
6233 ;;
6234 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006235
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006236 case $ac_cv_prog_cc_g in
6237 yes)
6238 if test "$Py_DEBUG" = 'true' ; then
6239 # Optimization messes up debuggers, so turn it off for
6240 # debug builds.
Mark Dickinsonb2153e92010-05-05 22:31:36 +00006241 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006242 else
6243 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
6244 fi
6245 ;;
6246 *)
6247 OPT="-O3 -Wall $STRICT_PROTO"
6248 ;;
6249 esac
6250 case $ac_sys_system in
6251 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6252 ;;
6253 esac
6254 ;;
6255
6256 *)
6257 OPT="-O"
6258 ;;
6259 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006260fi
6261
6262
6263
6264# The -arch flags for universal builds on OSX
6265UNIVERSAL_ARCH_FLAGS=
6266
6267
6268# tweak BASECFLAGS based on compiler and platform
6269case $GCC in
6270yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006271 # Python doesn't violate C99 aliasing rules, but older versions of
6272 # GCC produce warnings for legal Python code. Enable
6273 # -fno-strict-aliasing on versions of GCC that support but produce
6274 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006275 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6276$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006277 ac_save_cc="$CC"
6278 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006279 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006280 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006281 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006282else
Matthias Kloseb9621712010-04-24 17:59:49 +00006283 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006284/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006285
Matthias Kloseb159a552010-04-25 21:00:44 +00006286
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006287int
6288main ()
6289{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006290
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006291 ;
6292 return 0;
6293}
Matthias Kloseb159a552010-04-25 21:00:44 +00006294
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006295_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006296if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006297
6298 CC="$ac_save_cc -fstrict-aliasing"
6299 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6300 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006301/* end confdefs.h. */
6302
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006303 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006304int
6305main ()
6306{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006307double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006308 ;
6309 return 0;
6310}
Matthias Kloseb159a552010-04-25 21:00:44 +00006311
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006312_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006313if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006314
6315 ac_cv_no_strict_aliasing=no
6316
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006317else
Matthias Kloseb159a552010-04-25 21:00:44 +00006318
6319 ac_cv_no_strict_aliasing=yes
6320
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006321fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006322rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006323
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006324else
Matthias Kloseb159a552010-04-25 21:00:44 +00006325
6326 ac_cv_no_strict_aliasing=no
6327
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006328fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006329rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006330fi
6331
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006332 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006333 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6335$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006336 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006337 then
6338 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6339 fi
6340
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006341 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
6342$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
6343 ac_save_cc="$CC"
6344 CC="$CC -Wunused-result -Werror"
6345 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006346 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006347 $as_echo_n "(cached) " >&6
6348else
6349 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6350/* end confdefs.h. */
6351
6352
6353int
6354main ()
6355{
6356
6357 ;
6358 return 0;
6359}
6360
6361_ACEOF
6362if ac_fn_c_try_compile "$LINENO"; then :
6363
6364 ac_cv_disable_unused_result_warning=yes
6365
6366else
6367
6368 ac_cv_disable_unused_result_warning=no
6369
6370fi
6371rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6372fi
6373
6374 CFLAGS="$save_CFLAGS"
6375 CC="$ac_save_cc"
6376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
6377$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
6378
6379 if test $ac_cv_disable_unused_result_warning = yes
6380 then
6381 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
6382 fi
6383
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006384 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
6385 # support. Without this, treatment of subnormals doesn't follow
6386 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01006387 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006388 alpha*)
6389 BASECFLAGS="$BASECFLAGS -mieee"
6390 ;;
6391 esac
6392
6393 case $ac_sys_system in
6394 SCO_SV*)
6395 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
6396 ;;
6397 # is there any other compiler on Darwin besides gcc?
6398 Darwin*)
6399 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
6400 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussoren666028b2010-04-18 19:07:43 +00006401 if test "${CC}" = gcc
6402 then
Matthias Kloseb9621712010-04-24 17:59:49 +00006403 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
6404$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00006405 case "${UNIVERSALSDK}" in
6406 */MacOSX10.4u.sdk)
6407 # Build using 10.4 SDK, force usage of gcc when the
6408 # compiler is gcc, otherwise the user will get very
6409 # confusing error messages when building on OSX 10.6
6410 CC=gcc-4.0
6411 CPP=cpp-4.0
6412 ;;
6413 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006414 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
6415$as_echo "$CC" >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00006416 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006417
6418
6419 if test "${enable_universalsdk}"; then
6420 UNIVERSAL_ARCH_FLAGS=""
6421 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
6422 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
6423 ARCH_RUN_32BIT=""
Benjamin Peterson99f03762010-04-11 22:15:28 +00006424 LIPO_32BIT_FLAGS=""
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006425 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
6426 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00006427 LIPO_32BIT_FLAGS=""
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00006428 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006429
6430 elif test "$UNIVERSAL_ARCHS" = "all" ; then
6431 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00006432 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00006433 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006434
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006435 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
6436 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00006437 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00006438 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006439
6440 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
6441 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00006442 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00006443 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006444
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006445 else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006446 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 +00006447
6448 fi
6449
6450
Ronald Oussoren666028b2010-04-18 19:07:43 +00006451 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
6452 if test "${UNIVERSALSDK}" != "/"
6453 then
6454 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
6455 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren712979d2010-04-20 19:51:33 +00006456 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006457 fi
6458 fi
6459
6460 # Calculate the right deployment target for this build.
6461 #
6462 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
Ned Deily3784ff92012-06-25 05:04:28 -07006463 if test ${cur_target} '>' 10.2 && \
6464 test ${cur_target} '<' 10.6
6465 then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006466 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00006467 if test ${enable_universalsdk}; then
6468 if test "${UNIVERSAL_ARCHS}" = "all"; then
6469 # Ensure that the default platform for a
6470 # 4-way universal build is OSX 10.5,
6471 # that's the first OS release where
6472 # 4-way builds make sense.
6473 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006474
6475 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
6476 cur_target='10.5'
6477
6478 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
6479 cur_target='10.5'
6480
6481 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
6482 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00006483 fi
6484 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00006485 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00006486 # On Intel macs default to a deployment
6487 # target of 10.4, that's the first OSX
6488 # release with Intel support.
6489 cur_target="10.4"
6490 fi
6491 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006492 fi
6493 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
6494
6495 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
6496 # environment with a value that is the same as what we'll use
6497 # in the Makefile to ensure that we'll get the same compiler
6498 # environment during configure and build time.
6499 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
6500 export MACOSX_DEPLOYMENT_TARGET
6501 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
6502
6503 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006504 esac
6505 ;;
6506
6507*)
6508 case $ac_sys_system in
6509 OpenUNIX*|UnixWare*)
6510 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
6511 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006512 SCO_SV*)
6513 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
6514 ;;
6515 esac
6516 ;;
6517esac
6518
6519if test "$Py_DEBUG" = 'true'; then
6520 :
6521else
6522 OPT="-DNDEBUG $OPT"
6523fi
6524
6525if test "$ac_arch_flags"
6526then
6527 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
6528fi
6529
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006530# Check whether GCC supports PyArg_ParseTuple format
6531if test "$GCC" = "yes"
6532then
Matthias Kloseb9621712010-04-24 17:59:49 +00006533 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
6534$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006535 save_CFLAGS=$CFLAGS
Benjamin Petersonfeb51492013-05-11 13:00:05 -05006536 CFLAGS="$CFLAGS -Werror -Wformat"
Matthias Kloseb9621712010-04-24 17:59:49 +00006537 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006538/* end confdefs.h. */
6539
6540 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006541int
6542main ()
6543{
6544
6545 ;
6546 return 0;
6547}
Matthias Kloseb159a552010-04-25 21:00:44 +00006548
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006549_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006550if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006551
Matthias Kloseb159a552010-04-25 21:00:44 +00006552
Matthias Kloseb9621712010-04-24 17:59:49 +00006553$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006554
Matthias Kloseb159a552010-04-25 21:00:44 +00006555 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006556$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00006557
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006558else
Matthias Kloseb159a552010-04-25 21:00:44 +00006559
6560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006561$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006562
6563fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006564rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6565 CFLAGS=$save_CFLAGS
6566fi
6567
6568# On some compilers, pthreads are available without further options
6569# (e.g. MacOS X). On some of these systems, the compiler will not
6570# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
6571# So we have to see first whether pthreads are available without
6572# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00006573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
6574$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006575if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006576 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006577else
Matthias Kloseb9621712010-04-24 17:59:49 +00006578 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006579 ac_cv_pthread_is_default=no
6580else
Matthias Kloseb9621712010-04-24 17:59:49 +00006581 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006582/* end confdefs.h. */
6583
Stefan Krah7dba5942012-11-22 22:49:11 +01006584#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006585#include <pthread.h>
6586
6587void* routine(void* p){return NULL;}
6588
6589int main(){
6590 pthread_t p;
6591 if(pthread_create(&p,NULL,routine,NULL)!=0)
6592 return 1;
6593 (void)pthread_detach(p);
6594 return 0;
6595}
6596
6597_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006598if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006599
6600 ac_cv_pthread_is_default=yes
6601 ac_cv_kthread=no
6602 ac_cv_pthread=no
6603
6604else
Matthias Kloseb9621712010-04-24 17:59:49 +00006605 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006606fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006607rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6608 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006609fi
6610
6611
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006612fi
6613
Matthias Kloseb9621712010-04-24 17:59:49 +00006614{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
6615$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006616
6617
6618if test $ac_cv_pthread_is_default = yes
6619then
6620 ac_cv_kpthread=no
6621else
6622# -Kpthread, if available, provides the right #defines
6623# and linker options to make pthread_create available
6624# Some compilers won't report that they do not support -Kpthread,
6625# so we need to run a program to see whether it really made the
6626# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
6628$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006629if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006630 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006631else
6632 ac_save_cc="$CC"
6633CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006634if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006635 ac_cv_kpthread=no
6636else
Matthias Kloseb9621712010-04-24 17:59:49 +00006637 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006638/* end confdefs.h. */
6639
Stefan Krah7dba5942012-11-22 22:49:11 +01006640#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006641#include <pthread.h>
6642
6643void* routine(void* p){return NULL;}
6644
6645int main(){
6646 pthread_t p;
6647 if(pthread_create(&p,NULL,routine,NULL)!=0)
6648 return 1;
6649 (void)pthread_detach(p);
6650 return 0;
6651}
6652
6653_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006654if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006655 ac_cv_kpthread=yes
6656else
Matthias Kloseb9621712010-04-24 17:59:49 +00006657 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006658fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006659rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6660 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006661fi
6662
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006663CC="$ac_save_cc"
6664fi
6665
Matthias Kloseb9621712010-04-24 17:59:49 +00006666{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
6667$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006668fi
6669
6670if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
6671then
6672# -Kthread, if available, provides the right #defines
6673# and linker options to make pthread_create available
6674# Some compilers won't report that they do not support -Kthread,
6675# so we need to run a program to see whether it really made the
6676# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
6678$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006679if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006680 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006681else
6682 ac_save_cc="$CC"
6683CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006684if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006685 ac_cv_kthread=no
6686else
Matthias Kloseb9621712010-04-24 17:59:49 +00006687 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006688/* end confdefs.h. */
6689
Stefan Krah7dba5942012-11-22 22:49:11 +01006690#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006691#include <pthread.h>
6692
6693void* routine(void* p){return NULL;}
6694
6695int main(){
6696 pthread_t p;
6697 if(pthread_create(&p,NULL,routine,NULL)!=0)
6698 return 1;
6699 (void)pthread_detach(p);
6700 return 0;
6701}
6702
6703_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006704if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006705 ac_cv_kthread=yes
6706else
Matthias Kloseb9621712010-04-24 17:59:49 +00006707 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006708fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006709rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6710 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006711fi
6712
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006713CC="$ac_save_cc"
6714fi
6715
Matthias Kloseb9621712010-04-24 17:59:49 +00006716{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
6717$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006718fi
6719
6720if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
6721then
6722# -pthread, if available, provides the right #defines
6723# and linker options to make pthread_create available
6724# Some compilers won't report that they do not support -pthread,
6725# so we need to run a program to see whether it really made the
6726# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
6728$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01006729if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006730 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006731else
6732 ac_save_cc="$CC"
6733CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006734if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006735 ac_cv_pthread=no
6736else
Matthias Kloseb9621712010-04-24 17:59:49 +00006737 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006738/* end confdefs.h. */
6739
Stefan Krah7dba5942012-11-22 22:49:11 +01006740#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006741#include <pthread.h>
6742
6743void* routine(void* p){return NULL;}
6744
6745int main(){
6746 pthread_t p;
6747 if(pthread_create(&p,NULL,routine,NULL)!=0)
6748 return 1;
6749 (void)pthread_detach(p);
6750 return 0;
6751}
6752
6753_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006754if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006755 ac_cv_pthread=yes
6756else
Matthias Kloseb9621712010-04-24 17:59:49 +00006757 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006758fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006759rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6760 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006761fi
6762
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006763CC="$ac_save_cc"
6764fi
6765
Matthias Kloseb9621712010-04-24 17:59:49 +00006766{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
6767$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006768fi
6769
6770# If we have set a CC compiler flag for thread support then
6771# check if it works for CXX, too.
6772ac_cv_cxx_thread=no
6773if test ! -z "$CXX"
6774then
Matthias Kloseb9621712010-04-24 17:59:49 +00006775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
6776$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006777ac_save_cxx="$CXX"
6778
6779if test "$ac_cv_kpthread" = "yes"
6780then
6781 CXX="$CXX -Kpthread"
6782 ac_cv_cxx_thread=yes
6783elif test "$ac_cv_kthread" = "yes"
6784then
6785 CXX="$CXX -Kthread"
6786 ac_cv_cxx_thread=yes
6787elif test "$ac_cv_pthread" = "yes"
6788then
6789 CXX="$CXX -pthread"
6790 ac_cv_cxx_thread=yes
6791fi
6792
6793if test $ac_cv_cxx_thread = yes
6794then
6795 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
6796 $CXX -c conftest.$ac_ext 2>&5
6797 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
6798 && test -s conftest$ac_exeext && ./conftest$ac_exeext
6799 then
6800 ac_cv_cxx_thread=yes
6801 else
6802 ac_cv_cxx_thread=no
6803 fi
6804 rm -fr conftest*
6805fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006806{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
6807$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006808fi
6809CXX="$ac_save_cxx"
6810
6811
6812# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00006813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6814$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006815if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006816 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006817else
Matthias Kloseb9621712010-04-24 17:59:49 +00006818 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006819/* end confdefs.h. */
6820#include <stdlib.h>
6821#include <stdarg.h>
6822#include <string.h>
6823#include <float.h>
6824
6825int
6826main ()
6827{
6828
6829 ;
6830 return 0;
6831}
6832_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006833if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006834 ac_cv_header_stdc=yes
6835else
Matthias Kloseb9621712010-04-24 17:59:49 +00006836 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006837fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006838rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6839
6840if test $ac_cv_header_stdc = yes; then
6841 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006842 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006843/* end confdefs.h. */
6844#include <string.h>
6845
6846_ACEOF
6847if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006848 $EGREP "memchr" >/dev/null 2>&1; then :
6849
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006850else
6851 ac_cv_header_stdc=no
6852fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006853rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006854
6855fi
6856
6857if test $ac_cv_header_stdc = yes; then
6858 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006859 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006860/* end confdefs.h. */
6861#include <stdlib.h>
6862
6863_ACEOF
6864if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006865 $EGREP "free" >/dev/null 2>&1; then :
6866
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006867else
6868 ac_cv_header_stdc=no
6869fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006870rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006871
6872fi
6873
6874if test $ac_cv_header_stdc = yes; then
6875 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00006876 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006877 :
6878else
Matthias Kloseb9621712010-04-24 17:59:49 +00006879 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006880/* end confdefs.h. */
6881#include <ctype.h>
6882#include <stdlib.h>
6883#if ((' ' & 0x0FF) == 0x020)
6884# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6885# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6886#else
6887# define ISLOWER(c) \
6888 (('a' <= (c) && (c) <= 'i') \
6889 || ('j' <= (c) && (c) <= 'r') \
6890 || ('s' <= (c) && (c) <= 'z'))
6891# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6892#endif
6893
6894#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6895int
6896main ()
6897{
6898 int i;
6899 for (i = 0; i < 256; i++)
6900 if (XOR (islower (i), ISLOWER (i))
6901 || toupper (i) != TOUPPER (i))
6902 return 2;
6903 return 0;
6904}
6905_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006906if ac_fn_c_try_run "$LINENO"; then :
6907
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006908else
Matthias Kloseb9621712010-04-24 17:59:49 +00006909 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006910fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006911rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6912 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006913fi
6914
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006915fi
6916fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006917{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6918$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006919if test $ac_cv_header_stdc = yes; then
6920
Matthias Kloseb9621712010-04-24 17:59:49 +00006921$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006922
6923fi
6924
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +02006925ac_save_cppflags="$CPPFLAGS"
6926CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
Benjamin Petersonb77fe172011-09-13 17:20:47 -04006927for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006928fcntl.h grp.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006929ieeefp.h io.h langinfo.h libintl.h ncurses.h process.h pthread.h \
Benjamin Peterson94b580d2011-08-02 17:30:04 -05006930sched.h shadow.h signal.h stdint.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006931unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006932poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01006933sys/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 +01006934sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006935sys/param.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01006936sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00006937sys/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 -07006938libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimesf0400ba2013-06-18 13:22:17 +02006939bluetooth/bluetooth.h linux/tipc.h spawn.h util.h alloca.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006940do :
6941 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6942ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006943if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006944 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006945#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006946_ACEOF
6947
6948fi
6949
Guido van Rossum627b2d71993-12-24 10:39:16 +00006950done
6951
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +02006952CPPFLAGS=$ac_save_cppflags
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006953ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006954for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00006955 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6957$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006958if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006959 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006960else
Matthias Kloseb9621712010-04-24 17:59:49 +00006961 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006962/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006963#include <sys/types.h>
6964#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006965
Martin v. Löwis11437992002-04-12 09:54:03 +00006966int
6967main ()
6968{
6969if ((DIR *) 0)
6970return 0;
6971 ;
6972 return 0;
6973}
6974_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006975if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006976 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006977else
Matthias Kloseb9621712010-04-24 17:59:49 +00006978 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006979fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006980rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006981fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006982eval ac_res=\$$as_ac_Header
6983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6984$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006985if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006986 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006987#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006988_ACEOF
6989
6990ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006991fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006992
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006993done
6994# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6995if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006996 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6997$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006998if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006999 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007000else
Martin v. Löwis11437992002-04-12 09:54:03 +00007001 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007002cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007003/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007004
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007005/* Override any GCC internal prototype to avoid an error.
7006 Use char because int might match the return type of a GCC
7007 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007008#ifdef __cplusplus
7009extern "C"
7010#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007011char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007012int
7013main ()
7014{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007015return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007016 ;
7017 return 0;
7018}
7019_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007020for ac_lib in '' dir; do
7021 if test -z "$ac_lib"; then
7022 ac_res="none required"
7023 else
7024 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007025 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007026 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007027 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007028 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007029fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007030rm -f core conftest.err conftest.$ac_objext \
7031 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007032 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007033 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007034fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007035done
Victor Stinnere0be4232011-10-25 13:06:09 +02007036if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007037
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007038else
7039 ac_cv_search_opendir=no
7040fi
7041rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007042LIBS=$ac_func_search_save_LIBS
7043fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007044{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7045$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007046ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007047if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007048 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007049
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007050fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007051
Michael W. Hudson54241132001-12-07 15:38:26 +00007052else
Matthias Kloseb9621712010-04-24 17:59:49 +00007053 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7054$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007055if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007056 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007057else
7058 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007059cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007060/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007061
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007062/* Override any GCC internal prototype to avoid an error.
7063 Use char because int might match the return type of a GCC
7064 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007065#ifdef __cplusplus
7066extern "C"
7067#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007068char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007069int
7070main ()
7071{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007072return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007073 ;
7074 return 0;
7075}
7076_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007077for ac_lib in '' x; do
7078 if test -z "$ac_lib"; then
7079 ac_res="none required"
7080 else
7081 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007082 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007083 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007084 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007085 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007086fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007087rm -f core conftest.err conftest.$ac_objext \
7088 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007089 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007090 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007091fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007092done
Victor Stinnere0be4232011-10-25 13:06:09 +02007093if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007094
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007095else
7096 ac_cv_search_opendir=no
7097fi
7098rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007099LIBS=$ac_func_search_save_LIBS
7100fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007101{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7102$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007103ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007104if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007105 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007106
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007107fi
7108
7109fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007110
Matthias Kloseb9621712010-04-24 17:59:49 +00007111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7112$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007113if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007114 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007115else
Matthias Kloseb9621712010-04-24 17:59:49 +00007116 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007117/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007118#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007119int
7120main ()
7121{
7122return makedev(0, 0);
7123 ;
7124 return 0;
7125}
7126_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007127if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007128 ac_cv_header_sys_types_h_makedev=yes
7129else
Matthias Kloseb9621712010-04-24 17:59:49 +00007130 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007131fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007132rm -f core conftest.err conftest.$ac_objext \
7133 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007134
7135fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007136{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7137$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007138
7139if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007140ac_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 +02007141if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007142
Matthias Kloseb9621712010-04-24 17:59:49 +00007143$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007144
7145fi
7146
7147
7148
7149 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007150 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 +02007151if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007152
Matthias Kloseb9621712010-04-24 17:59:49 +00007153$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007154
7155fi
7156
7157
7158 fi
7159fi
7160
Michael W. Hudson54241132001-12-07 15:38:26 +00007161
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007162# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
7163for ac_header in net/if.h
7164do :
7165 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
7166#ifdef STDC_HEADERS
7167# include <stdlib.h>
7168# include <stddef.h>
7169#else
7170# ifdef HAVE_STDLIB_H
7171# include <stdlib.h>
7172# endif
7173#endif
7174#ifdef HAVE_SYS_SOCKET_H
7175# include <sys/socket.h>
7176#endif
7177
7178"
Victor Stinnere0be4232011-10-25 13:06:09 +02007179if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007180 cat >>confdefs.h <<_ACEOF
7181#define HAVE_NET_IF_H 1
7182_ACEOF
7183
7184fi
7185
7186done
7187
7188
7189
Martin v. Löwisae2830c2004-09-18 09:54:52 +00007190# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00007191for ac_header in term.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007192do :
7193 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00007194#ifdef HAVE_CURSES_H
7195#include <curses.h>
7196#endif
7197
Matthias Kloseb9621712010-04-24 17:59:49 +00007198"
Victor Stinnere0be4232011-10-25 13:06:09 +02007199if test "x$ac_cv_header_term_h" = xyes; then :
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00007200 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007201#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00007202_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00007203
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00007204fi
7205
7206done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00007207
7208
Martin v. Löwis11017b12006-01-14 18:12:57 +00007209# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007210for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007211do :
7212 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 +00007213#ifdef HAVE_ASM_TYPES_H
7214#include <asm/types.h>
7215#endif
7216#ifdef HAVE_SYS_SOCKET_H
7217#include <sys/socket.h>
7218#endif
7219
Matthias Kloseb9621712010-04-24 17:59:49 +00007220"
Victor Stinnere0be4232011-10-25 13:06:09 +02007221if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007222 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007223#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007224_ACEOF
7225
7226fi
7227
7228done
7229
7230
Charles-François Natali47413c12011-10-06 19:47:44 +02007231# On Linux, can.h and can/raw.h require sys/socket.h
7232for ac_header in linux/can.h linux/can/raw.h
7233do :
7234 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7235ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
7236#ifdef HAVE_SYS_SOCKET_H
7237#include <sys/socket.h>
7238#endif
7239
7240"
7241if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7242 cat >>confdefs.h <<_ACEOF
7243#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7244_ACEOF
7245
7246fi
7247
7248done
7249
7250
Guido van Rossum627b2d71993-12-24 10:39:16 +00007251# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00007252was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
7254$as_echo_n "checking for clock_t in time.h... " >&6; }
7255cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007256/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007257#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007258
7259_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007260if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007261 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00007262 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007263else
Martin v. Löwis11437992002-04-12 09:54:03 +00007264
7265
Matthias Kloseb9621712010-04-24 17:59:49 +00007266$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00007267
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007268
Guido van Rossum627b2d71993-12-24 10:39:16 +00007269fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007270rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007271
Matthias Kloseb9621712010-04-24 17:59:49 +00007272{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
7273$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00007274
Matthias Kloseb9621712010-04-24 17:59:49 +00007275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
7276$as_echo_n "checking for makedev... " >&6; }
7277cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007278/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007279
Jesus Cea740f53a2010-04-28 11:35:30 +00007280#if defined(MAJOR_IN_MKDEV)
7281#include <sys/mkdev.h>
7282#elif defined(MAJOR_IN_SYSMACROS)
7283#include <sys/sysmacros.h>
7284#else
7285#include <sys/types.h>
7286#endif
7287
Neal Norwitz11690112002-07-30 01:08:28 +00007288int
7289main ()
7290{
Jesus Cea740f53a2010-04-28 11:35:30 +00007291
7292 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00007293 ;
7294 return 0;
7295}
Matthias Kloseb159a552010-04-25 21:00:44 +00007296
Neal Norwitz11690112002-07-30 01:08:28 +00007297_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007298if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007299 ac_cv_has_makedev=yes
7300else
Matthias Kloseb9621712010-04-24 17:59:49 +00007301 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007302fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007303rm -f core conftest.err conftest.$ac_objext \
7304 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007305{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
7306$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007307if test "$ac_cv_has_makedev" = "yes"; then
7308
Matthias Kloseb9621712010-04-24 17:59:49 +00007309$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007310
7311fi
7312
Martin v. Löwis399a6892002-10-04 10:22:02 +00007313# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7314# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7315# defined, but the compiler does not support pragma redefine_extname,
7316# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7317# structures (such as rlimit64) without declaring them. As a
7318# work-around, disable LFS on such configurations
7319
7320use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00007321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
7322$as_echo_n "checking Solaris LFS bug... " >&6; }
7323cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007324/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007325
7326#define _LARGEFILE_SOURCE 1
7327#define _FILE_OFFSET_BITS 64
7328#include <sys/resource.h>
7329
Martin v. Löwis399a6892002-10-04 10:22:02 +00007330int
7331main ()
7332{
7333struct rlimit foo;
7334 ;
7335 return 0;
7336}
7337_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007338if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00007339 sol_lfs_bug=no
7340else
Matthias Kloseb9621712010-04-24 17:59:49 +00007341 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00007342fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007343rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007344{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
7345$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007346if test "$sol_lfs_bug" = "yes"; then
7347 use_lfs=no
7348fi
7349
7350if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00007351# Two defines needed to enable largefile support on various platforms
7352# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00007353case $ac_sys_system/$ac_sys_release in
7354AIX*)
7355
7356$as_echo "#define _LARGE_FILES 1" >>confdefs.h
7357
7358 ;;
7359esac
Guido van Rossum810cc512001-09-09 23:51:39 +00007360
Matthias Kloseb9621712010-04-24 17:59:49 +00007361$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007362
7363
Matthias Kloseb9621712010-04-24 17:59:49 +00007364$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00007365
Martin v. Löwis399a6892002-10-04 10:22:02 +00007366fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007367
Guido van Rossum84e7b241996-08-19 21:59:00 +00007368# Add some code to confdefs.h so that the test for off_t works on SCO
7369cat >> confdefs.h <<\EOF
7370#if defined(SCO_DS)
7371#undef _OFF_T
7372#endif
7373EOF
7374
Guido van Rossumef2255b2000-03-10 22:30:29 +00007375# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00007376ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007377if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007378
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007379else
Martin v. Löwis11437992002-04-12 09:54:03 +00007380
7381cat >>confdefs.h <<_ACEOF
7382#define mode_t int
7383_ACEOF
7384
7385fi
7386
Matthias Kloseb9621712010-04-24 17:59:49 +00007387ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007388if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007389
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007390else
Martin v. Löwis11437992002-04-12 09:54:03 +00007391
7392cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007393#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00007394_ACEOF
7395
7396fi
7397
Matthias Kloseb9621712010-04-24 17:59:49 +00007398ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007399if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007400
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007401else
Martin v. Löwis11437992002-04-12 09:54:03 +00007402
7403cat >>confdefs.h <<_ACEOF
7404#define pid_t int
7405_ACEOF
7406
7407fi
7408
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007409
Martin v. Löwis11437992002-04-12 09:54:03 +00007410cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00007411#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00007412_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007413
Matthias Kloseb9621712010-04-24 17:59:49 +00007414ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007415if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007416
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007417else
Martin v. Löwis11437992002-04-12 09:54:03 +00007418
7419cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007420#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007421_ACEOF
7422
7423fi
7424
Matthias Kloseb9621712010-04-24 17:59:49 +00007425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
7426$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007427if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007428 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007429else
Matthias Kloseb9621712010-04-24 17:59:49 +00007430 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007431/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007432#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007433
7434_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007435if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007436 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007437 ac_cv_type_uid_t=yes
7438else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007439 ac_cv_type_uid_t=no
7440fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007441rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007442
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007443fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007444{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
7445$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007446if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007447
Matthias Kloseb9621712010-04-24 17:59:49 +00007448$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007449
7450
Matthias Kloseb9621712010-04-24 17:59:49 +00007451$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007452
7453fi
7454
Mark Dickinsonce31f662012-12-02 13:20:22 +00007455
7456# There are two separate checks for each of the exact-width integer types we
7457# need. First we check whether the type is available using the usual
7458# AC_CHECK_TYPE macro with the default includes (which includes <inttypes.h>
7459# and <stdint.h> where available). We then also use the special type checks of
7460# the form AC_TYPE_UINT32_T, which in the case that uint32_t is not available
7461# directly, #define's uint32_t to be a suitable type.
7462
7463ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
7464if test "x$ac_cv_type_uint32_t" = xyes; then :
7465
7466$as_echo "#define HAVE_UINT32_T 1" >>confdefs.h
7467
7468fi
7469
Matthias Kloseb9621712010-04-24 17:59:49 +00007470ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
7471case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007472 no|yes) ;; #(
7473 *)
7474
Matthias Kloseb9621712010-04-24 17:59:49 +00007475$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00007476
7477
7478cat >>confdefs.h <<_ACEOF
7479#define uint32_t $ac_cv_c_uint32_t
7480_ACEOF
7481;;
7482 esac
7483
Mark Dickinsonce31f662012-12-02 13:20:22 +00007484
7485ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
7486if test "x$ac_cv_type_uint64_t" = xyes; then :
7487
7488$as_echo "#define HAVE_UINT64_T 1" >>confdefs.h
7489
7490fi
7491
Matthias Kloseb9621712010-04-24 17:59:49 +00007492ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
7493case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007494 no|yes) ;; #(
7495 *)
7496
Matthias Kloseb9621712010-04-24 17:59:49 +00007497$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00007498
7499
7500cat >>confdefs.h <<_ACEOF
7501#define uint64_t $ac_cv_c_uint64_t
7502_ACEOF
7503;;
7504 esac
7505
Mark Dickinsonce31f662012-12-02 13:20:22 +00007506
7507ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
7508if test "x$ac_cv_type_int32_t" = xyes; then :
7509
7510$as_echo "#define HAVE_INT32_T 1" >>confdefs.h
7511
7512fi
7513
Matthias Kloseb9621712010-04-24 17:59:49 +00007514ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
7515case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007516 no|yes) ;; #(
7517 *)
7518
7519cat >>confdefs.h <<_ACEOF
7520#define int32_t $ac_cv_c_int32_t
7521_ACEOF
7522;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00007523esac
7524
Mark Dickinsonce31f662012-12-02 13:20:22 +00007525
7526ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
7527if test "x$ac_cv_type_int64_t" = xyes; then :
7528
7529$as_echo "#define HAVE_INT64_T 1" >>confdefs.h
7530
7531fi
7532
Matthias Kloseb9621712010-04-24 17:59:49 +00007533ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
7534case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007535 no|yes) ;; #(
7536 *)
7537
7538cat >>confdefs.h <<_ACEOF
7539#define int64_t $ac_cv_c_int64_t
7540_ACEOF
7541;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007542esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00007543
Mark Dickinsonce31f662012-12-02 13:20:22 +00007544
Matthias Kloseb9621712010-04-24 17:59:49 +00007545ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007546if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007547
Matthias Kloseb9621712010-04-24 17:59:49 +00007548$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00007549
7550fi
7551
Stefan Krah1919b7e2012-03-21 18:25:23 +01007552ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
7553if test "x$ac_cv_type___uint128_t" = xyes; then :
7554
7555$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
7556
7557fi
7558
Jack Jansendd19cf82001-12-06 22:36:17 +00007559
Michael W. Hudson54241132001-12-07 15:38:26 +00007560# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007561# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007562# The cast to long int works around a bug in the HP C Compiler
7563# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7564# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7565# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
7567$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007568if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007569 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007570else
Matthias Kloseb9621712010-04-24 17:59:49 +00007571 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 +00007572
Martin v. Löwis11437992002-04-12 09:54:03 +00007573else
Matthias Kloseb9621712010-04-24 17:59:49 +00007574 if test "$ac_cv_type_int" = yes; then
7575 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7576$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007577as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02007578See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007579 else
7580 ac_cv_sizeof_int=0
7581 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007582fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007583
Martin v. Löwis11437992002-04-12 09:54:03 +00007584fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007585{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
7586$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007587
7588
7589
Martin v. Löwis11437992002-04-12 09:54:03 +00007590cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007591#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007592_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007593
7594
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007595# The cast to long int works around a bug in the HP C Compiler
7596# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7597# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7598# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
7600$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007601if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007602 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007603else
Matthias Kloseb9621712010-04-24 17:59:49 +00007604 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 +00007605
Martin v. Löwis11437992002-04-12 09:54:03 +00007606else
Matthias Kloseb9621712010-04-24 17:59:49 +00007607 if test "$ac_cv_type_long" = yes; then
7608 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7609$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007610as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02007611See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007612 else
7613 ac_cv_sizeof_long=0
7614 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007615fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007616
Martin v. Löwis11437992002-04-12 09:54:03 +00007617fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007618{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
7619$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007620
7621
7622
Martin v. Löwis11437992002-04-12 09:54:03 +00007623cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007624#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007625_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007626
7627
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007628# The cast to long int works around a bug in the HP C Compiler
7629# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7630# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7631# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
7633$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007634if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007635 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007636else
Matthias Kloseb9621712010-04-24 17:59:49 +00007637 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 +00007638
Martin v. Löwis11437992002-04-12 09:54:03 +00007639else
Matthias Kloseb9621712010-04-24 17:59:49 +00007640 if test "$ac_cv_type_void_p" = yes; then
7641 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7642$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007643as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02007644See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007645 else
7646 ac_cv_sizeof_void_p=0
7647 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007648fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007649
Martin v. Löwis11437992002-04-12 09:54:03 +00007650fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007651{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
7652$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007653
7654
7655
Martin v. Löwis11437992002-04-12 09:54:03 +00007656cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007657#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00007658_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007659
7660
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007661# The cast to long int works around a bug in the HP C Compiler
7662# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7663# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7664# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
7666$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007667if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007668 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007669else
Matthias Kloseb9621712010-04-24 17:59:49 +00007670 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 +00007671
Martin v. Löwis11437992002-04-12 09:54:03 +00007672else
Matthias Kloseb9621712010-04-24 17:59:49 +00007673 if test "$ac_cv_type_short" = yes; then
7674 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7675$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007676as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02007677See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007678 else
7679 ac_cv_sizeof_short=0
7680 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007681fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007682
Martin v. Löwis11437992002-04-12 09:54:03 +00007683fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007684{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
7685$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007686
7687
7688
Martin v. Löwis11437992002-04-12 09:54:03 +00007689cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007690#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007691_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007692
7693
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007694# The cast to long int works around a bug in the HP C Compiler
7695# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7696# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7697# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
7699$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007700if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007701 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007702else
Matthias Kloseb9621712010-04-24 17:59:49 +00007703 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 +00007704
Martin v. Löwis11437992002-04-12 09:54:03 +00007705else
Matthias Kloseb9621712010-04-24 17:59:49 +00007706 if test "$ac_cv_type_float" = yes; then
7707 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7708$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007709as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02007710See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007711 else
7712 ac_cv_sizeof_float=0
7713 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007714fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007715
Martin v. Löwis11437992002-04-12 09:54:03 +00007716fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007717{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
7718$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007719
7720
7721
Martin v. Löwis11437992002-04-12 09:54:03 +00007722cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007723#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007724_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007725
7726
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007727# The cast to long int works around a bug in the HP C Compiler
7728# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7729# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7730# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
7732$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007733if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007734 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007735else
Matthias Kloseb9621712010-04-24 17:59:49 +00007736 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 +00007737
Martin v. Löwis11437992002-04-12 09:54:03 +00007738else
Matthias Kloseb9621712010-04-24 17:59:49 +00007739 if test "$ac_cv_type_double" = yes; then
7740 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7741$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007742as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02007743See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007744 else
7745 ac_cv_sizeof_double=0
7746 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007747fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007748
Martin v. Löwis11437992002-04-12 09:54:03 +00007749fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007750{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
7751$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007752
7753
7754
Martin v. Löwis11437992002-04-12 09:54:03 +00007755cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007756#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007757_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007758
7759
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007760# The cast to long int works around a bug in the HP C Compiler
7761# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7762# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7763# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
7765$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007766if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007767 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007768else
Matthias Kloseb9621712010-04-24 17:59:49 +00007769 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 +00007770
Martin v. Löwis11437992002-04-12 09:54:03 +00007771else
Matthias Kloseb9621712010-04-24 17:59:49 +00007772 if test "$ac_cv_type_fpos_t" = yes; then
7773 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7774$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007775as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007776See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007777 else
7778 ac_cv_sizeof_fpos_t=0
7779 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007780fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007781
Martin v. Löwis11437992002-04-12 09:54:03 +00007782fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007783{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
7784$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007785
7786
7787
Martin v. Löwis11437992002-04-12 09:54:03 +00007788cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007789#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007790_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007791
Michael W. Hudson54241132001-12-07 15:38:26 +00007792
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007793# The cast to long int works around a bug in the HP C Compiler
7794# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7795# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7796# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
7798$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007799if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007800 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007801else
Matthias Kloseb9621712010-04-24 17:59:49 +00007802 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 +00007803
Martin v. Löwis18e16552006-02-15 17:27:45 +00007804else
Matthias Kloseb9621712010-04-24 17:59:49 +00007805 if test "$ac_cv_type_size_t" = yes; then
7806 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7807$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007808as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007809See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007810 else
7811 ac_cv_sizeof_size_t=0
7812 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00007813fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007814
Martin v. Löwis18e16552006-02-15 17:27:45 +00007815fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007816{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
7817$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007818
7819
7820
Martin v. Löwis18e16552006-02-15 17:27:45 +00007821cat >>confdefs.h <<_ACEOF
7822#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
7823_ACEOF
7824
7825
Christian Heimes400adb02008-02-01 08:12:03 +00007826# The cast to long int works around a bug in the HP C Compiler
7827# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7828# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7829# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
7831$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007832if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007833 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00007834else
Matthias Kloseb9621712010-04-24 17:59:49 +00007835 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 +00007836
Christian Heimes400adb02008-02-01 08:12:03 +00007837else
Matthias Kloseb9621712010-04-24 17:59:49 +00007838 if test "$ac_cv_type_pid_t" = yes; then
7839 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7840$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007841as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007842See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00007843 else
7844 ac_cv_sizeof_pid_t=0
7845 fi
7846fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007847
Christian Heimes400adb02008-02-01 08:12:03 +00007848fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007849{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
7850$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00007851
7852
7853
7854cat >>confdefs.h <<_ACEOF
7855#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
7856_ACEOF
7857
7858
Michael W. Hudson54241132001-12-07 15:38:26 +00007859
Matthias Kloseb9621712010-04-24 17:59:49 +00007860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
7861$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007862have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007863cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007864/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007865
Martin v. Löwis11437992002-04-12 09:54:03 +00007866int
7867main ()
7868{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007869long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007870 ;
7871 return 0;
7872}
7873_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007874if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007875
7876
Matthias Kloseb9621712010-04-24 17:59:49 +00007877$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007878
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007879 have_long_long=yes
7880
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007881fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007882rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007883{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
7884$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007885if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007886# The cast to long int works around a bug in the HP C Compiler
7887# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7888# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7889# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
7891$as_echo_n "checking size of long long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007892if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007893 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007894else
Matthias Kloseb9621712010-04-24 17:59:49 +00007895 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 +00007896
Martin v. Löwis11437992002-04-12 09:54:03 +00007897else
Matthias Kloseb9621712010-04-24 17:59:49 +00007898 if test "$ac_cv_type_long_long" = yes; then
7899 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7900$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007901as_fn_error 77 "cannot compute sizeof (long long)
Victor Stinnere0be4232011-10-25 13:06:09 +02007902See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007903 else
7904 ac_cv_sizeof_long_long=0
7905 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007906fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007907
Martin v. Löwis11437992002-04-12 09:54:03 +00007908fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007909{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
7910$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007911
7912
7913
Martin v. Löwis11437992002-04-12 09:54:03 +00007914cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007915#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007916_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007917
Michael W. Hudson54241132001-12-07 15:38:26 +00007918
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007919fi
7920
Matthias Kloseb9621712010-04-24 17:59:49 +00007921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
7922$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007923have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007924cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007925/* end confdefs.h. */
7926
7927int
7928main ()
7929{
7930long double x; x = (long double)0;
7931 ;
7932 return 0;
7933}
7934_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007935if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007936
7937
Matthias Kloseb9621712010-04-24 17:59:49 +00007938$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007939
7940 have_long_double=yes
7941
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007942fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007943rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007944{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
7945$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007946if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007947# The cast to long int works around a bug in the HP C Compiler
7948# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7949# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7950# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
7952$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007953if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007954 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007955else
Matthias Kloseb9621712010-04-24 17:59:49 +00007956 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 +00007957
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007958else
Matthias Kloseb9621712010-04-24 17:59:49 +00007959 if test "$ac_cv_type_long_double" = yes; then
7960 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7961$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007962as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02007963See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007964 else
7965 ac_cv_sizeof_long_double=0
7966 fi
7967fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007968
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007969fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007970{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
7971$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007972
7973
7974
7975cat >>confdefs.h <<_ACEOF
7976#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7977_ACEOF
7978
7979
7980fi
7981
7982
Matthias Kloseb9621712010-04-24 17:59:49 +00007983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7984$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007985have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007986cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00007987/* end confdefs.h. */
7988
7989int
7990main ()
7991{
7992_Bool x; x = (_Bool)0;
7993 ;
7994 return 0;
7995}
7996_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007997if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00007998
7999
Matthias Kloseb9621712010-04-24 17:59:49 +00008000$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00008001
8002 have_c99_bool=yes
8003
Thomas Woutersb2137042007-02-01 18:02:27 +00008004fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008005rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008006{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
8007$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008008if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008009# The cast to long int works around a bug in the HP C Compiler
8010# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8011# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8012# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8014$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008015if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008016 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008017else
Matthias Kloseb9621712010-04-24 17:59:49 +00008018 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 +00008019
Thomas Woutersb2137042007-02-01 18:02:27 +00008020else
Matthias Kloseb9621712010-04-24 17:59:49 +00008021 if test "$ac_cv_type__Bool" = yes; then
8022 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8023$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008024as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008025See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008026 else
8027 ac_cv_sizeof__Bool=0
8028 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008029fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008030
Thomas Woutersb2137042007-02-01 18:02:27 +00008031fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008032{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8033$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008034
8035
8036
Thomas Woutersb2137042007-02-01 18:02:27 +00008037cat >>confdefs.h <<_ACEOF
8038#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8039_ACEOF
8040
8041
8042fi
8043
Matthias Kloseb9621712010-04-24 17:59:49 +00008044ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00008045 #include <stdint.h>
8046 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00008047 #ifdef HAVE_INTTYPES_H
8048 #include <inttypes.h>
8049 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00008050"
Victor Stinnere0be4232011-10-25 13:06:09 +02008051if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00008052
8053cat >>confdefs.h <<_ACEOF
8054#define HAVE_UINTPTR_T 1
8055_ACEOF
8056
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008057# The cast to long int works around a bug in the HP C Compiler
8058# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8059# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8060# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8062$as_echo_n "checking size of uintptr_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008063if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008064 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008065else
Matthias Kloseb9621712010-04-24 17:59:49 +00008066 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 +00008067
Martin v. Löwis11437992002-04-12 09:54:03 +00008068else
Matthias Kloseb9621712010-04-24 17:59:49 +00008069 if test "$ac_cv_type_uintptr_t" = yes; then
8070 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8071$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008072as_fn_error 77 "cannot compute sizeof (uintptr_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008073See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008074 else
8075 ac_cv_sizeof_uintptr_t=0
8076 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008077fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008078
Martin v. Löwis11437992002-04-12 09:54:03 +00008079fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008080{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8081$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008082
8083
8084
Martin v. Löwis11437992002-04-12 09:54:03 +00008085cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008086#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008087_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008088
Michael W. Hudson54241132001-12-07 15:38:26 +00008089
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008090fi
8091
Thomas Wouters89f507f2006-12-13 04:49:30 +00008092
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008093# The cast to long int works around a bug in the HP C Compiler
8094# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8095# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8096# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8098$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008099if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008100 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008101else
Matthias Kloseb9621712010-04-24 17:59:49 +00008102 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008103#ifdef HAVE_SYS_TYPES_H
8104#include <sys/types.h>
8105#endif
8106
Matthias Kloseb9621712010-04-24 17:59:49 +00008107"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008108
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008109else
Matthias Kloseb9621712010-04-24 17:59:49 +00008110 if test "$ac_cv_type_off_t" = yes; then
8111 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8112$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008113as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008114See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008115 else
8116 ac_cv_sizeof_off_t=0
8117 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008118fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008119
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008120fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008121{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8122$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008123
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008124
8125
Martin v. Löwis11437992002-04-12 09:54:03 +00008126cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008127#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008128_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008129
Michael W. Hudson54241132001-12-07 15:38:26 +00008130
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008131
Matthias Kloseb9621712010-04-24 17:59:49 +00008132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8133$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008134if test "$have_long_long" = yes
8135then
8136if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008137 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008138
Matthias Kloseb9621712010-04-24 17:59:49 +00008139$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008140
Matthias Kloseb9621712010-04-24 17:59:49 +00008141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8142$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008143else
Matthias Kloseb9621712010-04-24 17:59:49 +00008144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8145$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008146fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00008147else
Matthias Kloseb9621712010-04-24 17:59:49 +00008148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8149$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008150fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008151
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008152# The cast to long int works around a bug in the HP C Compiler
8153# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8154# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8155# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008156{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8157$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008158if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008159 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008160else
Matthias Kloseb9621712010-04-24 17:59:49 +00008161 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008162#ifdef HAVE_SYS_TYPES_H
8163#include <sys/types.h>
8164#endif
8165#ifdef HAVE_TIME_H
8166#include <time.h>
8167#endif
8168
Matthias Kloseb9621712010-04-24 17:59:49 +00008169"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008170
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008171else
Matthias Kloseb9621712010-04-24 17:59:49 +00008172 if test "$ac_cv_type_time_t" = yes; then
8173 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8174$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008175as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008176See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008177 else
8178 ac_cv_sizeof_time_t=0
8179 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008180fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008181
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008182fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008183{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8184$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008185
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008186
8187
Martin v. Löwis11437992002-04-12 09:54:03 +00008188cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008189#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008190_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008191
Michael W. Hudson54241132001-12-07 15:38:26 +00008192
8193
Trent Mick635f6fb2000-08-23 21:33:05 +00008194# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008195ac_save_cc="$CC"
8196if test "$ac_cv_kpthread" = "yes"
8197then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008198elif test "$ac_cv_kthread" = "yes"
8199then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008200elif test "$ac_cv_pthread" = "yes"
8201then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008202fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008203
Matthias Kloseb9621712010-04-24 17:59:49 +00008204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8205$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008206have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008207cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008208/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008209
8210 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008211int
8212main ()
8213{
Guido van Rossum12580492000-09-24 16:47:19 +00008214pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008215 ;
8216 return 0;
8217}
Matthias Kloseb159a552010-04-25 21:00:44 +00008218
Martin v. Löwis11437992002-04-12 09:54:03 +00008219_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008220if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008221 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008222fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008223rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008224{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8225$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008226if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008227 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008228# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8229# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8230# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008231{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8232$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008233if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008234 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008235else
Matthias Kloseb9621712010-04-24 17:59:49 +00008236 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008237#ifdef HAVE_PTHREAD_H
8238#include <pthread.h>
8239#endif
8240
Matthias Kloseb9621712010-04-24 17:59:49 +00008241"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008242
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008243else
Matthias Kloseb9621712010-04-24 17:59:49 +00008244 if test "$ac_cv_type_pthread_t" = yes; then
8245 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8246$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008247as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008248See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008249 else
8250 ac_cv_sizeof_pthread_t=0
8251 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008252fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008253
Trent Mick635f6fb2000-08-23 21:33:05 +00008254fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008255{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8256$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008257
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008258
8259
Martin v. Löwis11437992002-04-12 09:54:03 +00008260cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008261#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008262_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008263
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008264
Trent Mick635f6fb2000-08-23 21:33:05 +00008265fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008266CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008267
Michael W. Hudson54241132001-12-07 15:38:26 +00008268
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008269case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008270 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008271 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8272 ;;
8273 Darwin/*)
8274 OTHER_LIBTOOL_OPT=""
8275 ;;
8276esac
8277
8278
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008279ARCH_RUN_32BIT=""
8280
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008281case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008282 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00008283 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8284 if test "${enable_universalsdk}"; then
8285 :
8286 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008287 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008288 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008289 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008290 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008291 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00008292 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008293 if test ${gcc_version} '<' 4.0
8294 then
8295 LIBTOOL_CRUFT="-lcc_dynamic"
8296 else
8297 LIBTOOL_CRUFT=""
8298 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008299 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008300 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008301else
Matthias Kloseb9621712010-04-24 17:59:49 +00008302 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008303/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008304
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008305 #include <unistd.h>
8306 int main(int argc, char*argv[])
8307 {
8308 if (sizeof(long) == 4) {
8309 return 0;
8310 } else {
8311 return 1;
8312 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008313 }
8314
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008315_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008316if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008317 ac_osx_32bit=yes
8318else
Matthias Kloseb9621712010-04-24 17:59:49 +00008319 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008320fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008321rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8322 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008323fi
8324
8325
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008326 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008327 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008328 i386)
8329 MACOSX_DEFAULT_ARCH="i386"
8330 ;;
8331 ppc)
8332 MACOSX_DEFAULT_ARCH="ppc"
8333 ;;
8334 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008335 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008336 ;;
8337 esac
8338 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008339 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008340 i386)
8341 MACOSX_DEFAULT_ARCH="x86_64"
8342 ;;
8343 ppc)
8344 MACOSX_DEFAULT_ARCH="ppc64"
8345 ;;
8346 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008347 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008348 ;;
8349 esac
8350
8351 #ARCH_RUN_32BIT="true"
8352 fi
8353
8354 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00008355 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008356 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008357esac
8358
Matthias Kloseb9621712010-04-24 17:59:49 +00008359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
8360$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008361if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008362then
Skip Montanarodecc6a42003-01-01 20:07:49 +00008363 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00008364 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008365 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008366
Matthias Kloseb9621712010-04-24 17:59:49 +00008367$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008368
Matthias Kloseb9621712010-04-24 17:59:49 +00008369 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8370$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00008371 if test $enable_shared = "yes"
8372 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008373 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 +00008374 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008375else
Matthias Kloseb9621712010-04-24 17:59:49 +00008376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8377$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008378fi
8379
Matthias Kloseb9621712010-04-24 17:59:49 +00008380{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
8381$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008382case $ac_sys_system/$ac_sys_release in
8383 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008384
Matthias Kloseb9621712010-04-24 17:59:49 +00008385$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008386
Matthias Kloseb9621712010-04-24 17:59:49 +00008387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
8388$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008389 ;;
8390 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00008391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8392$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008393 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008394esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008395
Guido van Rossum0a516c91994-09-12 10:58:40 +00008396# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008397
Michael W. Hudson54241132001-12-07 15:38:26 +00008398
8399
8400
8401
Benjamin Peterson99f03762010-04-11 22:15:28 +00008402
Thomas Wouters477c8d52006-05-27 19:21:47 +00008403
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07008404# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
8405# -- usually .so, .sl on HP-UX, .dll on Cygwin
8406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
8407$as_echo_n "checking the extension of shared libraries... " >&6; }
8408if test -z "$SHLIB_SUFFIX"; then
8409 case $ac_sys_system in
8410 hp*|HP*)
8411 case `uname -m` in
8412 ia64) SHLIB_SUFFIX=.so;;
8413 *) SHLIB_SUFFIX=.sl;;
8414 esac
8415 ;;
8416 CYGWIN*) SHLIB_SUFFIX=.dll;;
8417 *) SHLIB_SUFFIX=.so;;
8418 esac
8419fi
8420{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
8421$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00008422
Guido van Rossum0a516c91994-09-12 10:58:40 +00008423# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00008424# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008425# (Shared libraries in this instance are shared modules to be loaded into
8426# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00008427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
8428$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008429if test -z "$LDSHARED"
8430then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008431 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008432 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00008433 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00008434 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008435 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008436 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008437 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008438 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008439 if test "$GCC" = "yes" ; then
8440 LDSHARED='$(CC) -shared'
8441 LDCXXSHARED='$(CXX) -shared'
8442 else
8443 LDSHARED='$(CC) -G'
8444 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00008445 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008446 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008447 if test "$GCC" = "yes" ; then
8448 LDSHARED='$(CC) -shared'
8449 LDCXXSHARED='$(CXX) -shared'
8450 else
8451 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008452 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00008453 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008454 LDSHARED='$(CC) -bundle'
8455 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00008456 if test "$enable_framework" ; then
8457 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008458 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8459 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008460 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008461 else
8462 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008463 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00008464 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008465 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008466 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008467 LDSHARED='$(CC) -bundle'
8468 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00008469 if test "$enable_framework" ; then
8470 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008471 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8472 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008473 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008474 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008475 # No framework, use the Python app as bundle-loader
8476 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00008477 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008478 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008479 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008480 Darwin/*)
8481 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
8482 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00008483
Benjamin Peterson14ae9592008-07-16 02:20:15 +00008484 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00008485 then
Thomas Wouters477c8d52006-05-27 19:21:47 +00008486 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +00008487 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008488 fi
Antoine Pitroud4958c22010-10-13 17:01:10 +00008489 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
8490 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00008491 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00008492 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00008493 LDSHARED='$(CC) -bundle'
8494 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00008495 if test "$enable_framework" ; then
8496 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008497 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8498 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008499 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008500 else
8501 # No framework, use the Python app as bundle-loader
8502 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8503 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008504 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008505 fi
8506 fi
8507 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008508 Linux*|GNU*|QNX*)
8509 LDSHARED='$(CC) -shared'
8510 LDCXXSHARED='$(CXX) -shared';;
8511 BSD/OS*/4*)
8512 LDSHARED="gcc -shared"
8513 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008514 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008515 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008516 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008517 LDSHARED='$(CC) -shared'
8518 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00008519 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00008520 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00008521 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008522 OpenBSD*)
8523 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8524 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008525 LDSHARED='$(CC) -shared $(CCSHARED)'
8526 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008527 else
8528 case `uname -r` in
8529 [01].* | 2.[0-7] | 2.[0-7].*)
8530 LDSHARED="ld -Bshareable ${LDFLAGS}"
8531 ;;
8532 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008533 LDSHARED='$(CC) -shared $(CCSHARED)'
8534 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008535 ;;
8536 esac
8537 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008538 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00008539 LDSHARED='$(CC) -shared'
8540 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008541 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008542 if test "$GCC" = "yes" ; then
8543 LDSHARED='$(CC) -shared'
8544 LDCXXSHARED='$(CXX) -shared'
8545 else
8546 LDSHARED='$(CC) -G'
8547 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00008548 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008549 SCO_SV*)
8550 LDSHARED='$(CC) -Wl,-G,-Bexport'
8551 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
8552 CYGWIN*)
8553 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
8554 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008555 *) LDSHARED="ld";;
8556 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008557fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008558{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
8559$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00008560LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008561BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008562# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008563# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
8565$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008566if test -z "$CCSHARED"
8567then
Guido van Rossum07397971997-04-29 21:49:50 +00008568 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008569 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008570 then CCSHARED="-fPIC";
8571 elif test `uname -p` = sparc;
8572 then CCSHARED="-xcode=pic32";
8573 else CCSHARED="-Kpic";
8574 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00008575 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00008576 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00008577 else CCSHARED="+z";
8578 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008579 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008580 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008581 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008582 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008583 if test "$GCC" = "yes"
8584 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008585 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008586 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008587 SCO_SV*)
8588 if test "$GCC" = "yes"
8589 then CCSHARED="-fPIC"
8590 else CCSHARED="-Kpic -belf"
8591 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008592 IRIX*/6*) case $CC in
8593 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00008594 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008595 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008596 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008597fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008598{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
8599$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008600# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008601# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
8603$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008604if test -z "$LINKFORSHARED"
8605then
Guido van Rossum07397971997-04-29 21:49:50 +00008606 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008607 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008608 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00008609 LINKFORSHARED="-Wl,-E -Wl,+s";;
8610# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008611 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008612 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008613 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00008614 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00008615 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +00008616 if test "$enable_framework"
8617 then
Jack Jansenda49e192005-01-07 13:08:22 +00008618 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008619 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008620 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008621 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008622 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00008623 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008624 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00008625 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8626 then
8627 LINKFORSHARED="-Wl,--export-dynamic"
8628 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008629 SunOS/5*) case $CC in
8630 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00008631 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00008632 then
8633 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008634 fi;;
8635 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00008636 CYGWIN*)
8637 if test $enable_shared = "no"
8638 then
8639 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
8640 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00008641 QNX*)
8642 # -Wl,-E causes the symbols to be added to the dynamic
8643 # symbol table so that they can be found when a module
8644 # is loaded. -N 2048K causes the stack size to be set
8645 # to 2048 kilobytes so that the stack doesn't overflow
8646 # when running test_compile.py.
8647 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008648 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008649fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008650{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
8651$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008652
Michael W. Hudson54241132001-12-07 15:38:26 +00008653
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00008654
Matthias Kloseb9621712010-04-24 17:59:49 +00008655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
8656$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008657if test ! "$LIBRARY" = "$LDLIBRARY"
8658then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00008659 case $ac_sys_system in
8660 CYGWIN*)
8661 # Cygwin needs CCSHARED when building extension DLLs
8662 # but not when building the interpreter DLL.
8663 CFLAGSFORSHARED='';;
8664 *)
8665 CFLAGSFORSHARED='$(CCSHARED)'
8666 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008667fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008668{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
8669$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008670
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008671# SHLIBS are libraries (except -lc and -lm) to link to the python shared
8672# library (with --enable-shared).
8673# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008674# symbols, this must be set to $(LIBS) (expanded by make). We do this even
8675# if it is not required, since it creates a dependency of the shared library
8676# to LIBS. This, in turn, means that applications linking the shared libpython
8677# don't need to link LIBS explicitly. The default should be only changed
8678# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008679
Matthias Kloseb9621712010-04-24 17:59:49 +00008680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
8681$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008682case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008683 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008684 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008685esac
Matthias Kloseb9621712010-04-24 17:59:49 +00008686{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
8687$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008688
8689
Guido van Rossum627b2d71993-12-24 10:39:16 +00008690# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00008691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
8692$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008693if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00008694 $as_echo_n "(cached) " >&6
8695else
8696 ac_check_lib_save_LIBS=$LIBS
8697LIBS="-lsendfile $LIBS"
8698cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8699/* end confdefs.h. */
8700
8701/* Override any GCC internal prototype to avoid an error.
8702 Use char because int might match the return type of a GCC
8703 builtin and then its argument prototype would still apply. */
8704#ifdef __cplusplus
8705extern "C"
8706#endif
8707char sendfile ();
8708int
8709main ()
8710{
8711return sendfile ();
8712 ;
8713 return 0;
8714}
8715_ACEOF
8716if ac_fn_c_try_link "$LINENO"; then :
8717 ac_cv_lib_sendfile_sendfile=yes
8718else
8719 ac_cv_lib_sendfile_sendfile=no
8720fi
8721rm -f core conftest.err conftest.$ac_objext \
8722 conftest$ac_exeext conftest.$ac_ext
8723LIBS=$ac_check_lib_save_LIBS
8724fi
8725{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
8726$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008727if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00008728 cat >>confdefs.h <<_ACEOF
8729#define HAVE_LIBSENDFILE 1
8730_ACEOF
8731
8732 LIBS="-lsendfile $LIBS"
8733
8734fi
8735
Matthias Kloseb9621712010-04-24 17:59:49 +00008736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
8737$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008738if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008739 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008740else
Martin v. Löwis11437992002-04-12 09:54:03 +00008741 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008742LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008743cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008744/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008745
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008746/* Override any GCC internal prototype to avoid an error.
8747 Use char because int might match the return type of a GCC
8748 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008749#ifdef __cplusplus
8750extern "C"
8751#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008752char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008753int
8754main ()
8755{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008756return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008757 ;
8758 return 0;
8759}
8760_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008761if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008762 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008763else
Matthias Kloseb9621712010-04-24 17:59:49 +00008764 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008765fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008766rm -f core conftest.err conftest.$ac_objext \
8767 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008768LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008769fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008770{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
8771$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008772if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008773 cat >>confdefs.h <<_ACEOF
8774#define HAVE_LIBDL 1
8775_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008776
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008777 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00008778
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008779fi
8780 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00008781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
8782$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008783if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008784 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008785else
Martin v. Löwis11437992002-04-12 09:54:03 +00008786 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008787LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008788cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008789/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008790
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008791/* Override any GCC internal prototype to avoid an error.
8792 Use char because int might match the return type of a GCC
8793 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008794#ifdef __cplusplus
8795extern "C"
8796#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008797char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008798int
8799main ()
8800{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008801return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008802 ;
8803 return 0;
8804}
8805_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008806if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008807 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008808else
Matthias Kloseb9621712010-04-24 17:59:49 +00008809 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008810fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008811rm -f core conftest.err conftest.$ac_objext \
8812 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008813LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008814fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008815{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
8816$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008817if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008818 cat >>confdefs.h <<_ACEOF
8819#define HAVE_LIBDLD 1
8820_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008821
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008822 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008823
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008824fi
8825 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00008826
Georg Brandlb1441c72009-01-03 22:33:39 +00008827# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00008828if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008829 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
8830$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008831if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008832 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008833else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008834 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008835cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008836/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008837
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008838/* Override any GCC internal prototype to avoid an error.
8839 Use char because int might match the return type of a GCC
8840 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008841#ifdef __cplusplus
8842extern "C"
8843#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008844char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008845int
8846main ()
8847{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008848return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008849 ;
8850 return 0;
8851}
8852_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008853for ac_lib in '' pthread rt posix4; do
8854 if test -z "$ac_lib"; then
8855 ac_res="none required"
8856 else
8857 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008858 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008859 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008860 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008861 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008862fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008863rm -f core conftest.err conftest.$ac_objext \
8864 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008865 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008866 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008867fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008868done
Victor Stinnere0be4232011-10-25 13:06:09 +02008869if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008870
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008871else
8872 ac_cv_search_sem_init=no
8873fi
8874rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008875LIBS=$ac_func_search_save_LIBS
8876fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008877{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
8878$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008879ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00008880if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008881 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008882
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008883fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00008884 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00008885 # posix4 on Solaris 2.6
8886 # pthread (first!) on Linux
8887fi
8888
Martin v. Löwis19d17342003-06-14 21:03:05 +00008889# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00008890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
8891$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008892if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008893 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00008894else
8895 ac_check_lib_save_LIBS=$LIBS
8896LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008897cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008898/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008899
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008900/* Override any GCC internal prototype to avoid an error.
8901 Use char because int might match the return type of a GCC
8902 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008903#ifdef __cplusplus
8904extern "C"
8905#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00008906char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008907int
8908main ()
8909{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008910return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008911 ;
8912 return 0;
8913}
8914_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008915if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008916 ac_cv_lib_intl_textdomain=yes
8917else
Matthias Kloseb9621712010-04-24 17:59:49 +00008918 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00008919fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008920rm -f core conftest.err conftest.$ac_objext \
8921 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00008922LIBS=$ac_check_lib_save_LIBS
8923fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008924{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
8925$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008926if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008927
Matthias Kloseb9621712010-04-24 17:59:49 +00008928$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00008929
Brett Cannonc6d936e2009-06-07 20:09:53 +00008930 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00008931fi
8932
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008933
8934# checks for system dependent C++ extensions support
8935case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00008936 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
8937$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
8938 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008939/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008940
Georg Brandl59e87bd2011-02-15 19:48:59 +00008941 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008942int
8943main ()
8944{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008945loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00008946 ;
8947 return 0;
8948}
Matthias Kloseb159a552010-04-25 21:00:44 +00008949
Martin v. Löwis11437992002-04-12 09:54:03 +00008950_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008951if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008952
Matthias Kloseb159a552010-04-25 21:00:44 +00008953
Matthias Kloseb9621712010-04-24 17:59:49 +00008954$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008955
Matthias Kloseb159a552010-04-25 21:00:44 +00008956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008957$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008958
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008959else
Matthias Kloseb159a552010-04-25 21:00:44 +00008960
8961 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008962$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008963
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008964fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008965rm -f core conftest.err conftest.$ac_objext \
8966 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008967 *) ;;
8968esac
8969
Guido van Rossum70c7f481998-03-26 18:44:10 +00008970# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00008971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
8972$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008973if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008974 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008975else
Martin v. Löwis11437992002-04-12 09:54:03 +00008976 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008977LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008978cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008979/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008980
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008981/* Override any GCC internal prototype to avoid an error.
8982 Use char because int might match the return type of a GCC
8983 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008984#ifdef __cplusplus
8985extern "C"
8986#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008987char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008988int
8989main ()
8990{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008991return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008992 ;
8993 return 0;
8994}
8995_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008996if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008997 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008998else
Matthias Kloseb9621712010-04-24 17:59:49 +00008999 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009000fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009001rm -f core conftest.err conftest.$ac_objext \
9002 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009003LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009004fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009005{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9006$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009007if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009008 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009009fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009010 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00009011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9012$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009013if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009014 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009015else
Martin v. Löwis11437992002-04-12 09:54:03 +00009016 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009017LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009018cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009019/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009020
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009021/* Override any GCC internal prototype to avoid an error.
9022 Use char because int might match the return type of a GCC
9023 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009024#ifdef __cplusplus
9025extern "C"
9026#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009027char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009028int
9029main ()
9030{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009031return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009032 ;
9033 return 0;
9034}
9035_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009036if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009037 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009038else
Matthias Kloseb9621712010-04-24 17:59:49 +00009039 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009040fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009041rm -f core conftest.err conftest.$ac_objext \
9042 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009043LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009044fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009045{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9046$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009047if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009048 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009049fi
9050 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009051
Matthias Kloseb9621712010-04-24 17:59:49 +00009052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9053$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009054
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009055# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009056if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009057 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009058{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9059$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009060LIBS="$withval $LIBS"
9061
9062else
Matthias Kloseb9621712010-04-24 17:59:49 +00009063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9064$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009065fi
9066
Guido van Rossum7f43da71994-08-01 12:15:30 +00009067
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009068if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009069 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9070set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9072$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009073if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009074 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00009075else
9076 case $PKG_CONFIG in
9077 [\\/]* | ?:[\\/]*)
9078 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9079 ;;
9080 *)
9081 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9082for as_dir in $PATH
9083do
9084 IFS=$as_save_IFS
9085 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009086 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00009087 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009088 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00009089 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00009090 break 2
9091 fi
9092done
Matthias Kloseb9621712010-04-24 17:59:49 +00009093 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00009094IFS=$as_save_IFS
9095
9096 ;;
9097esac
9098fi
9099PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9100if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9102$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009103else
Matthias Kloseb9621712010-04-24 17:59:49 +00009104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9105$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009106fi
9107
9108
9109fi
9110if test -z "$ac_cv_path_PKG_CONFIG"; then
9111 ac_pt_PKG_CONFIG=$PKG_CONFIG
9112 # Extract the first word of "pkg-config", so it can be a program name with args.
9113set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9115$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009116if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009117 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00009118else
9119 case $ac_pt_PKG_CONFIG in
9120 [\\/]* | ?:[\\/]*)
9121 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9122 ;;
9123 *)
9124 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9125for as_dir in $PATH
9126do
9127 IFS=$as_save_IFS
9128 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009129 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00009130 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009131 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00009132 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00009133 break 2
9134 fi
9135done
Matthias Kloseb9621712010-04-24 17:59:49 +00009136 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00009137IFS=$as_save_IFS
9138
9139 ;;
9140esac
9141fi
9142ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9143if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9145$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009146else
Matthias Kloseb9621712010-04-24 17:59:49 +00009147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9148$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009149fi
9150
9151 if test "x$ac_pt_PKG_CONFIG" = x; then
9152 PKG_CONFIG=""
9153 else
9154 case $cross_compiling:$ac_tool_warned in
9155yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00009156{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9157$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00009158ac_tool_warned=yes ;;
9159esac
9160 PKG_CONFIG=$ac_pt_PKG_CONFIG
9161 fi
9162else
9163 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9164fi
9165
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009166
9167# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00009168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
9169$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009170
9171# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009172if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009173 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00009174else
9175 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009176fi
9177
9178
Matthias Kloseb9621712010-04-24 17:59:49 +00009179{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
9180$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009181
9182# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00009183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
9184$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009185
9186# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009187if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009188 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00009189else
9190 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009191fi
9192
9193
9194if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009195 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
9196else
9197 LIBFFI_INCLUDEDIR=""
9198fi
9199
9200
Matthias Kloseb9621712010-04-24 17:59:49 +00009201{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
9202$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009203
Stefan Krah60187b52012-03-23 19:06:27 +01009204# Check for use of the system libmpdec library
9205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
9206$as_echo_n "checking for --with-system-libmpdec... " >&6; }
9207
9208# Check whether --with-system_libmpdec was given.
9209if test "${with_system_libmpdec+set}" = set; then :
9210 withval=$with_system_libmpdec;
9211else
9212 with_system_libmpdec="no"
9213fi
9214
9215
9216{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
9217$as_echo "$with_system_libmpdec" >&6; }
9218
Benjamin Peterson076ed002010-10-31 17:11:02 +00009219# Check for support for loadable sqlite extensions
9220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
9221$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
9222# Check whether --enable-loadable-sqlite-extensions was given.
9223if test "${enable_loadable_sqlite_extensions+set}" = set; then :
9224 enableval=$enable_loadable_sqlite_extensions;
9225else
9226 enable_loadable_sqlite_extensions="no"
9227fi
9228
9229
9230{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
9231$as_echo "$enable_loadable_sqlite_extensions" >&6; }
9232
Ned Deily65657c22013-10-25 00:34:44 -07009233# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
9234
9235
9236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
9237$as_echo_n "checking for --with-tcltk-includes... " >&6; }
9238
9239# Check whether --with-tcltk-includes was given.
9240if test "${with_tcltk_includes+set}" = set; then :
9241 withval=$with_tcltk_includes;
9242else
9243 with_tcltk_includes="default"
9244fi
9245
9246{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
9247$as_echo "$with_tcltk_includes" >&6; }
9248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
9249$as_echo_n "checking for --with-tcltk-libs... " >&6; }
9250
9251# Check whether --with-tcltk-libs was given.
9252if test "${with_tcltk_libs+set}" = set; then :
9253 withval=$with_tcltk_libs;
9254else
9255 with_tcltk_libs="default"
9256fi
9257
9258{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
9259$as_echo "$with_tcltk_libs" >&6; }
9260if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
9261then
9262 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
9263 then
9264 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
9265 fi
9266 TCLTK_INCLUDES=""
9267 TCLTK_LIBS=""
9268else
9269 TCLTK_INCLUDES="$with_tcltk_includes"
9270 TCLTK_LIBS="$with_tcltk_libs"
9271fi
9272
Matthias Klose55708cc2009-04-30 08:06:49 +00009273# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00009274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
9275$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009276
9277# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009278if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00009279 withval=$with_dbmliborder;
9280if test x$with_dbmliborder = xyes
9281then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009282as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009283else
9284 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
9285 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
9286 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009287 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009288 fi
9289 done
9290fi
9291fi
9292
Matthias Kloseb9621712010-04-24 17:59:49 +00009293{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
9294$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009295
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009296# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009297
9298
Matthias Kloseb9621712010-04-24 17:59:49 +00009299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
9300$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009301
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009302# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009303if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009304 withval=$with_signal_module;
9305fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009306
9307
9308if test -z "$with_signal_module"
9309then with_signal_module="yes"
9310fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009311{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
9312$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009313
9314if test "${with_signal_module}" = "yes"; then
9315 USE_SIGNAL_MODULE=""
9316 SIGNAL_OBJS=""
9317else
9318 USE_SIGNAL_MODULE="#"
9319 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9320fi
9321
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009322# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009323
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009324USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009325
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009326
Martin v. Löwis11437992002-04-12 09:54:03 +00009327
9328# Templates for things AC_DEFINEd more than once.
9329# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009330
9331
Martin v. Löwis11437992002-04-12 09:54:03 +00009332
Matthias Kloseb9621712010-04-24 17:59:49 +00009333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
9334$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009335
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009336# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009337if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009338 withval=$with_threads;
9339fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009340
9341
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009342# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009343
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009344# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009345if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009346 withval=$with_thread; with_threads=$with_thread
9347fi
9348
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009349
9350if test -z "$with_threads"
9351then with_threads="yes"
9352fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009353{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
9354$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009355
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009356
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009357if test "$with_threads" = "no"
9358then
9359 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009360elif test "$ac_cv_pthread_is_default" = yes
9361then
Matthias Kloseb9621712010-04-24 17:59:49 +00009362 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009363
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009364 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00009365 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009366
9367 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009368 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009369elif test "$ac_cv_kpthread" = "yes"
9370then
9371 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009372 if test "$ac_cv_cxx_thread" = "yes"; then
9373 CXX="$CXX -Kpthread"
9374 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009375 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009376
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009377 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009378 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009379elif test "$ac_cv_kthread" = "yes"
9380then
9381 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009382 if test "$ac_cv_cxx_thread" = "yes"; then
9383 CXX="$CXX -Kthread"
9384 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009385 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009386
9387 posix_threads=yes
9388 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009389elif test "$ac_cv_pthread" = "yes"
9390then
9391 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009392 if test "$ac_cv_cxx_thread" = "yes"; then
9393 CXX="$CXX -pthread"
9394 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009395 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009396
9397 posix_threads=yes
9398 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009399else
9400 if test ! -z "$with_threads" -a -d "$with_threads"
9401 then LDFLAGS="$LDFLAGS -L$with_threads"
9402 fi
9403 if test ! -z "$withval" -a -d "$withval"
9404 then LDFLAGS="$LDFLAGS -L$withval"
9405 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009406
9407 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00009408 # define _POSIX_THREADS in unistd.h. Some apparently don't
9409 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00009410 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
9411$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
9412 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009413/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009414
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009415#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009416#ifdef _POSIX_THREADS
9417yes
9418#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009419
9420_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009421if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009422 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009423 unistd_defines_pthreads=yes
9424else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009425 unistd_defines_pthreads=no
9426fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009427rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009428
Matthias Kloseb9621712010-04-24 17:59:49 +00009429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
9430$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009431
Matthias Kloseb9621712010-04-24 17:59:49 +00009432 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009433
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009434 # Just looking for pthread_create in libpthread is not enough:
9435 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
9436 # So we really have to include pthread.h, and then link.
9437 _libs=$LIBS
9438 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00009439 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
9440$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
9441 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009442/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +01009443
9444#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009445#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00009446
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009447void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00009448int
9449main ()
9450{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009451
9452pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00009453 ;
9454 return 0;
9455}
9456_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009457if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009458
Matthias Kloseb9621712010-04-24 17:59:49 +00009459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9460$as_echo "yes" >&6; }
9461 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00009462
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009463 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009464 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009465else
Martin v. Löwis11437992002-04-12 09:54:03 +00009466
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009467 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00009468 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +02009469if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009470 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00009471
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009472 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009473 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00009474else
Guido van Rossumad678af1998-10-02 14:42:15 +00009475
Matthias Kloseb9621712010-04-24 17:59:49 +00009476 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
9477$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009478if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009479 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009480else
Martin v. Löwis11437992002-04-12 09:54:03 +00009481 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009482LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009483cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009484/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009485
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009486/* Override any GCC internal prototype to avoid an error.
9487 Use char because int might match the return type of a GCC
9488 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009489#ifdef __cplusplus
9490extern "C"
9491#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009492char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009493int
9494main ()
9495{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009496return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009497 ;
9498 return 0;
9499}
9500_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009501if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009502 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00009503else
Matthias Kloseb9621712010-04-24 17:59:49 +00009504 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00009505fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009506rm -f core conftest.err conftest.$ac_objext \
9507 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009508LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009509fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009510{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
9511$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009512if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009513 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00009514
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009515 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009516 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009517 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00009518else
Greg Steinadf63d62000-07-05 10:38:09 +00009519
Matthias Kloseb9621712010-04-24 17:59:49 +00009520 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
9521$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009522if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009523 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00009524else
Martin v. Löwis11437992002-04-12 09:54:03 +00009525 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009526LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009527cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009528/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009529
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009530/* Override any GCC internal prototype to avoid an error.
9531 Use char because int might match the return type of a GCC
9532 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009533#ifdef __cplusplus
9534extern "C"
9535#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009536char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009537int
9538main ()
9539{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009540return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009541 ;
9542 return 0;
9543}
9544_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009545if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009546 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00009547else
Matthias Kloseb9621712010-04-24 17:59:49 +00009548 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00009549fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009550rm -f core conftest.err conftest.$ac_objext \
9551 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009552LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00009553fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009554{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
9555$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009556if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009557 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00009558
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009559 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009560 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009561 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009562else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009563
Matthias Kloseb9621712010-04-24 17:59:49 +00009564 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
9565$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009566if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009567 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009568else
Martin v. Löwis11437992002-04-12 09:54:03 +00009569 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009570LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009571cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009572/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009573
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009574/* Override any GCC internal prototype to avoid an error.
9575 Use char because int might match the return type of a GCC
9576 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009577#ifdef __cplusplus
9578extern "C"
9579#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009580char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009581int
9582main ()
9583{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009584return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009585 ;
9586 return 0;
9587}
9588_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009589if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009590 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009591else
Matthias Kloseb9621712010-04-24 17:59:49 +00009592 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009593fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009594rm -f core conftest.err conftest.$ac_objext \
9595 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009596LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009597fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009598{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
9599$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009600if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009601 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009602
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009603 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009604 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009605 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009606else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009607
Matthias Kloseb9621712010-04-24 17:59:49 +00009608 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
9609$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009610if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009611 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00009612else
Martin v. Löwis11437992002-04-12 09:54:03 +00009613 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009614LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009615cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009616/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009617
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009618/* Override any GCC internal prototype to avoid an error.
9619 Use char because int might match the return type of a GCC
9620 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009621#ifdef __cplusplus
9622extern "C"
9623#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009624char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009625int
9626main ()
9627{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009628return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009629 ;
9630 return 0;
9631}
9632_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009633if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009634 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00009635else
Matthias Kloseb9621712010-04-24 17:59:49 +00009636 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00009637fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009638rm -f core conftest.err conftest.$ac_objext \
9639 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009640LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009641fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009642{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
9643$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009644if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009645 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00009646
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009647 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009648 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009649 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00009650else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00009651
Martin v. Löwis130fb172001-07-19 11:00:41 +00009652 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00009653fi
9654
Guido van Rossum627b2d71993-12-24 10:39:16 +00009655
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009656fi
9657
Guido van Rossum0be3e491997-05-22 20:33:33 +00009658fi
9659
Guido van Rossum49545951997-12-02 19:28:29 +00009660fi
9661
Guido van Rossumb93a8621998-05-07 13:27:32 +00009662fi
9663
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009664fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009665rm -f core conftest.err conftest.$ac_objext \
9666 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00009667
Matthias Kloseb9621712010-04-24 17:59:49 +00009668 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
9669$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009670if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009671 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009672else
Martin v. Löwis11437992002-04-12 09:54:03 +00009673 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009674LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009675cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009676/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009677
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009678/* Override any GCC internal prototype to avoid an error.
9679 Use char because int might match the return type of a GCC
9680 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009681#ifdef __cplusplus
9682extern "C"
9683#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009684char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009685int
9686main ()
9687{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009688return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009689 ;
9690 return 0;
9691}
9692_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009693if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009694 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009695else
Matthias Kloseb9621712010-04-24 17:59:49 +00009696 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009697fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009698rm -f core conftest.err conftest.$ac_objext \
9699 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009700LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009701fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009702{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
9703$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009704if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009705 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009706
Martin v. Löwis130fb172001-07-19 11:00:41 +00009707 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009708 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009709 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009710fi
9711
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009712
Neal Norwitza978ab02002-11-02 16:58:05 +00009713 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009714 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
9715$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009716if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009717 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009718else
Martin v. Löwis11437992002-04-12 09:54:03 +00009719 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009720LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009721cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009722/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009723
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009724/* Override any GCC internal prototype to avoid an error.
9725 Use char because int might match the return type of a GCC
9726 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009727#ifdef __cplusplus
9728extern "C"
9729#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009730char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009731int
9732main ()
9733{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009734return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009735 ;
9736 return 0;
9737}
9738_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009739if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009740 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009741else
Matthias Kloseb9621712010-04-24 17:59:49 +00009742 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009743fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009744rm -f core conftest.err conftest.$ac_objext \
9745 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009746LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009747fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009748{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
9749$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009750if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009751 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009752
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009753 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009754 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009755 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009756fi
9757
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009758 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009759fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009760
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009761if test "$posix_threads" = "yes"; then
9762 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009763
Matthias Kloseb9621712010-04-24 17:59:49 +00009764$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009765
9766 fi
9767
9768 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
9769 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +02009770 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00009771$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009772
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009773 ;;
9774 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00009775$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009776
9777 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +02009778 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +00009779$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00009780
9781 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009782 esac
9783
Matthias Kloseb9621712010-04-24 17:59:49 +00009784 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
9785$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009786 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009787 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009788else
Matthias Kloseb9621712010-04-24 17:59:49 +00009789 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009790 ac_cv_pthread_system_supported=no
9791else
Matthias Kloseb9621712010-04-24 17:59:49 +00009792 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009793/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +01009794
9795 #include <stdio.h>
9796 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009797 void *foo(void *parm) {
9798 return NULL;
9799 }
9800 main() {
9801 pthread_attr_t attr;
9802 pthread_t id;
9803 if (pthread_attr_init(&attr)) exit(-1);
9804 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
9805 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
9806 exit(0);
9807 }
9808_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009809if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009810 ac_cv_pthread_system_supported=yes
9811else
Matthias Kloseb9621712010-04-24 17:59:49 +00009812 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009813fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009814rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9815 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009816fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009817
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009818
Guido van Rossum627b2d71993-12-24 10:39:16 +00009819fi
9820
Matthias Kloseb9621712010-04-24 17:59:49 +00009821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
9822$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009823 if test "$ac_cv_pthread_system_supported" = "yes"; then
9824
Matthias Kloseb9621712010-04-24 17:59:49 +00009825$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009826
9827 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009828 for ac_func in pthread_sigmask
9829do :
9830 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +02009831if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009832 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009833#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009834_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00009835 case $ac_sys_system in
9836 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009837
Matthias Kloseb9621712010-04-24 17:59:49 +00009838$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00009839
9840 ;;
9841 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009842fi
9843done
9844
Christian Heimesf77b4b22013-08-21 13:26:05 +02009845 for ac_func in pthread_atfork
9846do :
9847 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
9848if test "x$ac_cv_func_pthread_atfork" = xyes; then :
9849 cat >>confdefs.h <<_ACEOF
9850#define HAVE_PTHREAD_ATFORK 1
9851_ACEOF
9852
9853fi
9854done
9855
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009856fi
9857
9858
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009859# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00009860
Matthias Kloseb9621712010-04-24 17:59:49 +00009861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
9862$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009863# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009864if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009865 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009866 no)
Matthias Kloseb9621712010-04-24 17:59:49 +00009867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9868$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009869 ipv6=no
9870 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00009871 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9872$as_echo "yes" >&6; }
9873 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009874
9875 ipv6=yes
9876 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009877 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009878else
Martin v. Löwis11437992002-04-12 09:54:03 +00009879
Matthias Kloseb9621712010-04-24 17:59:49 +00009880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009881/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009882 /* AF_INET6 available check */
9883#include <sys/types.h>
9884#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +01009885int
9886main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009887{
Charles-François Natalif6fd7942013-01-08 19:49:42 +01009888int domain = AF_INET6;
9889 ;
9890 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009891}
Martin v. Löwis11437992002-04-12 09:54:03 +00009892_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +01009893if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009894
Matthias Kloseb9621712010-04-24 17:59:49 +00009895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9896$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009897 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +00009898
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009899else
Matthias Kloseb159a552010-04-25 21:00:44 +00009900
Matthias Kloseb9621712010-04-24 17:59:49 +00009901 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9902$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009903 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +00009904
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009905fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +01009906rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009907
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009908if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009909 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
9910$as_echo_n "checking if RFC2553 API is available... " >&6; }
9911 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009912/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009913
9914 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009915#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009916int
9917main ()
9918{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009919struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +00009920 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00009921 ;
9922 return 0;
9923}
Matthias Kloseb159a552010-04-25 21:00:44 +00009924
Martin v. Löwis11437992002-04-12 09:54:03 +00009925_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009926if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009927
9928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009929$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009930 ipv6=yes
9931
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009932else
Matthias Kloseb159a552010-04-25 21:00:44 +00009933
9934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009935$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009936 ipv6=no
9937
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009938fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009939rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009940fi
9941
9942if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009943 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009944
9945fi
9946
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009947fi
9948
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009949
9950ipv6type=unknown
9951ipv6lib=none
9952ipv6trylibc=no
9953
9954if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009955 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
9956$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00009957 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
9958 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009959 case $i in
9960 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +00009961 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009962/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009963
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009964#include <netinet/in.h>
9965#ifdef IPV6_INRIA_VERSION
9966yes
9967#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009968_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009969if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009970 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009971 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009972fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009973rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009974
9975 ;;
9976 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +00009977 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009978/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009979
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009980#include <netinet/in.h>
9981#ifdef __KAME__
9982yes
9983#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009984_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009985if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009986 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009987 ipv6type=$i;
9988 ipv6lib=inet6
9989 ipv6libdir=/usr/local/v6/lib
9990 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009991fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009992rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009993
9994 ;;
9995 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +00009996 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009997/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009998
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009999#include <features.h>
10000#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10001yes
10002#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010003_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010004if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010005 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010006 ipv6type=$i;
10007 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010008fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010009rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010010
10011 ;;
10012 linux-inet6)
10013 if test -d /usr/inet6; then
10014 ipv6type=$i
10015 ipv6lib=inet6
10016 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010017 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010018 fi
10019 ;;
10020 solaris)
10021 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000010022 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010023 ipv6type=$i
10024 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010025 fi
10026 fi
10027 ;;
10028 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000010029 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010030/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010031
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010032#include <sys/param.h>
10033#ifdef _TOSHIBA_INET6
10034yes
10035#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010036_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010037if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010038 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010039 ipv6type=$i;
10040 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010041 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010042fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010043rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010044
10045 ;;
10046 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000010047 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010048/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010049
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010050#include </usr/local/v6/include/sys/v6config.h>
10051#ifdef __V6D__
10052yes
10053#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010054_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010055if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010056 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010057 ipv6type=$i;
10058 ipv6lib=v6;
10059 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010060 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010061fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010062rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010063
10064 ;;
10065 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010066 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010067/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010068
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010069#include <sys/param.h>
10070#ifdef _ZETA_MINAMI_INET6
10071yes
10072#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010073_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010074if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010075 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010076 ipv6type=$i;
10077 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010078 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010079fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010080rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010081
10082 ;;
10083 esac
10084 if test "$ipv6type" != "unknown"; then
10085 break
10086 fi
10087 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10089$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010090fi
10091
10092if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10093 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10094 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10095 echo "using lib$ipv6lib"
10096 else
10097 if test $ipv6trylibc = "yes"; then
10098 echo "using libc"
10099 else
10100 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10101 echo "You need to fetch lib$ipv6lib.a from appropriate"
10102 echo 'ipv6 kit and compile beforehand.'
10103 exit 1
10104 fi
10105 fi
10106fi
10107
Matthias Kloseb9621712010-04-24 17:59:49 +000010108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
10109$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
10110cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010111/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010112
10113 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010114int
10115main ()
10116{
10117FSIORefNum fRef = 0
10118 ;
10119 return 0;
10120}
Matthias Kloseb159a552010-04-25 21:00:44 +000010121
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010122_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010123if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010124
Matthias Kloseb159a552010-04-25 21:00:44 +000010125
Matthias Kloseb9621712010-04-24 17:59:49 +000010126$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010127
Matthias Kloseb9621712010-04-24 17:59:49 +000010128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10129$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010130
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010131else
Matthias Kloseb159a552010-04-25 21:00:44 +000010132
Matthias Kloseb9621712010-04-24 17:59:49 +000010133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10134$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010135
10136fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010137rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10138
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010139# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000010140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10141$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010142
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010143# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010144if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010145 withval=$with_doc_strings;
10146fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010147
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010148
10149if test -z "$with_doc_strings"
10150then with_doc_strings="yes"
10151fi
10152if test "$with_doc_strings" != "no"
10153then
10154
Matthias Kloseb9621712010-04-24 17:59:49 +000010155$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010156
10157fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010158{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10159$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010160
Antoine Pitrou042b1282010-08-13 21:15:58 +000010161# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +000010162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
10163$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010164
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010165# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010166if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010167 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010168if test "$withval" != no
10169then
10170
Matthias Kloseb9621712010-04-24 17:59:49 +000010171$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010172
Matthias Kloseb9621712010-04-24 17:59:49 +000010173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10174$as_echo "yes" >&6; }
10175else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10176$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010177fi
10178else
Matthias Kloseb9621712010-04-24 17:59:49 +000010179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10180$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010181fi
10182
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010183
10184# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000010185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10186$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010187
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010188# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010189if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010190 withval=$with_pymalloc;
10191fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010192
Neil Schemenauera35c6882001-02-27 04:45:05 +000010193
Neil Schemenauer16c22972002-03-22 15:34:49 +000010194if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000010195then
10196 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010197fi
10198if test "$with_pymalloc" != "no"
10199then
Martin v. Löwis11437992002-04-12 09:54:03 +000010200
Matthias Kloseb9621712010-04-24 17:59:49 +000010201$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010202
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010203 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010204fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010205{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10206$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010207
Benjamin Peterson05159c42009-12-03 03:01:27 +000010208# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000010209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
10210$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010211
10212# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010213if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010214 withval=$with_valgrind;
10215else
10216 with_valgrind=no
10217fi
10218
Matthias Kloseb9621712010-04-24 17:59:49 +000010219{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
10220$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010221if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010222 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 +020010223if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010224
Matthias Kloseb9621712010-04-24 17:59:49 +000010225$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000010226
10227else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010228 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000010229
10230fi
10231
10232
Jeffrey Yasskin39370832010-05-03 19:29:34 +000010233 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000010234fi
10235
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010236# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000010237
Guido van Rossum98935bf2001-09-05 19:13:16 +000010238DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000010239
Guido van Rossume97ee181999-12-20 21:27:22 +000010240# the dlopen() function means we might want to use dynload_shlib.o. some
10241# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000010242for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000010243do :
10244 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020010245if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010246 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010247#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010248_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000010249
Guido van Rossume97ee181999-12-20 21:27:22 +000010250fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010251done
Guido van Rossume97ee181999-12-20 21:27:22 +000010252
Michael W. Hudson54241132001-12-07 15:38:26 +000010253
Guido van Rossume97ee181999-12-20 21:27:22 +000010254# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
10255# loading of modules.
10256
Matthias Kloseb9621712010-04-24 17:59:49 +000010257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
10258$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010259if test -z "$DYNLOADFILE"
10260then
10261 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000010262 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
10263 if test "$ac_cv_func_dlopen" = yes
10264 then DYNLOADFILE="dynload_shlib.o"
10265 else DYNLOADFILE="dynload_aix.o"
10266 fi
10267 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000010268 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000010269 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
10270 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000010271 *)
10272 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
10273 # out any dynamic loading
10274 if test "$ac_cv_func_dlopen" = yes
10275 then DYNLOADFILE="dynload_shlib.o"
10276 else DYNLOADFILE="dynload_stub.o"
10277 fi
10278 ;;
10279 esac
10280fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010281{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
10282$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010283if test "$DYNLOADFILE" != "dynload_stub.o"
10284then
Martin v. Löwis11437992002-04-12 09:54:03 +000010285
Matthias Kloseb9621712010-04-24 17:59:49 +000010286$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000010287
10288fi
10289
Neil Schemenauer4e425612001-06-19 15:44:15 +000010290# MACHDEP_OBJS can be set to platform-specific object files needed by Python
10291
Michael W. Hudson54241132001-12-07 15:38:26 +000010292
Matthias Kloseb9621712010-04-24 17:59:49 +000010293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
10294$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010295if test -z "$MACHDEP_OBJS"
10296then
Jack Jansene578a632001-08-15 01:27:14 +000010297 MACHDEP_OBJS=$extra_machdep_objs
10298else
10299 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000010300fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010301if test -z "$MACHDEP_OBJS"; then
10302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
10303$as_echo "none" >&6; }
10304else
10305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
10306$as_echo "$MACHDEP_OBJS" >&6; }
10307fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000010308
Guido van Rossum627b2d71993-12-24 10:39:16 +000010309# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000010310for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Gregory P. Smith1577cf72012-01-21 18:21:56 -080010311 clock confstr ctermid execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010312 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010313 futimens futimes gai_strerror \
10314 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000010315 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070010316 if_nameindex \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010010317 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
10318 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020010319 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010320 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020010321 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +000010322 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000010323 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000010324 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010325 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
10326 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020010327 sigaction sigaltstack siginterrupt sigpending sigrelse \
10328 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000010329 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010330 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
10331 wcscoll wcsftime wcsxfrm writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010332do :
10333 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10334ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010335if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010336 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010337#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010338_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010339
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010340fi
10341done
10342
Michael W. Hudson54241132001-12-07 15:38:26 +000010343
Gregory P. Smithdf300d52012-01-21 18:20:15 -080010344ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
10345 #include <dirent.h>
10346"
10347if test "x$ac_cv_have_decl_dirfd" = xyes; then :
10348
10349$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
10350
10351fi
10352
10353
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010354# For some functions, having a definition is not sufficient, since
10355# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000010356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
10357$as_echo_n "checking for chroot... " >&6; }
10358cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010359/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010360#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010361int
10362main ()
10363{
10364void *x=chroot
10365 ;
10366 return 0;
10367}
10368_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010369if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010370
Matthias Kloseb9621712010-04-24 17:59:49 +000010371$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010372
Matthias Kloseb159a552010-04-25 21:00:44 +000010373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010374$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010375else
Matthias Kloseb9621712010-04-24 17:59:49 +000010376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10377$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010378
10379fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010380rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
10382$as_echo_n "checking for link... " >&6; }
10383cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010384/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010385#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010386int
10387main ()
10388{
10389void *x=link
10390 ;
10391 return 0;
10392}
10393_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010394if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010395
Matthias Kloseb9621712010-04-24 17:59:49 +000010396$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010397
Matthias Kloseb159a552010-04-25 21:00:44 +000010398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010399$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010400else
Matthias Kloseb9621712010-04-24 17:59:49 +000010401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10402$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010403
10404fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010405rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
10407$as_echo_n "checking for symlink... " >&6; }
10408cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010409/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010410#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010411int
10412main ()
10413{
10414void *x=symlink
10415 ;
10416 return 0;
10417}
10418_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010419if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010420
Matthias Kloseb9621712010-04-24 17:59:49 +000010421$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010422
Matthias Kloseb159a552010-04-25 21:00:44 +000010423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010424$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010425else
Matthias Kloseb9621712010-04-24 17:59:49 +000010426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10427$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010428
10429fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010430rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
10432$as_echo_n "checking for fchdir... " >&6; }
10433cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010434/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010435#include <unistd.h>
10436int
10437main ()
10438{
10439void *x=fchdir
10440 ;
10441 return 0;
10442}
10443_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010444if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010445
Matthias Kloseb9621712010-04-24 17:59:49 +000010446$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010447
Matthias Kloseb159a552010-04-25 21:00:44 +000010448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010449$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010450else
Matthias Kloseb9621712010-04-24 17:59:49 +000010451 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10452$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010453
10454fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010455rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
10457$as_echo_n "checking for fsync... " >&6; }
10458cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010459/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010460#include <unistd.h>
10461int
10462main ()
10463{
10464void *x=fsync
10465 ;
10466 return 0;
10467}
10468_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010469if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010470
Matthias Kloseb9621712010-04-24 17:59:49 +000010471$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010472
Matthias Kloseb159a552010-04-25 21:00:44 +000010473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010474$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010475else
Matthias Kloseb9621712010-04-24 17:59:49 +000010476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10477$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010478
10479fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010480rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
10482$as_echo_n "checking for fdatasync... " >&6; }
10483cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010484/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010485#include <unistd.h>
10486int
10487main ()
10488{
10489void *x=fdatasync
10490 ;
10491 return 0;
10492}
10493_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010494if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010495
Matthias Kloseb9621712010-04-24 17:59:49 +000010496$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010497
Matthias Kloseb159a552010-04-25 21:00:44 +000010498 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010499$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010500else
Matthias Kloseb9621712010-04-24 17:59:49 +000010501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10502$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010503
10504fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010505rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
10507$as_echo_n "checking for epoll... " >&6; }
10508cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010509/* end confdefs.h. */
10510#include <sys/epoll.h>
10511int
10512main ()
10513{
10514void *x=epoll_create
10515 ;
10516 return 0;
10517}
10518_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010519if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010520
Matthias Kloseb9621712010-04-24 17:59:49 +000010521$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010522
Matthias Kloseb159a552010-04-25 21:00:44 +000010523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010524$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010525else
Matthias Kloseb9621712010-04-24 17:59:49 +000010526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10527$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010528
10529fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010530rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060010531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
10532$as_echo_n "checking for epoll_create1... " >&6; }
10533cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10534/* end confdefs.h. */
10535#include <sys/epoll.h>
10536int
10537main ()
10538{
10539void *x=epoll_create1
10540 ;
10541 return 0;
10542}
10543_ACEOF
10544if ac_fn_c_try_compile "$LINENO"; then :
10545
10546$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
10547
10548 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10549$as_echo "yes" >&6; }
10550else
10551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10552$as_echo "no" >&6; }
10553
10554fi
10555rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
10557$as_echo_n "checking for kqueue... " >&6; }
10558cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010559/* end confdefs.h. */
10560
10561#include <sys/types.h>
10562#include <sys/event.h>
10563
10564int
10565main ()
10566{
10567int x=kqueue()
10568 ;
10569 return 0;
10570}
10571_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010572if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010573
Matthias Kloseb9621712010-04-24 17:59:49 +000010574$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010575
Matthias Kloseb159a552010-04-25 21:00:44 +000010576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010577$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010578else
Matthias Kloseb9621712010-04-24 17:59:49 +000010579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10580$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010581
10582fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010583rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010584# On some systems (eg. FreeBSD 5), we would find a definition of the
10585# functions ctermid_r, setgroups in the library, but no prototype
10586# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
10587# address to avoid compiler warnings and potential miscompilations
10588# because of the missing prototypes.
10589
Matthias Kloseb9621712010-04-24 17:59:49 +000010590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
10591$as_echo_n "checking for ctermid_r... " >&6; }
10592cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010593/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010594
Martin v. Löwisd5843682002-11-21 20:41:28 +000010595#include <stdio.h>
10596
Martin v. Löwisd5843682002-11-21 20:41:28 +000010597int
10598main ()
10599{
10600void* p = ctermid_r
10601 ;
10602 return 0;
10603}
10604_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010605if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010606
Matthias Kloseb9621712010-04-24 17:59:49 +000010607$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010608
Matthias Kloseb159a552010-04-25 21:00:44 +000010609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010610$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010611else
Matthias Kloseb9621712010-04-24 17:59:49 +000010612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10613$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010614
10615fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010616rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10617
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
10619$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010620if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010621 $as_echo_n "(cached) " >&6
10622else
10623 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010624/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010625#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010626int
10627main ()
10628{
10629void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010630
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010631 ;
10632 return 0;
10633}
10634_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010635if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010636 ac_cv_flock_decl=yes
10637else
10638 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010639
10640fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010641rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000010642
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010643fi
10644{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
10645$as_echo "$ac_cv_flock_decl" >&6; }
10646if test "x${ac_cv_flock_decl}" = xyes; then
10647 for ac_func in flock
10648do :
10649 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020010650if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010651 cat >>confdefs.h <<_ACEOF
10652#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000010653_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010654
Antoine Pitroua3000072010-09-07 14:52:42 +000010655else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010656 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000010657$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010658if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000010659 $as_echo_n "(cached) " >&6
10660else
10661 ac_check_lib_save_LIBS=$LIBS
10662LIBS="-lbsd $LIBS"
10663cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10664/* end confdefs.h. */
10665
10666/* Override any GCC internal prototype to avoid an error.
10667 Use char because int might match the return type of a GCC
10668 builtin and then its argument prototype would still apply. */
10669#ifdef __cplusplus
10670extern "C"
10671#endif
10672char flock ();
10673int
10674main ()
10675{
10676return flock ();
10677 ;
10678 return 0;
10679}
10680_ACEOF
10681if ac_fn_c_try_link "$LINENO"; then :
10682 ac_cv_lib_bsd_flock=yes
10683else
10684 ac_cv_lib_bsd_flock=no
10685fi
10686rm -f core conftest.err conftest.$ac_objext \
10687 conftest$ac_exeext conftest.$ac_ext
10688LIBS=$ac_check_lib_save_LIBS
10689fi
10690{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
10691$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010692if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010693 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000010694
10695
10696$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
10697
10698
10699fi
10700
10701
10702fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010703done
10704
Antoine Pitroua3000072010-09-07 14:52:42 +000010705fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010706
Matthias Kloseb9621712010-04-24 17:59:49 +000010707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
10708$as_echo_n "checking for getpagesize... " >&6; }
10709cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010710/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010711
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010712#include <unistd.h>
10713
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010714int
10715main ()
10716{
10717void* p = getpagesize
10718 ;
10719 return 0;
10720}
10721_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010722if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010723
Matthias Kloseb9621712010-04-24 17:59:49 +000010724$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010725
Matthias Kloseb159a552010-04-25 21:00:44 +000010726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010727$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010728else
Matthias Kloseb9621712010-04-24 17:59:49 +000010729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10730$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010731
10732fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010733rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010734
Victor Stinner984890f2011-11-24 13:53:38 +010010735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
10736$as_echo_n "checking for broken unsetenv... " >&6; }
10737cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10738/* end confdefs.h. */
10739
10740#include <stdlib.h>
10741
10742int
10743main ()
10744{
10745int res = unsetenv("DUMMY")
10746 ;
10747 return 0;
10748}
10749_ACEOF
10750if ac_fn_c_try_compile "$LINENO"; then :
10751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10752$as_echo "no" >&6; }
10753else
10754
10755$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
10756
10757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10758$as_echo "yes" >&6; }
10759
10760fi
10761rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10762
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010763for ac_prog in true
10764do
10765 # Extract the first word of "$ac_prog", so it can be a program name with args.
10766set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000010767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10768$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010769if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010770 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010771else
10772 if test -n "$TRUE"; then
10773 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
10774else
10775as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10776for as_dir in $PATH
10777do
10778 IFS=$as_save_IFS
10779 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000010780 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000010781 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010782 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000010783 $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 +000010784 break 2
10785 fi
10786done
Matthias Kloseb9621712010-04-24 17:59:49 +000010787 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010788IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010789
10790fi
10791fi
10792TRUE=$ac_cv_prog_TRUE
10793if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
10795$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010796else
Matthias Kloseb9621712010-04-24 17:59:49 +000010797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10798$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010799fi
10800
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010801
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010802 test -n "$TRUE" && break
10803done
10804test -n "$TRUE" || TRUE="/bin/true"
10805
10806
Matthias Kloseb9621712010-04-24 17:59:49 +000010807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
10808$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010809if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010810 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010811else
10812 ac_check_lib_save_LIBS=$LIBS
10813LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010814cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010815/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010816
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010817/* Override any GCC internal prototype to avoid an error.
10818 Use char because int might match the return type of a GCC
10819 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010820#ifdef __cplusplus
10821extern "C"
10822#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010823char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010824int
10825main ()
10826{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010827return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010828 ;
10829 return 0;
10830}
10831_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010832if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010833 ac_cv_lib_c_inet_aton=yes
10834else
Matthias Kloseb9621712010-04-24 17:59:49 +000010835 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010836fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010837rm -f core conftest.err conftest.$ac_objext \
10838 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010839LIBS=$ac_check_lib_save_LIBS
10840fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010841{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
10842$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010843if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010844 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010845else
Matthias Kloseb9621712010-04-24 17:59:49 +000010846 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
10847$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010848if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010849 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010850else
10851 ac_check_lib_save_LIBS=$LIBS
10852LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010853cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010854/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010855
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010856/* Override any GCC internal prototype to avoid an error.
10857 Use char because int might match the return type of a GCC
10858 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010859#ifdef __cplusplus
10860extern "C"
10861#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010862char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010863int
10864main ()
10865{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010866return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010867 ;
10868 return 0;
10869}
10870_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010871if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010872 ac_cv_lib_resolv_inet_aton=yes
10873else
Matthias Kloseb9621712010-04-24 17:59:49 +000010874 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010875fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010876rm -f core conftest.err conftest.$ac_objext \
10877 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010878LIBS=$ac_check_lib_save_LIBS
10879fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010880{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
10881$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010882if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010883 cat >>confdefs.h <<_ACEOF
10884#define HAVE_LIBRESOLV 1
10885_ACEOF
10886
10887 LIBS="-lresolv $LIBS"
10888
10889fi
10890
10891
10892fi
10893
10894
Christian Heimesd0764e22007-12-04 15:00:33 +000010895# On Tru64, chflags seems to be present, but calling it will
10896# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000010897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
10898$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010899if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010900 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010901else
Matthias Kloseb9621712010-04-24 17:59:49 +000010902 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010903 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000010904else
Matthias Kloseb9621712010-04-24 17:59:49 +000010905 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000010906/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070010907
Christian Heimesd0764e22007-12-04 15:00:33 +000010908#include <sys/stat.h>
10909#include <unistd.h>
10910int main(int argc, char*argv[])
10911{
10912 if(chflags(argv[0], 0) != 0)
10913 return 1;
10914 return 0;
10915}
Ned Deily3eb67d52011-06-28 00:00:28 -070010916
Christian Heimesd0764e22007-12-04 15:00:33 +000010917_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010918if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010919 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010920else
Matthias Kloseb9621712010-04-24 17:59:49 +000010921 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010922fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010923rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10924 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010925fi
10926
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010927
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010928fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010929{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
10930$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010931if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010932 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020010933if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010934 ac_cv_have_chflags="yes"
10935else
10936 ac_cv_have_chflags="no"
10937fi
10938
10939fi
10940if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010941
Matthias Kloseb9621712010-04-24 17:59:49 +000010942$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010943
10944fi
10945
Matthias Kloseb9621712010-04-24 17:59:49 +000010946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
10947$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010948if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010949 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010950else
Matthias Kloseb9621712010-04-24 17:59:49 +000010951 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010952 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000010953else
Matthias Kloseb9621712010-04-24 17:59:49 +000010954 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000010955/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070010956
Christian Heimesd0764e22007-12-04 15:00:33 +000010957#include <sys/stat.h>
10958#include <unistd.h>
10959int main(int argc, char*argv[])
10960{
10961 if(lchflags(argv[0], 0) != 0)
10962 return 1;
10963 return 0;
10964}
Ned Deily3eb67d52011-06-28 00:00:28 -070010965
Christian Heimesd0764e22007-12-04 15:00:33 +000010966_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010967if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010968 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010969else
Matthias Kloseb9621712010-04-24 17:59:49 +000010970 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000010971fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010972rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10973 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010974fi
10975
10976
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010977fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010978{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
10979$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010980if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010981 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020010982if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010983 ac_cv_have_lchflags="yes"
10984else
10985 ac_cv_have_lchflags="no"
10986fi
10987
10988fi
10989if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010990
Matthias Kloseb9621712010-04-24 17:59:49 +000010991$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010992
10993fi
10994
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010995case $ac_sys_system/$ac_sys_release in
10996Darwin/*)
10997 _CUR_CFLAGS="${CFLAGS}"
10998 _CUR_LDFLAGS="${LDFLAGS}"
10999 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11000 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11001 ;;
11002esac
11003
Matthias Kloseb9621712010-04-24 17:59:49 +000011004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11005$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011006if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011007 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011008else
11009 ac_check_lib_save_LIBS=$LIBS
11010LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011011cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011012/* end confdefs.h. */
11013
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011014/* Override any GCC internal prototype to avoid an error.
11015 Use char because int might match the return type of a GCC
11016 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011017#ifdef __cplusplus
11018extern "C"
11019#endif
11020char inflateCopy ();
11021int
11022main ()
11023{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011024return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011025 ;
11026 return 0;
11027}
11028_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011029if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011030 ac_cv_lib_z_inflateCopy=yes
11031else
Matthias Kloseb9621712010-04-24 17:59:49 +000011032 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011033fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011034rm -f core conftest.err conftest.$ac_objext \
11035 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011036LIBS=$ac_check_lib_save_LIBS
11037fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011038{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
11039$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011040if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011041
Matthias Kloseb9621712010-04-24 17:59:49 +000011042$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011043
11044fi
11045
11046
11047case $ac_sys_system/$ac_sys_release in
11048Darwin/*)
11049 CFLAGS="${_CUR_CFLAGS}"
11050 LDFLAGS="${_CUR_LDFLAGS}"
11051 ;;
11052esac
11053
Matthias Kloseb9621712010-04-24 17:59:49 +000011054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
11055$as_echo_n "checking for hstrerror... " >&6; }
11056cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011057/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011058
Martin v. Löwise9416172003-05-03 10:12:45 +000011059#include <netdb.h>
11060
Martin v. Löwise9416172003-05-03 10:12:45 +000011061int
11062main ()
11063{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011064void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011065 ;
11066 return 0;
11067}
11068_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011069if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011070
Matthias Kloseb9621712010-04-24 17:59:49 +000011071$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011072
Matthias Kloseb159a552010-04-25 21:00:44 +000011073 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011074$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011075else
Matthias Kloseb9621712010-04-24 17:59:49 +000011076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11077$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011078
11079fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011080rm -f core conftest.err conftest.$ac_objext \
11081 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011082
Matthias Kloseb9621712010-04-24 17:59:49 +000011083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
11084$as_echo_n "checking for inet_aton... " >&6; }
11085cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011086/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011087
Martin v. Löwis86d66262006-02-17 08:40:11 +000011088#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011089#include <sys/socket.h>
11090#include <netinet/in.h>
11091#include <arpa/inet.h>
11092
Martin v. Löwise9416172003-05-03 10:12:45 +000011093int
11094main ()
11095{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011096void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011097 ;
11098 return 0;
11099}
11100_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011101if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011102
Matthias Kloseb9621712010-04-24 17:59:49 +000011103$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011104
Matthias Kloseb159a552010-04-25 21:00:44 +000011105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011106$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011107else
Matthias Kloseb9621712010-04-24 17:59:49 +000011108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11109$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011110
11111fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011112rm -f core conftest.err conftest.$ac_objext \
11113 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011114
Matthias Kloseb9621712010-04-24 17:59:49 +000011115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
11116$as_echo_n "checking for inet_pton... " >&6; }
11117cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011118/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011119
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011120#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011121#include <sys/socket.h>
11122#include <netinet/in.h>
11123#include <arpa/inet.h>
11124
Martin v. Löwise9416172003-05-03 10:12:45 +000011125int
11126main ()
11127{
11128void* p = inet_pton
11129 ;
11130 return 0;
11131}
11132_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011133if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011134
Matthias Kloseb9621712010-04-24 17:59:49 +000011135$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011136
Matthias Kloseb159a552010-04-25 21:00:44 +000011137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011138$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011139else
Matthias Kloseb9621712010-04-24 17:59:49 +000011140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11141$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011142
11143fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011144rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000011145
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011146# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000011147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
11148$as_echo_n "checking for setgroups... " >&6; }
11149cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011150/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011151
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011152#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011153#ifdef HAVE_GRP_H
11154#include <grp.h>
11155#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000011156
Martin v. Löwisd5843682002-11-21 20:41:28 +000011157int
11158main ()
11159{
11160void* p = setgroups
11161 ;
11162 return 0;
11163}
11164_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011165if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011166
Matthias Kloseb9621712010-04-24 17:59:49 +000011167$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011168
Matthias Kloseb159a552010-04-25 21:00:44 +000011169 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011170$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011171else
Matthias Kloseb9621712010-04-24 17:59:49 +000011172 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11173$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011174
11175fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011176rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000011177
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011178# check for openpty and forkpty
11179
11180for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011181do :
11182 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011183if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011184 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011185#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011186_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011187
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011188else
Matthias Kloseb9621712010-04-24 17:59:49 +000011189 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
11190$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011191if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011192 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011193else
Martin v. Löwis11437992002-04-12 09:54:03 +000011194 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011195LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011196cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011197/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011198
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011199/* Override any GCC internal prototype to avoid an error.
11200 Use char because int might match the return type of a GCC
11201 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011202#ifdef __cplusplus
11203extern "C"
11204#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011205char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011206int
11207main ()
11208{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011209return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011210 ;
11211 return 0;
11212}
11213_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011214if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011215 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011216else
Matthias Kloseb9621712010-04-24 17:59:49 +000011217 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011218fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011219rm -f core conftest.err conftest.$ac_objext \
11220 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011221LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011222fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011223{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
11224$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011225if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011226 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011227 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011228else
Matthias Kloseb9621712010-04-24 17:59:49 +000011229 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
11230$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011231if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011232 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011233else
11234 ac_check_lib_save_LIBS=$LIBS
11235LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011236cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011237/* end confdefs.h. */
11238
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011239/* Override any GCC internal prototype to avoid an error.
11240 Use char because int might match the return type of a GCC
11241 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011242#ifdef __cplusplus
11243extern "C"
11244#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011245char openpty ();
11246int
11247main ()
11248{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011249return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011250 ;
11251 return 0;
11252}
11253_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011254if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011255 ac_cv_lib_bsd_openpty=yes
11256else
Matthias Kloseb9621712010-04-24 17:59:49 +000011257 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011258fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011259rm -f core conftest.err conftest.$ac_objext \
11260 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011261LIBS=$ac_check_lib_save_LIBS
11262fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011263{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
11264$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011265if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011266 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011267 LIBS="$LIBS -lbsd"
11268fi
11269
11270
11271fi
11272
Fred Drake8cef4cf2000-06-28 16:40:38 +000011273
11274fi
11275done
11276
11277for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011278do :
11279 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011280if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011281 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011282#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011283_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011284
Fred Drake8cef4cf2000-06-28 16:40:38 +000011285else
Matthias Kloseb9621712010-04-24 17:59:49 +000011286 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
11287$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011288if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011289 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011290else
Martin v. Löwis11437992002-04-12 09:54:03 +000011291 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011292LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011293cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011294/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011295
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011296/* Override any GCC internal prototype to avoid an error.
11297 Use char because int might match the return type of a GCC
11298 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011299#ifdef __cplusplus
11300extern "C"
11301#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011302char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011303int
11304main ()
11305{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011306return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011307 ;
11308 return 0;
11309}
11310_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011311if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011312 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011313else
Matthias Kloseb9621712010-04-24 17:59:49 +000011314 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011315fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011316rm -f core conftest.err conftest.$ac_objext \
11317 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011318LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011319fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011320{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
11321$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011322if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011323 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011324 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011325else
Matthias Kloseb9621712010-04-24 17:59:49 +000011326 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
11327$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011328if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011329 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011330else
11331 ac_check_lib_save_LIBS=$LIBS
11332LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011333cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011334/* end confdefs.h. */
11335
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011336/* Override any GCC internal prototype to avoid an error.
11337 Use char because int might match the return type of a GCC
11338 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011339#ifdef __cplusplus
11340extern "C"
11341#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011342char forkpty ();
11343int
11344main ()
11345{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011346return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011347 ;
11348 return 0;
11349}
11350_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011351if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011352 ac_cv_lib_bsd_forkpty=yes
11353else
Matthias Kloseb9621712010-04-24 17:59:49 +000011354 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011355fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011356rm -f core conftest.err conftest.$ac_objext \
11357 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011358LIBS=$ac_check_lib_save_LIBS
11359fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011360{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
11361$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011362if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011363 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011364 LIBS="$LIBS -lbsd"
11365fi
11366
11367
11368fi
11369
Fred Drake8cef4cf2000-06-28 16:40:38 +000011370
11371fi
11372done
11373
Jack Jansendd19cf82001-12-06 22:36:17 +000011374
Christian Heimesb186d002008-03-18 15:15:01 +000011375# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000011376for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000011377do :
11378 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020011379if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000011380 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011381#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000011382_ACEOF
11383
11384fi
11385done
11386
11387
Michael W. Hudson54241132001-12-07 15:38:26 +000011388# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000011389for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000011390do :
11391 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11392ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011393if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011394 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011395#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011396_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000011397
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011398fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000011399done
11400
Michael W. Hudson54241132001-12-07 15:38:26 +000011401
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011402ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020011403if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011404 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000011405
Martin v. Löwis1142de32002-03-29 16:28:31 +000011406else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011407 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011408 *" dup2.$ac_objext "* ) ;;
11409 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011410 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011411esac
11412
Martin v. Löwis1142de32002-03-29 16:28:31 +000011413fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011414
11415ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
Victor Stinnere0be4232011-10-25 13:06:09 +020011416if test "x$ac_cv_func_getcwd" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011417 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
11418
11419else
11420 case " $LIBOBJS " in
11421 *" getcwd.$ac_objext "* ) ;;
11422 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
11423 ;;
11424esac
11425
11426fi
11427
11428ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020011429if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011430 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
11431
11432else
11433 case " $LIBOBJS " in
11434 *" strdup.$ac_objext "* ) ;;
11435 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
11436 ;;
11437esac
11438
11439fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000011440
11441
11442for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000011443do :
11444 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020011445if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011446 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011447#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011448_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011449 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011450/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011451#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011452int
11453main ()
11454{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011455getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011456 ;
11457 return 0;
11458}
11459_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011460if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011461
Matthias Kloseb9621712010-04-24 17:59:49 +000011462$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011463
Guido van Rossum627b2d71993-12-24 10:39:16 +000011464fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011465rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011466
Guido van Rossum627b2d71993-12-24 10:39:16 +000011467fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011468done
Guido van Rossum627b2d71993-12-24 10:39:16 +000011469
Jack Jansen150753c2003-03-29 22:07:47 +000011470for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000011471do :
11472 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020011473if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000011474 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011475#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000011476_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011477 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011478/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000011479#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000011480int
11481main ()
11482{
11483setpgrp(0,0);
11484 ;
11485 return 0;
11486}
11487_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011488if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011489
Matthias Kloseb9621712010-04-24 17:59:49 +000011490$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011491
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011492fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011493rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000011494
11495fi
11496done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011497
Thomas Wouters3a584202000-08-05 23:28:51 +000011498for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000011499do :
11500 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020011501if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011502 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011503#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011504_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011505 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011506/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011507#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011508int
11509main ()
11510{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011511gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011512 ;
11513 return 0;
11514}
11515_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011516if ac_fn_c_try_compile "$LINENO"; then :
11517
Guido van Rossum627b2d71993-12-24 10:39:16 +000011518else
Skip Montanaro6dead952003-09-25 14:50:04 +000011519
Matthias Kloseb9621712010-04-24 17:59:49 +000011520$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011521
Martin v. Löwis11437992002-04-12 09:54:03 +000011522
Guido van Rossum627b2d71993-12-24 10:39:16 +000011523fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011524rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011525
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011526fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011527done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011528
Michael W. Hudson54241132001-12-07 15:38:26 +000011529
Victor Stinnere0be4232011-10-25 13:06:09 +020011530for ac_func in clock_gettime
11531do :
11532 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
11533if test "x$ac_cv_func_clock_gettime" = xyes; then :
11534 cat >>confdefs.h <<_ACEOF
11535#define HAVE_CLOCK_GETTIME 1
11536_ACEOF
11537
11538else
11539
11540 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
11541$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
11542if ${ac_cv_lib_rt_clock_gettime+:} false; then :
11543 $as_echo_n "(cached) " >&6
11544else
11545 ac_check_lib_save_LIBS=$LIBS
11546LIBS="-lrt $LIBS"
11547cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11548/* end confdefs.h. */
11549
11550/* Override any GCC internal prototype to avoid an error.
11551 Use char because int might match the return type of a GCC
11552 builtin and then its argument prototype would still apply. */
11553#ifdef __cplusplus
11554extern "C"
11555#endif
11556char clock_gettime ();
11557int
11558main ()
11559{
11560return clock_gettime ();
11561 ;
11562 return 0;
11563}
11564_ACEOF
11565if ac_fn_c_try_link "$LINENO"; then :
11566 ac_cv_lib_rt_clock_gettime=yes
11567else
11568 ac_cv_lib_rt_clock_gettime=no
11569fi
11570rm -f core conftest.err conftest.$ac_objext \
11571 conftest$ac_exeext conftest.$ac_ext
11572LIBS=$ac_check_lib_save_LIBS
11573fi
11574{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
11575$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
11576if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
11577
11578 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
11579
11580
11581$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
11582
11583
11584fi
11585
11586
11587fi
11588done
11589
11590
11591for ac_func in clock_getres
11592do :
11593 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
11594if test "x$ac_cv_func_clock_getres" = xyes; then :
11595 cat >>confdefs.h <<_ACEOF
11596#define HAVE_CLOCK_GETRES 1
11597_ACEOF
11598
11599else
11600
11601 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
11602$as_echo_n "checking for clock_getres in -lrt... " >&6; }
11603if ${ac_cv_lib_rt_clock_getres+:} false; then :
11604 $as_echo_n "(cached) " >&6
11605else
11606 ac_check_lib_save_LIBS=$LIBS
11607LIBS="-lrt $LIBS"
11608cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11609/* end confdefs.h. */
11610
11611/* Override any GCC internal prototype to avoid an error.
11612 Use char because int might match the return type of a GCC
11613 builtin and then its argument prototype would still apply. */
11614#ifdef __cplusplus
11615extern "C"
11616#endif
11617char clock_getres ();
11618int
11619main ()
11620{
11621return clock_getres ();
11622 ;
11623 return 0;
11624}
11625_ACEOF
11626if ac_fn_c_try_link "$LINENO"; then :
11627 ac_cv_lib_rt_clock_getres=yes
11628else
11629 ac_cv_lib_rt_clock_getres=no
11630fi
11631rm -f core conftest.err conftest.$ac_objext \
11632 conftest$ac_exeext conftest.$ac_ext
11633LIBS=$ac_check_lib_save_LIBS
11634fi
11635{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
11636$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
11637if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
11638
11639 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
11640
11641
11642fi
11643
11644
11645fi
11646done
11647
11648
Matthias Kloseb9621712010-04-24 17:59:49 +000011649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
11650$as_echo_n "checking for major... " >&6; }
11651cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011652/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011653
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011654#if defined(MAJOR_IN_MKDEV)
11655#include <sys/mkdev.h>
11656#elif defined(MAJOR_IN_SYSMACROS)
11657#include <sys/sysmacros.h>
11658#else
11659#include <sys/types.h>
11660#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011661
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011662int
11663main ()
11664{
11665
11666 makedev(major(0),minor(0));
11667
11668 ;
11669 return 0;
11670}
11671_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011672if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011673
11674
Matthias Kloseb9621712010-04-24 17:59:49 +000011675$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011676
Matthias Kloseb9621712010-04-24 17:59:49 +000011677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11678$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011679
11680else
Skip Montanaro6dead952003-09-25 14:50:04 +000011681
Matthias Kloseb9621712010-04-24 17:59:49 +000011682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11683$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011684
11685fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011686rm -f core conftest.err conftest.$ac_objext \
11687 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011688
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011689# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000011690# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000011691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
11692$as_echo_n "checking for getaddrinfo... " >&6; }
11693cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011694/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011695
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011696#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011697#include <sys/socket.h>
11698#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011699#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011700
Martin v. Löwis11437992002-04-12 09:54:03 +000011701int
11702main ()
11703{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011704getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000011705 ;
11706 return 0;
11707}
11708_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011709if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011710 have_getaddrinfo=yes
11711else
Matthias Kloseb9621712010-04-24 17:59:49 +000011712 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011713fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011714rm -f core conftest.err conftest.$ac_objext \
11715 conftest$ac_exeext conftest.$ac_ext
11716{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
11717$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011718if test $have_getaddrinfo = yes
11719then
Matthias Kloseb9621712010-04-24 17:59:49 +000011720 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
11721$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011722 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011723 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011724else
Matthias Kloseb9621712010-04-24 17:59:49 +000011725 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010011726
11727if test "${enable_ipv6+set}" = set; then
11728 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
11729else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011730 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010011731fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011732else
Matthias Kloseb9621712010-04-24 17:59:49 +000011733 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011734/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011735
Stefan Krah19c21392012-11-22 23:47:32 +010011736#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011737#include <sys/types.h>
11738#include <netdb.h>
11739#include <string.h>
11740#include <sys/socket.h>
11741#include <netinet/in.h>
11742
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011743int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011744{
11745 int passive, gaierr, inet4 = 0, inet6 = 0;
11746 struct addrinfo hints, *ai, *aitop;
11747 char straddr[INET6_ADDRSTRLEN], strport[16];
11748
11749 for (passive = 0; passive <= 1; passive++) {
11750 memset(&hints, 0, sizeof(hints));
11751 hints.ai_family = AF_UNSPEC;
11752 hints.ai_flags = passive ? AI_PASSIVE : 0;
11753 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000011754 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011755 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
11756 (void)gai_strerror(gaierr);
11757 goto bad;
11758 }
11759 for (ai = aitop; ai; ai = ai->ai_next) {
11760 if (ai->ai_addr == NULL ||
11761 ai->ai_addrlen == 0 ||
11762 getnameinfo(ai->ai_addr, ai->ai_addrlen,
11763 straddr, sizeof(straddr), strport, sizeof(strport),
11764 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
11765 goto bad;
11766 }
11767 switch (ai->ai_family) {
11768 case AF_INET:
11769 if (strcmp(strport, "54321") != 0) {
11770 goto bad;
11771 }
11772 if (passive) {
11773 if (strcmp(straddr, "0.0.0.0") != 0) {
11774 goto bad;
11775 }
11776 } else {
11777 if (strcmp(straddr, "127.0.0.1") != 0) {
11778 goto bad;
11779 }
11780 }
11781 inet4++;
11782 break;
11783 case AF_INET6:
11784 if (strcmp(strport, "54321") != 0) {
11785 goto bad;
11786 }
11787 if (passive) {
11788 if (strcmp(straddr, "::") != 0) {
11789 goto bad;
11790 }
11791 } else {
11792 if (strcmp(straddr, "::1") != 0) {
11793 goto bad;
11794 }
11795 }
11796 inet6++;
11797 break;
11798 case AF_UNSPEC:
11799 goto bad;
11800 break;
11801 default:
11802 /* another family support? */
11803 break;
11804 }
11805 }
11806 }
11807
11808 if (!(inet4 == 0 || inet4 == 2))
11809 goto bad;
11810 if (!(inet6 == 0 || inet6 == 2))
11811 goto bad;
11812
11813 if (aitop)
11814 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011815 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011816
11817 bad:
11818 if (aitop)
11819 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011820 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011821}
11822
Martin v. Löwis11437992002-04-12 09:54:03 +000011823_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011824if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011825 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011826else
Matthias Kloseb9621712010-04-24 17:59:49 +000011827 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011828fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011829rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11830 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011831fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011832
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011833fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011834
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011835fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011836
Benjamin Petersond4694ed2010-11-01 01:44:30 +000011837{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
11838$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
11839
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011840if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011841then
11842 if test $ipv6 = yes
11843 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011844 echo 'Fatal: You must get working getaddrinfo() function.'
11845 echo ' or you can specify "--disable-ipv6"'.
11846 exit 1
11847 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011848else
Martin v. Löwis11437992002-04-12 09:54:03 +000011849
Matthias Kloseb9621712010-04-24 17:59:49 +000011850$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011851
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011852fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000011853
Jack Jansen9a66b6d2001-08-08 13:56:14 +000011854for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000011855do :
11856 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020011857if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011858 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011859#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011860_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011861
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011862fi
11863done
11864
Michael W. Hudson54241132001-12-07 15:38:26 +000011865
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011866# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000011867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
11868$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011869if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011870 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011871else
Matthias Kloseb9621712010-04-24 17:59:49 +000011872 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011873/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011874#include <sys/types.h>
11875#include <sys/time.h>
11876#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011877
Martin v. Löwis11437992002-04-12 09:54:03 +000011878int
11879main ()
11880{
11881if ((struct tm *) 0)
11882return 0;
11883 ;
11884 return 0;
11885}
11886_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011887if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011888 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011889else
Matthias Kloseb9621712010-04-24 17:59:49 +000011890 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011891fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011892rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011893fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011894{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
11895$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011896if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011897
Matthias Kloseb9621712010-04-24 17:59:49 +000011898$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011899
11900fi
11901
Matthias Kloseb9621712010-04-24 17:59:49 +000011902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
11903$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011904if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011905 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011906else
Matthias Kloseb9621712010-04-24 17:59:49 +000011907 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011908/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011909#include <sys/types.h>
11910#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011911
Martin v. Löwis11437992002-04-12 09:54:03 +000011912int
11913main ()
11914{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011915struct tm tm;
11916 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000011917 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000011918 ;
11919 return 0;
11920}
11921_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011922if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011923 ac_cv_struct_tm=time.h
11924else
Matthias Kloseb9621712010-04-24 17:59:49 +000011925 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011926fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011927rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011928fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011929{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
11930$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011931if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011932
Matthias Kloseb9621712010-04-24 17:59:49 +000011933$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011934
11935fi
11936
Matthias Kloseb9621712010-04-24 17:59:49 +000011937ac_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 +000011938#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000011939
Matthias Kloseb9621712010-04-24 17:59:49 +000011940"
Victor Stinnere0be4232011-10-25 13:06:09 +020011941if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011942
11943cat >>confdefs.h <<_ACEOF
11944#define HAVE_STRUCT_TM_TM_ZONE 1
11945_ACEOF
11946
11947
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011948fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011949
Martin v. Löwis11437992002-04-12 09:54:03 +000011950if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
11951
Matthias Kloseb9621712010-04-24 17:59:49 +000011952$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011953
11954else
Matthias Kloseb9621712010-04-24 17:59:49 +000011955 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
11956"
Victor Stinnere0be4232011-10-25 13:06:09 +020011957if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011958 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011959else
Matthias Kloseb9621712010-04-24 17:59:49 +000011960 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011961fi
11962
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011963cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011964#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011965_ACEOF
11966
Matthias Kloseb9621712010-04-24 17:59:49 +000011967 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
11968$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011969if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011970 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011971else
Matthias Kloseb9621712010-04-24 17:59:49 +000011972 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011973/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011974#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011975#if !HAVE_DECL_TZNAME
11976extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000011977#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011978
Martin v. Löwis11437992002-04-12 09:54:03 +000011979int
11980main ()
11981{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011982return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000011983 ;
11984 return 0;
11985}
11986_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011987if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011988 ac_cv_var_tzname=yes
11989else
Matthias Kloseb9621712010-04-24 17:59:49 +000011990 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011991fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011992rm -f core conftest.err conftest.$ac_objext \
11993 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000011994fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011995{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
11996$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011997 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011998
Matthias Kloseb9621712010-04-24 17:59:49 +000011999$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012000
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012001 fi
12002fi
12003
Matthias Kloseb9621712010-04-24 17:59:49 +000012004ac_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 +020012005if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012006
12007cat >>confdefs.h <<_ACEOF
12008#define HAVE_STRUCT_STAT_ST_RDEV 1
12009_ACEOF
12010
12011
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012012fi
12013
Matthias Kloseb9621712010-04-24 17:59:49 +000012014ac_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 +020012015if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012016
Martin v. Löwis11437992002-04-12 09:54:03 +000012017cat >>confdefs.h <<_ACEOF
12018#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12019_ACEOF
12020
12021
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012022fi
12023
Matthias Kloseb9621712010-04-24 17:59:49 +000012024ac_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 +020012025if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000012026
12027cat >>confdefs.h <<_ACEOF
12028#define HAVE_STRUCT_STAT_ST_FLAGS 1
12029_ACEOF
12030
12031
12032fi
12033
Matthias Kloseb9621712010-04-24 17:59:49 +000012034ac_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 +020012035if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012036
12037cat >>confdefs.h <<_ACEOF
12038#define HAVE_STRUCT_STAT_ST_GEN 1
12039_ACEOF
12040
12041
12042fi
12043
Matthias Kloseb9621712010-04-24 17:59:49 +000012044ac_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 +020012045if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012046
12047cat >>confdefs.h <<_ACEOF
12048#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
12049_ACEOF
12050
12051
12052fi
12053
Matthias Kloseb9621712010-04-24 17:59:49 +000012054ac_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 +020012055if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012056
Martin v. Löwis11437992002-04-12 09:54:03 +000012057cat >>confdefs.h <<_ACEOF
12058#define HAVE_STRUCT_STAT_ST_BLOCKS 1
12059_ACEOF
12060
12061
Matthias Kloseb9621712010-04-24 17:59:49 +000012062$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012063
12064else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012065 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000012066 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012067 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
12068 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012069esac
12070
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012071fi
12072
Michael W. Hudson54241132001-12-07 15:38:26 +000012073
Martin v. Löwis11437992002-04-12 09:54:03 +000012074
Matthias Kloseb9621712010-04-24 17:59:49 +000012075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
12076$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012077if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012078 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012079else
Matthias Kloseb159a552010-04-25 21:00:44 +000012080
Matthias Kloseb9621712010-04-24 17:59:49 +000012081 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012082/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012083#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012084int
12085main ()
12086{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012087return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000012088 ;
12089 return 0;
12090}
12091_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012092if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012093 ac_cv_header_time_altzone=yes
12094else
Matthias Kloseb9621712010-04-24 17:59:49 +000012095 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000012096fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012097rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000012098
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012099fi
12100
Matthias Kloseb9621712010-04-24 17:59:49 +000012101{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
12102$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012103if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012104
Matthias Kloseb9621712010-04-24 17:59:49 +000012105$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012106
12107fi
12108
Guido van Rossumda88dad1995-01-26 00:46:29 +000012109was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
12111$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
12112cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012113/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012114
12115#include <sys/types.h>
12116#include <sys/select.h>
12117#include <sys/time.h>
12118
Martin v. Löwis11437992002-04-12 09:54:03 +000012119int
12120main ()
12121{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012122;
Martin v. Löwis11437992002-04-12 09:54:03 +000012123 ;
12124 return 0;
12125}
12126_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012127if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012128
12129
Matthias Kloseb9621712010-04-24 17:59:49 +000012130$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012131
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012132 was_it_defined=yes
12133
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012134fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012135rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012136{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
12137$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012138
Matthias Kloseb9621712010-04-24 17:59:49 +000012139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
12140$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012141if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012142 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012143else
Matthias Kloseb9621712010-04-24 17:59:49 +000012144 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012145/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000012146#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012147int
12148main ()
12149{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012150struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000012151 ;
12152 return 0;
12153}
12154_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012155if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012156 ac_cv_struct_addrinfo=yes
12157else
Matthias Kloseb9621712010-04-24 17:59:49 +000012158 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012159fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012160rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12161fi
12162
Matthias Kloseb9621712010-04-24 17:59:49 +000012163{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
12164$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012165if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012166
Matthias Kloseb9621712010-04-24 17:59:49 +000012167$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012168
12169fi
12170
Matthias Kloseb9621712010-04-24 17:59:49 +000012171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
12172$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012173if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012174 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012175else
Matthias Kloseb9621712010-04-24 17:59:49 +000012176 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012177/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012178
12179# include <sys/types.h>
12180# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012181int
12182main ()
12183{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012184struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000012185 ;
12186 return 0;
12187}
12188_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012189if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012190 ac_cv_struct_sockaddr_storage=yes
12191else
Matthias Kloseb9621712010-04-24 17:59:49 +000012192 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012193fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012194rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12195fi
12196
Matthias Kloseb9621712010-04-24 17:59:49 +000012197{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
12198$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012199if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012200
Matthias Kloseb9621712010-04-24 17:59:49 +000012201$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012202
12203fi
12204
Guido van Rossum627b2d71993-12-24 10:39:16 +000012205# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000012206
Matthias Kloseb9621712010-04-24 17:59:49 +000012207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
12208$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012209if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012210 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000012211else
Matthias Kloseb9621712010-04-24 17:59:49 +000012212 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012213/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012214$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012215int
12216main ()
12217{
12218static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012219test_array [0] = 0;
12220return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012221
12222 ;
12223 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000012224}
Martin v. Löwis11437992002-04-12 09:54:03 +000012225_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012226if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012227 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012228else
Matthias Kloseb9621712010-04-24 17:59:49 +000012229 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012230fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012231rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012232fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012233{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
12234$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012235if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012236 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012237
12238fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000012239
Matthias Kloseb9621712010-04-24 17:59:49 +000012240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12241$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012242if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012243 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012244else
Matthias Kloseb9621712010-04-24 17:59:49 +000012245 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012246/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012247
Martin v. Löwis11437992002-04-12 09:54:03 +000012248int
12249main ()
12250{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012251
Martin v. Löwis11437992002-04-12 09:54:03 +000012252#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012253 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012254 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012255 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000012256 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012257 char const *const *pcpcc;
12258 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000012259 /* NEC SVR4.0.2 mips cc rejects this. */
12260 struct point {int x, y;};
12261 static struct point const zero = {0,0};
12262 /* AIX XL C 1.02.0.0 rejects this.
12263 It does not let you subtract one const X* pointer from another in
12264 an arm of an if-expression whose if-part is not a constant
12265 expression */
12266 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012267 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012268 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012269 ++pcpcc;
12270 ppc = (char**) pcpcc;
12271 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012272 { /* SCO 3.2v4 cc rejects this sort of thing. */
12273 char tx;
12274 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000012275 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012276
Martin v. Löwis11437992002-04-12 09:54:03 +000012277 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012278 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012279 }
12280 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12281 int x[] = {25, 17};
12282 const int *foo = &x[0];
12283 ++foo;
12284 }
12285 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12286 typedef const int *iptr;
12287 iptr p = 0;
12288 ++p;
12289 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012290 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000012291 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012292 struct s { int j; const int *ap[3]; } bx;
12293 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000012294 }
12295 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12296 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012297 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012298 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012299 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000012300#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000012301
Martin v. Löwis11437992002-04-12 09:54:03 +000012302 ;
12303 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012304}
Martin v. Löwis11437992002-04-12 09:54:03 +000012305_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012306if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012307 ac_cv_c_const=yes
12308else
Matthias Kloseb9621712010-04-24 17:59:49 +000012309 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012310fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012311rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012312fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012313{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12314$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012315if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012316
Matthias Kloseb9621712010-04-24 17:59:49 +000012317$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012318
12319fi
12320
Michael W. Hudson54241132001-12-07 15:38:26 +000012321
Guido van Rossumda88dad1995-01-26 00:46:29 +000012322works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
12324$as_echo_n "checking for working volatile... " >&6; }
12325cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012326/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012327
Martin v. Löwis11437992002-04-12 09:54:03 +000012328int
12329main ()
12330{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012331volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012332 ;
12333 return 0;
12334}
12335_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012336if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012337 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012338else
Skip Montanaro6dead952003-09-25 14:50:04 +000012339
Matthias Kloseb9621712010-04-24 17:59:49 +000012340$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012341
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012342
Guido van Rossum627b2d71993-12-24 10:39:16 +000012343fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012344rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012345{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12346$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012347
Guido van Rossumda88dad1995-01-26 00:46:29 +000012348works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
12350$as_echo_n "checking for working signed char... " >&6; }
12351cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012352/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012353
Martin v. Löwis11437992002-04-12 09:54:03 +000012354int
12355main ()
12356{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012357signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000012358 ;
12359 return 0;
12360}
12361_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012362if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012363 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012364else
Skip Montanaro6dead952003-09-25 14:50:04 +000012365
Matthias Kloseb9621712010-04-24 17:59:49 +000012366$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000012367
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012368
Guido van Rossum7f43da71994-08-01 12:15:30 +000012369fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012370rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012371{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12372$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012373
Guido van Rossumda88dad1995-01-26 00:46:29 +000012374have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
12376$as_echo_n "checking for prototypes... " >&6; }
12377cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012378/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012379int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012380int
12381main ()
12382{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012383return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000012384 ;
12385 return 0;
12386}
12387_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012388if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012389
Matthias Kloseb9621712010-04-24 17:59:49 +000012390$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012391
Matthias Kloseb159a552010-04-25 21:00:44 +000012392 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012393fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012394rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012395{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
12396$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012397
Guido van Rossumda88dad1995-01-26 00:46:29 +000012398works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
12400$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
12401cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012402/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012403
12404#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000012405int foo(int x, ...) {
12406 va_list va;
12407 va_start(va, x);
12408 va_arg(va, int);
12409 va_arg(va, char *);
12410 va_arg(va, double);
12411 return 0;
12412}
Guido van Rossum7f43da71994-08-01 12:15:30 +000012413
Martin v. Löwis11437992002-04-12 09:54:03 +000012414int
12415main ()
12416{
Guido van Rossum90eea071996-08-30 20:58:57 +000012417return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000012418 ;
12419 return 0;
12420}
12421_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012422if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012423
12424
Matthias Kloseb9621712010-04-24 17:59:49 +000012425$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012426
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012427 works=yes
12428
Guido van Rossum627b2d71993-12-24 10:39:16 +000012429fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012430rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012431{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12432$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012433
Martin v. Löwisd6320502004-08-12 13:45:08 +000012434# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000012435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
12436$as_echo_n "checking for socketpair... " >&6; }
12437cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012438/* end confdefs.h. */
12439
12440#include <sys/types.h>
12441#include <sys/socket.h>
12442
12443int
12444main ()
12445{
12446void *x=socketpair
12447 ;
12448 return 0;
12449}
12450_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012451if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000012452
Matthias Kloseb9621712010-04-24 17:59:49 +000012453$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000012454
Matthias Kloseb159a552010-04-25 21:00:44 +000012455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012456$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012457else
Matthias Kloseb9621712010-04-24 17:59:49 +000012458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12459$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012460
12461fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012462rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012463
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012464# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000012465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
12466$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
12467cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012468/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012469#include <sys/types.h>
12470#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012471int
12472main ()
12473{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012474struct sockaddr x;
12475x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012476 ;
12477 return 0;
12478}
12479_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012480if ac_fn_c_try_compile "$LINENO"; then :
12481 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12482$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012483
Matthias Kloseb9621712010-04-24 17:59:49 +000012484$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012485
12486else
Matthias Kloseb9621712010-04-24 17:59:49 +000012487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12488$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000012489
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012490fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012491rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012492
Guido van Rossumda88dad1995-01-26 00:46:29 +000012493va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
12495$as_echo_n "checking whether va_list is an array... " >&6; }
12496cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012497/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012498
12499#ifdef HAVE_STDARG_PROTOTYPES
12500#include <stdarg.h>
12501#else
12502#include <varargs.h>
12503#endif
12504
Martin v. Löwis11437992002-04-12 09:54:03 +000012505int
12506main ()
12507{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012508va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000012509 ;
12510 return 0;
12511}
12512_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012513if ac_fn_c_try_compile "$LINENO"; then :
12514
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012515else
Skip Montanaro6dead952003-09-25 14:50:04 +000012516
Martin v. Löwis11437992002-04-12 09:54:03 +000012517
Matthias Kloseb9621712010-04-24 17:59:49 +000012518$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012519
Guido van Rossumda88dad1995-01-26 00:46:29 +000012520 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012521
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012522fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012523rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012524{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
12525$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012526
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012527# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000012528
12529
Matthias Kloseb9621712010-04-24 17:59:49 +000012530ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020012531if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012532
Matthias Kloseb9621712010-04-24 17:59:49 +000012533 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000012534
Matthias Kloseb9621712010-04-24 17:59:49 +000012535 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
12536$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012537 OLD_CFLAGS=$CFLAGS
12538 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012539 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012540/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012541
12542# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012543
Martin v. Löwis11437992002-04-12 09:54:03 +000012544int
12545main ()
12546{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012547
12548 char *name;
12549 struct hostent *he, *res;
12550 char buffer[2048];
12551 int buflen = 2048;
12552 int h_errnop;
12553
12554 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012555
12556 ;
12557 return 0;
12558}
12559_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012560if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012561
Matthias Kloseb9621712010-04-24 17:59:49 +000012562 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012563
Martin v. Löwis11437992002-04-12 09:54:03 +000012564
Matthias Kloseb9621712010-04-24 17:59:49 +000012565$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012566
Matthias Kloseb9621712010-04-24 17:59:49 +000012567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12568$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012569
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012570else
Skip Montanaro6dead952003-09-25 14:50:04 +000012571
Matthias Kloseb9621712010-04-24 17:59:49 +000012572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12573$as_echo "no" >&6; }
12574 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
12575$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
12576 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012577/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012578
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012579# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012580
Martin v. Löwis11437992002-04-12 09:54:03 +000012581int
12582main ()
12583{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012584
12585 char *name;
12586 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000012587 char buffer[2048];
12588 int buflen = 2048;
12589 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012590
Matthias Kloseb159a552010-04-25 21:00:44 +000012591 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012592
12593 ;
12594 return 0;
12595}
12596_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012597if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012598
Matthias Kloseb9621712010-04-24 17:59:49 +000012599 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012600
Martin v. Löwis11437992002-04-12 09:54:03 +000012601
Matthias Kloseb159a552010-04-25 21:00:44 +000012602$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012603
Matthias Kloseb9621712010-04-24 17:59:49 +000012604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12605$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012606
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012607else
Skip Montanaro6dead952003-09-25 14:50:04 +000012608
Matthias Kloseb9621712010-04-24 17:59:49 +000012609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12610$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000012611 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
12612$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
12613 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12614/* end confdefs.h. */
12615
12616# include <netdb.h>
12617
12618int
12619main ()
12620{
12621
12622 char *name;
12623 struct hostent *he;
12624 struct hostent_data data;
12625
12626 (void) gethostbyname_r(name, he, &data);
12627
12628 ;
12629 return 0;
12630}
12631_ACEOF
12632if ac_fn_c_try_compile "$LINENO"; then :
12633
12634 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
12635
12636
12637$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
12638
12639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12640$as_echo "yes" >&6; }
12641
12642else
12643
12644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12645$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012646
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012647fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012648rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012649
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012650fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012651rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012652
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012653fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012654rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012655 CFLAGS=$OLD_CFLAGS
12656
12657else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012658
Matthias Kloseb9621712010-04-24 17:59:49 +000012659 for ac_func in gethostbyname
12660do :
12661 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020012662if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012663 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012664#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012665_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012666
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012667fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012668done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012669
Michael W. Hudson54241132001-12-07 15:38:26 +000012670
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012671fi
12672
Michael W. Hudson54241132001-12-07 15:38:26 +000012673
12674
12675
12676
12677
12678
Guido van Rossum627b2d71993-12-24 10:39:16 +000012679# checks for system services
12680# (none yet)
12681
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012682# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000012683ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020012684if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012685
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012686else
Matthias Kloseb9621712010-04-24 17:59:49 +000012687 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
12688$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012689if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012690 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012691else
Martin v. Löwis11437992002-04-12 09:54:03 +000012692 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012693LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012694cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012695/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012696
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012697/* Override any GCC internal prototype to avoid an error.
12698 Use char because int might match the return type of a GCC
12699 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012700#ifdef __cplusplus
12701extern "C"
12702#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012703char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012704int
12705main ()
12706{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012707return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012708 ;
12709 return 0;
12710}
12711_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012712if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012713 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012714else
Matthias Kloseb9621712010-04-24 17:59:49 +000012715 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012716fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012717rm -f core conftest.err conftest.$ac_objext \
12718 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012719LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012720fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012721{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
12722$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012723if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012724 cat >>confdefs.h <<_ACEOF
12725#define HAVE_LIBIEEE 1
12726_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012727
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012728 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012729
Guido van Rossum627b2d71993-12-24 10:39:16 +000012730fi
12731
Michael W. Hudson54241132001-12-07 15:38:26 +000012732
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012733fi
12734
Michael W. Hudson54241132001-12-07 15:38:26 +000012735
Guido van Rossum7f253911997-05-09 02:42:48 +000012736# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000012737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
12738$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012739
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012740# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012741if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012742 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000012743if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000012744then
12745
Matthias Kloseb9621712010-04-24 17:59:49 +000012746$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012747
Matthias Kloseb9621712010-04-24 17:59:49 +000012748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12749$as_echo "yes" >&6; }
12750else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12751$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012752fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000012753else
Matthias Kloseb9621712010-04-24 17:59:49 +000012754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12755$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012756fi
12757
Guido van Rossum7f253911997-05-09 02:42:48 +000012758
Guido van Rossum7f43da71994-08-01 12:15:30 +000012759# check for --with-libm=...
12760
Guido van Rossum563e7081996-09-10 18:20:48 +000012761case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000012762Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000012763*) LIBM=-lm
12764esac
Matthias Kloseb9621712010-04-24 17:59:49 +000012765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
12766$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012767
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012768# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012769if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012770 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000012771if test "$withval" = no
12772then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000012773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
12774$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012775elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012776then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000012777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
12778$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012779else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012780fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012781else
Matthias Kloseb9621712010-04-24 17:59:49 +000012782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
12783$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012784fi
12785
Guido van Rossum7f43da71994-08-01 12:15:30 +000012786
12787# check for --with-libc=...
12788
Matthias Kloseb9621712010-04-24 17:59:49 +000012789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
12790$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012791
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012792# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012793if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012794 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000012795if test "$withval" = no
12796then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000012797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
12798$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012799elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012800then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000012801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
12802$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012803else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012804fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012805else
Matthias Kloseb9621712010-04-24 17:59:49 +000012806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
12807$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012808fi
12809
Guido van Rossum7f43da71994-08-01 12:15:30 +000012810
Stefan Krah1919b7e2012-03-21 18:25:23 +010012811# **************************************
12812# * Check for gcc x64 inline assembler *
12813# **************************************
12814
12815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
12816$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
12817cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12818/* end confdefs.h. */
12819
12820int
12821main ()
12822{
12823
12824 __asm__ __volatile__ ("movq %rcx, %rax");
12825
12826 ;
12827 return 0;
12828}
12829_ACEOF
12830if ac_fn_c_try_compile "$LINENO"; then :
12831 have_gcc_asm_for_x64=yes
12832else
12833 have_gcc_asm_for_x64=no
12834fi
12835rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12836{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
12837$as_echo "$have_gcc_asm_for_x64" >&6; }
12838if test "$have_gcc_asm_for_x64" = yes
12839then
12840
12841$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
12842
12843fi
12844
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012845# **************************************************
12846# * Check for various properties of floating point *
12847# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012848
Matthias Kloseb9621712010-04-24 17:59:49 +000012849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
12850$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012851if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012852 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012853else
12854
Matthias Kloseb9621712010-04-24 17:59:49 +000012855if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012856 ac_cv_little_endian_double=no
12857else
Matthias Kloseb9621712010-04-24 17:59:49 +000012858 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012859/* end confdefs.h. */
12860
12861#include <string.h>
12862int main() {
12863 double x = 9006104071832581.0;
12864 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
12865 return 0;
12866 else
12867 return 1;
12868}
12869
12870_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012871if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012872 ac_cv_little_endian_double=yes
12873else
Matthias Kloseb9621712010-04-24 17:59:49 +000012874 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012875fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012876rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12877 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012878fi
12879
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012880fi
12881
Matthias Kloseb9621712010-04-24 17:59:49 +000012882{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
12883$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012884if test "$ac_cv_little_endian_double" = yes
12885then
12886
Matthias Kloseb9621712010-04-24 17:59:49 +000012887$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012888
12889fi
12890
Matthias Kloseb9621712010-04-24 17:59:49 +000012891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
12892$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012893if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012894 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012895else
12896
Matthias Kloseb9621712010-04-24 17:59:49 +000012897if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012898 ac_cv_big_endian_double=no
12899else
Matthias Kloseb9621712010-04-24 17:59:49 +000012900 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012901/* end confdefs.h. */
12902
12903#include <string.h>
12904int main() {
12905 double x = 9006104071832581.0;
12906 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
12907 return 0;
12908 else
12909 return 1;
12910}
12911
12912_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012913if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012914 ac_cv_big_endian_double=yes
12915else
Matthias Kloseb9621712010-04-24 17:59:49 +000012916 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012917fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012918rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12919 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012920fi
12921
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012922fi
12923
Matthias Kloseb9621712010-04-24 17:59:49 +000012924{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
12925$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012926if test "$ac_cv_big_endian_double" = yes
12927then
12928
Matthias Kloseb9621712010-04-24 17:59:49 +000012929$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012930
12931fi
12932
12933# Some ARM platforms use a mixed-endian representation for doubles.
12934# While Python doesn't currently have full support for these platforms
12935# (see e.g., issue 1762561), we can at least make sure that float <-> string
12936# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000012937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
12938$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012939if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012940 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012941else
12942
Matthias Kloseb9621712010-04-24 17:59:49 +000012943if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012944 ac_cv_mixed_endian_double=no
12945else
Matthias Kloseb9621712010-04-24 17:59:49 +000012946 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012947/* end confdefs.h. */
12948
12949#include <string.h>
12950int main() {
12951 double x = 9006104071832581.0;
12952 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
12953 return 0;
12954 else
12955 return 1;
12956}
12957
12958_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012959if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012960 ac_cv_mixed_endian_double=yes
12961else
Matthias Kloseb9621712010-04-24 17:59:49 +000012962 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012963fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012964rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12965 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012966fi
12967
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012968fi
12969
Matthias Kloseb9621712010-04-24 17:59:49 +000012970{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
12971$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012972if test "$ac_cv_mixed_endian_double" = yes
12973then
12974
Matthias Kloseb9621712010-04-24 17:59:49 +000012975$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012976
12977fi
12978
Mark Dickinson7abf8d42009-04-18 20:17:52 +000012979# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000012980# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000012981# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000012982# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012983# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000012984# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012985
12986# This inline assembler syntax may also work for suncc and icc,
12987# so we try it on all platforms.
12988
Matthias Kloseb9621712010-04-24 17:59:49 +000012989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
12990$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
12991cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012992/* end confdefs.h. */
12993
12994int
12995main ()
12996{
12997
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012998 unsigned short cw;
12999 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
13000 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013001
13002 ;
13003 return 0;
13004}
13005_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013006if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013007 have_gcc_asm_for_x87=yes
13008else
Matthias Kloseb9621712010-04-24 17:59:49 +000013009 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013010fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013011rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013012{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
13013$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013014if test "$have_gcc_asm_for_x87" = yes
13015then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013016
Matthias Kloseb9621712010-04-24 17:59:49 +000013017$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013018
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013019fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013020
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013021# Detect whether system arithmetic is subject to x87-style double
13022# rounding issues. The result of this test has little meaning on non
13023# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
13024# mode is round-to-nearest and double rounding issues are present, and
13025# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000013026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
13027$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013028# $BASECFLAGS may affect the result
13029ac_save_cc="$CC"
13030CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013031if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013032 ac_cv_x87_double_rounding=no
13033else
Matthias Kloseb9621712010-04-24 17:59:49 +000013034 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013035/* end confdefs.h. */
13036
13037#include <stdlib.h>
13038#include <math.h>
13039int main() {
13040 volatile double x, y, z;
13041 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
13042 x = 0.99999999999999989; /* 1-2**-53 */
13043 y = 1./x;
13044 if (y != 1.)
13045 exit(0);
13046 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
13047 x = 1e16;
13048 y = 2.99999;
13049 z = x + y;
13050 if (z != 1e16+4.)
13051 exit(0);
13052 /* both tests show evidence of double rounding */
13053 exit(1);
13054}
13055
13056_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013057if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013058 ac_cv_x87_double_rounding=no
13059else
Matthias Kloseb9621712010-04-24 17:59:49 +000013060 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013061fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013062rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13063 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013064fi
13065
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013066CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000013067{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
13068$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013069if test "$ac_cv_x87_double_rounding" = yes
13070then
13071
Matthias Kloseb9621712010-04-24 17:59:49 +000013072$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013073
13074fi
13075
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013076# ************************************
13077# * Check for mathematical functions *
13078# ************************************
13079
13080LIBS_SAVE=$LIBS
13081LIBS="$LIBS $LIBM"
13082
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013083for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
13084do :
13085 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13086ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013087if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013088 cat >>confdefs.h <<_ACEOF
13089#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13090_ACEOF
13091
13092fi
13093done
13094
Victor Stinner8f9f8d62011-05-09 12:45:41 +020013095for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013096do :
13097 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13098ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013099if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013100 cat >>confdefs.h <<_ACEOF
13101#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13102_ACEOF
13103
13104fi
13105done
13106
13107ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
13108"
Victor Stinnere0be4232011-10-25 13:06:09 +020013109if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013110 ac_have_decl=1
13111else
13112 ac_have_decl=0
13113fi
13114
13115cat >>confdefs.h <<_ACEOF
13116#define HAVE_DECL_ISINF $ac_have_decl
13117_ACEOF
13118ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
13119"
Victor Stinnere0be4232011-10-25 13:06:09 +020013120if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013121 ac_have_decl=1
13122else
13123 ac_have_decl=0
13124fi
13125
13126cat >>confdefs.h <<_ACEOF
13127#define HAVE_DECL_ISNAN $ac_have_decl
13128_ACEOF
13129ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
13130"
Victor Stinnere0be4232011-10-25 13:06:09 +020013131if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013132 ac_have_decl=1
13133else
13134 ac_have_decl=0
13135fi
13136
13137cat >>confdefs.h <<_ACEOF
13138#define HAVE_DECL_ISFINITE $ac_have_decl
13139_ACEOF
13140
13141
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013142# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
13143# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000013144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
13145$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013146if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013147 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013148else
13149
Matthias Kloseb9621712010-04-24 17:59:49 +000013150if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013151 ac_cv_tanh_preserves_zero_sign=no
13152else
Matthias Kloseb9621712010-04-24 17:59:49 +000013153 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013154/* end confdefs.h. */
13155
13156#include <math.h>
13157#include <stdlib.h>
13158int main() {
13159 /* return 0 if either negative zeros don't exist
13160 on this platform or if negative zeros exist
13161 and tanh(-0.) == -0. */
13162 if (atan2(0., -1.) == atan2(-0., -1.) ||
13163 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
13164 else exit(1);
13165}
13166
13167_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013168if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013169 ac_cv_tanh_preserves_zero_sign=yes
13170else
Matthias Kloseb9621712010-04-24 17:59:49 +000013171 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013172fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013173rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13174 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013175fi
13176
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013177fi
13178
Matthias Kloseb9621712010-04-24 17:59:49 +000013179{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
13180$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013181if test "$ac_cv_tanh_preserves_zero_sign" = yes
13182then
13183
Matthias Kloseb9621712010-04-24 17:59:49 +000013184$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013185
13186fi
13187
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013188if test "$ac_cv_func_log1p" = yes
13189then
13190 # On some versions of AIX, log1p(-0.) returns 0. instead of
13191 # -0. See issue #9920.
13192 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
13193$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013194 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013195 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013196else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013197
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013198 if test "$cross_compiling" = yes; then :
13199 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013200else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013201 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13202/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013203
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013204 #include <math.h>
13205 #include <stdlib.h>
13206 int main() {
13207 /* Fail if the signs of log1p(-0.) and -0. can be
13208 distinguished. */
13209 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
13210 return 0;
13211 else
13212 return 1;
13213 }
13214
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013215_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013216if ac_fn_c_try_run "$LINENO"; then :
13217 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013218else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013219 ac_cv_log1p_drops_zero_sign=yes
13220fi
13221rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13222 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013223fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013224
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013225fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013226
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
13228$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
13229fi
13230if test "$ac_cv_log1p_drops_zero_sign" = yes
13231then
13232
13233$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
13234
13235fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013236
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000013237LIBS=$LIBS_SAVE
13238
Mark Dickinsona614f042009-11-28 12:48:43 +000013239# For multiprocessing module, check that sem_open
13240# actually works. For FreeBSD versions <= 7.2,
13241# the kernel module that provides POSIX semaphores
13242# isn't loaded by default, so an attempt to call
13243# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000013244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
13245$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013246if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013247 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000013248else
Matthias Kloseb9621712010-04-24 17:59:49 +000013249 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013250 ac_cv_posix_semaphores_enabled=yes
13251else
Matthias Kloseb9621712010-04-24 17:59:49 +000013252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013253/* end confdefs.h. */
13254
13255#include <unistd.h>
13256#include <fcntl.h>
13257#include <stdio.h>
13258#include <semaphore.h>
13259#include <sys/stat.h>
13260
13261int main(void) {
13262 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
13263 if (a == SEM_FAILED) {
13264 perror("sem_open");
13265 return 1;
13266 }
13267 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013268 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000013269 return 0;
13270}
13271
13272_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013273if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013274 ac_cv_posix_semaphores_enabled=yes
13275else
Matthias Kloseb9621712010-04-24 17:59:49 +000013276 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000013277fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013278rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13279 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013280fi
13281
13282
Mark Dickinsona614f042009-11-28 12:48:43 +000013283fi
13284
Matthias Kloseb9621712010-04-24 17:59:49 +000013285{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
13286$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000013287if test $ac_cv_posix_semaphores_enabled = no
13288then
13289
Matthias Kloseb9621712010-04-24 17:59:49 +000013290$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000013291
13292fi
13293
Mark Dickinson10683072009-04-18 21:18:19 +000013294# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000013295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
13296$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013297if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013298 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013299else
Matthias Kloseb9621712010-04-24 17:59:49 +000013300 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013301 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000013302else
Matthias Kloseb9621712010-04-24 17:59:49 +000013303 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000013304/* end confdefs.h. */
13305
13306#include <unistd.h>
13307#include <fcntl.h>
13308#include <stdio.h>
13309#include <semaphore.h>
13310#include <sys/stat.h>
13311
13312int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000013313 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000013314 int count;
13315 int res;
13316 if(a==SEM_FAILED){
13317 perror("sem_open");
13318 return 1;
13319
13320 }
13321 res = sem_getvalue(a, &count);
13322 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013323 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000013324 return res==-1 ? 1 : 0;
13325}
13326
Mark Dickinson10683072009-04-18 21:18:19 +000013327_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013328if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013329 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000013330else
Matthias Kloseb9621712010-04-24 17:59:49 +000013331 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013332fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013333rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13334 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013335fi
13336
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013337
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013338fi
13339
Matthias Kloseb9621712010-04-24 17:59:49 +000013340{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
13341$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013342if test $ac_cv_broken_sem_getvalue = yes
13343then
13344
Matthias Kloseb9621712010-04-24 17:59:49 +000013345$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013346
13347fi
13348
Mark Dickinsonbd792642009-03-18 20:06:12 +000013349# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000013350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
13351$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013352# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013353if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000013354 enableval=$enable_big_digits; case $enable_big_digits in
13355yes)
13356 enable_big_digits=30 ;;
13357no)
13358 enable_big_digits=15 ;;
1335915|30)
13360 ;;
13361*)
Victor Stinnere0be4232011-10-25 13:06:09 +020013362 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 +000013363esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013364{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
13365$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013366
13367cat >>confdefs.h <<_ACEOF
13368#define PYLONG_BITS_IN_DIGIT $enable_big_digits
13369_ACEOF
13370
13371
13372else
Matthias Kloseb9621712010-04-24 17:59:49 +000013373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13374$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013375fi
13376
13377
Guido van Rossumef2255b2000-03-10 22:30:29 +000013378# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000013379ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020013380if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013381
13382
Matthias Kloseb9621712010-04-24 17:59:49 +000013383$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013384
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013385 wchar_h="yes"
13386
Guido van Rossumef2255b2000-03-10 22:30:29 +000013387else
Martin v. Löwis11437992002-04-12 09:54:03 +000013388 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000013389
13390fi
13391
Michael W. Hudson54241132001-12-07 15:38:26 +000013392
Martin v. Löwis11437992002-04-12 09:54:03 +000013393
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013394# determine wchar_t size
13395if test "$wchar_h" = yes
13396then
Matthias Kloseb9621712010-04-24 17:59:49 +000013397 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013398# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13399# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13400# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000013401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
13402$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013403if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013404 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013405else
Matthias Kloseb9621712010-04-24 17:59:49 +000013406 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
13407"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013408
Martin v. Löwis11437992002-04-12 09:54:03 +000013409else
Matthias Kloseb9621712010-04-24 17:59:49 +000013410 if test "$ac_cv_type_wchar_t" = yes; then
13411 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13412$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013413as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020013414See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013415 else
13416 ac_cv_sizeof_wchar_t=0
13417 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013418fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013419
Martin v. Löwis11437992002-04-12 09:54:03 +000013420fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013421{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
13422$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013423
13424
13425
Martin v. Löwis11437992002-04-12 09:54:03 +000013426cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013427#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013428_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013429
Michael W. Hudson54241132001-12-07 15:38:26 +000013430
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013431fi
13432
Matthias Kloseb9621712010-04-24 17:59:49 +000013433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
13434$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013435have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013436cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013437/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013438
13439#include <tcl.h>
13440#if TCL_UTF_MAX != 6
13441# error "NOT UCS4_TCL"
13442#endif
13443int
13444main ()
13445{
13446
13447 ;
13448 return 0;
13449}
13450_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013451if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013452
13453
Matthias Kloseb9621712010-04-24 17:59:49 +000013454$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013455
13456 have_ucs4_tcl=yes
13457
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013458fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013459rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013460{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
13461$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013462
Skip Montanaro6dead952003-09-25 14:50:04 +000013463# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013464if test "$wchar_h" = yes
13465then
13466 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000013467 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
13468$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013469 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013470 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013471else
13472
Matthias Kloseb9621712010-04-24 17:59:49 +000013473 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013474 ac_cv_wchar_t_signed=yes
13475else
Matthias Kloseb9621712010-04-24 17:59:49 +000013476 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013477/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013478
13479 #include <wchar.h>
13480 int main()
13481 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000013482 /* Success: exit code 0 */
13483 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013484 }
13485
13486_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013487if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013488 ac_cv_wchar_t_signed=yes
13489else
Matthias Kloseb9621712010-04-24 17:59:49 +000013490 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013491fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013492rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13493 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013494fi
13495
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013496fi
13497
Matthias Kloseb9621712010-04-24 17:59:49 +000013498 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
13499$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013500fi
13501
Georg Brandl52d168a2008-01-07 18:10:24 +000013502# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013503if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000013504 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000013505then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013506 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013507
Matthias Kloseb9621712010-04-24 17:59:49 +000013508$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013509
Georg Brandl52d168a2008-01-07 18:10:24 +000013510else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013511 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013512fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013513{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
13514$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000013515
13516# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000013517 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13518$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013519if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013520 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000013521else
Matthias Kloseb9621712010-04-24 17:59:49 +000013522 ac_cv_c_bigendian=unknown
13523 # See if we're dealing with a universal compiler.
13524 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13525/* end confdefs.h. */
13526#ifndef __APPLE_CC__
13527 not a universal capable compiler
13528 #endif
13529 typedef int dummy;
13530
Skip Montanaro6dead952003-09-25 14:50:04 +000013531_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013532if ac_fn_c_try_compile "$LINENO"; then :
13533
13534 # Check for potential -arch flags. It is not universal unless
13535 # there are at least two -arch flags with different values.
13536 ac_arch=
13537 ac_prev=
13538 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13539 if test -n "$ac_prev"; then
13540 case $ac_word in
13541 i?86 | x86_64 | ppc | ppc64)
13542 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13543 ac_arch=$ac_word
13544 else
13545 ac_cv_c_bigendian=universal
13546 break
13547 fi
13548 ;;
13549 esac
13550 ac_prev=
13551 elif test "x$ac_word" = "x-arch"; then
13552 ac_prev=arch
13553 fi
13554 done
13555fi
13556rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13557 if test $ac_cv_c_bigendian = unknown; then
13558 # See if sys/param.h defines the BYTE_ORDER macro.
13559 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013560/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013561#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000013562 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013563
Martin v. Löwis11437992002-04-12 09:54:03 +000013564int
13565main ()
13566{
Matthias Kloseb9621712010-04-24 17:59:49 +000013567#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13568 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13569 && LITTLE_ENDIAN)
13570 bogus endian macros
13571 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013572
13573 ;
13574 return 0;
13575}
13576_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013577if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013578 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000013579 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013580/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013581#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000013582 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013583
Martin v. Löwis11437992002-04-12 09:54:03 +000013584int
13585main ()
13586{
Guido van Rossumef2255b2000-03-10 22:30:29 +000013587#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000013588 not big endian
13589 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013590
13591 ;
13592 return 0;
13593}
13594_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013595if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013596 ac_cv_c_bigendian=yes
13597else
Matthias Kloseb9621712010-04-24 17:59:49 +000013598 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000013599fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013600rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013601fi
13602rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13603 fi
13604 if test $ac_cv_c_bigendian = unknown; then
13605 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13606 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013607/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000013608#include <limits.h>
13609
Martin v. Löwis11437992002-04-12 09:54:03 +000013610int
13611main ()
13612{
Matthias Kloseb9621712010-04-24 17:59:49 +000013613#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13614 bogus endian macros
13615 #endif
13616
Martin v. Löwis11437992002-04-12 09:54:03 +000013617 ;
13618 return 0;
13619}
13620_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013621if ac_fn_c_try_compile "$LINENO"; then :
13622 # It does; now see whether it defined to _BIG_ENDIAN or not.
13623 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13624/* end confdefs.h. */
13625#include <limits.h>
13626
13627int
13628main ()
13629{
13630#ifndef _BIG_ENDIAN
13631 not big endian
13632 #endif
13633
13634 ;
13635 return 0;
13636}
13637_ACEOF
13638if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013639 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013640else
Matthias Kloseb9621712010-04-24 17:59:49 +000013641 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013642fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013643rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13644fi
13645rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13646 fi
13647 if test $ac_cv_c_bigendian = unknown; then
13648 # Compile a test program.
13649 if test "$cross_compiling" = yes; then :
13650 # Try to guess by grepping values from an object file.
13651 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13652/* end confdefs.h. */
13653short int ascii_mm[] =
13654 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13655 short int ascii_ii[] =
13656 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13657 int use_ascii (int i) {
13658 return ascii_mm[i] + ascii_ii[i];
13659 }
13660 short int ebcdic_ii[] =
13661 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13662 short int ebcdic_mm[] =
13663 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13664 int use_ebcdic (int i) {
13665 return ebcdic_mm[i] + ebcdic_ii[i];
13666 }
13667 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013668
Matthias Kloseb9621712010-04-24 17:59:49 +000013669int
13670main ()
13671{
13672return use_ascii (foo) == use_ebcdic (foo);
13673 ;
13674 return 0;
13675}
13676_ACEOF
13677if ac_fn_c_try_compile "$LINENO"; then :
13678 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13679 ac_cv_c_bigendian=yes
13680 fi
13681 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13682 if test "$ac_cv_c_bigendian" = unknown; then
13683 ac_cv_c_bigendian=no
13684 else
13685 # finding both strings is unlikely to happen, but who knows?
13686 ac_cv_c_bigendian=unknown
13687 fi
13688 fi
13689fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013690rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013691else
Matthias Kloseb9621712010-04-24 17:59:49 +000013692 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013693/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013694$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013695int
13696main ()
13697{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013698
Matthias Kloseb9621712010-04-24 17:59:49 +000013699 /* Are we little or big endian? From Harbison&Steele. */
13700 union
13701 {
13702 long int l;
13703 char c[sizeof (long int)];
13704 } u;
13705 u.l = 1;
13706 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013707
13708 ;
13709 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000013710}
Martin v. Löwis11437992002-04-12 09:54:03 +000013711_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013712if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013713 ac_cv_c_bigendian=no
13714else
Matthias Kloseb9621712010-04-24 17:59:49 +000013715 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000013716fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013717rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13718 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000013719fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013720
Matthias Kloseb9621712010-04-24 17:59:49 +000013721 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013722fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013723{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
13724$as_echo "$ac_cv_c_bigendian" >&6; }
13725 case $ac_cv_c_bigendian in #(
13726 yes)
13727 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
13728;; #(
13729 no)
13730 ;; #(
13731 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013732
Matthias Kloseb9621712010-04-24 17:59:49 +000013733$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013734
Matthias Kloseb9621712010-04-24 17:59:49 +000013735 ;; #(
13736 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013737 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020013738 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000013739 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000013740
Michael W. Hudson54241132001-12-07 15:38:26 +000013741
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013742# ABI version string for Python extension modules. This appears between the
13743# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
13744# from the following attributes which affect the ABI of this Python build (in
13745# this order):
13746#
13747# * The Python implementation (always 'cpython-' for us)
13748# * The major and minor version numbers
13749# * --with-pydebug (adds a 'd')
13750# * --with-pymalloc (adds a 'm')
13751# * --with-wide-unicode (adds a 'u')
13752#
13753# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000013754# would get a shared library ABI version tag of 'cpython-32dmu' and shared
13755# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013756
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
13758$as_echo_n "checking ABIFLAGS... " >&6; }
13759{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
13760$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
13762$as_echo_n "checking SOABI... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013763SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013764{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
13765$as_echo "$SOABI" >&6; }
13766
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070013767
13768case $ac_sys_system in
13769 Linux*|GNU*)
13770 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
13771 *)
13772 EXT_SUFFIX=${SHLIB_SUFFIX};;
13773esac
13774
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
13776$as_echo_n "checking LDVERSION... " >&6; }
13777LDVERSION='$(VERSION)$(ABIFLAGS)'
13778{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
13779$as_echo "$LDVERSION" >&6; }
13780
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013781# Check whether right shifting a negative integer extends the sign bit
13782# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000013783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
13784$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013785if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013786 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000013787else
Martin v. Löwis11437992002-04-12 09:54:03 +000013788
Matthias Kloseb9621712010-04-24 17:59:49 +000013789if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013790 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013791else
Matthias Kloseb9621712010-04-24 17:59:49 +000013792 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013793/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013794
13795int main()
13796{
Vladimir Marangozova6180282000-07-12 05:05:06 +000013797 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013798}
13799
Martin v. Löwis11437992002-04-12 09:54:03 +000013800_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013801if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000013802 ac_cv_rshift_extends_sign=yes
13803else
Matthias Kloseb9621712010-04-24 17:59:49 +000013804 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000013805fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013806rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13807 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000013808fi
13809
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013810fi
13811
Matthias Kloseb9621712010-04-24 17:59:49 +000013812{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
13813$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000013814if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013815then
Martin v. Löwis11437992002-04-12 09:54:03 +000013816
Matthias Kloseb9621712010-04-24 17:59:49 +000013817$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013818
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013819fi
13820
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013821# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000013822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
13823$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013824if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013825 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013826else
Martin v. Löwis11437992002-04-12 09:54:03 +000013827
Matthias Kloseb9621712010-04-24 17:59:49 +000013828cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013829/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013830#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013831int
13832main ()
13833{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013834
13835 FILE *f = fopen("/dev/null", "r");
13836 flockfile(f);
13837 getc_unlocked(f);
13838 funlockfile(f);
13839
Martin v. Löwis11437992002-04-12 09:54:03 +000013840 ;
13841 return 0;
13842}
13843_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013844if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013845 ac_cv_have_getc_unlocked=yes
13846else
Matthias Kloseb9621712010-04-24 17:59:49 +000013847 ac_cv_have_getc_unlocked=no
13848fi
13849rm -f core conftest.err conftest.$ac_objext \
13850 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013851fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013852
Matthias Kloseb9621712010-04-24 17:59:49 +000013853{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
13854$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013855if test "$ac_cv_have_getc_unlocked" = yes
13856then
Martin v. Löwis11437992002-04-12 09:54:03 +000013857
Matthias Kloseb9621712010-04-24 17:59:49 +000013858$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013859
13860fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013861
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013862# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000013863# save the value of LIBS so we don't actually link Python with readline
13864LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013865
Gregory P. Smith18820942008-09-07 06:24:49 +000013866# On some systems we need to link readline to a termcap compatible
13867# library. NOTE: Keep the precedence of listed libraries synchronised
13868# with setup.py.
13869py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
13871$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020013872for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000013873 if test -z "$py_libtermcap"; then
13874 READLINE_LIBS="-lreadline"
13875 else
13876 READLINE_LIBS="-lreadline -l$py_libtermcap"
13877 fi
13878 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000013879 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013880/* end confdefs.h. */
13881
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013882/* Override any GCC internal prototype to avoid an error.
13883 Use char because int might match the return type of a GCC
13884 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013885#ifdef __cplusplus
13886extern "C"
13887#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013888char readline ();
13889int
13890main ()
13891{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013892return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013893 ;
13894 return 0;
13895}
13896_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013897if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000013898 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013899fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013900rm -f core conftest.err conftest.$ac_objext \
13901 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000013902 if test $py_cv_lib_readline = yes; then
13903 break
13904 fi
13905done
13906# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
13907#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000013908if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
13910$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000013911else
Matthias Kloseb9621712010-04-24 17:59:49 +000013912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
13913$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000013914
Matthias Kloseb9621712010-04-24 17:59:49 +000013915$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013916
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013917fi
13918
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013919# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000013920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
13921$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013922if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013923 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013924else
13925 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013926LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013927cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013928/* end confdefs.h. */
13929
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013930/* Override any GCC internal prototype to avoid an error.
13931 Use char because int might match the return type of a GCC
13932 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013933#ifdef __cplusplus
13934extern "C"
13935#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013936char rl_callback_handler_install ();
13937int
13938main ()
13939{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013940return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013941 ;
13942 return 0;
13943}
13944_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013945if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013946 ac_cv_lib_readline_rl_callback_handler_install=yes
13947else
Matthias Kloseb9621712010-04-24 17:59:49 +000013948 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013949fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013950rm -f core conftest.err conftest.$ac_objext \
13951 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013952LIBS=$ac_check_lib_save_LIBS
13953fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013954{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
13955$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013956if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013957
Matthias Kloseb9621712010-04-24 17:59:49 +000013958$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013959
13960fi
13961
13962
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013963# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013964cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013965/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013966#include <readline/readline.h>
13967_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013968if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013969 have_readline=yes
13970else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013971 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000013972
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013973fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013974rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013975if test $have_readline = yes
13976then
Matthias Kloseb9621712010-04-24 17:59:49 +000013977 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013978/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013979#include <readline/readline.h>
13980
13981_ACEOF
13982if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013983 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013984
Matthias Kloseb9621712010-04-24 17:59:49 +000013985$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013986
13987fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013988rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013989
Matthias Kloseb9621712010-04-24 17:59:49 +000013990 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000013991/* end confdefs.h. */
13992#include <readline/readline.h>
13993
13994_ACEOF
13995if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013996 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000013997
Matthias Kloseb9621712010-04-24 17:59:49 +000013998$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000013999
14000fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014001rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000014002
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014003fi
14004
Martin v. Löwis0daad592001-09-30 21:09:59 +000014005# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
14007$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014008if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014009 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000014010else
Martin v. Löwis11437992002-04-12 09:54:03 +000014011 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014012LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014013cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014014/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014015
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014016/* Override any GCC internal prototype to avoid an error.
14017 Use char because int might match the return type of a GCC
14018 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014019#ifdef __cplusplus
14020extern "C"
14021#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014022char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014023int
14024main ()
14025{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014026return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014027 ;
14028 return 0;
14029}
14030_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014031if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014032 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000014033else
Matthias Kloseb9621712010-04-24 17:59:49 +000014034 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000014035fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014036rm -f core conftest.err conftest.$ac_objext \
14037 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014038LIBS=$ac_check_lib_save_LIBS
14039fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014040{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
14041$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014042if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014043
Matthias Kloseb9621712010-04-24 17:59:49 +000014044$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000014045
Martin v. Löwis0daad592001-09-30 21:09:59 +000014046fi
14047
Michael W. Hudson54241132001-12-07 15:38:26 +000014048
Thomas Wouters89d996e2007-09-08 17:39:28 +000014049# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
14051$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014052if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014053 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000014054else
14055 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014056LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014057cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014058/* end confdefs.h. */
14059
14060/* Override any GCC internal prototype to avoid an error.
14061 Use char because int might match the return type of a GCC
14062 builtin and then its argument prototype would still apply. */
14063#ifdef __cplusplus
14064extern "C"
14065#endif
14066char rl_completion_display_matches_hook ();
14067int
14068main ()
14069{
14070return rl_completion_display_matches_hook ();
14071 ;
14072 return 0;
14073}
14074_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014075if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014076 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
14077else
Matthias Kloseb9621712010-04-24 17:59:49 +000014078 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000014079fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014080rm -f core conftest.err conftest.$ac_objext \
14081 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014082LIBS=$ac_check_lib_save_LIBS
14083fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014084{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
14085$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014086if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014087
Matthias Kloseb9621712010-04-24 17:59:49 +000014088$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000014089
14090fi
14091
14092
Martin v. Löwis0daad592001-09-30 21:09:59 +000014093# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
14095$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014096if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014097 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000014098else
Martin v. Löwis11437992002-04-12 09:54:03 +000014099 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014100LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014101cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014102/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014103
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014104/* Override any GCC internal prototype to avoid an error.
14105 Use char because int might match the return type of a GCC
14106 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014107#ifdef __cplusplus
14108extern "C"
14109#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014110char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014111int
14112main ()
14113{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014114return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014115 ;
14116 return 0;
14117}
14118_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014119if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014120 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000014121else
Matthias Kloseb9621712010-04-24 17:59:49 +000014122 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000014123fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014124rm -f core conftest.err conftest.$ac_objext \
14125 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014126LIBS=$ac_check_lib_save_LIBS
14127fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014128{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
14129$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014130if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014131
Matthias Kloseb9621712010-04-24 17:59:49 +000014132$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000014133
Guido van Rossum353ae582001-07-10 16:45:32 +000014134fi
14135
Jack Jansendd19cf82001-12-06 22:36:17 +000014136
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014137# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014138cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014139/* end confdefs.h. */
14140#include <readline/readline.h>
14141_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014142if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014143 have_readline=yes
14144else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014145 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014146
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014147fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014148rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014149if test $have_readline = yes
14150then
Matthias Kloseb9621712010-04-24 17:59:49 +000014151 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014152/* end confdefs.h. */
14153#include <readline/readline.h>
14154
14155_ACEOF
14156if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014157 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014158
Matthias Kloseb9621712010-04-24 17:59:49 +000014159$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014160
14161fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014162rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014163
14164fi
14165
Martin v. Löwis82bca632006-02-10 20:49:30 +000014166# End of readline checks: restore LIBS
14167LIBS=$LIBS_no_readline
14168
Matthias Kloseb9621712010-04-24 17:59:49 +000014169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
14170$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014171if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014172 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014173else
Martin v. Löwis11437992002-04-12 09:54:03 +000014174
Matthias Kloseb9621712010-04-24 17:59:49 +000014175if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014176 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014177else
Matthias Kloseb9621712010-04-24 17:59:49 +000014178 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014179/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014180
14181int main()
14182{
14183 int val1 = nice(1);
14184 if (val1 != -1 && val1 == nice(2))
14185 exit(0);
14186 exit(1);
14187}
14188
Martin v. Löwis11437992002-04-12 09:54:03 +000014189_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014190if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014191 ac_cv_broken_nice=yes
14192else
Matthias Kloseb9621712010-04-24 17:59:49 +000014193 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014194fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014195rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14196 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014197fi
14198
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014199fi
14200
Matthias Kloseb9621712010-04-24 17:59:49 +000014201{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
14202$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014203if test "$ac_cv_broken_nice" = yes
14204then
Martin v. Löwis11437992002-04-12 09:54:03 +000014205
Matthias Kloseb9621712010-04-24 17:59:49 +000014206$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014207
14208fi
14209
Matthias Kloseb9621712010-04-24 17:59:49 +000014210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
14211$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014212if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014213 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014214else
Matthias Kloseb9621712010-04-24 17:59:49 +000014215 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014216 ac_cv_broken_poll=no
14217else
Matthias Kloseb9621712010-04-24 17:59:49 +000014218 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014219/* end confdefs.h. */
14220
14221#include <poll.h>
14222
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014223int main()
14224{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014225 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014226 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014227
14228 close (42);
14229
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014230 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014231 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014232 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014233 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014234 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014235 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014236 return 1;
14237}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014238
14239_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014240if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014241 ac_cv_broken_poll=yes
14242else
Matthias Kloseb9621712010-04-24 17:59:49 +000014243 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014244fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014245rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14246 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014247fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014248
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014249fi
14250
Matthias Kloseb9621712010-04-24 17:59:49 +000014251{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
14252$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014253if test "$ac_cv_broken_poll" = yes
14254then
14255
Matthias Kloseb9621712010-04-24 17:59:49 +000014256$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014257
14258fi
14259
Brett Cannon43802422005-02-10 20:48:03 +000014260# 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 +000014261# (which is not required by ISO C or UNIX spec) and/or if we support
14262# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000014263ac_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 +000014264#include <$ac_cv_struct_tm>
14265
Matthias Kloseb9621712010-04-24 17:59:49 +000014266"
Victor Stinnere0be4232011-10-25 13:06:09 +020014267if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000014268
14269cat >>confdefs.h <<_ACEOF
14270#define HAVE_STRUCT_TM_TM_ZONE 1
14271_ACEOF
14272
14273
14274fi
14275
14276if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14277
Matthias Kloseb9621712010-04-24 17:59:49 +000014278$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014279
14280else
Matthias Kloseb9621712010-04-24 17:59:49 +000014281 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
14282"
Victor Stinnere0be4232011-10-25 13:06:09 +020014283if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014284 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014285else
Matthias Kloseb9621712010-04-24 17:59:49 +000014286 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014287fi
14288
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014289cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014290#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014291_ACEOF
14292
Matthias Kloseb9621712010-04-24 17:59:49 +000014293 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
14294$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014295if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014296 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014297else
Matthias Kloseb9621712010-04-24 17:59:49 +000014298 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014299/* end confdefs.h. */
14300#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014301#if !HAVE_DECL_TZNAME
14302extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000014303#endif
14304
14305int
14306main ()
14307{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014308return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000014309 ;
14310 return 0;
14311}
14312_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014313if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000014314 ac_cv_var_tzname=yes
14315else
Matthias Kloseb9621712010-04-24 17:59:49 +000014316 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000014317fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014318rm -f core conftest.err conftest.$ac_objext \
14319 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014320fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014321{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
14322$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000014323 if test $ac_cv_var_tzname = yes; then
14324
Matthias Kloseb9621712010-04-24 17:59:49 +000014325$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014326
14327 fi
14328fi
14329
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014330
Martin v. Löwis1d459062005-03-14 21:23:33 +000014331# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000014332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
14333$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014334if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014335 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014336else
14337
Matthias Kloseb9621712010-04-24 17:59:49 +000014338if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014339 ac_cv_working_tzset=no
14340else
Matthias Kloseb9621712010-04-24 17:59:49 +000014341 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014342/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014343
14344#include <stdlib.h>
14345#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000014346#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000014347
14348#if HAVE_TZNAME
14349extern char *tzname[];
14350#endif
14351
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014352int main()
14353{
Brett Cannon18367812003-09-19 00:59:16 +000014354 /* Note that we need to ensure that not only does tzset(3)
14355 do 'something' with localtime, but it works as documented
14356 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000014357 This includes making sure that tzname is set properly if
14358 tm->tm_zone does not exist since it is the alternative way
14359 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000014360
14361 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000014362 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000014363 */
14364
Martin v. Löwis1d459062005-03-14 21:23:33 +000014365 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000014366 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
14367
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014368 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014369 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014370 if (localtime(&groundhogday)->tm_hour != 0)
14371 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014372#if HAVE_TZNAME
14373 /* For UTC, tzname[1] is sometimes "", sometimes " " */
14374 if (strcmp(tzname[0], "UTC") ||
14375 (tzname[1][0] != 0 && tzname[1][0] != ' '))
14376 exit(1);
14377#endif
Brett Cannon18367812003-09-19 00:59:16 +000014378
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014379 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014380 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014381 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014382 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014383#if HAVE_TZNAME
14384 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
14385 exit(1);
14386#endif
Brett Cannon18367812003-09-19 00:59:16 +000014387
14388 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
14389 tzset();
14390 if (localtime(&groundhogday)->tm_hour != 11)
14391 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014392#if HAVE_TZNAME
14393 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
14394 exit(1);
14395#endif
14396
14397#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000014398 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
14399 exit(1);
14400 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
14401 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014402#endif
Brett Cannon18367812003-09-19 00:59:16 +000014403
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014404 exit(0);
14405}
14406
14407_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014408if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014409 ac_cv_working_tzset=yes
14410else
Matthias Kloseb9621712010-04-24 17:59:49 +000014411 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014412fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014413rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14414 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014415fi
14416
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014417fi
14418
Matthias Kloseb9621712010-04-24 17:59:49 +000014419{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
14420$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014421if test "$ac_cv_working_tzset" = yes
14422then
14423
Matthias Kloseb9621712010-04-24 17:59:49 +000014424$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014425
14426fi
14427
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014428# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000014429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
14430$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014431if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014432 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014433else
Matthias Kloseb9621712010-04-24 17:59:49 +000014434 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014435/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014436#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014437int
14438main ()
14439{
14440
14441struct stat st;
14442st.st_mtim.tv_nsec = 1;
14443
14444 ;
14445 return 0;
14446}
14447_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014448if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000014449 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014450else
Matthias Kloseb9621712010-04-24 17:59:49 +000014451 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014452fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014453rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14454fi
14455
Matthias Kloseb9621712010-04-24 17:59:49 +000014456{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
14457$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014458if test "$ac_cv_stat_tv_nsec" = yes
14459then
14460
Matthias Kloseb9621712010-04-24 17:59:49 +000014461$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014462
14463fi
14464
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014465# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000014466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
14467$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014468if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014469 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014470else
Matthias Kloseb9621712010-04-24 17:59:49 +000014471 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014472/* end confdefs.h. */
14473#include <sys/stat.h>
14474int
14475main ()
14476{
14477
14478struct stat st;
14479st.st_mtimespec.tv_nsec = 1;
14480
14481 ;
14482 return 0;
14483}
14484_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014485if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014486 ac_cv_stat_tv_nsec2=yes
14487else
Matthias Kloseb9621712010-04-24 17:59:49 +000014488 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014489fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014490rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14491fi
14492
Matthias Kloseb9621712010-04-24 17:59:49 +000014493{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
14494$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014495if test "$ac_cv_stat_tv_nsec2" = yes
14496then
14497
Matthias Kloseb9621712010-04-24 17:59:49 +000014498$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014499
14500fi
14501
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020014502ac_save_cppflags="$CPPFLAGS"
14503CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
Jack Jansen666b1e72001-10-31 12:11:48 +000014504# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000014505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
14506$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014507if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014508 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014509else
Matthias Kloseb9621712010-04-24 17:59:49 +000014510 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014511/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014512#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014513int
14514main ()
14515{
Jack Jansen666b1e72001-10-31 12:11:48 +000014516
14517 int rtn;
14518 rtn = mvwdelch(0,0,0);
14519
Martin v. Löwis11437992002-04-12 09:54:03 +000014520 ;
14521 return 0;
14522}
14523_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014524if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014525 ac_cv_mvwdelch_is_expression=yes
14526else
Matthias Kloseb9621712010-04-24 17:59:49 +000014527 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014528fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014529rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14530fi
14531
Matthias Kloseb9621712010-04-24 17:59:49 +000014532{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
14533$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000014534
14535if test "$ac_cv_mvwdelch_is_expression" = yes
14536then
Martin v. Löwis11437992002-04-12 09:54:03 +000014537
Matthias Kloseb9621712010-04-24 17:59:49 +000014538$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014539
14540fi
14541
Matthias Kloseb9621712010-04-24 17:59:49 +000014542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
14543$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014544if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014545 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014546else
Matthias Kloseb9621712010-04-24 17:59:49 +000014547 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014548/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014549#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014550int
14551main ()
14552{
Jack Jansen666b1e72001-10-31 12:11:48 +000014553
14554 WINDOW *w;
14555 w->_flags = 0;
14556
Martin v. Löwis11437992002-04-12 09:54:03 +000014557 ;
14558 return 0;
14559}
14560_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014561if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014562 ac_cv_window_has_flags=yes
14563else
Matthias Kloseb9621712010-04-24 17:59:49 +000014564 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014565fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014566rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14567fi
14568
Matthias Kloseb9621712010-04-24 17:59:49 +000014569{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
14570$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000014571
Jack Jansen666b1e72001-10-31 12:11:48 +000014572
14573if test "$ac_cv_window_has_flags" = yes
14574then
Martin v. Löwis11437992002-04-12 09:54:03 +000014575
Matthias Kloseb9621712010-04-24 17:59:49 +000014576$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014577
14578fi
14579
Matthias Kloseb9621712010-04-24 17:59:49 +000014580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
14581$as_echo_n "checking for is_term_resized... " >&6; }
14582cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014583/* end confdefs.h. */
14584#include <curses.h>
14585int
14586main ()
14587{
14588void *x=is_term_resized
14589 ;
14590 return 0;
14591}
14592_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014593if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014594
Matthias Kloseb9621712010-04-24 17:59:49 +000014595$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014596
Matthias Kloseb159a552010-04-25 21:00:44 +000014597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014598$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014599else
Matthias Kloseb9621712010-04-24 17:59:49 +000014600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14601$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014602
14603fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014604rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14605
Matthias Kloseb9621712010-04-24 17:59:49 +000014606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
14607$as_echo_n "checking for resize_term... " >&6; }
14608cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014609/* end confdefs.h. */
14610#include <curses.h>
14611int
14612main ()
14613{
14614void *x=resize_term
14615 ;
14616 return 0;
14617}
14618_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014619if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014620
Matthias Kloseb9621712010-04-24 17:59:49 +000014621$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014622
Matthias Kloseb159a552010-04-25 21:00:44 +000014623 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014624$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014625else
Matthias Kloseb9621712010-04-24 17:59:49 +000014626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14627$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014628
14629fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014630rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14631
Matthias Kloseb9621712010-04-24 17:59:49 +000014632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
14633$as_echo_n "checking for resizeterm... " >&6; }
14634cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014635/* end confdefs.h. */
14636#include <curses.h>
14637int
14638main ()
14639{
14640void *x=resizeterm
14641 ;
14642 return 0;
14643}
14644_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014645if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014646
Matthias Kloseb9621712010-04-24 17:59:49 +000014647$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014648
Matthias Kloseb159a552010-04-25 21:00:44 +000014649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014650$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014651else
Matthias Kloseb9621712010-04-24 17:59:49 +000014652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14653$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014654
14655fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014656rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020014657# last curses configure check
14658CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014659
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
14661$as_echo "$as_me: checking for device files" >&6;}
14662
14663if test "x$cross_compiling" = xyes; then
14664 if test "${ac_cv_file__dev_ptmx+set}" != set; then
14665 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14666$as_echo_n "checking for /dev/ptmx... " >&6; }
14667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14668$as_echo "not set" >&6; }
14669 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14670 fi
14671 if test "${ac_cv_file__dev_ptc+set}" != set; then
14672 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14673$as_echo_n "checking for /dev/ptc... " >&6; }
14674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14675$as_echo "not set" >&6; }
14676 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14677 fi
14678fi
14679
Matthias Kloseb9621712010-04-24 17:59:49 +000014680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14681$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014682if ${ac_cv_file__dev_ptmx+:} false; then :
14683 $as_echo_n "(cached) " >&6
14684else
14685 test "$cross_compiling" = yes &&
14686 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14687if test -r "/dev/ptmx"; then
14688 ac_cv_file__dev_ptmx=yes
14689else
14690 ac_cv_file__dev_ptmx=no
14691fi
14692fi
14693{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
14694$as_echo "$ac_cv_file__dev_ptmx" >&6; }
14695if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000014696
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014697fi
14698
14699if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014700
Matthias Kloseb9621712010-04-24 17:59:49 +000014701$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014702
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014703fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14705$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014706if ${ac_cv_file__dev_ptc+:} false; then :
14707 $as_echo_n "(cached) " >&6
14708else
14709 test "$cross_compiling" = yes &&
14710 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14711if test -r "/dev/ptc"; then
14712 ac_cv_file__dev_ptc=yes
14713else
14714 ac_cv_file__dev_ptc=no
14715fi
14716fi
14717{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
14718$as_echo "$ac_cv_file__dev_ptc" >&6; }
14719if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000014720
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014721fi
14722
14723if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000014724
Matthias Kloseb9621712010-04-24 17:59:49 +000014725$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000014726
Neal Norwitz865400f2003-03-21 01:42:58 +000014727fi
14728
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014729if test "$have_long_long" = yes
14730then
Matthias Kloseb9621712010-04-24 17:59:49 +000014731 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
14732$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014733 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014734 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014735else
Matthias Kloseb9621712010-04-24 17:59:49 +000014736 if test "$cross_compiling" = yes; then :
Matthias Klose3b739b12012-03-15 19:31:06 +010014737 ac_cv_have_long_long_format="cross -- assuming no"
14738 if test x$GCC = xyes; then
14739 save_CFLAGS=$CFLAGS
14740 CFLAGS="$CFLAGS -Werror -Wformat"
14741 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14742/* end confdefs.h. */
14743
14744 #include <stdio.h>
14745 #include <stddef.h>
14746
14747int
14748main ()
14749{
14750
14751 char *buffer;
14752 sprintf(buffer, "%lld", (long long)123);
14753 sprintf(buffer, "%lld", (long long)-123);
14754 sprintf(buffer, "%llu", (unsigned long long)123);
14755
14756 ;
14757 return 0;
14758}
14759_ACEOF
14760if ac_fn_c_try_compile "$LINENO"; then :
14761 ac_cv_have_long_long_format=yes
14762
14763fi
14764rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14765 CFLAGS=$save_CFLAGS
14766 fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014767else
Matthias Kloseb9621712010-04-24 17:59:49 +000014768 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014769/* end confdefs.h. */
14770
14771 #include <stdio.h>
14772 #include <stddef.h>
14773 #include <string.h>
14774
14775 #ifdef HAVE_SYS_TYPES_H
14776 #include <sys/types.h>
14777 #endif
14778
14779 int main()
14780 {
14781 char buffer[256];
14782
14783 if (sprintf(buffer, "%lld", (long long)123) < 0)
14784 return 1;
14785 if (strcmp(buffer, "123"))
14786 return 1;
14787
14788 if (sprintf(buffer, "%lld", (long long)-123) < 0)
14789 return 1;
14790 if (strcmp(buffer, "-123"))
14791 return 1;
14792
14793 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
14794 return 1;
14795 if (strcmp(buffer, "123"))
14796 return 1;
14797
14798 return 0;
14799 }
14800
14801_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014802if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014803 ac_cv_have_long_long_format=yes
14804else
Matthias Kloseb9621712010-04-24 17:59:49 +000014805 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014806fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014807rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14808 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014809fi
14810
14811
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014812fi
14813
Matthias Kloseb9621712010-04-24 17:59:49 +000014814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
14815$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014816fi
14817
Mark Dickinson89d7d412009-12-31 20:50:59 +000014818if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014819then
14820
Matthias Kloseb9621712010-04-24 17:59:49 +000014821$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014822
14823fi
14824
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000014825if test $ac_sys_system = Darwin
14826then
14827 LIBS="$LIBS -framework CoreFoundation"
14828fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014829
Matthias Kloseb9621712010-04-24 17:59:49 +000014830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
14831$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014832if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014833 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014834else
Matthias Kloseb9621712010-04-24 17:59:49 +000014835 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000014836 ac_cv_have_size_t_format="cross -- assuming yes"
14837
Thomas Wouters477c8d52006-05-27 19:21:47 +000014838else
Matthias Kloseb9621712010-04-24 17:59:49 +000014839 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000014840/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014841
Thomas Wouters477c8d52006-05-27 19:21:47 +000014842#include <stdio.h>
14843#include <stddef.h>
14844#include <string.h>
14845
Christian Heimes2c181612007-12-17 20:04:13 +000014846#ifdef HAVE_SYS_TYPES_H
14847#include <sys/types.h>
14848#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000014849
14850#ifdef HAVE_SSIZE_T
14851typedef ssize_t Py_ssize_t;
14852#elif SIZEOF_VOID_P == SIZEOF_LONG
14853typedef long Py_ssize_t;
14854#else
14855typedef int Py_ssize_t;
14856#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000014857
Christian Heimes2c181612007-12-17 20:04:13 +000014858int main()
14859{
14860 char buffer[256];
14861
Thomas Wouters477c8d52006-05-27 19:21:47 +000014862 if(sprintf(buffer, "%zd", (size_t)123) < 0)
14863 return 1;
14864
Thomas Wouters89f507f2006-12-13 04:49:30 +000014865 if (strcmp(buffer, "123"))
14866 return 1;
14867
14868 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
14869 return 1;
14870
14871 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000014872 return 1;
14873
14874 return 0;
14875}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014876
Thomas Wouters477c8d52006-05-27 19:21:47 +000014877_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014878if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014879 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014880else
Matthias Kloseb9621712010-04-24 17:59:49 +000014881 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014882fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014883rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14884 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014885fi
14886
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014887fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014888{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
14889$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000014890if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014891
Matthias Kloseb9621712010-04-24 17:59:49 +000014892$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014893
14894fi
14895
Matthias Kloseb9621712010-04-24 17:59:49 +000014896ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000014897#ifdef HAVE_SYS_TYPES_H
14898#include <sys/types.h>
14899#endif
14900#ifdef HAVE_SYS_SOCKET_H
14901#include <sys/socket.h>
14902#endif
14903
Matthias Kloseb9621712010-04-24 17:59:49 +000014904"
Victor Stinnere0be4232011-10-25 13:06:09 +020014905if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000014906
Martin v. Löwis11437992002-04-12 09:54:03 +000014907else
Guido van Rossum95713eb2000-05-18 20:53:31 +000014908
Matthias Kloseb9621712010-04-24 17:59:49 +000014909$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000014910
14911fi
14912
Michael W. Hudson54241132001-12-07 15:38:26 +000014913
Matthias Kloseb9621712010-04-24 17:59:49 +000014914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
14915$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014916if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014917 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014918else
Matthias Kloseb9621712010-04-24 17:59:49 +000014919 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000014920 ac_cv_broken_mbstowcs=no
14921else
Matthias Kloseb9621712010-04-24 17:59:49 +000014922 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000014923/* end confdefs.h. */
14924
Stefan Krah19c21392012-11-22 23:47:32 +010014925#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000014926#include<stdlib.h>
14927int main() {
14928 size_t len = -1;
14929 const char *str = "text";
14930 len = mbstowcs(NULL, str, 0);
14931 return (len != 4);
14932}
14933
14934_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014935if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000014936 ac_cv_broken_mbstowcs=no
14937else
Matthias Kloseb9621712010-04-24 17:59:49 +000014938 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000014939fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014940rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14941 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000014942fi
14943
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014944fi
14945
Matthias Kloseb9621712010-04-24 17:59:49 +000014946{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
14947$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000014948if test "$ac_cv_broken_mbstowcs" = yes
14949then
14950
Matthias Kloseb9621712010-04-24 17:59:49 +000014951$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000014952
14953fi
14954
Antoine Pitroub52ec782009-01-25 16:34:23 +000014955# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000014956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
14957$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014958
14959# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014960if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000014961 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000014962if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000014963then
14964
Matthias Kloseb9621712010-04-24 17:59:49 +000014965$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000014966
Matthias Kloseb9621712010-04-24 17:59:49 +000014967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14968$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014969fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000014970if test "$withval" = no
14971then
14972
14973$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
14974
Matthias Kloseb9621712010-04-24 17:59:49 +000014975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14976$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014977fi
14978
Antoine Pitrou042b1282010-08-13 21:15:58 +000014979else
14980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14981$as_echo "no value specified" >&6; }
14982fi
14983
Antoine Pitroub52ec782009-01-25 16:34:23 +000014984
Matthias Kloseb17289e2012-03-15 19:51:34 +010014985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
14986$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
14987if ${ac_cv_computed_gotos+:} false; then :
14988 $as_echo_n "(cached) " >&6
14989else
14990 if test "$cross_compiling" = yes; then :
14991 if test "${with_computed_gotos+set}" = set; then
14992 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
14993 else
14994 ac_cv_computed_gotos=no
14995 fi
14996else
14997 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14998/* end confdefs.h. */
14999
15000int main(int argc, char **argv)
15001{
15002 static void *targets[1] = { &&LABEL1 };
15003 goto LABEL2;
15004LABEL1:
15005 return 0;
15006LABEL2:
15007 goto *targets[0];
15008 return 1;
15009}
15010
15011_ACEOF
15012if ac_fn_c_try_run "$LINENO"; then :
15013 ac_cv_computed_gotos=yes
15014else
15015 ac_cv_computed_gotos=no
15016fi
15017rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15018 conftest.$ac_objext conftest.beam conftest.$ac_ext
15019fi
15020
15021fi
15022
15023{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
15024$as_echo "$ac_cv_computed_gotos" >&6; }
15025case "$ac_cv_computed_gotos" in yes*)
15026
15027$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
15028
15029esac
15030
Benjamin Petersond8d835b2010-10-15 23:14:46 +000015031case $ac_sys_system in
15032AIX*)
15033
15034$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
15035 ;;
15036esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000015037
Michael W. Hudson54241132001-12-07 15:38:26 +000015038
Mark Dickinsonb2153e92010-05-05 22:31:36 +000015039
15040
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000015041for h in `(cd $srcdir;echo Python/thread_*.h)`
15042do
15043 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
15044done
15045
Michael W. Hudson54241132001-12-07 15:38:26 +000015046
Neal Norwitzd24499d2005-12-18 21:36:39 +000015047SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000015048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
15049$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015050for dir in $SRCDIRS; do
15051 if test ! -d $dir; then
15052 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000015053 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015054done
Matthias Kloseb9621712010-04-24 17:59:49 +000015055{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
15056$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000015057
Stefan Krah1919b7e2012-03-21 18:25:23 +010015058# Availability of -O2:
15059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
15060$as_echo_n "checking for -O2... " >&6; }
15061saved_cflags="$CFLAGS"
15062CFLAGS="-O2"
15063cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15064/* end confdefs.h. */
15065
15066int
15067main ()
15068{
15069
15070
15071 ;
15072 return 0;
15073}
15074_ACEOF
15075if ac_fn_c_try_compile "$LINENO"; then :
15076 have_O2=yes
15077else
15078 have_O2=no
15079fi
15080rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15081{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
15082$as_echo "$have_O2" >&6; }
15083CFLAGS="$saved_cflags"
15084
15085# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
15086# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
15087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
15088$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
15089saved_cflags="$CFLAGS"
15090CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
15091if test "$have_O2" = no; then
15092 CFLAGS=""
15093fi
15094if test "$cross_compiling" = yes; then :
15095 have_glibc_memmove_bug=undefined
15096else
15097 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15098/* end confdefs.h. */
15099
15100#include <stdio.h>
15101#include <stdlib.h>
15102#include <string.h>
15103void foo(void *p, void *q) { memmove(p, q, 19); }
15104int main() {
15105 char a[32] = "123456789000000000";
15106 foo(&a[9], a);
15107 if (strcmp(a, "123456789123456789000000000") != 0)
15108 return 1;
15109 foo(a, &a[9]);
15110 if (strcmp(a, "123456789000000000") != 0)
15111 return 1;
15112 return 0;
15113}
15114
15115_ACEOF
15116if ac_fn_c_try_run "$LINENO"; then :
15117 have_glibc_memmove_bug=no
15118else
15119 have_glibc_memmove_bug=yes
15120fi
15121rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15122 conftest.$ac_objext conftest.beam conftest.$ac_ext
15123fi
15124
15125CFLAGS="$saved_cflags"
15126{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
15127$as_echo "$have_glibc_memmove_bug" >&6; }
15128if test "$have_glibc_memmove_bug" = yes; then
15129
15130$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
15131
15132fi
15133
15134if test "$have_gcc_asm_for_x87" = yes; then
15135 # Some versions of gcc miscompile inline asm:
15136 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
15137 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
15138 case $CC in
15139 *gcc*)
15140 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
15141$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
15142 saved_cflags="$CFLAGS"
15143 CFLAGS="-O2"
15144 if test "$cross_compiling" = yes; then :
15145 have_ipa_pure_const_bug=undefined
15146else
15147 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15148/* end confdefs.h. */
15149
15150 __attribute__((noinline)) int
15151 foo(int *p) {
15152 int r;
15153 asm ( "movl \$6, (%1)\n\t"
15154 "xorl %0, %0\n\t"
15155 : "=r" (r) : "r" (p) : "memory"
15156 );
15157 return r;
15158 }
15159 int main() {
15160 int p = 8;
15161 if ((foo(&p) ? : p) != 6)
15162 return 1;
15163 return 0;
15164 }
15165
15166_ACEOF
15167if ac_fn_c_try_run "$LINENO"; then :
15168 have_ipa_pure_const_bug=no
15169else
15170 have_ipa_pure_const_bug=yes
15171fi
15172rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15173 conftest.$ac_objext conftest.beam conftest.$ac_ext
15174fi
15175
15176 CFLAGS="$saved_cflags"
15177 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
15178$as_echo "$have_ipa_pure_const_bug" >&6; }
15179 if test "$have_ipa_pure_const_bug" = yes; then
15180
15181$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
15182
15183 fi
15184 ;;
15185 esac
15186fi
15187
Guido van Rossum627b2d71993-12-24 10:39:16 +000015188# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000015189ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000015190
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015191ac_config_files="$ac_config_files Modules/ld_so_aix"
15192
Martin v. Löwis11437992002-04-12 09:54:03 +000015193cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015194# This file is a shell script that caches the results of configure
15195# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000015196# scripts and configure runs, see configure's option --config-cache.
15197# It is not useful on other systems. If it contains results you don't
15198# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015199#
Martin v. Löwis11437992002-04-12 09:54:03 +000015200# config.status only pays attention to the cache file if you give it
15201# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015202#
Skip Montanaro6dead952003-09-25 14:50:04 +000015203# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000015204# loading this file, other *unset* `ac_cv_foo' will be assigned the
15205# following values.
15206
15207_ACEOF
15208
Guido van Rossumf78abae1997-01-21 22:02:36 +000015209# The following way of writing the cache mishandles newlines in values,
15210# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015211# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015212# Ultrix sh set writes to stderr and can't be redirected directly,
15213# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015214(
15215 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
15216 eval ac_val=\$$ac_var
15217 case $ac_val in #(
15218 *${as_nl}*)
15219 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000015220 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
15221$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015222 esac
15223 case $ac_var in #(
15224 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000015225 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
15226 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015227 esac ;;
15228 esac
15229 done
15230
Martin v. Löwis11437992002-04-12 09:54:03 +000015231 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015232 case $as_nl`(ac_space=' '; set) 2>&1` in #(
15233 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000015234 # `set' does not quote correctly, so add quotes: double-quote
15235 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000015236 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015237 "s/'/'\\\\''/g;
15238 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015239 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000015240 *)
15241 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015242 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000015243 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015244 esac |
15245 sort
15246) |
Martin v. Löwis11437992002-04-12 09:54:03 +000015247 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015248 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000015249 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015250 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000015251 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15252 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015253 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15254 :end' >>confcache
15255if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
15256 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020015257 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015258 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
15259$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020015260 if test ! -f "$cache_file" || test -h "$cache_file"; then
15261 cat confcache >"$cache_file"
15262 else
15263 case $cache_file in #(
15264 */* | ?:*)
15265 mv -f confcache "$cache_file"$$ &&
15266 mv -f "$cache_file"$$ "$cache_file" ;; #(
15267 *)
15268 mv -f confcache "$cache_file" ;;
15269 esac
15270 fi
15271 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015272 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015273 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
15274$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015275 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015276fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015277rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000015278
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015279test "x$prefix" = xNONE && prefix=$ac_default_prefix
15280# Let make expand exec_prefix.
15281test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000015282
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015283DEFS=-DHAVE_CONFIG_H
15284
Skip Montanaro6dead952003-09-25 14:50:04 +000015285ac_libobjs=
15286ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015287U=
Skip Montanaro6dead952003-09-25 14:50:04 +000015288for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
15289 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015290 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000015291 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015292 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
15293 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000015294 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
15295 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000015296done
15297LIBOBJS=$ac_libobjs
15298
15299LTLIBOBJS=$ac_ltlibobjs
15300
15301
Martin v. Löwis11437992002-04-12 09:54:03 +000015302
Matthias Kloseb9621712010-04-24 17:59:49 +000015303
Victor Stinnere0be4232011-10-25 13:06:09 +020015304: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000015305ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000015306ac_clean_files_save=$ac_clean_files
15307ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015308{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
15309$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
15310as_write_fail=0
15311cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015312#! $SHELL
15313# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015314# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015315# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000015316# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015317
Martin v. Löwis11437992002-04-12 09:54:03 +000015318debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000015319ac_cs_recheck=false
15320ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000015321
Matthias Kloseb9621712010-04-24 17:59:49 +000015322SHELL=\${CONFIG_SHELL-$SHELL}
15323export SHELL
15324_ASEOF
15325cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
15326## -------------------- ##
15327## M4sh Initialization. ##
15328## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000015329
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015330# Be more Bourne compatible
15331DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000015332if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015333 emulate sh
15334 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000015335 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000015336 # is contrary to our usage. Disable this feature.
15337 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015338 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015339else
Matthias Kloseb9621712010-04-24 17:59:49 +000015340 case `(set -o) 2>/dev/null` in #(
15341 *posix*) :
15342 set -o posix ;; #(
15343 *) :
15344 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015345esac
Michael W. Hudson54241132001-12-07 15:38:26 +000015346fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000015347
15348
Matthias Kloseb9621712010-04-24 17:59:49 +000015349as_nl='
15350'
15351export as_nl
15352# Printing a long string crashes Solaris 7 /usr/bin/printf.
15353as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
15354as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
15355as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
15356# Prefer a ksh shell builtin over an external printf program on Solaris,
15357# but without wasting forks for bash or zsh.
15358if test -z "$BASH_VERSION$ZSH_VERSION" \
15359 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
15360 as_echo='print -r --'
15361 as_echo_n='print -rn --'
15362elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
15363 as_echo='printf %s\n'
15364 as_echo_n='printf %s'
15365else
15366 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
15367 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
15368 as_echo_n='/usr/ucb/echo -n'
15369 else
15370 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
15371 as_echo_n_body='eval
15372 arg=$1;
15373 case $arg in #(
15374 *"$as_nl"*)
15375 expr "X$arg" : "X\\(.*\\)$as_nl";
15376 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
15377 esac;
15378 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
15379 '
15380 export as_echo_n_body
15381 as_echo_n='sh -c $as_echo_n_body as_echo'
15382 fi
15383 export as_echo_body
15384 as_echo='sh -c $as_echo_body as_echo'
15385fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015386
15387# The user is always right.
15388if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015389 PATH_SEPARATOR=:
15390 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
15391 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
15392 PATH_SEPARATOR=';'
15393 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015394fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015395
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015396
15397# IFS
15398# We need space, tab and new line, in precisely that order. Quoting is
15399# there to prevent editors from complaining about space-tab.
15400# (If _AS_PATH_WALK were called with IFS unset, it would disable word
15401# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015402IFS=" "" $as_nl"
15403
15404# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020015405as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000015406case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015407 *[\\/]* ) as_myself=$0 ;;
15408 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000015409for as_dir in $PATH
15410do
15411 IFS=$as_save_IFS
15412 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000015413 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15414 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015415IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000015416
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015417 ;;
15418esac
15419# We did not find ourselves, most probably we were run as `sh COMMAND'
15420# in which case we are not to be found in the path.
15421if test "x$as_myself" = x; then
15422 as_myself=$0
15423fi
15424if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015425 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
15426 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015427fi
15428
Matthias Kloseb9621712010-04-24 17:59:49 +000015429# Unset variables that we do not need and which cause bugs (e.g. in
15430# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
15431# suppresses any "Segmentation fault" message there. '((' could
15432# trigger a bug in pdksh 5.2.14.
15433for as_var in BASH_ENV ENV MAIL MAILPATH
15434do eval test x\${$as_var+set} = xset \
15435 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015436done
15437PS1='$ '
15438PS2='> '
15439PS4='+ '
15440
15441# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000015442LC_ALL=C
15443export LC_ALL
15444LANGUAGE=C
15445export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015446
Matthias Kloseb9621712010-04-24 17:59:49 +000015447# CDPATH.
15448(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
15449
15450
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015451# as_fn_error STATUS ERROR [LINENO LOG_FD]
15452# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000015453# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
15454# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015455# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000015456as_fn_error ()
15457{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015458 as_status=$1; test $as_status -eq 0 && as_status=1
15459 if test "$4"; then
15460 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
15461 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000015462 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015463 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000015464 as_fn_exit $as_status
15465} # as_fn_error
15466
15467
15468# as_fn_set_status STATUS
15469# -----------------------
15470# Set $? to STATUS, without forking.
15471as_fn_set_status ()
15472{
15473 return $1
15474} # as_fn_set_status
15475
15476# as_fn_exit STATUS
15477# -----------------
15478# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
15479as_fn_exit ()
15480{
15481 set +e
15482 as_fn_set_status $1
15483 exit $1
15484} # as_fn_exit
15485
15486# as_fn_unset VAR
15487# ---------------
15488# Portably unset VAR.
15489as_fn_unset ()
15490{
15491 { eval $1=; unset $1;}
15492}
15493as_unset=as_fn_unset
15494# as_fn_append VAR VALUE
15495# ----------------------
15496# Append the text in VALUE to the end of the definition contained in VAR. Take
15497# advantage of any shell optimizations that allow amortized linear growth over
15498# repeated appends, instead of the typical quadratic growth present in naive
15499# implementations.
15500if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
15501 eval 'as_fn_append ()
15502 {
15503 eval $1+=\$2
15504 }'
15505else
15506 as_fn_append ()
15507 {
15508 eval $1=\$$1\$2
15509 }
15510fi # as_fn_append
15511
15512# as_fn_arith ARG...
15513# ------------------
15514# Perform arithmetic evaluation on the ARGs, and store the result in the
15515# global $as_val. Take advantage of shells that can avoid forks. The arguments
15516# must be portable across $(()) and expr.
15517if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
15518 eval 'as_fn_arith ()
15519 {
15520 as_val=$(( $* ))
15521 }'
15522else
15523 as_fn_arith ()
15524 {
15525 as_val=`expr "$@" || test $? -eq 1`
15526 }
15527fi # as_fn_arith
15528
15529
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015530if expr a : '\(a\)' >/dev/null 2>&1 &&
15531 test "X`expr 00001 : '.*\(...\)'`" = X001; then
15532 as_expr=expr
15533else
15534 as_expr=false
15535fi
15536
15537if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
15538 as_basename=basename
15539else
15540 as_basename=false
15541fi
15542
Matthias Kloseb9621712010-04-24 17:59:49 +000015543if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
15544 as_dirname=dirname
15545else
15546 as_dirname=false
15547fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015548
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015549as_me=`$as_basename -- "$0" ||
15550$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15551 X"$0" : 'X\(//\)$' \| \
15552 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000015553$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015554 sed '/^.*\/\([^/][^/]*\)\/*$/{
15555 s//\1/
15556 q
15557 }
15558 /^X\/\(\/\/\)$/{
15559 s//\1/
15560 q
15561 }
15562 /^X\/\(\/\).*/{
15563 s//\1/
15564 q
15565 }
15566 s/.*/./; q'`
15567
Matthias Kloseb9621712010-04-24 17:59:49 +000015568# Avoid depending upon Character Ranges.
15569as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15570as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15571as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15572as_cr_digits='0123456789'
15573as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015574
15575ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000015576case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015577-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015578 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015579 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000015580 xy) ECHO_C='\c';;
15581 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
15582 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015583 esac;;
15584*)
15585 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000015586esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015587
Martin v. Löwis11437992002-04-12 09:54:03 +000015588rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015589if test -d conf$$.dir; then
15590 rm -f conf$$.dir/conf$$.file
15591else
15592 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000015593 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015594fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015595if (echo >conf$$.file) 2>/dev/null; then
15596 if ln -s conf$$.file conf$$ 2>/dev/null; then
15597 as_ln_s='ln -s'
15598 # ... but there are two gotchas:
15599 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
15600 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015601 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000015602 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015603 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000015604 elif ln conf$$.file conf$$ 2>/dev/null; then
15605 as_ln_s=ln
15606 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015607 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000015608 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015609else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015610 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000015611fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015612rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
15613rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000015614
Matthias Kloseb9621712010-04-24 17:59:49 +000015615
15616# as_fn_mkdir_p
15617# -------------
15618# Create "$as_dir" as a directory, including parents if necessary.
15619as_fn_mkdir_p ()
15620{
15621
15622 case $as_dir in #(
15623 -*) as_dir=./$as_dir;;
15624 esac
15625 test -d "$as_dir" || eval $as_mkdir_p || {
15626 as_dirs=
15627 while :; do
15628 case $as_dir in #(
15629 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
15630 *) as_qdir=$as_dir;;
15631 esac
15632 as_dirs="'$as_qdir' $as_dirs"
15633 as_dir=`$as_dirname -- "$as_dir" ||
15634$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15635 X"$as_dir" : 'X\(//\)[^/]' \| \
15636 X"$as_dir" : 'X\(//\)$' \| \
15637 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
15638$as_echo X"$as_dir" |
15639 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15640 s//\1/
15641 q
15642 }
15643 /^X\(\/\/\)[^/].*/{
15644 s//\1/
15645 q
15646 }
15647 /^X\(\/\/\)$/{
15648 s//\1/
15649 q
15650 }
15651 /^X\(\/\).*/{
15652 s//\1/
15653 q
15654 }
15655 s/.*/./; q'`
15656 test -d "$as_dir" && break
15657 done
15658 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015659 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000015660
15661
15662} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000015663if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015664 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000015665else
Skip Montanarof0d5f792004-08-15 14:08:23 +000015666 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000015667 as_mkdir_p=false
15668fi
15669
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015670
15671# as_fn_executable_p FILE
15672# -----------------------
15673# Test if FILE is an executable regular file.
15674as_fn_executable_p ()
15675{
15676 test -f "$1" && test -x "$1"
15677} # as_fn_executable_p
15678as_test_x='test -x'
15679as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015680
15681# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015682as_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 +000015683
15684# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015685as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015686
15687
Martin v. Löwis11437992002-04-12 09:54:03 +000015688exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000015689## ----------------------------------- ##
15690## Main body of $CONFIG_STATUS script. ##
15691## ----------------------------------- ##
15692_ASEOF
15693test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015694
Matthias Kloseb9621712010-04-24 17:59:49 +000015695cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15696# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000015697# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015698# values after options handling.
15699ac_log="
Georg Brandl3ebb6b32011-02-20 10:37:07 +000015700This file was extended by python $as_me 3.3, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015701generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000015702
15703 CONFIG_FILES = $CONFIG_FILES
15704 CONFIG_HEADERS = $CONFIG_HEADERS
15705 CONFIG_LINKS = $CONFIG_LINKS
15706 CONFIG_COMMANDS = $CONFIG_COMMANDS
15707 $ $0 $@
15708
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015709on `(hostname || uname -n) 2>/dev/null | sed 1q`
15710"
15711
Martin v. Löwis11437992002-04-12 09:54:03 +000015712_ACEOF
15713
Matthias Kloseb9621712010-04-24 17:59:49 +000015714case $ac_config_files in *"
15715"*) set x $ac_config_files; shift; ac_config_files=$*;;
15716esac
15717
15718case $ac_config_headers in *"
15719"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
15720esac
15721
15722
15723cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015724# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010015725config_files="$ac_config_files"
15726config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000015727
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015728_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015729
Matthias Kloseb9621712010-04-24 17:59:49 +000015730cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015731ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000015732\`$as_me' instantiates files and other configuration actions
15733from templates according to the current configuration. Unless the files
15734and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000015735
Matthias Kloseb9621712010-04-24 17:59:49 +000015736Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000015737
15738 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015739 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000015740 --config print configuration, then exit
15741 -q, --quiet, --silent
15742 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000015743 -d, --debug don't remove temporary files
15744 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000015745 --file=FILE[:TEMPLATE]
15746 instantiate the configuration file FILE
15747 --header=FILE[:TEMPLATE]
15748 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000015749
15750Configuration files:
15751$config_files
15752
15753Configuration headers:
15754$config_headers
15755
Matthias Kloseb9621712010-04-24 17:59:49 +000015756Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015757
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015758_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015759cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15760ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000015761ac_cs_version="\\
Georg Brandl3ebb6b32011-02-20 10:37:07 +000015762python config.status 3.3
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015763configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000015764 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000015765
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015766Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000015767This config.status script is free software; the Free Software Foundation
15768gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015769
15770ac_pwd='$ac_pwd'
15771srcdir='$srcdir'
15772INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010015773MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000015774test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000015775_ACEOF
15776
Matthias Kloseb9621712010-04-24 17:59:49 +000015777cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15778# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000015779ac_need_defaults=:
15780while test $# != 0
15781do
15782 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015783 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015784 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15785 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000015786 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000015787 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015788 --*=)
15789 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15790 ac_optarg=
15791 ac_shift=:
15792 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015793 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000015794 ac_option=$1
15795 ac_optarg=$2
15796 ac_shift=shift
15797 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015798 esac
15799
Skip Montanaro6dead952003-09-25 14:50:04 +000015800 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000015801 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000015802 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15803 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015804 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000015805 $as_echo "$ac_cs_version"; exit ;;
15806 --config | --confi | --conf | --con | --co | --c )
15807 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015808 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000015809 debug=: ;;
15810 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000015811 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000015812 case $ac_optarg in
15813 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015814 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000015815 esac
15816 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015817 ac_need_defaults=false;;
15818 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000015819 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000015820 case $ac_optarg in
15821 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15822 esac
15823 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015824 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015825 --he | --h)
15826 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015827 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000015828Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015829 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000015830 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000015831 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
15832 | -silent | --silent | --silen | --sile | --sil | --si | --s)
15833 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015834
15835 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015836 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000015837Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015838
Matthias Kloseb9621712010-04-24 17:59:49 +000015839 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015840 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015841
15842 esac
15843 shift
15844done
15845
Skip Montanaro6dead952003-09-25 14:50:04 +000015846ac_configure_extra_args=
15847
15848if $ac_cs_silent; then
15849 exec 6>/dev/null
15850 ac_configure_extra_args="$ac_configure_extra_args --silent"
15851fi
15852
15853_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015854cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000015855if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015856 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000015857 shift
15858 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
15859 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015860 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000015861 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000015862fi
15863
Martin v. Löwis11437992002-04-12 09:54:03 +000015864_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015865cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015866exec 5>>config.log
15867{
15868 echo
15869 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
15870## Running $as_me. ##
15871_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000015872 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015873} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015874
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015875_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015876cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015877_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015878
Matthias Kloseb9621712010-04-24 17:59:49 +000015879cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015880
15881# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000015882for ac_config_target in $ac_config_targets
15883do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015884 case $ac_config_target in
15885 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
15886 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
15887 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000015888 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
15889 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015890 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
15891 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000015892 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015893 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015894
Victor Stinnere0be4232011-10-25 13:06:09 +020015895 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015896 esac
15897done
15898
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015899
Martin v. Löwis11437992002-04-12 09:54:03 +000015900# If the user did not use the arguments to specify the items to instantiate,
15901# then the envvar interface is used. Set only those that are not.
15902# We use the long form for the default assignment because of an extremely
15903# bizarre bug on SunOS 4.1.3.
15904if $ac_need_defaults; then
15905 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15906 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15907fi
15908
Skip Montanaro6dead952003-09-25 14:50:04 +000015909# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015910# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000015911# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015912# Hook for its removal unless debugging.
15913# Note that there is a small window in which the directory will not be cleaned:
15914# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000015915$debug ||
15916{
Victor Stinnere0be4232011-10-25 13:06:09 +020015917 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015918 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020015919 : "${ac_tmp:=$tmp}"
15920 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015921' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000015922 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000015923}
Martin v. Löwis11437992002-04-12 09:54:03 +000015924# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000015925
Martin v. Löwis11437992002-04-12 09:54:03 +000015926{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015927 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020015928 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000015929} ||
15930{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015931 tmp=./conf$$-$RANDOM
15932 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015933} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020015934ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000015935
Matthias Kloseb9621712010-04-24 17:59:49 +000015936# Set up the scripts for CONFIG_FILES section.
15937# No need to generate them if there are no CONFIG_FILES.
15938# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015939if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015940
Matthias Kloseb9621712010-04-24 17:59:49 +000015941
15942ac_cr=`echo X | tr X '\015'`
15943# On cygwin, bash can eat \r inside `` if the user requested igncr.
15944# But we know of no other shell where ac_cr would be empty at this
15945# point, so we can use a bashism as a fallback.
15946if test "x$ac_cr" = x; then
15947 eval ac_cr=\$\'\\r\'
15948fi
15949ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
15950if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015951 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000015952else
15953 ac_cs_awk_cr=$ac_cr
15954fi
15955
Victor Stinnere0be4232011-10-25 13:06:09 +020015956echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000015957_ACEOF
15958
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015959
Matthias Kloseb9621712010-04-24 17:59:49 +000015960{
15961 echo "cat >conf$$subs.awk <<_ACEOF" &&
15962 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
15963 echo "_ACEOF"
15964} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015965 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15966ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015967ac_delim='%!_!# '
15968for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000015969 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015970 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015971
Matthias Kloseb9621712010-04-24 17:59:49 +000015972 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
15973 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015974 break
15975 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015976 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015977 else
15978 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000015979 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015980done
Matthias Kloseb9621712010-04-24 17:59:49 +000015981rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015982
Matthias Kloseb9621712010-04-24 17:59:49 +000015983cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020015984cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015985_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015986sed -n '
15987h
15988s/^/S["/; s/!.*/"]=/
15989p
15990g
15991s/^[^!]*!//
15992:repl
15993t repl
15994s/'"$ac_delim"'$//
15995t delim
15996:nl
15997h
15998s/\(.\{148\}\)..*/\1/
15999t more1
16000s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
16001p
16002n
16003b repl
16004:more1
16005s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16006p
16007g
16008s/.\{148\}//
16009t nl
16010:delim
16011h
16012s/\(.\{148\}\)..*/\1/
16013t more2
16014s/["\\]/\\&/g; s/^/"/; s/$/"/
16015p
16016b
16017:more2
16018s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16019p
16020g
16021s/.\{148\}//
16022t delim
16023' <conf$$subs.awk | sed '
16024/^[^""]/{
16025 N
16026 s/\n//
16027}
16028' >>$CONFIG_STATUS || ac_write_fail=1
16029rm -f conf$$subs.awk
16030cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16031_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020016032cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000016033 for (key in S) S_is_set[key] = 1
16034 FS = ""
16035
16036}
16037{
16038 line = $ 0
16039 nfields = split(line, field, "@")
16040 substed = 0
16041 len = length(field[1])
16042 for (i = 2; i < nfields; i++) {
16043 key = field[i]
16044 keylen = length(key)
16045 if (S_is_set[key]) {
16046 value = S[key]
16047 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
16048 len += length(value) + length(field[++i])
16049 substed = 1
16050 } else
16051 len += 1 + keylen
16052 }
16053
16054 print line
16055}
16056
16057_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016058_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016059cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16060if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
16061 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
16062else
16063 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020016064fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016065 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016066_ACEOF
16067
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016068# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
16069# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016070# trailing colons and then remove the whole line if VPATH becomes empty
16071# (actually we leave an empty line to preserve line numbers).
16072if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016073 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
16074h
16075s///
16076s/^/:/
16077s/[ ]*$/:/
16078s/:\$(srcdir):/:/g
16079s/:\${srcdir}:/:/g
16080s/:@srcdir@:/:/g
16081s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016082s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016083x
16084s/\(=[ ]*\).*/\1/
16085G
16086s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016087s/^[^=]*=[ ]*$//
16088}'
16089fi
16090
Matthias Kloseb9621712010-04-24 17:59:49 +000016091cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016092fi # test -n "$CONFIG_FILES"
16093
Matthias Kloseb9621712010-04-24 17:59:49 +000016094# Set up the scripts for CONFIG_HEADERS section.
16095# No need to generate them if there are no CONFIG_HEADERS.
16096# This happens for instance with `./config.status Makefile'.
16097if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016098cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016099BEGIN {
16100_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016101
Matthias Kloseb9621712010-04-24 17:59:49 +000016102# Transform confdefs.h into an awk script `defines.awk', embedded as
16103# here-document in config.status, that substitutes the proper values into
16104# config.h.in to produce config.h.
16105
16106# Create a delimiter string that does not exist in confdefs.h, to ease
16107# handling of long lines.
16108ac_delim='%!_!# '
16109for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020016110 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
16111 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016112 break
16113 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016114 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016115 else
16116 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16117 fi
16118done
16119
16120# For the awk script, D is an array of macro values keyed by name,
16121# likewise P contains macro parameters if any. Preserve backslash
16122# newline sequences.
16123
16124ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
16125sed -n '
16126s/.\{148\}/&'"$ac_delim"'/g
16127t rset
16128:rset
16129s/^[ ]*#[ ]*define[ ][ ]*/ /
16130t def
16131d
16132:def
16133s/\\$//
16134t bsnl
16135s/["\\]/\\&/g
16136s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16137D["\1"]=" \3"/p
16138s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
16139d
16140:bsnl
16141s/["\\]/\\&/g
16142s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16143D["\1"]=" \3\\\\\\n"\\/p
16144t cont
16145s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
16146t cont
16147d
16148:cont
16149n
16150s/.\{148\}/&'"$ac_delim"'/g
16151t clear
16152:clear
16153s/\\$//
16154t bsnlc
16155s/["\\]/\\&/g; s/^/"/; s/$/"/p
16156d
16157:bsnlc
16158s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
16159b cont
16160' <confdefs.h | sed '
16161s/'"$ac_delim"'/"\\\
16162"/g' >>$CONFIG_STATUS || ac_write_fail=1
16163
16164cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16165 for (key in D) D_is_set[key] = 1
16166 FS = ""
16167}
16168/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
16169 line = \$ 0
16170 split(line, arg, " ")
16171 if (arg[1] == "#") {
16172 defundef = arg[2]
16173 mac1 = arg[3]
16174 } else {
16175 defundef = substr(arg[1], 2)
16176 mac1 = arg[2]
16177 }
16178 split(mac1, mac2, "(") #)
16179 macro = mac2[1]
16180 prefix = substr(line, 1, index(line, defundef) - 1)
16181 if (D_is_set[macro]) {
16182 # Preserve the white space surrounding the "#".
16183 print prefix "define", macro P[macro] D[macro]
16184 next
16185 } else {
16186 # Replace #undef with comments. This is necessary, for example,
16187 # in the case of _POSIX_SOURCE, which is predefined and required
16188 # on some systems where configure will not decide to define it.
16189 if (defundef == "undef") {
16190 print "/*", prefix defundef, macro, "*/"
16191 next
16192 }
16193 }
16194}
16195{ print }
16196_ACAWK
16197_ACEOF
16198cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016199 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016200fi # test -n "$CONFIG_HEADERS"
16201
16202
16203eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
16204shift
16205for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016206do
16207 case $ac_tag in
16208 :[FHLC]) ac_mode=$ac_tag; continue;;
16209 esac
16210 case $ac_mode$ac_tag in
16211 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020016212 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016213 :[FH]-) ac_tag=-:-;;
16214 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
16215 esac
16216 ac_save_IFS=$IFS
16217 IFS=:
16218 set x $ac_tag
16219 IFS=$ac_save_IFS
16220 shift
16221 ac_file=$1
16222 shift
16223
16224 case $ac_mode in
16225 :L) ac_source=$1;;
16226 :[FH])
16227 ac_file_inputs=
16228 for ac_f
16229 do
16230 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020016231 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016232 *) # Look for the file first in the build tree, then in the source tree
16233 # (if the path is not absolute). The absolute path cannot be DOS-style,
16234 # because $ac_f cannot contain `:'.
16235 test -f "$ac_f" ||
16236 case $ac_f in
16237 [\\/$]*) false;;
16238 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
16239 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020016240 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016241 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000016242 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
16243 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016244 done
16245
16246 # Let's still pretend it is `configure' which instantiates (i.e., don't
16247 # use $as_me), people would be surprised to read:
16248 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000016249 configure_input='Generated from '`
16250 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
16251 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016252 if test x"$ac_file" != x-; then
16253 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000016254 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
16255$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016256 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016257 # Neutralize special characters interpreted by sed in replacement strings.
16258 case $configure_input in #(
16259 *\&* | *\|* | *\\* )
16260 ac_sed_conf_input=`$as_echo "$configure_input" |
16261 sed 's/[\\\\&|]/\\\\&/g'`;; #(
16262 *) ac_sed_conf_input=$configure_input;;
16263 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016264
16265 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020016266 *:-:* | *:-) cat >"$ac_tmp/stdin" \
16267 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016268 esac
16269 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016270 esac
16271
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016272 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000016273$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016274 X"$ac_file" : 'X\(//\)[^/]' \| \
16275 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016276 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016277$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016278 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16279 s//\1/
16280 q
16281 }
16282 /^X\(\/\/\)[^/].*/{
16283 s//\1/
16284 q
16285 }
16286 /^X\(\/\/\)$/{
16287 s//\1/
16288 q
16289 }
16290 /^X\(\/\).*/{
16291 s//\1/
16292 q
16293 }
16294 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000016295 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000016296 ac_builddir=.
16297
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016298case "$ac_dir" in
16299.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
16300*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016301 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016302 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000016303 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016304 case $ac_top_builddir_sub in
16305 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
16306 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
16307 esac ;;
16308esac
16309ac_abs_top_builddir=$ac_pwd
16310ac_abs_builddir=$ac_pwd$ac_dir_suffix
16311# for backward compatibility:
16312ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000016313
16314case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016315 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000016316 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016317 ac_top_srcdir=$ac_top_builddir_sub
16318 ac_abs_top_srcdir=$ac_pwd ;;
16319 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000016320 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016321 ac_top_srcdir=$srcdir
16322 ac_abs_top_srcdir=$srcdir ;;
16323 *) # Relative name.
16324 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
16325 ac_top_srcdir=$ac_top_build_prefix$srcdir
16326 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016327esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016328ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000016329
Martin v. Löwis11437992002-04-12 09:54:03 +000016330
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016331 case $ac_mode in
16332 :F)
16333 #
16334 # CONFIG_FILE
16335 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016336
16337 case $INSTALL in
16338 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016339 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016340 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010016341 ac_MKDIR_P=$MKDIR_P
16342 case $MKDIR_P in
16343 [\\/$]* | ?:[\\/]* ) ;;
16344 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
16345 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000016346_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016347
Matthias Kloseb9621712010-04-24 17:59:49 +000016348cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016349# If the template does not know about datarootdir, expand it.
16350# FIXME: This hack should be removed a few years after 2.60.
16351ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000016352ac_sed_dataroot='
16353/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016354 p
16355 q
16356}
16357/@datadir@/p
16358/@docdir@/p
16359/@infodir@/p
16360/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000016361/@mandir@/p'
16362case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016363*datarootdir*) ac_datarootdir_seen=yes;;
16364*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016365 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
16366$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016367_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016368cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016369 ac_datarootdir_hack='
16370 s&@datadir@&$datadir&g
16371 s&@docdir@&$docdir&g
16372 s&@infodir@&$infodir&g
16373 s&@localedir@&$localedir&g
16374 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000016375 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016376esac
16377_ACEOF
16378
16379# Neutralize VPATH when `$srcdir' = `.'.
16380# Shell code in configure.ac might set extrasub.
16381# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000016382cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16383ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000016384$extrasub
16385_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016386cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016387:t
16388/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000016389s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016390s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000016391s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016392s&@srcdir@&$ac_srcdir&;t t
16393s&@abs_srcdir@&$ac_abs_srcdir&;t t
16394s&@top_srcdir@&$ac_top_srcdir&;t t
16395s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
16396s&@builddir@&$ac_builddir&;t t
16397s&@abs_builddir@&$ac_abs_builddir&;t t
16398s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
16399s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010016400s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016401$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000016402"
Victor Stinnere0be4232011-10-25 13:06:09 +020016403eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
16404 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016405
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016406test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020016407 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
16408 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
16409 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000016410 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016411which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016412$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016413which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016414
Victor Stinnere0be4232011-10-25 13:06:09 +020016415 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000016416 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020016417 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
16418 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000016419 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016420 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016421 ;;
16422 :H)
16423 #
16424 # CONFIG_HEADER
16425 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016426 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016427 {
16428 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020016429 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
16430 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016431 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020016432 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016433 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
16434$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016435 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016436 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020016437 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016438 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016439 fi
16440 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016441 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020016442 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016443 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016444 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016445 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000016446
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016447
16448 esac
16449
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016450
16451 case $ac_file$ac_mode in
16452 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
16453
16454 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016455done # for ac_tag
16456
Guido van Rossum627b2d71993-12-24 10:39:16 +000016457
Matthias Kloseb9621712010-04-24 17:59:49 +000016458as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000016459_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016460ac_clean_files=$ac_clean_files_save
16461
Matthias Kloseb9621712010-04-24 17:59:49 +000016462test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016463 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016464
Martin v. Löwis11437992002-04-12 09:54:03 +000016465
16466# configure is writing to config.log, and then calls config.status.
16467# config.status does its own redirection, appending to config.log.
16468# Unfortunately, on DOS this fails, as config.log is still kept open
16469# by configure, so config.status won't be able to write to it; its
16470# output is simply discarded. So we exec the FD to /dev/null,
16471# effectively closing config.log, so it can be properly (re)opened and
16472# appended to by config.status. When coming back to configure, we
16473# need to make the FD available again.
16474if test "$no_create" != yes; then
16475 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000016476 ac_config_status_args=
16477 test "$silent" = yes &&
16478 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000016479 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000016480 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000016481 exec 5>>config.log
16482 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16483 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016484 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000016485fi
16486if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
16487 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
16488$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016489fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000016490
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016491
Christian Heimes75ed8902013-11-20 01:11:18 +010016492echo "creating Modules/Setup" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016493if test ! -f Modules/Setup
16494then
16495 cp $srcdir/Modules/Setup.dist Modules/Setup
16496fi
16497
Christian Heimes75ed8902013-11-20 01:11:18 +010016498echo "creating Modules/Setup.local" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016499if test ! -f Modules/Setup.local
16500then
16501 echo "# Edit this file for local setup changes" >Modules/Setup.local
16502fi
16503
Christian Heimes75ed8902013-11-20 01:11:18 +010016504echo "creating Makefile" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016505$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
16506 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000016507 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000016508mv config.c Modules