blob: 83d0ee293194b56868e2d1cb47cd32f14657a552 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00002# Guess values for system-dependent variables and create Makefiles.
Ross Lagerwall2bb842a2012-10-29 17:39:19 +00003# Generated by GNU Autoconf 2.69 for python 3.4.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004#
Georg Brandle2e15612009-05-20 18:25:10 +00005# Report bugs to <http://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00006#
Matthias Kloseb9621712010-04-24 17:59:49 +00007#
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00008# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
Matthias Kloseb9621712010-04-24 17:59:49 +00009#
10#
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011# This configure script is free software; the Free Software Foundation
12# gives unlimited permission to copy, distribute and modify it.
Matthias Kloseb9621712010-04-24 17:59:49 +000013## -------------------- ##
14## M4sh Initialization. ##
15## -------------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +000016
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017# Be more Bourne compatible
18DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000019if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000020 emulate sh
21 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000022 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000023 # is contrary to our usage. Disable this feature.
24 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000026else
Matthias Kloseb9621712010-04-24 17:59:49 +000027 case `(set -o) 2>/dev/null` in #(
28 *posix*) :
29 set -o posix ;; #(
30 *) :
31 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000032esac
Martin v. Löwis11437992002-04-12 09:54:03 +000033fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000034
35
Matthias Kloseb9621712010-04-24 17:59:49 +000036as_nl='
37'
38export as_nl
39# Printing a long string crashes Solaris 7 /usr/bin/printf.
40as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
41as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
42as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
43# Prefer a ksh shell builtin over an external printf program on Solaris,
44# but without wasting forks for bash or zsh.
45if test -z "$BASH_VERSION$ZSH_VERSION" \
46 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
47 as_echo='print -r --'
48 as_echo_n='print -rn --'
49elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
50 as_echo='printf %s\n'
51 as_echo_n='printf %s'
52else
53 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
54 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
55 as_echo_n='/usr/ucb/echo -n'
56 else
57 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
58 as_echo_n_body='eval
59 arg=$1;
60 case $arg in #(
61 *"$as_nl"*)
62 expr "X$arg" : "X\\(.*\\)$as_nl";
63 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
64 esac;
65 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66 '
67 export as_echo_n_body
68 as_echo_n='sh -c $as_echo_n_body as_echo'
69 fi
70 export as_echo_body
71 as_echo='sh -c $as_echo_body as_echo'
72fi
Martin v. Löwis11437992002-04-12 09:54:03 +000073
74# The user is always right.
75if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000076 PATH_SEPARATOR=:
77 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
78 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
79 PATH_SEPARATOR=';'
80 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000081fi
Martin v. Löwis11437992002-04-12 09:54:03 +000082
Thomas Wouters47b49bf2007-08-30 22:15:33 +000083
84# IFS
85# We need space, tab and new line, in precisely that order. Quoting is
86# there to prevent editors from complaining about space-tab.
87# (If _AS_PATH_WALK were called with IFS unset, it would disable word
88# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000089IFS=" "" $as_nl"
90
91# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020092as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000093case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000094 *[\\/]* ) as_myself=$0 ;;
95 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000096for as_dir in $PATH
97do
98 IFS=$as_save_IFS
99 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +0000100 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
101 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000102IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +0000103
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000104 ;;
105esac
106# We did not find ourselves, most probably we were run as `sh COMMAND'
107# in which case we are not to be found in the path.
108if test "x$as_myself" = x; then
109 as_myself=$0
110fi
111if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000112 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
113 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000114fi
115
Matthias Kloseb9621712010-04-24 17:59:49 +0000116# Unset variables that we do not need and which cause bugs (e.g. in
117# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
118# suppresses any "Segmentation fault" message there. '((' could
119# trigger a bug in pdksh 5.2.14.
120for as_var in BASH_ENV ENV MAIL MAILPATH
121do eval test x\${$as_var+set} = xset \
122 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000123done
124PS1='$ '
125PS2='> '
126PS4='+ '
127
128# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +0000129LC_ALL=C
130export LC_ALL
131LANGUAGE=C
132export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000133
Matthias Kloseb9621712010-04-24 17:59:49 +0000134# CDPATH.
135(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
136
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000137# Use a proper internal environment variable to ensure we don't fall
138 # into an infinite loop, continuously re-executing ourselves.
139 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
140 _as_can_reexec=no; export _as_can_reexec;
141 # We cannot yet assume a decent shell, so we have to provide a
142# neutralization value for shells without unset; and this also
143# works around shells that cannot unset nonexistent variables.
144# Preserve -v and -x to the replacement shell.
145BASH_ENV=/dev/null
146ENV=/dev/null
147(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
148case $- in # ((((
149 *v*x* | *x*v* ) as_opts=-vx ;;
150 *v* ) as_opts=-v ;;
151 *x* ) as_opts=-x ;;
152 * ) as_opts= ;;
153esac
154exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
155# Admittedly, this is quite paranoid, since all the known shells bail
156# out after a failed `exec'.
157$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
158as_fn_exit 255
159 fi
160 # We don't want this to propagate to other subprocesses.
161 { _as_can_reexec=; unset _as_can_reexec;}
Matthias Kloseb9621712010-04-24 17:59:49 +0000162if test "x$CONFIG_SHELL" = x; then
163 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
164 emulate sh
165 NULLCMD=:
166 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
167 # is contrary to our usage. Disable this feature.
168 alias -g '\${1+\"\$@\"}'='\"\$@\"'
169 setopt NO_GLOB_SUBST
170else
171 case \`(set -o) 2>/dev/null\` in #(
172 *posix*) :
173 set -o posix ;; #(
174 *) :
175 ;;
176esac
177fi
178"
179 as_required="as_fn_return () { (exit \$1); }
180as_fn_success () { as_fn_return 0; }
181as_fn_failure () { as_fn_return 1; }
182as_fn_ret_success () { return 0; }
183as_fn_ret_failure () { return 1; }
184
185exitcode=0
186as_fn_success || { exitcode=1; echo as_fn_success failed.; }
187as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
188as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
189as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
190if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
191
192else
193 exitcode=1; echo positional parameters were not saved.
194fi
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000195test x\$exitcode = x0 || exit 1
196test -x / || exit 1"
Matthias Kloseb9621712010-04-24 17:59:49 +0000197 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
198 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
199 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
200 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
201test \$(( 1 + 1 )) = 2 || exit 1"
202 if (eval "$as_required") 2>/dev/null; then :
203 as_have_required=yes
204else
205 as_have_required=no
206fi
207 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
208
209else
210 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
211as_found=false
212for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
213do
214 IFS=$as_save_IFS
215 test -z "$as_dir" && as_dir=.
216 as_found=:
217 case $as_dir in #(
218 /*)
219 for as_base in sh bash ksh sh5; do
220 # Try only shells that exist, to save several forks.
221 as_shell=$as_dir/$as_base
222 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
223 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
224 CONFIG_SHELL=$as_shell as_have_required=yes
225 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
226 break 2
227fi
228fi
229 done;;
230 esac
231 as_found=false
232done
233$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
234 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
235 CONFIG_SHELL=$SHELL as_have_required=yes
236fi; }
237IFS=$as_save_IFS
238
239
240 if test "x$CONFIG_SHELL" != x; then :
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000241 export CONFIG_SHELL
242 # We cannot yet assume a decent shell, so we have to provide a
243# neutralization value for shells without unset; and this also
244# works around shells that cannot unset nonexistent variables.
245# Preserve -v and -x to the replacement shell.
246BASH_ENV=/dev/null
247ENV=/dev/null
248(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
249case $- in # ((((
250 *v*x* | *x*v* ) as_opts=-vx ;;
251 *v* ) as_opts=-v ;;
252 *x* ) as_opts=-x ;;
253 * ) as_opts= ;;
254esac
255exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
256# Admittedly, this is quite paranoid, since all the known shells bail
257# out after a failed `exec'.
258$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
259exit 255
Matthias Kloseb9621712010-04-24 17:59:49 +0000260fi
261
262 if test x$as_have_required = xno; then :
263 $as_echo "$0: This script requires a shell more modern than all"
264 $as_echo "$0: the shells that I found on your system."
265 if test x${ZSH_VERSION+set} = xset ; then
266 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
267 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
268 else
269 $as_echo "$0: Please tell bug-autoconf@gnu.org and
270$0: http://bugs.python.org/ about your system, including
271$0: any error possibly output before this message. Then
272$0: install a modern shell, or manually run the script
273$0: under such a shell if you do have one."
274 fi
275 exit 1
276fi
277fi
278fi
279SHELL=${CONFIG_SHELL-/bin/sh}
280export SHELL
281# Unset more variables known to interfere with behavior of common tools.
282CLICOLOR_FORCE= GREP_OPTIONS=
283unset CLICOLOR_FORCE GREP_OPTIONS
284
285## --------------------- ##
286## M4sh Shell Functions. ##
287## --------------------- ##
288# as_fn_unset VAR
289# ---------------
290# Portably unset VAR.
291as_fn_unset ()
292{
293 { eval $1=; unset $1;}
294}
295as_unset=as_fn_unset
296
297# as_fn_set_status STATUS
298# -----------------------
299# Set $? to STATUS, without forking.
300as_fn_set_status ()
301{
302 return $1
303} # as_fn_set_status
304
305# as_fn_exit STATUS
306# -----------------
307# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
308as_fn_exit ()
309{
310 set +e
311 as_fn_set_status $1
312 exit $1
313} # as_fn_exit
314
315# as_fn_mkdir_p
316# -------------
317# Create "$as_dir" as a directory, including parents if necessary.
318as_fn_mkdir_p ()
319{
320
321 case $as_dir in #(
322 -*) as_dir=./$as_dir;;
323 esac
324 test -d "$as_dir" || eval $as_mkdir_p || {
325 as_dirs=
326 while :; do
327 case $as_dir in #(
328 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
329 *) as_qdir=$as_dir;;
330 esac
331 as_dirs="'$as_qdir' $as_dirs"
332 as_dir=`$as_dirname -- "$as_dir" ||
333$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
334 X"$as_dir" : 'X\(//\)[^/]' \| \
335 X"$as_dir" : 'X\(//\)$' \| \
336 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
337$as_echo X"$as_dir" |
338 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
339 s//\1/
340 q
341 }
342 /^X\(\/\/\)[^/].*/{
343 s//\1/
344 q
345 }
346 /^X\(\/\/\)$/{
347 s//\1/
348 q
349 }
350 /^X\(\/\).*/{
351 s//\1/
352 q
353 }
354 s/.*/./; q'`
355 test -d "$as_dir" && break
356 done
357 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200358 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +0000359
360
361} # as_fn_mkdir_p
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000362
363# as_fn_executable_p FILE
364# -----------------------
365# Test if FILE is an executable regular file.
366as_fn_executable_p ()
367{
368 test -f "$1" && test -x "$1"
369} # as_fn_executable_p
Matthias Kloseb9621712010-04-24 17:59:49 +0000370# as_fn_append VAR VALUE
371# ----------------------
372# Append the text in VALUE to the end of the definition contained in VAR. Take
373# advantage of any shell optimizations that allow amortized linear growth over
374# repeated appends, instead of the typical quadratic growth present in naive
375# implementations.
376if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
377 eval 'as_fn_append ()
378 {
379 eval $1+=\$2
380 }'
381else
382 as_fn_append ()
383 {
384 eval $1=\$$1\$2
385 }
386fi # as_fn_append
387
388# as_fn_arith ARG...
389# ------------------
390# Perform arithmetic evaluation on the ARGs, and store the result in the
391# global $as_val. Take advantage of shells that can avoid forks. The arguments
392# must be portable across $(()) and expr.
393if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
394 eval 'as_fn_arith ()
395 {
396 as_val=$(( $* ))
397 }'
398else
399 as_fn_arith ()
400 {
401 as_val=`expr "$@" || test $? -eq 1`
402 }
403fi # as_fn_arith
404
405
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200406# as_fn_error STATUS ERROR [LINENO LOG_FD]
407# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +0000408# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
409# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200410# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +0000411as_fn_error ()
412{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200413 as_status=$1; test $as_status -eq 0 && as_status=1
414 if test "$4"; then
415 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
416 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +0000417 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200418 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +0000419 as_fn_exit $as_status
420} # as_fn_error
421
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000422if expr a : '\(a\)' >/dev/null 2>&1 &&
423 test "X`expr 00001 : '.*\(...\)'`" = X001; then
424 as_expr=expr
425else
426 as_expr=false
427fi
428
429if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
430 as_basename=basename
431else
432 as_basename=false
433fi
434
Matthias Kloseb9621712010-04-24 17:59:49 +0000435if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
436 as_dirname=dirname
437else
438 as_dirname=false
439fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000440
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000441as_me=`$as_basename -- "$0" ||
442$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
443 X"$0" : 'X\(//\)$' \| \
444 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000445$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000446 sed '/^.*\/\([^/][^/]*\)\/*$/{
447 s//\1/
448 q
449 }
450 /^X\/\(\/\/\)$/{
451 s//\1/
452 q
453 }
454 /^X\/\(\/\).*/{
455 s//\1/
456 q
457 }
458 s/.*/./; q'`
459
Matthias Kloseb9621712010-04-24 17:59:49 +0000460# Avoid depending upon Character Ranges.
461as_cr_letters='abcdefghijklmnopqrstuvwxyz'
462as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
463as_cr_Letters=$as_cr_letters$as_cr_LETTERS
464as_cr_digits='0123456789'
465as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000466
467
Matthias Kloseb9621712010-04-24 17:59:49 +0000468 as_lineno_1=$LINENO as_lineno_1a=$LINENO
469 as_lineno_2=$LINENO as_lineno_2a=$LINENO
470 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
471 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
472 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000473 sed -n '
474 p
475 /[$]LINENO/=
476 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000477 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000478 s/[$]LINENO.*/&-/
479 t lineno
480 b
481 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000482 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000483 :loop
484 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000485 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000486 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000487 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000488 chmod +x "$as_me.lineno" ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000489 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
Martin v. Löwis11437992002-04-12 09:54:03 +0000490
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000491 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
492 # already done that, so ensure we don't try to do so again and fall
493 # in an infinite loop. This has already happened in practice.
494 _as_can_reexec=no; export _as_can_reexec
Martin v. Löwis11437992002-04-12 09:54:03 +0000495 # Don't try to exec as it changes $[0], causing all sort of problems
496 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000497 # original and so on. Autoconf is especially sensitive to this).
498 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000499 # Exit status is that of the last command.
500 exit
501}
502
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000503ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +0000504case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000505-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000506 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000507 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +0000508 xy) ECHO_C='\c';;
509 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
510 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000511 esac;;
512*)
513 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000514esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000515
Martin v. Löwis11437992002-04-12 09:54:03 +0000516rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000517if test -d conf$$.dir; then
518 rm -f conf$$.dir/conf$$.file
519else
520 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +0000521 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000522fi
Matthias Kloseb9621712010-04-24 17:59:49 +0000523if (echo >conf$$.file) 2>/dev/null; then
524 if ln -s conf$$.file conf$$ 2>/dev/null; then
525 as_ln_s='ln -s'
526 # ... but there are two gotchas:
527 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
528 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000529 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +0000530 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000531 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +0000532 elif ln conf$$.file conf$$ 2>/dev/null; then
533 as_ln_s=ln
534 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000535 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +0000536 fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000537else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000538 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +0000539fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000540rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
541rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000542
Skip Montanaro6dead952003-09-25 14:50:04 +0000543if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000544 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +0000545else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000546 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000547 as_mkdir_p=false
548fi
549
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000550as_test_x='test -x'
551as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +0000552
553# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000554as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000555
556# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000557as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000558
559
Matthias Kloseb9621712010-04-24 17:59:49 +0000560test -n "$DJDIR" || exec 7<&0 </dev/null
561exec 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000562
563# Name of the host.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200564# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
Martin v. Löwis11437992002-04-12 09:54:03 +0000565# so uname gets run too.
566ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
567
Martin v. Löwis11437992002-04-12 09:54:03 +0000568#
569# Initializations.
570#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000571ac_default_prefix=/usr/local
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000572ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000573ac_config_libobj_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000574LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000575cross_compiling=no
576subdirs=
577MFLAGS=
578MAKEFLAGS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000579
Martin v. Löwis11437992002-04-12 09:54:03 +0000580# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000581PACKAGE_NAME='python'
582PACKAGE_TARNAME='python'
Georg Brandl08a90122012-09-29 09:34:13 +0200583PACKAGE_VERSION='3.4'
584PACKAGE_STRING='python 3.4'
Georg Brandle2e15612009-05-20 18:25:10 +0000585PACKAGE_BUGREPORT='http://bugs.python.org/'
Matthias Kloseb9621712010-04-24 17:59:49 +0000586PACKAGE_URL=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000587
588ac_unique_file="Include/object.h"
589# Factoring default headers for most tests.
590ac_includes_default="\
591#include <stdio.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000592#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000593# include <sys/types.h>
594#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000595#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000596# include <sys/stat.h>
597#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000598#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000599# include <stdlib.h>
600# include <stddef.h>
601#else
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000602# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000603# include <stdlib.h>
604# endif
605#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000606#ifdef HAVE_STRING_H
607# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000608# include <memory.h>
609# endif
610# include <string.h>
611#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000612#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000613# include <strings.h>
614#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000615#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000616# include <inttypes.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +0000617#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000618#ifdef HAVE_STDINT_H
619# include <stdint.h>
620#endif
621#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000622# include <unistd.h>
623#endif"
624
Matthias Kloseb9621712010-04-24 17:59:49 +0000625ac_subst_vars='LTLIBOBJS
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000626SRCDIRS
Matthias Kloseb9621712010-04-24 17:59:49 +0000627THREADHEADERS
doko@python.org87421192013-01-26 11:39:31 +0100628LIBPL
629PY_ENABLE_SHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700630EXT_SUFFIX
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000631SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000632LIBC
633LIBM
634HAVE_GETHOSTBYNAME
635HAVE_GETHOSTBYNAME_R
636HAVE_GETHOSTBYNAME_R_3_ARG
637HAVE_GETHOSTBYNAME_R_5_ARG
638HAVE_GETHOSTBYNAME_R_6_ARG
639LIBOBJS
640TRUE
641MACHDEP_OBJS
642DYNLOADFILE
643DLINCLDIR
644THREADOBJ
645LDLAST
646USE_THREAD_MODULE
647SIGNAL_OBJS
648USE_SIGNAL_MODULE
Ned Deilyd819b932013-09-06 01:07:05 -0700649TCLTK_LIBS
650TCLTK_INCLUDES
Matthias Kloseb9621712010-04-24 17:59:49 +0000651LIBFFI_INCLUDEDIR
652PKG_CONFIG
653SHLIBS
654CFLAGSFORSHARED
655LINKFORSHARED
656CCSHARED
657BLDSHARED
658LDCXXSHARED
659LDSHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700660SHLIB_SUFFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000661LIBTOOL_CRUFT
662OTHER_LIBTOOL_OPT
663UNIVERSAL_ARCH_FLAGS
664BASECFLAGS
665OPT
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000666ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000667LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100668MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000669INSTALL_DATA
670INSTALL_SCRIPT
671INSTALL_PROGRAM
Matthias Klosec4c48422012-10-21 23:05:35 +0200672PYTHON
673ASDLGEN
doko@ubuntu.com58844492012-06-30 18:25:32 +0200674ac_ct_READELF
675READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000676ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200677ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000678AR
679RANLIB
Daniel Stutzbacha606faa2010-08-31 19:51:07 +0000680USE_INLINE
Matthias Kloseb9621712010-04-24 17:59:49 +0000681GNULD
682LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000683LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000684RUNSHARED
685INSTSONAME
686LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000687PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000688BLDLIBRARY
689DLLLIBRARY
690LDLIBRARY
691LIBRARY
doko@python.org3e6e2ac2013-01-25 13:12:29 +0100692MULTIARCH
Matthias Kloseb9621712010-04-24 17:59:49 +0000693BUILDEXEEXT
694EGREP
695GREP
696CPP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200697NO_AS_NEEDED
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200698ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000699MAINCC
700CXX
701OBJEXT
702EXEEXT
703ac_ct_CC
704CPPFLAGS
705LDFLAGS
706CFLAGS
707CC
708EXPORT_MACOSX_DEPLOYMENT_TARGET
709CONFIGURE_MACOSX_DEPLOYMENT_TARGET
710SGI_ABI
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200711_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000712MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000713FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000714FRAMEWORKUNIXTOOLSPREFIX
715FRAMEWORKALTINSTALLLAST
716FRAMEWORKALTINSTALLFIRST
717FRAMEWORKINSTALLLAST
718FRAMEWORKINSTALLFIRST
719PYTHONFRAMEWORKINSTALLDIR
720PYTHONFRAMEWORKPREFIX
721PYTHONFRAMEWORKDIR
722PYTHONFRAMEWORKIDENTIFIER
723PYTHONFRAMEWORK
724LIPO_32BIT_FLAGS
725ARCH_RUN_32BIT
726UNIVERSALSDK
727CONFIG_ARGS
728SOVERSION
729VERSION
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200730PYTHON_FOR_BUILD
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100731host_os
732host_vendor
733host_cpu
734host
735build_os
736build_vendor
737build_cpu
738build
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -0500739HAS_HG
740HGBRANCH
741HGTAG
742HGVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400743BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000744target_alias
745host_alias
746build_alias
747LIBS
748ECHO_T
749ECHO_N
750ECHO_C
751DEFS
752mandir
753localedir
754libdir
755psdir
756pdfdir
757dvidir
758htmldir
759infodir
760docdir
761oldincludedir
762includedir
763localstatedir
764sharedstatedir
765sysconfdir
766datadir
767datarootdir
768libexecdir
769sbindir
770bindir
771program_transform_name
772prefix
773exec_prefix
774PACKAGE_URL
775PACKAGE_BUGREPORT
776PACKAGE_STRING
777PACKAGE_VERSION
778PACKAGE_TARNAME
779PACKAGE_NAME
780PATH_SEPARATOR
781SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000782ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000783ac_user_opts='
784enable_option_checking
785enable_universalsdk
786with_universal_archs
787with_framework_name
788enable_framework
789with_gcc
790with_cxx_main
791with_suffix
792enable_shared
793enable_profiling
794with_pydebug
795with_libs
796with_system_expat
797with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100798with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000799enable_loadable_sqlite_extensions
Ned Deilyd819b932013-09-06 01:07:05 -0700800with_tcltk_includes
801with_tcltk_libs
Matthias Kloseb9621712010-04-24 17:59:49 +0000802with_dbmliborder
803with_signal_module
Matthias Kloseb9621712010-04-24 17:59:49 +0000804with_threads
805with_thread
806enable_ipv6
807with_doc_strings
808with_tsc
809with_pymalloc
810with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000811with_fpectl
812with_libm
813with_libc
814enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000815with_computed_gotos
816'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000817 ac_precious_vars='build_alias
818host_alias
819target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100820MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000821CC
822CFLAGS
823LDFLAGS
824LIBS
825CPPFLAGS
Charles-François Natali47413c12011-10-06 19:47:44 +0200826CPP'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000827
Guido van Rossum627b2d71993-12-24 10:39:16 +0000828
Guido van Rossum7f43da71994-08-01 12:15:30 +0000829# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000830ac_init_help=
831ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000832ac_unrecognized_opts=
833ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000834# The variables have the same names as the options, with
835# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000836cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000837exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000838no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000839no_recursion=
840prefix=NONE
841program_prefix=NONE
842program_suffix=NONE
843program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000844silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000845site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000846srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000847verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000848x_includes=NONE
849x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000850
851# Installation directory options.
852# These are left unexpanded so users can "make install exec_prefix=/foo"
853# and all the variables that are supposed to be based on exec_prefix
854# by default will actually change.
855# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000856# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000857bindir='${exec_prefix}/bin'
858sbindir='${exec_prefix}/sbin'
859libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000860datarootdir='${prefix}/share'
861datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000862sysconfdir='${prefix}/etc'
863sharedstatedir='${prefix}/com'
864localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000865includedir='${prefix}/include'
866oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000867docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
868infodir='${datarootdir}/info'
869htmldir='${docdir}'
870dvidir='${docdir}'
871pdfdir='${docdir}'
872psdir='${docdir}'
873libdir='${exec_prefix}/lib'
874localedir='${datarootdir}/locale'
875mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000876
Guido van Rossum7f43da71994-08-01 12:15:30 +0000877ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000878ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000879for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000880do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000881 # If the previous option needs an argument, assign it.
882 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000883 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000884 ac_prev=
885 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000886 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000887
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000888 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200889 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
890 *=) ac_optarg= ;;
891 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000892 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000893
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000894 # Accept the important Cygnus configure options, so we can diagnose typos.
895
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000896 case $ac_dashdash$ac_option in
897 --)
898 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000899
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000900 -bindir | --bindir | --bindi | --bind | --bin | --bi)
901 ac_prev=bindir ;;
902 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000903 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000904
905 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000906 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000907 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000908 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000909
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000910 -cache-file | --cache-file | --cache-fil | --cache-fi \
911 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
912 ac_prev=cache_file ;;
913 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
914 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000915 cache_file=$ac_optarg ;;
916
917 --config-cache | -C)
918 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000919
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000920 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000921 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000922 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000923 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000924
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000925 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
926 | --dataroo | --dataro | --datar)
927 ac_prev=datarootdir ;;
928 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
929 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
930 datarootdir=$ac_optarg ;;
931
Guido van Rossum7f43da71994-08-01 12:15:30 +0000932 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000933 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000934 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000935 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200936 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000937 ac_useropt_orig=$ac_useropt
938 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
939 case $ac_user_opts in
940 *"
941"enable_$ac_useropt"
942"*) ;;
943 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
944 ac_unrecognized_sep=', ';;
945 esac
946 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000947
948 -docdir | --docdir | --docdi | --doc | --do)
949 ac_prev=docdir ;;
950 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
951 docdir=$ac_optarg ;;
952
953 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
954 ac_prev=dvidir ;;
955 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
956 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000957
958 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000959 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000960 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000961 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200962 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000963 ac_useropt_orig=$ac_useropt
964 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
965 case $ac_user_opts in
966 *"
967"enable_$ac_useropt"
968"*) ;;
969 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
970 ac_unrecognized_sep=', ';;
971 esac
972 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000973
Guido van Rossum7f43da71994-08-01 12:15:30 +0000974 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
975 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
976 | --exec | --exe | --ex)
977 ac_prev=exec_prefix ;;
978 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
979 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
980 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000981 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000982
983 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000984 # Obsolete; use --with-gas.
985 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000986
Martin v. Löwis11437992002-04-12 09:54:03 +0000987 -help | --help | --hel | --he | -h)
988 ac_init_help=long ;;
989 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
990 ac_init_help=recursive ;;
991 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
992 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000993
994 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000995 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000996 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000997 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000998
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000999 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1000 ac_prev=htmldir ;;
1001 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1002 | --ht=*)
1003 htmldir=$ac_optarg ;;
1004
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001005 -includedir | --includedir | --includedi | --included | --include \
1006 | --includ | --inclu | --incl | --inc)
1007 ac_prev=includedir ;;
1008 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1009 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001010 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001011
1012 -infodir | --infodir | --infodi | --infod | --info | --inf)
1013 ac_prev=infodir ;;
1014 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001015 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001016
1017 -libdir | --libdir | --libdi | --libd)
1018 ac_prev=libdir ;;
1019 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001020 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001021
1022 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1023 | --libexe | --libex | --libe)
1024 ac_prev=libexecdir ;;
1025 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1026 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001027 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001028
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001029 -localedir | --localedir | --localedi | --localed | --locale)
1030 ac_prev=localedir ;;
1031 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1032 localedir=$ac_optarg ;;
1033
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001034 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001035 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001036 ac_prev=localstatedir ;;
1037 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001038 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001039 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001040
1041 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1042 ac_prev=mandir ;;
1043 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001044 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001045
Guido van Rossum7f43da71994-08-01 12:15:30 +00001046 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001047 # Obsolete; use --without-fp.
1048 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001049
1050 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001051 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001052 no_create=yes ;;
1053
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001054 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1055 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1056 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001057
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001058 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1059 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1060 | --oldin | --oldi | --old | --ol | --o)
1061 ac_prev=oldincludedir ;;
1062 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1063 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1064 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001065 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001066
Guido van Rossum7f43da71994-08-01 12:15:30 +00001067 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1068 ac_prev=prefix ;;
1069 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001070 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001071
1072 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1073 | --program-pre | --program-pr | --program-p)
1074 ac_prev=program_prefix ;;
1075 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1076 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001077 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001078
1079 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1080 | --program-suf | --program-su | --program-s)
1081 ac_prev=program_suffix ;;
1082 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1083 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001084 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001085
1086 -program-transform-name | --program-transform-name \
1087 | --program-transform-nam | --program-transform-na \
1088 | --program-transform-n | --program-transform- \
1089 | --program-transform | --program-transfor \
1090 | --program-transfo | --program-transf \
1091 | --program-trans | --program-tran \
1092 | --progr-tra | --program-tr | --program-t)
1093 ac_prev=program_transform_name ;;
1094 -program-transform-name=* | --program-transform-name=* \
1095 | --program-transform-nam=* | --program-transform-na=* \
1096 | --program-transform-n=* | --program-transform-=* \
1097 | --program-transform=* | --program-transfor=* \
1098 | --program-transfo=* | --program-transf=* \
1099 | --program-trans=* | --program-tran=* \
1100 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001101 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001102
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001103 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1104 ac_prev=pdfdir ;;
1105 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1106 pdfdir=$ac_optarg ;;
1107
1108 -psdir | --psdir | --psdi | --psd | --ps)
1109 ac_prev=psdir ;;
1110 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1111 psdir=$ac_optarg ;;
1112
Guido van Rossum7f43da71994-08-01 12:15:30 +00001113 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1114 | -silent | --silent | --silen | --sile | --sil)
1115 silent=yes ;;
1116
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001117 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1118 ac_prev=sbindir ;;
1119 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1120 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001121 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001122
1123 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1124 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1125 | --sharedst | --shareds | --shared | --share | --shar \
1126 | --sha | --sh)
1127 ac_prev=sharedstatedir ;;
1128 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1129 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1130 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1131 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001132 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001133
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001134 -site | --site | --sit)
1135 ac_prev=site ;;
1136 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001137 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001138
Guido van Rossum7f43da71994-08-01 12:15:30 +00001139 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1140 ac_prev=srcdir ;;
1141 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001142 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001143
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001144 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1145 | --syscon | --sysco | --sysc | --sys | --sy)
1146 ac_prev=sysconfdir ;;
1147 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1148 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001149 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001150
Guido van Rossum7f43da71994-08-01 12:15:30 +00001151 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001152 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001153 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001154 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001155
1156 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1157 verbose=yes ;;
1158
Martin v. Löwis11437992002-04-12 09:54:03 +00001159 -version | --version | --versio | --versi | --vers | -V)
1160 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001161
1162 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001163 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001164 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001165 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001166 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001167 ac_useropt_orig=$ac_useropt
1168 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1169 case $ac_user_opts in
1170 *"
1171"with_$ac_useropt"
1172"*) ;;
1173 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1174 ac_unrecognized_sep=', ';;
1175 esac
1176 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001177
1178 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001179 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001180 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001181 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001182 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001183 ac_useropt_orig=$ac_useropt
1184 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1185 case $ac_user_opts in
1186 *"
1187"with_$ac_useropt"
1188"*) ;;
1189 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1190 ac_unrecognized_sep=', ';;
1191 esac
1192 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001193
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001194 --x)
1195 # Obsolete; use --with-x.
1196 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001197
1198 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1199 | --x-incl | --x-inc | --x-in | --x-i)
1200 ac_prev=x_includes ;;
1201 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1202 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001203 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001204
1205 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1206 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1207 ac_prev=x_libraries ;;
1208 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1209 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001210 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001211
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001212 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1213Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001214 ;;
1215
Martin v. Löwis11437992002-04-12 09:54:03 +00001216 *=*)
1217 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1218 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001219 case $ac_envvar in #(
1220 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001221 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001222 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001223 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001224 export $ac_envvar ;;
1225
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001226 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001227 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001228 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001229 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001230 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001231 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001232 ;;
1233
1234 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001235done
1236
Guido van Rossum7f43da71994-08-01 12:15:30 +00001237if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001238 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001239 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001240fi
1241
Matthias Kloseb9621712010-04-24 17:59:49 +00001242if test -n "$ac_unrecognized_opts"; then
1243 case $enable_option_checking in
1244 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001245 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001246 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1247 esac
1248fi
1249
1250# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001251for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1252 datadir sysconfdir sharedstatedir localstatedir includedir \
1253 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1254 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001255do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001256 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001257 # Remove trailing slashes.
1258 case $ac_val in
1259 */ )
1260 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1261 eval $ac_var=\$ac_val;;
1262 esac
1263 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001264 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001265 [\\/$]* | ?:[\\/]* ) continue;;
1266 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001267 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001268 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001269done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001270
Martin v. Löwis11437992002-04-12 09:54:03 +00001271# There might be people who depend on the old broken behavior: `$host'
1272# used to hold the argument of --host etc.
1273# FIXME: To remove some day.
1274build=$build_alias
1275host=$host_alias
1276target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001277
Martin v. Löwis11437992002-04-12 09:54:03 +00001278# FIXME: To remove some day.
1279if test "x$host_alias" != x; then
1280 if test "x$build_alias" = x; then
1281 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001282 elif test "x$build_alias" != "x$host_alias"; then
1283 cross_compiling=yes
1284 fi
1285fi
1286
1287ac_tool_prefix=
1288test -n "$host_alias" && ac_tool_prefix=$host_alias-
1289
1290test "$silent" = yes && exec 6>/dev/null
1291
Guido van Rossum627b2d71993-12-24 10:39:16 +00001292
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001293ac_pwd=`pwd` && test -n "$ac_pwd" &&
1294ac_ls_di=`ls -di .` &&
1295ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001296 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001297test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001298 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001299
1300
Guido van Rossum627b2d71993-12-24 10:39:16 +00001301# Find the source files, if location was not specified.
1302if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001303 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001304 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001305 ac_confdir=`$as_dirname -- "$as_myself" ||
1306$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1307 X"$as_myself" : 'X\(//\)[^/]' \| \
1308 X"$as_myself" : 'X\(//\)$' \| \
1309 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1310$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001311 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1312 s//\1/
1313 q
1314 }
1315 /^X\(\/\/\)[^/].*/{
1316 s//\1/
1317 q
1318 }
1319 /^X\(\/\/\)$/{
1320 s//\1/
1321 q
1322 }
1323 /^X\(\/\).*/{
1324 s//\1/
1325 q
1326 }
1327 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001328 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001329 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001330 srcdir=..
1331 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001332else
1333 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001334fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001335if test ! -r "$srcdir/$ac_unique_file"; then
1336 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001337 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001338fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001339ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1340ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001341 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001342 pwd)`
1343# When building in place, set srcdir=.
1344if test "$ac_abs_confdir" = "$ac_pwd"; then
1345 srcdir=.
1346fi
1347# Remove unnecessary trailing slashes from srcdir.
1348# Double slashes in file names in object file debugging info
1349# mess up M-x gdb in Emacs.
1350case $srcdir in
1351*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1352esac
1353for ac_var in $ac_precious_vars; do
1354 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1355 eval ac_env_${ac_var}_value=\$${ac_var}
1356 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1357 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1358done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001359
Martin v. Löwis11437992002-04-12 09:54:03 +00001360#
1361# Report the --help message.
1362#
1363if test "$ac_init_help" = "long"; then
1364 # Omit some internal or obsolete options to make the list less imposing.
1365 # This message is too long to be a string in the A/UX 3.1 sh.
1366 cat <<_ACEOF
Georg Brandl08a90122012-09-29 09:34:13 +02001367\`configure' configures python 3.4 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001368
1369Usage: $0 [OPTION]... [VAR=VALUE]...
1370
1371To assign environment variables (e.g., CC, CFLAGS...), specify them as
1372VAR=VALUE. See below for descriptions of some of the useful variables.
1373
1374Defaults for the options are specified in brackets.
1375
1376Configuration:
1377 -h, --help display this help and exit
1378 --help=short display options specific to this package
1379 --help=recursive display the short help of all the included packages
1380 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001381 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001382 --cache-file=FILE cache test results in FILE [disabled]
1383 -C, --config-cache alias for \`--cache-file=config.cache'
1384 -n, --no-create do not create output files
1385 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1386
Martin v. Löwis11437992002-04-12 09:54:03 +00001387Installation directories:
1388 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001389 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001390 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001391 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001392
1393By default, \`make install' will install all the files in
1394\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1395an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1396for instance \`--prefix=\$HOME'.
1397
1398For better control, use the options below.
1399
1400Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001401 --bindir=DIR user executables [EPREFIX/bin]
1402 --sbindir=DIR system admin executables [EPREFIX/sbin]
1403 --libexecdir=DIR program executables [EPREFIX/libexec]
1404 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1405 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1406 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1407 --libdir=DIR object code libraries [EPREFIX/lib]
1408 --includedir=DIR C header files [PREFIX/include]
1409 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1410 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1411 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1412 --infodir=DIR info documentation [DATAROOTDIR/info]
1413 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1414 --mandir=DIR man documentation [DATAROOTDIR/man]
1415 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1416 --htmldir=DIR html documentation [DOCDIR]
1417 --dvidir=DIR dvi documentation [DOCDIR]
1418 --pdfdir=DIR pdf documentation [DOCDIR]
1419 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001420_ACEOF
1421
1422 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001423
1424System types:
1425 --build=BUILD configure for building on BUILD [guessed]
1426 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001427_ACEOF
1428fi
1429
1430if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001431 case $ac_init_help in
Georg Brandl08a90122012-09-29 09:34:13 +02001432 short | recursive ) echo "Configuration of python 3.4:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001433 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001434 cat <<\_ACEOF
1435
1436Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001437 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001438 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1439 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001440 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001441 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001442 --enable-framework[=INSTALLDIR]
1443 Build (MacOSX|Darwin) framework
1444 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001445 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001446 --enable-loadable-sqlite-extensions
1447 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001448 --enable-ipv6 Enable ipv6 (with ipv4) support
1449 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001450 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001451 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001452
1453Optional Packages:
1454 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1455 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001456 --with-universal-archs=ARCH
1457 select architectures for universal build ("32-bit",
Ned Deily87adb6e2013-10-18 21:09:56 -07001458 "64-bit", "3-way", "intel", "intel-32", or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001459 --with-framework-name=FRAMEWORK
1460 specify an alternate name of the framework built
1461 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001462 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001463 --with-cxx-main=<compiler>
1464 compile main() and link python executable with C++
1465 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001466 --with-suffix=.exe set executable suffix
1467 --with-pydebug build with Py_DEBUG defined
1468 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001469 --with-system-expat build pyexpat module using an installed expat
1470 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001471 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001472 --with-system-libmpdec build _decimal module using an installed libmpdec
1473 library
Ned Deilyd819b932013-09-06 01:07:05 -07001474 --with-tcltk-includes='-I...'
1475 override search for Tcl and Tk include files
1476 --with-tcltk-libs='-L...'
1477 override search for Tcl and Tk libs
Matthias Klose55708cc2009-04-30 08:06:49 +00001478 --with-dbmliborder=db1:db2:...
1479 order to check db backends for dbm. Valid value is a
1480 colon separated string with the backend names
1481 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001482 --with-signal-module disable/enable signal module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001483 --with(out)-threads[=DIRECTORY]
1484 disable/enable thread support
1485 --with(out)-thread[=DIRECTORY]
1486 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001487 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001488 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001489 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001490 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001491 --with-fpectl enable SIGFPE catching
1492 --with-libm=STRING math library
1493 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001494 --with(out)-computed-gotos
1495 Use computed gotos in evaluation loop (enabled by
1496 default on supported compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001497
1498Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001499 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001500 CC C compiler command
1501 CFLAGS C compiler flags
1502 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1503 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001504 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001505 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001506 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001507 CPP C preprocessor
1508
1509Use these variables to override the choices made by `configure' or to help
1510it to find libraries and programs with nonstandard names/locations.
1511
Georg Brandle2e15612009-05-20 18:25:10 +00001512Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001513_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001514ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001515fi
1516
1517if test "$ac_init_help" = "recursive"; then
1518 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001519 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001520 test -d "$ac_dir" ||
1521 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1522 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001523 ac_builddir=.
1524
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001525case "$ac_dir" in
1526.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1527*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001528 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001529 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001530 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001531 case $ac_top_builddir_sub in
1532 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1533 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1534 esac ;;
1535esac
1536ac_abs_top_builddir=$ac_pwd
1537ac_abs_builddir=$ac_pwd$ac_dir_suffix
1538# for backward compatibility:
1539ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001540
1541case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001542 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001543 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001544 ac_top_srcdir=$ac_top_builddir_sub
1545 ac_abs_top_srcdir=$ac_pwd ;;
1546 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001547 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001548 ac_top_srcdir=$srcdir
1549 ac_abs_top_srcdir=$srcdir ;;
1550 *) # Relative name.
1551 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1552 ac_top_srcdir=$ac_top_build_prefix$srcdir
1553 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001554esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001555ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001556
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001557 cd "$ac_dir" || { ac_status=$?; continue; }
1558 # Check for guested configure.
1559 if test -f "$ac_srcdir/configure.gnu"; then
1560 echo &&
1561 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1562 elif test -f "$ac_srcdir/configure"; then
1563 echo &&
1564 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001565 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001566 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001567 fi || ac_status=$?
1568 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001569 done
1570fi
1571
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001572test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001573if $ac_init_version; then
1574 cat <<\_ACEOF
Georg Brandl08a90122012-09-29 09:34:13 +02001575python configure 3.4
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001576generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001577
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001578Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001579This configure script is free software; the Free Software Foundation
1580gives unlimited permission to copy, distribute and modify it.
1581_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001582 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001583fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001584
1585## ------------------------ ##
1586## Autoconf initialization. ##
1587## ------------------------ ##
1588
1589# ac_fn_c_try_compile LINENO
1590# --------------------------
1591# Try to compile conftest.$ac_ext, and return whether this succeeded.
1592ac_fn_c_try_compile ()
1593{
1594 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1595 rm -f conftest.$ac_objext
1596 if { { ac_try="$ac_compile"
1597case "(($ac_try" in
1598 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1599 *) ac_try_echo=$ac_try;;
1600esac
1601eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1602$as_echo "$ac_try_echo"; } >&5
1603 (eval "$ac_compile") 2>conftest.err
1604 ac_status=$?
1605 if test -s conftest.err; then
1606 grep -v '^ *+' conftest.err >conftest.er1
1607 cat conftest.er1 >&5
1608 mv -f conftest.er1 conftest.err
1609 fi
1610 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1611 test $ac_status = 0; } && {
1612 test -z "$ac_c_werror_flag" ||
1613 test ! -s conftest.err
1614 } && test -s conftest.$ac_objext; then :
1615 ac_retval=0
1616else
1617 $as_echo "$as_me: failed program was:" >&5
1618sed 's/^/| /' conftest.$ac_ext >&5
1619
1620 ac_retval=1
1621fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001622 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001623 as_fn_set_status $ac_retval
1624
1625} # ac_fn_c_try_compile
1626
Matthias Kloseb9621712010-04-24 17:59:49 +00001627# ac_fn_c_try_link LINENO
1628# -----------------------
1629# Try to link conftest.$ac_ext, and return whether this succeeded.
1630ac_fn_c_try_link ()
1631{
1632 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1633 rm -f conftest.$ac_objext conftest$ac_exeext
1634 if { { ac_try="$ac_link"
1635case "(($ac_try" in
1636 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1637 *) ac_try_echo=$ac_try;;
1638esac
1639eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1640$as_echo "$ac_try_echo"; } >&5
1641 (eval "$ac_link") 2>conftest.err
1642 ac_status=$?
1643 if test -s conftest.err; then
1644 grep -v '^ *+' conftest.err >conftest.er1
1645 cat conftest.er1 >&5
1646 mv -f conftest.er1 conftest.err
1647 fi
1648 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1649 test $ac_status = 0; } && {
1650 test -z "$ac_c_werror_flag" ||
1651 test ! -s conftest.err
1652 } && test -s conftest$ac_exeext && {
1653 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001654 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001655 }; then :
1656 ac_retval=0
1657else
1658 $as_echo "$as_me: failed program was:" >&5
1659sed 's/^/| /' conftest.$ac_ext >&5
1660
1661 ac_retval=1
1662fi
1663 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1664 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1665 # interfere with the next link command; also delete a directory that is
1666 # left behind by Apple's compiler. We do this before executing the actions.
1667 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001668 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001669 as_fn_set_status $ac_retval
1670
1671} # ac_fn_c_try_link
1672
Matthias Kloseb9621712010-04-24 17:59:49 +00001673# ac_fn_c_try_cpp LINENO
1674# ----------------------
1675# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1676ac_fn_c_try_cpp ()
1677{
1678 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1679 if { { ac_try="$ac_cpp conftest.$ac_ext"
1680case "(($ac_try" in
1681 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1682 *) ac_try_echo=$ac_try;;
1683esac
1684eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1685$as_echo "$ac_try_echo"; } >&5
1686 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1687 ac_status=$?
1688 if test -s conftest.err; then
1689 grep -v '^ *+' conftest.err >conftest.er1
1690 cat conftest.er1 >&5
1691 mv -f conftest.er1 conftest.err
1692 fi
1693 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001694 test $ac_status = 0; } > conftest.i && {
Matthias Kloseb9621712010-04-24 17:59:49 +00001695 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1696 test ! -s conftest.err
1697 }; then :
1698 ac_retval=0
1699else
1700 $as_echo "$as_me: failed program was:" >&5
1701sed 's/^/| /' conftest.$ac_ext >&5
1702
1703 ac_retval=1
1704fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001705 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001706 as_fn_set_status $ac_retval
1707
1708} # ac_fn_c_try_cpp
1709
1710# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1711# -------------------------------------------------------
1712# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1713# the include files in INCLUDES and setting the cache variable VAR
1714# accordingly.
1715ac_fn_c_check_header_mongrel ()
1716{
1717 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001718 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001719 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1720$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001721if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001722 $as_echo_n "(cached) " >&6
1723fi
1724eval ac_res=\$$3
1725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1726$as_echo "$ac_res" >&6; }
1727else
1728 # Is the header compilable?
1729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1730$as_echo_n "checking $2 usability... " >&6; }
1731cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1732/* end confdefs.h. */
1733$4
1734#include <$2>
1735_ACEOF
1736if ac_fn_c_try_compile "$LINENO"; then :
1737 ac_header_compiler=yes
1738else
1739 ac_header_compiler=no
1740fi
1741rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1742{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1743$as_echo "$ac_header_compiler" >&6; }
1744
1745# Is the header present?
1746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1747$as_echo_n "checking $2 presence... " >&6; }
1748cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1749/* end confdefs.h. */
1750#include <$2>
1751_ACEOF
1752if ac_fn_c_try_cpp "$LINENO"; then :
1753 ac_header_preproc=yes
1754else
1755 ac_header_preproc=no
1756fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001757rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001758{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1759$as_echo "$ac_header_preproc" >&6; }
1760
1761# So? What about this header?
1762case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1763 yes:no: )
1764 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1765$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1766 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1767$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1768 ;;
1769 no:yes:* )
1770 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1771$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1772 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1773$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1774 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1775$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1776 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1777$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1778 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1779$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001780( $as_echo "## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001781## Report this to http://bugs.python.org/ ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001782## -------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001783 ) | sed "s/^/$as_me: WARNING: /" >&2
1784 ;;
1785esac
1786 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1787$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001788if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001789 $as_echo_n "(cached) " >&6
1790else
1791 eval "$3=\$ac_header_compiler"
1792fi
1793eval ac_res=\$$3
1794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1795$as_echo "$ac_res" >&6; }
1796fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001797 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001798
1799} # ac_fn_c_check_header_mongrel
1800
1801# ac_fn_c_try_run LINENO
1802# ----------------------
1803# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1804# that executables *can* be run.
1805ac_fn_c_try_run ()
1806{
1807 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1808 if { { ac_try="$ac_link"
1809case "(($ac_try" in
1810 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1811 *) ac_try_echo=$ac_try;;
1812esac
1813eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1814$as_echo "$ac_try_echo"; } >&5
1815 (eval "$ac_link") 2>&5
1816 ac_status=$?
1817 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1818 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1819 { { case "(($ac_try" in
1820 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1821 *) ac_try_echo=$ac_try;;
1822esac
1823eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1824$as_echo "$ac_try_echo"; } >&5
1825 (eval "$ac_try") 2>&5
1826 ac_status=$?
1827 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1828 test $ac_status = 0; }; }; then :
1829 ac_retval=0
1830else
1831 $as_echo "$as_me: program exited with status $ac_status" >&5
1832 $as_echo "$as_me: failed program was:" >&5
1833sed 's/^/| /' conftest.$ac_ext >&5
1834
1835 ac_retval=$ac_status
1836fi
1837 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001838 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001839 as_fn_set_status $ac_retval
1840
1841} # ac_fn_c_try_run
1842
1843# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1844# -------------------------------------------------------
1845# Tests whether HEADER exists and can be compiled using the include files in
1846# INCLUDES, setting the cache variable VAR accordingly.
1847ac_fn_c_check_header_compile ()
1848{
1849 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1850 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1851$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001852if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001853 $as_echo_n "(cached) " >&6
1854else
1855 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1856/* end confdefs.h. */
1857$4
1858#include <$2>
1859_ACEOF
1860if ac_fn_c_try_compile "$LINENO"; then :
1861 eval "$3=yes"
1862else
1863 eval "$3=no"
1864fi
1865rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1866fi
1867eval ac_res=\$$3
1868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1869$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001870 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001871
1872} # ac_fn_c_check_header_compile
1873
Matthias Kloseb9621712010-04-24 17:59:49 +00001874# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1875# -------------------------------------------
1876# Tests whether TYPE exists after having included INCLUDES, setting cache
1877# variable VAR accordingly.
1878ac_fn_c_check_type ()
1879{
1880 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1881 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1882$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001883if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001884 $as_echo_n "(cached) " >&6
1885else
1886 eval "$3=no"
1887 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1888/* end confdefs.h. */
1889$4
1890int
1891main ()
1892{
1893if (sizeof ($2))
1894 return 0;
1895 ;
1896 return 0;
1897}
1898_ACEOF
1899if ac_fn_c_try_compile "$LINENO"; then :
1900 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1901/* end confdefs.h. */
1902$4
1903int
1904main ()
1905{
1906if (sizeof (($2)))
1907 return 0;
1908 ;
1909 return 0;
1910}
1911_ACEOF
1912if ac_fn_c_try_compile "$LINENO"; then :
1913
1914else
1915 eval "$3=yes"
1916fi
1917rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1918fi
1919rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1920fi
1921eval ac_res=\$$3
1922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1923$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001924 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001925
1926} # ac_fn_c_check_type
1927
1928# ac_fn_c_find_uintX_t LINENO BITS VAR
1929# ------------------------------------
1930# Finds an unsigned integer type with width BITS, setting cache variable VAR
1931# accordingly.
1932ac_fn_c_find_uintX_t ()
1933{
1934 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1935 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1936$as_echo_n "checking for uint$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001937if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001938 $as_echo_n "(cached) " >&6
1939else
1940 eval "$3=no"
1941 # Order is important - never check a type that is potentially smaller
1942 # than half of the expected target width.
1943 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1944 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1945 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1946/* end confdefs.h. */
1947$ac_includes_default
1948int
1949main ()
1950{
1951static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001952test_array [0] = 0;
1953return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00001954
1955 ;
1956 return 0;
1957}
1958_ACEOF
1959if ac_fn_c_try_compile "$LINENO"; then :
1960 case $ac_type in #(
1961 uint$2_t) :
1962 eval "$3=yes" ;; #(
1963 *) :
1964 eval "$3=\$ac_type" ;;
1965esac
1966fi
1967rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001968 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001969
1970else
1971 break
1972fi
1973 done
1974fi
1975eval ac_res=\$$3
1976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1977$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001978 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001979
1980} # ac_fn_c_find_uintX_t
1981
1982# ac_fn_c_find_intX_t LINENO BITS VAR
1983# -----------------------------------
1984# Finds a signed integer type with width BITS, setting cache variable VAR
1985# accordingly.
1986ac_fn_c_find_intX_t ()
1987{
1988 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1989 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1990$as_echo_n "checking for int$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001991if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001992 $as_echo_n "(cached) " >&6
1993else
1994 eval "$3=no"
1995 # Order is important - never check a type that is potentially smaller
1996 # than half of the expected target width.
1997 for ac_type in int$2_t 'int' 'long int' \
1998 'long long int' 'short int' 'signed char'; do
1999 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2000/* end confdefs.h. */
2001$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002002 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00002003int
2004main ()
2005{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002006static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002007test_array [0] = 0;
2008return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002009
2010 ;
2011 return 0;
2012}
2013_ACEOF
2014if ac_fn_c_try_compile "$LINENO"; then :
2015 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2016/* end confdefs.h. */
2017$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002018 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00002019int
2020main ()
2021{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002022static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00002023 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002024test_array [0] = 0;
2025return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002026
2027 ;
2028 return 0;
2029}
2030_ACEOF
2031if ac_fn_c_try_compile "$LINENO"; then :
2032
2033else
2034 case $ac_type in #(
2035 int$2_t) :
2036 eval "$3=yes" ;; #(
2037 *) :
2038 eval "$3=\$ac_type" ;;
2039esac
2040fi
2041rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2042fi
2043rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002044 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002045
2046else
2047 break
2048fi
2049 done
2050fi
2051eval ac_res=\$$3
2052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2053$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002054 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002055
2056} # ac_fn_c_find_intX_t
2057
2058# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2059# --------------------------------------------
2060# Tries to find the compile-time value of EXPR in a program that includes
2061# INCLUDES, setting VAR accordingly. Returns whether the value could be
2062# computed
2063ac_fn_c_compute_int ()
2064{
2065 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2066 if test "$cross_compiling" = yes; then
2067 # Depending upon the size, compute the lo and hi bounds.
2068cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2069/* end confdefs.h. */
2070$4
2071int
2072main ()
2073{
2074static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002075test_array [0] = 0;
2076return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002077
2078 ;
2079 return 0;
2080}
2081_ACEOF
2082if ac_fn_c_try_compile "$LINENO"; then :
2083 ac_lo=0 ac_mid=0
2084 while :; do
2085 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2086/* end confdefs.h. */
2087$4
2088int
2089main ()
2090{
2091static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002092test_array [0] = 0;
2093return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002094
2095 ;
2096 return 0;
2097}
2098_ACEOF
2099if ac_fn_c_try_compile "$LINENO"; then :
2100 ac_hi=$ac_mid; break
2101else
2102 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2103 if test $ac_lo -le $ac_mid; then
2104 ac_lo= ac_hi=
2105 break
2106 fi
2107 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2108fi
2109rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2110 done
2111else
2112 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2113/* end confdefs.h. */
2114$4
2115int
2116main ()
2117{
2118static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002119test_array [0] = 0;
2120return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002121
2122 ;
2123 return 0;
2124}
2125_ACEOF
2126if ac_fn_c_try_compile "$LINENO"; then :
2127 ac_hi=-1 ac_mid=-1
2128 while :; do
2129 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2130/* end confdefs.h. */
2131$4
2132int
2133main ()
2134{
2135static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002136test_array [0] = 0;
2137return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002138
2139 ;
2140 return 0;
2141}
2142_ACEOF
2143if ac_fn_c_try_compile "$LINENO"; then :
2144 ac_lo=$ac_mid; break
2145else
2146 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2147 if test $ac_mid -le $ac_hi; then
2148 ac_lo= ac_hi=
2149 break
2150 fi
2151 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2152fi
2153rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2154 done
2155else
2156 ac_lo= ac_hi=
2157fi
2158rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2159fi
2160rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2161# Binary search between lo and hi bounds.
2162while test "x$ac_lo" != "x$ac_hi"; do
2163 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2164 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2165/* end confdefs.h. */
2166$4
2167int
2168main ()
2169{
2170static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002171test_array [0] = 0;
2172return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002173
2174 ;
2175 return 0;
2176}
2177_ACEOF
2178if ac_fn_c_try_compile "$LINENO"; then :
2179 ac_hi=$ac_mid
2180else
2181 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2182fi
2183rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2184done
2185case $ac_lo in #((
2186?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2187'') ac_retval=1 ;;
2188esac
2189 else
2190 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2191/* end confdefs.h. */
2192$4
2193static long int longval () { return $2; }
2194static unsigned long int ulongval () { return $2; }
2195#include <stdio.h>
2196#include <stdlib.h>
2197int
2198main ()
2199{
2200
2201 FILE *f = fopen ("conftest.val", "w");
2202 if (! f)
2203 return 1;
2204 if (($2) < 0)
2205 {
2206 long int i = longval ();
2207 if (i != ($2))
2208 return 1;
2209 fprintf (f, "%ld", i);
2210 }
2211 else
2212 {
2213 unsigned long int i = ulongval ();
2214 if (i != ($2))
2215 return 1;
2216 fprintf (f, "%lu", i);
2217 }
2218 /* Do not output a trailing newline, as this causes \r\n confusion
2219 on some platforms. */
2220 return ferror (f) || fclose (f) != 0;
2221
2222 ;
2223 return 0;
2224}
2225_ACEOF
2226if ac_fn_c_try_run "$LINENO"; then :
2227 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2228else
2229 ac_retval=1
2230fi
2231rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2232 conftest.$ac_objext conftest.beam conftest.$ac_ext
2233rm -f conftest.val
2234
2235 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002236 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002237 as_fn_set_status $ac_retval
2238
2239} # ac_fn_c_compute_int
2240
2241# ac_fn_c_check_func LINENO FUNC VAR
2242# ----------------------------------
2243# Tests whether FUNC exists, setting the cache variable VAR accordingly
2244ac_fn_c_check_func ()
2245{
2246 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2247 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2248$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002249if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002250 $as_echo_n "(cached) " >&6
2251else
2252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2253/* end confdefs.h. */
2254/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2255 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2256#define $2 innocuous_$2
2257
2258/* System header to define __stub macros and hopefully few prototypes,
2259 which can conflict with char $2 (); below.
2260 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2261 <limits.h> exists even on freestanding compilers. */
2262
2263#ifdef __STDC__
2264# include <limits.h>
2265#else
2266# include <assert.h>
2267#endif
2268
2269#undef $2
2270
2271/* Override any GCC internal prototype to avoid an error.
2272 Use char because int might match the return type of a GCC
2273 builtin and then its argument prototype would still apply. */
2274#ifdef __cplusplus
2275extern "C"
2276#endif
2277char $2 ();
2278/* The GNU C library defines this for functions which it implements
2279 to always fail with ENOSYS. Some functions are actually named
2280 something starting with __ and the normal name is an alias. */
2281#if defined __stub_$2 || defined __stub___$2
2282choke me
2283#endif
2284
2285int
2286main ()
2287{
2288return $2 ();
2289 ;
2290 return 0;
2291}
2292_ACEOF
2293if ac_fn_c_try_link "$LINENO"; then :
2294 eval "$3=yes"
2295else
2296 eval "$3=no"
2297fi
2298rm -f core conftest.err conftest.$ac_objext \
2299 conftest$ac_exeext conftest.$ac_ext
2300fi
2301eval ac_res=\$$3
2302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2303$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002304 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002305
2306} # ac_fn_c_check_func
2307
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002308# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2309# ---------------------------------------------
2310# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2311# accordingly.
2312ac_fn_c_check_decl ()
2313{
2314 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2315 as_decl_name=`echo $2|sed 's/ *(.*//'`
2316 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2317 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2318$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2319if eval \${$3+:} false; then :
2320 $as_echo_n "(cached) " >&6
2321else
2322 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2323/* end confdefs.h. */
2324$4
2325int
2326main ()
2327{
2328#ifndef $as_decl_name
2329#ifdef __cplusplus
2330 (void) $as_decl_use;
2331#else
2332 (void) $as_decl_name;
2333#endif
2334#endif
2335
2336 ;
2337 return 0;
2338}
2339_ACEOF
2340if ac_fn_c_try_compile "$LINENO"; then :
2341 eval "$3=yes"
2342else
2343 eval "$3=no"
2344fi
2345rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2346fi
2347eval ac_res=\$$3
2348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2349$as_echo "$ac_res" >&6; }
2350 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2351
2352} # ac_fn_c_check_decl
2353
Matthias Kloseb9621712010-04-24 17:59:49 +00002354# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2355# ----------------------------------------------------
2356# Tries to find if the field MEMBER exists in type AGGR, after including
2357# INCLUDES, setting cache variable VAR accordingly.
2358ac_fn_c_check_member ()
2359{
2360 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2361 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2362$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002363if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002364 $as_echo_n "(cached) " >&6
2365else
2366 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2367/* end confdefs.h. */
2368$5
2369int
2370main ()
2371{
2372static $2 ac_aggr;
2373if (ac_aggr.$3)
2374return 0;
2375 ;
2376 return 0;
2377}
2378_ACEOF
2379if ac_fn_c_try_compile "$LINENO"; then :
2380 eval "$4=yes"
2381else
2382 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2383/* end confdefs.h. */
2384$5
2385int
2386main ()
2387{
2388static $2 ac_aggr;
2389if (sizeof ac_aggr.$3)
2390return 0;
2391 ;
2392 return 0;
2393}
2394_ACEOF
2395if ac_fn_c_try_compile "$LINENO"; then :
2396 eval "$4=yes"
2397else
2398 eval "$4=no"
2399fi
2400rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2401fi
2402rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2403fi
2404eval ac_res=\$$4
2405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2406$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002407 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002408
2409} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002410cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002411This file contains any messages produced by compilers while
2412running configure, to aid debugging if configure makes a mistake.
2413
Georg Brandl08a90122012-09-29 09:34:13 +02002414It was created by python $as_me 3.4, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002415generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002416
2417 $ $0 $@
2418
2419_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002420exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002421{
2422cat <<_ASUNAME
2423## --------- ##
2424## Platform. ##
2425## --------- ##
2426
2427hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2428uname -m = `(uname -m) 2>/dev/null || echo unknown`
2429uname -r = `(uname -r) 2>/dev/null || echo unknown`
2430uname -s = `(uname -s) 2>/dev/null || echo unknown`
2431uname -v = `(uname -v) 2>/dev/null || echo unknown`
2432
2433/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2434/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2435
2436/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2437/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2438/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002439/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002440/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2441/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2442/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2443
2444_ASUNAME
2445
2446as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2447for as_dir in $PATH
2448do
2449 IFS=$as_save_IFS
2450 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002451 $as_echo "PATH: $as_dir"
2452 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002453IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002454
2455} >&5
2456
2457cat >&5 <<_ACEOF
2458
2459
2460## ----------- ##
2461## Core tests. ##
2462## ----------- ##
2463
2464_ACEOF
2465
2466
2467# Keep a trace of the command line.
2468# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002469# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002470# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002471# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002472ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002473ac_configure_args0=
2474ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002475ac_must_keep_next=false
2476for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002477do
Skip Montanaro6dead952003-09-25 14:50:04 +00002478 for ac_arg
2479 do
2480 case $ac_arg in
2481 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2482 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2483 | -silent | --silent | --silen | --sile | --sil)
2484 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002485 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002486 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002487 esac
2488 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002489 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002490 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002491 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002492 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002493 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002494 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002495 case $ac_arg in
2496 *=* | --config-cache | -C | -disable-* | --disable-* \
2497 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2498 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2499 | -with-* | --with-* | -without-* | --without-* | --x)
2500 case "$ac_configure_args0 " in
2501 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2502 esac
2503 ;;
2504 -* ) ac_must_keep_next=true ;;
2505 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002506 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002507 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002508 ;;
2509 esac
2510 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002511done
Matthias Kloseb9621712010-04-24 17:59:49 +00002512{ ac_configure_args0=; unset ac_configure_args0;}
2513{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002514
2515# When interrupted or exit'd, cleanup temporary files, and complete
2516# config.log. We remove comments because anyway the quotes in there
2517# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002518# WARNING: Use '\'' to represent an apostrophe within the trap.
2519# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
Martin v. Löwis11437992002-04-12 09:54:03 +00002520trap 'exit_status=$?
2521 # Save into config.log some information that might help in debugging.
2522 {
2523 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002524
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002525 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002526## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002527## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002528 echo
2529 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002530(
2531 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2532 eval ac_val=\$$ac_var
2533 case $ac_val in #(
2534 *${as_nl}*)
2535 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002536 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2537$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002538 esac
2539 case $ac_var in #(
2540 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002541 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2542 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002543 esac ;;
2544 esac
2545 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002546 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002547 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2548 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002549 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002550 "s/'\''/'\''\\\\'\'''\''/g;
2551 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2552 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002553 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002554 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002555 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002556 esac |
2557 sort
2558)
Martin v. Löwis11437992002-04-12 09:54:03 +00002559 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002560
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002561 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002562## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002563## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002564 echo
2565 for ac_var in $ac_subst_vars
2566 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002567 eval ac_val=\$$ac_var
2568 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002569 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002570 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002571 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002572 done | sort
2573 echo
2574
2575 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002576 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002577## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002578## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002579 echo
2580 for ac_var in $ac_subst_files
2581 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002582 eval ac_val=\$$ac_var
2583 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002584 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002585 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002586 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002587 done | sort
2588 echo
2589 fi
2590
Martin v. Löwis11437992002-04-12 09:54:03 +00002591 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002592 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002593## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002594## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002595 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002596 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002597 echo
2598 fi
2599 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002600 $as_echo "$as_me: caught signal $ac_signal"
2601 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002602 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002603 rm -f core *.core core.conftest.* &&
2604 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002605 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002606' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002607for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002608 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002609done
2610ac_signal=0
2611
2612# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002613rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002614
Matthias Kloseb9621712010-04-24 17:59:49 +00002615$as_echo "/* confdefs.h */" > confdefs.h
2616
Martin v. Löwis11437992002-04-12 09:54:03 +00002617# Predefined preprocessor variables.
2618
2619cat >>confdefs.h <<_ACEOF
2620#define PACKAGE_NAME "$PACKAGE_NAME"
2621_ACEOF
2622
Martin v. Löwis11437992002-04-12 09:54:03 +00002623cat >>confdefs.h <<_ACEOF
2624#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2625_ACEOF
2626
Martin v. Löwis11437992002-04-12 09:54:03 +00002627cat >>confdefs.h <<_ACEOF
2628#define PACKAGE_VERSION "$PACKAGE_VERSION"
2629_ACEOF
2630
Martin v. Löwis11437992002-04-12 09:54:03 +00002631cat >>confdefs.h <<_ACEOF
2632#define PACKAGE_STRING "$PACKAGE_STRING"
2633_ACEOF
2634
Martin v. Löwis11437992002-04-12 09:54:03 +00002635cat >>confdefs.h <<_ACEOF
2636#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2637_ACEOF
2638
Matthias Kloseb9621712010-04-24 17:59:49 +00002639cat >>confdefs.h <<_ACEOF
2640#define PACKAGE_URL "$PACKAGE_URL"
2641_ACEOF
2642
Martin v. Löwis11437992002-04-12 09:54:03 +00002643
2644# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002645# Prefer an explicitly selected file to automatically selected ones.
2646ac_site_file1=NONE
2647ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002648if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002649 # We do not want a PATH search for config.site.
2650 case $CONFIG_SITE in #((
2651 -*) ac_site_file1=./$CONFIG_SITE;;
2652 */*) ac_site_file1=$CONFIG_SITE;;
2653 *) ac_site_file1=./$CONFIG_SITE;;
2654 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002655elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002656 ac_site_file1=$prefix/share/config.site
2657 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002658else
Matthias Kloseb9621712010-04-24 17:59:49 +00002659 ac_site_file1=$ac_default_prefix/share/config.site
2660 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002661fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002662for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002663do
Matthias Kloseb9621712010-04-24 17:59:49 +00002664 test "x$ac_site_file" = xNONE && continue
2665 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2666 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2667$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002668 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002669 . "$ac_site_file" \
2670 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2671$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2672as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002673See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002674 fi
2675done
2676
2677if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002678 # Some versions of bash will fail to source /dev/null (special files
2679 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2680 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2681 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2682$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002683 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002684 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2685 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002686 esac
2687 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002688else
Matthias Kloseb9621712010-04-24 17:59:49 +00002689 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2690$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002691 >$cache_file
2692fi
2693
2694# Check that the precious variables saved in the cache have kept the same
2695# value.
2696ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002697for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002698 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2699 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002700 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2701 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002702 case $ac_old_set,$ac_new_set in
2703 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002704 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2705$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002706 ac_cache_corrupted=: ;;
2707 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002708 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2709$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002710 ac_cache_corrupted=: ;;
2711 ,);;
2712 *)
2713 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002714 # differences in whitespace do not lead to failure.
2715 ac_old_val_w=`echo x $ac_old_val`
2716 ac_new_val_w=`echo x $ac_new_val`
2717 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2718 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2719$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2720 ac_cache_corrupted=:
2721 else
2722 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2723$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2724 eval $ac_var=\$ac_old_val
2725 fi
2726 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2727$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2728 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2729$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002730 fi;;
2731 esac
2732 # Pass precious variables to config.status.
2733 if test "$ac_new_set" = set; then
2734 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002735 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002736 *) ac_arg=$ac_var=$ac_new_val ;;
2737 esac
2738 case " $ac_configure_args " in
2739 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002740 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002741 esac
2742 fi
2743done
2744if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002745 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2746$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2747 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2748$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002749 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002750fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002751## -------------------- ##
2752## Main body of script. ##
2753## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002754
Guido van Rossum7f43da71994-08-01 12:15:30 +00002755ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002756ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002757ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2758ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2759ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002760
Guido van Rossum627b2d71993-12-24 10:39:16 +00002761
Michael W. Hudson54241132001-12-07 15:38:26 +00002762
Trent Nelson4d4ec652012-10-16 08:51:24 -04002763
Trent Nelson5595ab52012-10-17 04:47:31 -04002764if test "$abs_srcdir" != "$abs_builddir"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002765 # If we're building out-of-tree, we need to make sure the following
2766 # resources get picked up before their $srcdir counterparts.
2767 # Objects/ -> typeslots.inc
2768 # Include/ -> Python-ast.h, graminit.h
2769 # Python/ -> importlib.h
2770 # (A side effect of this is that these resources will automatically be
2771 # regenerated when building out-of-tree, regardless of whether or not
2772 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2773 # off.)
2774 BASECPPFLAGS="-IObjects -IInclude -IPython"
2775else
2776 BASECPPFLAGS=""
2777fi
2778
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002779
2780
2781
2782
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002783if test -e $srcdir/.hg/dirstate
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002784then
2785# Extract the first word of "hg", so it can be a program name with args.
2786set dummy hg; ac_word=$2
2787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2788$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002789if ${ac_cv_prog_HAS_HG+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002790 $as_echo_n "(cached) " >&6
2791else
2792 if test -n "$HAS_HG"; then
2793 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
2794else
2795as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2796for as_dir in $PATH
2797do
2798 IFS=$as_save_IFS
2799 test -z "$as_dir" && as_dir=.
2800 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002801 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002802 ac_cv_prog_HAS_HG="found"
2803 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2804 break 2
2805 fi
2806done
2807 done
2808IFS=$as_save_IFS
2809
2810 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
2811fi
2812fi
2813HAS_HG=$ac_cv_prog_HAS_HG
2814if test -n "$HAS_HG"; then
2815 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
2816$as_echo "$HAS_HG" >&6; }
2817else
2818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2819$as_echo "no" >&6; }
2820fi
2821
2822
2823else
2824HAS_HG=no-repository
2825fi
2826if test $HAS_HG = found
2827then
2828 HGVERSION="hg id -i \$(srcdir)"
2829 HGTAG="hg id -t \$(srcdir)"
2830 HGBRANCH="hg id -b \$(srcdir)"
2831else
2832 HGVERSION=""
2833 HGTAG=""
2834 HGBRANCH=""
2835fi
2836
2837
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002838ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002839
2840
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002841ac_aux_dir=
2842for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2843 if test -f "$ac_dir/install-sh"; then
2844 ac_aux_dir=$ac_dir
2845 ac_install_sh="$ac_aux_dir/install-sh -c"
2846 break
2847 elif test -f "$ac_dir/install.sh"; then
2848 ac_aux_dir=$ac_dir
2849 ac_install_sh="$ac_aux_dir/install.sh -c"
2850 break
2851 elif test -f "$ac_dir/shtool"; then
2852 ac_aux_dir=$ac_dir
2853 ac_install_sh="$ac_aux_dir/shtool install -c"
2854 break
2855 fi
2856done
2857if test -z "$ac_aux_dir"; then
2858 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2859fi
2860
2861# These three variables are undocumented and unsupported,
2862# and are intended to be withdrawn in a future Autoconf release.
2863# They can cause serious problems if a builder's source tree is in a directory
2864# whose full name contains unusual characters.
2865ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2866ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2867ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2868
2869
2870# Make sure we can run config.sub.
2871$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2872 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2873
2874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2875$as_echo_n "checking build system type... " >&6; }
2876if ${ac_cv_build+:} false; then :
2877 $as_echo_n "(cached) " >&6
2878else
2879 ac_build_alias=$build_alias
2880test "x$ac_build_alias" = x &&
2881 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2882test "x$ac_build_alias" = x &&
2883 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2884ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2885 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2886
2887fi
2888{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2889$as_echo "$ac_cv_build" >&6; }
2890case $ac_cv_build in
2891*-*-*) ;;
2892*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2893esac
2894build=$ac_cv_build
2895ac_save_IFS=$IFS; IFS='-'
2896set x $ac_cv_build
2897shift
2898build_cpu=$1
2899build_vendor=$2
2900shift; shift
2901# Remember, the first character of IFS is used to create $*,
2902# except with old shells:
2903build_os=$*
2904IFS=$ac_save_IFS
2905case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2906
2907
2908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2909$as_echo_n "checking host system type... " >&6; }
2910if ${ac_cv_host+:} false; then :
2911 $as_echo_n "(cached) " >&6
2912else
2913 if test "x$host_alias" = x; then
2914 ac_cv_host=$ac_cv_build
2915else
2916 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2917 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2918fi
2919
2920fi
2921{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2922$as_echo "$ac_cv_host" >&6; }
2923case $ac_cv_host in
2924*-*-*) ;;
2925*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2926esac
2927host=$ac_cv_host
2928ac_save_IFS=$IFS; IFS='-'
2929set x $ac_cv_host
2930shift
2931host_cpu=$1
2932host_vendor=$2
2933shift; shift
2934# Remember, the first character of IFS is used to create $*,
2935# except with old shells:
2936host_os=$*
2937IFS=$ac_save_IFS
2938case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2939
2940
2941
doko@python.orga10e4a92013-01-25 18:45:12 +01002942
2943
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002944if test "$cross_compiling" = yes; then
2945 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2946$as_echo_n "checking for python interpreter for cross build... " >&6; }
2947 if test -z "$PYTHON_FOR_BUILD"; then
2948 for interp in python$PACKAGE_VERSION python3 python; do
2949 which $interp >/dev/null 2>&1 || continue
2950 if $interp -c 'import sys;sys.exit(not sys.version_info[:2] >= (3,3))'; then
2951 break
2952 fi
2953 interp=
2954 done
2955 if test x$interp = x; then
2956 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2957 fi
2958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2959$as_echo "$interp" >&6; }
doko@python.org244b6872013-01-26 12:08:25 +01002960 PYTHON_FOR_BUILD='_PYTHON_PROJECT_BASE=$(abs_builddir) _PYTHON_HOST_PLATFORM=$(_PYTHON_HOST_PLATFORM) PYTHONPATH=$(shell test -f pybuilddir.txt && echo $(abs_builddir)/`cat pybuilddir.txt`:)$(srcdir)/Lib:$(srcdir)/Lib/$(PLATDIR) '$interp
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002961 fi
Christian Heimes954ac032012-12-12 13:10:21 +01002962elif test "$cross_compiling" = maybe; then
2963 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002964else
2965 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2966fi
2967
2968
Martin v. Löwis11437992002-04-12 09:54:03 +00002969
Benjamin Petersond23f8222009-04-05 19:13:16 +00002970if test "$prefix" != "/"; then
2971 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2972fi
2973
2974
Martin v. Löwis11437992002-04-12 09:54:03 +00002975
2976
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002977# We don't use PACKAGE_ variables, and they cause conflicts
2978# with other autoconf-based packages that include Python.h
2979grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2980rm confdefs.h
2981mv confdefs.h.new confdefs.h
2982
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002983
Georg Brandl08a90122012-09-29 09:34:13 +02002984VERSION=3.4
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002985
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002986# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002987
2988SOVERSION=1.0
2989
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002990# The later defininition of _XOPEN_SOURCE disables certain features
2991# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2992
Matthias Kloseb9621712010-04-24 17:59:49 +00002993$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002994
2995
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002996# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2997# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2998# them.
2999
Matthias Kloseb9621712010-04-24 17:59:49 +00003000$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00003001
3002
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003003# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3004# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
3005# them.
3006
Matthias Kloseb9621712010-04-24 17:59:49 +00003007$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00003008
3009
Martin v. Löwisd6320502004-08-12 13:45:08 +00003010# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3011# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
3012
Matthias Kloseb9621712010-04-24 17:59:49 +00003013$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00003014
3015
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003016# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3017# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
3018# them.
3019
Matthias Kloseb9621712010-04-24 17:59:49 +00003020$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003021
3022
3023
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003024define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003025
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003026# Arguments passed to configure.
3027
3028CONFIG_ARGS="$ac_configure_args"
3029
Matthias Kloseb9621712010-04-24 17:59:49 +00003030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3031$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003032# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003033if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003034 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003035 case $enableval in
3036 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07003037 # Locate the best usable SDK, see Mac/README.txt for more
3038 # information
3039 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
Ned Deily87adb6e2013-10-18 21:09:56 -07003040 if ! ( echo $enableval | grep -E '\.sdk' 1>/dev/null )
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003041 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003042 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3043 if test ! -d "${enableval}"
3044 then
3045 enableval=/
3046 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003047 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003048 ;;
3049 esac
3050 case $enableval in
3051 no)
3052 UNIVERSALSDK=
3053 enable_universalsdk=
3054 ;;
3055 *)
3056 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003057 if test ! -d "${UNIVERSALSDK}"
3058 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003059 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003060 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003061 ;;
3062 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003063
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003064
Thomas Wouters477c8d52006-05-27 19:21:47 +00003065else
3066
3067 UNIVERSALSDK=
3068 enable_universalsdk=
3069
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003070fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003071
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003072if test -n "${UNIVERSALSDK}"
3073then
Matthias Kloseb9621712010-04-24 17:59:49 +00003074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3075$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003076else
Matthias Kloseb9621712010-04-24 17:59:49 +00003077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3078$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003079fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003080
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003081
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003082
Ned Deily87adb6e2013-10-18 21:09:56 -07003083ARCH_RUN_32BIT=""
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003084
Ned Deilycbfb9a52012-06-23 16:02:19 -07003085# For backward compatibility reasons we prefer to select '32-bit' if available,
3086# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003087UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003088if test "`uname -s`" = "Darwin"
3089then
3090 if test -n "${UNIVERSALSDK}"
3091 then
Ned Deily87adb6e2013-10-18 21:09:56 -07003092 if test -z "`/usr/bin/file -L "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003093 then
3094 UNIVERSAL_ARCHS="intel"
3095 fi
3096 fi
3097fi
3098
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003099
Matthias Kloseb9621712010-04-24 17:59:49 +00003100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3101$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003102
3103# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003104if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003105 withval=$with_universal_archs;
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003106 UNIVERSAL_ARCHS="$withval"
3107
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003108fi
3109
Ned Deily87adb6e2013-10-18 21:09:56 -07003110if test -n "${UNIVERSALSDK}"
3111then
3112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3113$as_echo "${UNIVERSAL_ARCHS}" >&6; }
3114else
3115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3116$as_echo "no" >&6; }
3117fi
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003118
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003119
3120# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003121if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003122 withval=$with_framework_name;
3123 PYTHONFRAMEWORK=${withval}
3124 PYTHONFRAMEWORKDIR=${withval}.framework
3125 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3126
3127else
3128
3129 PYTHONFRAMEWORK=Python
3130 PYTHONFRAMEWORKDIR=Python.framework
3131 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3132
3133fi
3134
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003135# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003136if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003137 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003138 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003139 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003140 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003141 esac
3142 case $enableval in
3143 no)
3144 PYTHONFRAMEWORK=
3145 PYTHONFRAMEWORKDIR=no-framework
3146 PYTHONFRAMEWORKPREFIX=
3147 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003148 FRAMEWORKINSTALLFIRST=
3149 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003150 FRAMEWORKALTINSTALLFIRST=
3151 FRAMEWORKALTINSTALLLAST=
3152 if test "x${prefix}" = "xNONE"; then
3153 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3154 else
3155 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3156 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003157 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003158 ;;
3159 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003160 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003161 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003162 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003163 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003164 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3165 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003166 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003167
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003168 if test "x${prefix}" = "xNONE" ; then
3169 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003170
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003171 else
3172 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3173 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003174
3175 case "${enableval}" in
3176 /System*)
3177 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3178 if test "${prefix}" = "NONE" ; then
3179 # See below
3180 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3181 fi
3182 ;;
3183
3184 /Library*)
3185 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3186 ;;
3187
3188 */Library/Frameworks)
3189 MDIR="`dirname "${enableval}"`"
3190 MDIR="`dirname "${MDIR}"`"
3191 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3192
3193 if test "${prefix}" = "NONE"; then
3194 # User hasn't specified the
3195 # --prefix option, but wants to install
3196 # the framework in a non-default location,
3197 # ensure that the compatibility links get
3198 # installed relative to that prefix as well
3199 # instead of in /usr/local.
3200 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3201 fi
3202 ;;
3203
3204 *)
3205 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3206 ;;
3207 esac
3208
Jack Jansen127e56e2001-09-11 14:41:54 +00003209 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003210
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003211 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003212 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003213 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003214
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003215 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003216
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003217 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3218
3219 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3220
Jack Jansene578a632001-08-15 01:27:14 +00003221 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003222
Guido van Rossum563e7081996-09-10 18:20:48 +00003223else
Martin v. Löwis11437992002-04-12 09:54:03 +00003224
Jack Jansene578a632001-08-15 01:27:14 +00003225 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003226 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003227 PYTHONFRAMEWORKPREFIX=
3228 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003229 FRAMEWORKINSTALLFIRST=
3230 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003231 FRAMEWORKALTINSTALLFIRST=
3232 FRAMEWORKALTINSTALLLAST=
3233 if test "x${prefix}" = "xNONE" ; then
3234 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3235 else
3236 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3237 fi
Jack Jansene578a632001-08-15 01:27:14 +00003238 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003239
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003240
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003241fi
3242
Thomas Wouters477c8d52006-05-27 19:21:47 +00003243
3244
Michael W. Hudson54241132001-12-07 15:38:26 +00003245
3246
3247
3248
Jack Jansene578a632001-08-15 01:27:14 +00003249
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003250
3251
3252
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003253
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003254
Jack Jansene578a632001-08-15 01:27:14 +00003255##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003256## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003257## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003258##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003259# Set name for machine-dependent library files
3260
Matthias Kloseb9621712010-04-24 17:59:49 +00003261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3262$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003263if test -z "$MACHDEP"
3264then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003265 # avoid using uname for cross builds
3266 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003267 # ac_sys_system and ac_sys_release are used for setting
3268 # a lot of different things including 'define_xopen_source'
3269 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003270 case "$host" in
3271 *-*-linux*)
3272 ac_sys_system=Linux
3273 ;;
3274 *-*-cygwin*)
3275 ac_sys_system=Cygwin
3276 ;;
3277 *)
3278 # for now, limit cross builds to known configurations
3279 MACHDEP="unknown"
3280 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3281 esac
3282 ac_sys_release=
3283 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003284 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003285 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003286 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003287 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003288 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003289 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003290 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003291 fi
3292 ac_md_system=`echo $ac_sys_system |
3293 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3294 ac_md_release=`echo $ac_sys_release |
3295 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3296 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003297
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003298 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003299 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003300 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003301 darwin*) MACHDEP="darwin";;
doko@ubuntu.comba015832012-06-30 16:52:05 +02003302 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003303 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003304 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003305fi
Guido van Rossum91922671997-10-09 20:24:13 +00003306
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003307
3308if test "$cross_compiling" = yes; then
3309 case "$host" in
3310 *-*-linux*)
3311 case "$host_cpu" in
3312 arm*)
3313 _host_cpu=arm
3314 ;;
3315 *)
3316 _host_cpu=$host_cpu
3317 esac
3318 ;;
3319 *-*-cygwin*)
3320 _host_cpu=
3321 ;;
3322 *)
3323 # for now, limit cross builds to known configurations
3324 MACHDEP="unknown"
3325 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3326 esac
3327 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3328fi
3329
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003330# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3331# disable features if it is defined, without any means to access these
3332# features as extensions. For these systems, we skip the definition of
3333# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3334# some feature, make sure there is no alternative way to access this
3335# feature. Also, when using wildcards, make sure you have verified the
3336# need for not defining _XOPEN_SOURCE on all systems matching the
3337# wildcard, and that the wildcard does not include future systems
3338# (which may remove their limitations).
3339case $ac_sys_system/$ac_sys_release in
3340 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3341 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003342 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003343 # In addition, Stefan Krah confirms that issue #1244610 exists through
3344 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003345 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003346 define_xopen_source=no
3347 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3348 # also defined. This can be overridden by defining _BSD_SOURCE
3349 # As this has a different meaning on Linux, only define it on OpenBSD
3350
Matthias Kloseb9621712010-04-24 17:59:49 +00003351$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003352
3353 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003354 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003355 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3356 # also defined. This can be overridden by defining _BSD_SOURCE
3357 # As this has a different meaning on Linux, only define it on OpenBSD
3358
Matthias Kloseb9621712010-04-24 17:59:49 +00003359$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003360
3361 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003362 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3363 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3364 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003365 NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6[A-S])
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003366 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003367 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3368 # request to enable features supported by the standard as a request
3369 # to disable features not supported by the standard. The best way
3370 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3371 # entirely and define __EXTENSIONS__ instead.
3372 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003373 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003374 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3375 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003376 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003377 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003378 define_xopen_source=no;;
3379 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003380 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003381 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003382 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003383 # On FreeBSD 4, the math functions C89 does not cover are never defined
3384 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3385 FreeBSD/4.*)
3386 define_xopen_source=no;;
3387 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3388 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3389 # identifies itself as Darwin/7.*
3390 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3391 # disables platform specific features beyond repair.
3392 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3393 # has no effect, don't bother defining them
3394 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003395 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003396 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003397 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003398 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3399 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3400 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003401 AIX/4)
3402 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003403 AIX/5)
3404 if test `uname -r` -eq 1; then
3405 define_xopen_source=no
3406 fi
3407 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003408 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3409 # defining NI_NUMERICHOST.
3410 QNX/6.3.2)
3411 define_xopen_source=no
3412 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003413
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003414esac
3415
3416if test $define_xopen_source = yes
3417then
Victor Stinner14d098d2011-09-07 22:29:43 +02003418 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003419
Victor Stinner14d098d2011-09-07 22:29:43 +02003420$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003421
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003422
3423 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3424 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3425 # several APIs are not declared. Since this is also needed in some
3426 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003427
Matthias Kloseb9621712010-04-24 17:59:49 +00003428$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003429
3430
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003431
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003432$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003433
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003434fi
3435
Guido van Rossum91922671997-10-09 20:24:13 +00003436#
3437# SGI compilers allow the specification of the both the ABI and the
3438# ISA on the command line. Depending on the values of these switches,
3439# different and often incompatable code will be generated.
3440#
3441# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3442# thus supply support for various ABI/ISA combinations. The MACHDEP
3443# variable is also adjusted.
3444#
3445
3446if test ! -z "$SGI_ABI"
3447then
3448 CC="cc $SGI_ABI"
3449 LDFLAGS="$SGI_ABI $LDFLAGS"
3450 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3451fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003452{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3453$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003454
Jack Jansen6b08a402004-06-03 12:41:45 +00003455# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3456# it may influence the way we can build extensions, so distutils
3457# needs to check it
3458
Thomas Wouters477c8d52006-05-27 19:21:47 +00003459
Jack Jansen6b08a402004-06-03 12:41:45 +00003460CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003461EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003462
Guido van Rossum627b2d71993-12-24 10:39:16 +00003463# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003464
3465# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3466# for debug/optimization stuff. BASECFLAGS is for flags that are required
3467# just to get things to compile and link. Users are free to override OPT
3468# when running configure or make. The build should not break if they do.
3469# BASECFLAGS should generally not be messed with, however.
3470
3471# XXX shouldn't some/most/all of this code be merged with the stuff later
3472# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3474$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003475
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003476# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003477if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003478 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003479 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003480 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003481 without_gcc=yes;;
3482 yes) CC=gcc
3483 without_gcc=no;;
3484 *) CC=$withval
3485 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003486 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003487else
Martin v. Löwis11437992002-04-12 09:54:03 +00003488
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003489 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003490 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003491 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003492 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003493 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003494fi
3495
Matthias Kloseb9621712010-04-24 17:59:49 +00003496{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3497$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003498
Guido van Rossum8b131c51995-03-09 14:10:13 +00003499# If the user switches compilers, we can't believe the cache
3500if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3501then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003502 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003503(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003504fi
3505
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003506# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3507# when the compiler supports them, but we don't always want -O2, and
3508# we set -g later.
3509if test -z "$CFLAGS"; then
3510 CFLAGS=
3511fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003512
3513if test "$ac_sys_system" = "Darwin"
3514then
3515 # Compiler selection on MacOSX is more complicated than
3516 # AC_PROG_CC can handle, see Mac/README.txt for more
3517 # information
3518 if test -z "${CC}"
3519 then
3520 found_gcc=
3521 found_clang=
3522 as_save_IFS=$IFS; IFS=:
3523 for as_dir in $PATH
3524 do
3525 IFS=$as_save_IFS
3526 if test -x $as_dir/gcc; then
3527 if test -z "${found_gcc}"; then
3528 found_gcc=$as_dir/gcc
3529 fi
3530 fi
3531 if test -x $as_dir/clang; then
3532 if test -z "${found_clang}"; then
3533 found_clang=$as_dir/clang
3534 fi
3535 fi
3536 done
3537 IFS=$as_save_IFS
3538
3539 if test -n "$found_gcc" -a -n "$found_clang"
3540 then
3541 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3542 then
3543 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3544$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3545 CC="$found_clang"
3546 CXX="$found_clang++"
3547 fi
3548
3549
3550 elif test -z "$found_gcc" -a -n "$found_clang"
3551 then
3552 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3553$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3554 CC="$found_clang"
3555 CXX="$found_clang++"
3556
3557 elif test -z "$found_gcc" -a -z "$found_clang"
3558 then
3559 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3560 if test -n "${found_clang}"
3561 then
3562 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3563$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3564 CC="${found_clang}"
3565 CXX="`/usr/bin/xcrun -find clang++`"
3566
3567 # else: use default behaviour
3568 fi
3569 fi
3570 fi
3571fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003572ac_ext=c
3573ac_cpp='$CPP $CPPFLAGS'
3574ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3575ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3576ac_compiler_gnu=$ac_cv_c_compiler_gnu
3577if test -n "$ac_tool_prefix"; then
3578 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3579set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3581$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003582if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003583 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003584else
3585 if test -n "$CC"; then
3586 ac_cv_prog_CC="$CC" # Let the user override the test.
3587else
Martin v. Löwis11437992002-04-12 09:54:03 +00003588as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3589for as_dir in $PATH
3590do
3591 IFS=$as_save_IFS
3592 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003593 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003594 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003595 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003596 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003597 break 2
3598 fi
3599done
Matthias Kloseb9621712010-04-24 17:59:49 +00003600 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003601IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003602
Jack Jansendd19cf82001-12-06 22:36:17 +00003603fi
3604fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003605CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003606if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3608$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003609else
Matthias Kloseb9621712010-04-24 17:59:49 +00003610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3611$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003612fi
3613
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003614
Martin v. Löwis11437992002-04-12 09:54:03 +00003615fi
3616if test -z "$ac_cv_prog_CC"; then
3617 ac_ct_CC=$CC
3618 # Extract the first word of "gcc", so it can be a program name with args.
3619set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3621$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003622if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003623 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003624else
3625 if test -n "$ac_ct_CC"; then
3626 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3627else
3628as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3629for as_dir in $PATH
3630do
3631 IFS=$as_save_IFS
3632 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003633 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003634 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003635 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003636 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003637 break 2
3638 fi
3639done
Matthias Kloseb9621712010-04-24 17:59:49 +00003640 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003641IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003642
3643fi
3644fi
3645ac_ct_CC=$ac_cv_prog_ac_ct_CC
3646if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3648$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003649else
Matthias Kloseb9621712010-04-24 17:59:49 +00003650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3651$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003652fi
3653
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003654 if test "x$ac_ct_CC" = x; then
3655 CC=""
3656 else
3657 case $cross_compiling:$ac_tool_warned in
3658yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003659{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3660$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003661ac_tool_warned=yes ;;
3662esac
3663 CC=$ac_ct_CC
3664 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003665else
3666 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003667fi
3668
Jack Jansendd19cf82001-12-06 22:36:17 +00003669if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003670 if test -n "$ac_tool_prefix"; then
3671 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
Martin v. Löwis11437992002-04-12 09:54:03 +00003672set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3674$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003675if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003676 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003677else
3678 if test -n "$CC"; then
3679 ac_cv_prog_CC="$CC" # Let the user override the test.
3680else
Martin v. Löwis11437992002-04-12 09:54:03 +00003681as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3682for as_dir in $PATH
3683do
3684 IFS=$as_save_IFS
3685 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003686 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003687 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003688 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003689 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003690 break 2
3691 fi
3692done
Matthias Kloseb9621712010-04-24 17:59:49 +00003693 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003694IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003695
3696fi
3697fi
3698CC=$ac_cv_prog_CC
3699if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3701$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003702else
Matthias Kloseb9621712010-04-24 17:59:49 +00003703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3704$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003705fi
3706
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003707
Martin v. Löwis11437992002-04-12 09:54:03 +00003708 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003709fi
3710if test -z "$CC"; then
3711 # Extract the first word of "cc", so it can be a program name with args.
3712set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3714$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003715if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003716 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003717else
3718 if test -n "$CC"; then
3719 ac_cv_prog_CC="$CC" # Let the user override the test.
3720else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003721 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003722as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3723for as_dir in $PATH
3724do
3725 IFS=$as_save_IFS
3726 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003727 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003728 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003729 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3730 ac_prog_rejected=yes
3731 continue
3732 fi
3733 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003734 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003735 break 2
3736 fi
3737done
Matthias Kloseb9621712010-04-24 17:59:49 +00003738 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003739IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003740
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003741if test $ac_prog_rejected = yes; then
3742 # We found a bogon in the path, so make sure we never use it.
3743 set dummy $ac_cv_prog_CC
3744 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003745 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003746 # We chose a different compiler from the bogus one.
3747 # However, it has the same basename, so the bogon will be chosen
3748 # first if we set CC to just the basename; use the full file name.
3749 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003750 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003751 fi
3752fi
3753fi
3754fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003755CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003756if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3758$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003759else
Matthias Kloseb9621712010-04-24 17:59:49 +00003760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3761$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003762fi
3763
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003764
Martin v. Löwis11437992002-04-12 09:54:03 +00003765fi
3766if test -z "$CC"; then
3767 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003768 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003769 do
3770 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3771set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3773$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003774if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003775 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003776else
3777 if test -n "$CC"; then
3778 ac_cv_prog_CC="$CC" # Let the user override the test.
3779else
Martin v. Löwis11437992002-04-12 09:54:03 +00003780as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3781for as_dir in $PATH
3782do
3783 IFS=$as_save_IFS
3784 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003785 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003786 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003787 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003788 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003789 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003790 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003791done
Matthias Kloseb9621712010-04-24 17:59:49 +00003792 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003793IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003794
3795fi
3796fi
3797CC=$ac_cv_prog_CC
3798if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3800$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003801else
Matthias Kloseb9621712010-04-24 17:59:49 +00003802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3803$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003804fi
3805
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003806
Martin v. Löwis11437992002-04-12 09:54:03 +00003807 test -n "$CC" && break
3808 done
3809fi
3810if test -z "$CC"; then
3811 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003812 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003813do
3814 # Extract the first word of "$ac_prog", so it can be a program name with args.
3815set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3817$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003818if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003819 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003820else
3821 if test -n "$ac_ct_CC"; then
3822 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3823else
3824as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3825for as_dir in $PATH
3826do
3827 IFS=$as_save_IFS
3828 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003829 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003830 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003831 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003832 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003833 break 2
3834 fi
3835done
Matthias Kloseb9621712010-04-24 17:59:49 +00003836 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003837IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003838
Martin v. Löwis11437992002-04-12 09:54:03 +00003839fi
3840fi
3841ac_ct_CC=$ac_cv_prog_ac_ct_CC
3842if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3844$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003845else
Matthias Kloseb9621712010-04-24 17:59:49 +00003846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3847$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003848fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003849
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003850
Martin v. Löwis11437992002-04-12 09:54:03 +00003851 test -n "$ac_ct_CC" && break
3852done
Michael W. Hudson54241132001-12-07 15:38:26 +00003853
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003854 if test "x$ac_ct_CC" = x; then
3855 CC=""
3856 else
3857 case $cross_compiling:$ac_tool_warned in
3858yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003859{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3860$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003861ac_tool_warned=yes ;;
3862esac
3863 CC=$ac_ct_CC
3864 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003865fi
3866
3867fi
3868
3869
Matthias Kloseb9621712010-04-24 17:59:49 +00003870test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3871$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003872as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003873See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003874
3875# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003876$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3877set X $ac_compile
3878ac_compiler=$2
3879for ac_option in --version -v -V -qversion; do
3880 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003881case "(($ac_try" in
3882 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3883 *) ac_try_echo=$ac_try;;
3884esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003885eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3886$as_echo "$ac_try_echo"; } >&5
3887 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003888 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003889 if test -s conftest.err; then
3890 sed '10a\
3891... rest of stderr output deleted ...
3892 10q' conftest.err >conftest.er1
3893 cat conftest.er1 >&5
3894 fi
3895 rm -f conftest.er1 conftest.err
3896 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3897 test $ac_status = 0; }
3898done
Martin v. Löwis11437992002-04-12 09:54:03 +00003899
Matthias Kloseb9621712010-04-24 17:59:49 +00003900cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003901/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003902
Martin v. Löwis11437992002-04-12 09:54:03 +00003903int
3904main ()
3905{
3906
3907 ;
3908 return 0;
3909}
3910_ACEOF
3911ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003912ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003913# Try to create an executable without -o first, disregard a.out.
3914# It will help us diagnose broken compilers, and finding out an intuition
3915# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3917$as_echo_n "checking whether the C compiler works... " >&6; }
3918ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3919
3920# The possible output files:
3921ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3922
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003923ac_rmfiles=
3924for ac_file in $ac_files
3925do
3926 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003927 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003928 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3929 esac
3930done
3931rm -f $ac_rmfiles
3932
Matthias Kloseb9621712010-04-24 17:59:49 +00003933if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003934case "(($ac_try" in
3935 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3936 *) ac_try_echo=$ac_try;;
3937esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003938eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3939$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003940 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003941 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003942 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3943 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003944 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3945# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3946# in a Makefile. We should not override ac_cv_exeext if it was cached,
3947# so that the user can short-circuit this test for compilers unknown to
3948# Autoconf.
3949for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003950do
3951 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003952 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003953 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003954 ;;
3955 [ab].out )
3956 # We found the default executable, but exeext='' is most
3957 # certainly right.
3958 break;;
3959 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003960 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003961 then :; else
3962 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3963 fi
3964 # We set ac_cv_exeext here because the later test for it is not
3965 # safe: cross compilers may not add the suffix if given an `-o'
3966 # argument, so we may need to know it at that point already.
3967 # Even if this section looks crufty: it has the advantage of
3968 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003969 break;;
3970 * )
3971 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003972 esac
3973done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003974test "$ac_cv_exeext" = no && ac_cv_exeext=
3975
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003976else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003977 ac_file=''
3978fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003979if test -z "$ac_file"; then :
3980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3981$as_echo "no" >&6; }
3982$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003983sed 's/^/| /' conftest.$ac_ext >&5
3984
Matthias Kloseb9621712010-04-24 17:59:49 +00003985{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3986$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003987as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02003988See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003989else
3990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3991$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003992fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3994$as_echo_n "checking for C compiler default output file name... " >&6; }
3995{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3996$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003997ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003998
Matthias Kloseb9621712010-04-24 17:59:49 +00003999rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004000ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00004001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4002$as_echo_n "checking for suffix of executables... " >&6; }
4003if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004004case "(($ac_try" in
4005 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4006 *) ac_try_echo=$ac_try;;
4007esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004008eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4009$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004010 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004011 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004012 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4013 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004014 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4015# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4016# work properly (i.e., refer to `conftest.exe'), while it won't with
4017# `rm'.
4018for ac_file in conftest.exe conftest conftest.*; do
4019 test -f "$ac_file" || continue
4020 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004021 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004022 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4023 break;;
4024 * ) break;;
4025 esac
4026done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004027else
Matthias Kloseb9621712010-04-24 17:59:49 +00004028 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4029$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004030as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004031See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004032fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004033rm -f conftest conftest$ac_cv_exeext
4034{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4035$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004036
4037rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004038EXEEXT=$ac_cv_exeext
4039ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004040cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4041/* end confdefs.h. */
4042#include <stdio.h>
4043int
4044main ()
4045{
4046FILE *f = fopen ("conftest.out", "w");
4047 return ferror (f) || fclose (f) != 0;
4048
4049 ;
4050 return 0;
4051}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004052_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004053ac_clean_files="$ac_clean_files conftest.out"
4054# Check that the compiler produces executables we can run. If not, either
4055# the compiler is broken, or we cross compile.
4056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4057$as_echo_n "checking whether we are cross compiling... " >&6; }
4058if test "$cross_compiling" != yes; then
4059 { { ac_try="$ac_link"
4060case "(($ac_try" in
4061 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4062 *) ac_try_echo=$ac_try;;
4063esac
4064eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4065$as_echo "$ac_try_echo"; } >&5
4066 (eval "$ac_link") 2>&5
4067 ac_status=$?
4068 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4069 test $ac_status = 0; }
4070 if { ac_try='./conftest$ac_cv_exeext'
4071 { { case "(($ac_try" in
4072 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4073 *) ac_try_echo=$ac_try;;
4074esac
4075eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4076$as_echo "$ac_try_echo"; } >&5
4077 (eval "$ac_try") 2>&5
4078 ac_status=$?
4079 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4080 test $ac_status = 0; }; }; then
4081 cross_compiling=no
4082 else
4083 if test "$cross_compiling" = maybe; then
4084 cross_compiling=yes
4085 else
4086 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4087$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004088as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004089If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004090See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004091 fi
4092 fi
4093fi
4094{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4095$as_echo "$cross_compiling" >&6; }
4096
4097rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4098ac_clean_files=$ac_clean_files_save
4099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4100$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004101if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004102 $as_echo_n "(cached) " >&6
4103else
4104 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004105/* end confdefs.h. */
4106
4107int
4108main ()
4109{
4110
4111 ;
4112 return 0;
4113}
4114_ACEOF
4115rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004116if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004117case "(($ac_try" in
4118 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4119 *) ac_try_echo=$ac_try;;
4120esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004121eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4122$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004123 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004124 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004125 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4126 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004127 for ac_file in conftest.o conftest.obj conftest.*; do
4128 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004129 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004130 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004131 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4132 break;;
4133 esac
4134done
4135else
Matthias Kloseb9621712010-04-24 17:59:49 +00004136 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004137sed 's/^/| /' conftest.$ac_ext >&5
4138
Matthias Kloseb9621712010-04-24 17:59:49 +00004139{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4140$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004141as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004142See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004143fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004144rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004145fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004146{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4147$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004148OBJEXT=$ac_cv_objext
4149ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4151$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004152if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004153 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004154else
Matthias Kloseb9621712010-04-24 17:59:49 +00004155 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004156/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004157
Martin v. Löwis11437992002-04-12 09:54:03 +00004158int
4159main ()
4160{
4161#ifndef __GNUC__
4162 choke me
4163#endif
4164
4165 ;
4166 return 0;
4167}
4168_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004169if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004170 ac_compiler_gnu=yes
4171else
Matthias Kloseb9621712010-04-24 17:59:49 +00004172 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004173fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004174rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004175ac_cv_c_compiler_gnu=$ac_compiler_gnu
4176
4177fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004178{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4179$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4180if test $ac_compiler_gnu = yes; then
4181 GCC=yes
4182else
4183 GCC=
4184fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004185ac_test_CFLAGS=${CFLAGS+set}
4186ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4188$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004189if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004190 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004191else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004192 ac_save_c_werror_flag=$ac_c_werror_flag
4193 ac_c_werror_flag=yes
4194 ac_cv_prog_cc_g=no
4195 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004196 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004197/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004198
Martin v. Löwis11437992002-04-12 09:54:03 +00004199int
4200main ()
4201{
4202
4203 ;
4204 return 0;
4205}
4206_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004207if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004208 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004209else
Matthias Kloseb9621712010-04-24 17:59:49 +00004210 CFLAGS=""
4211 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004212/* end confdefs.h. */
4213
4214int
4215main ()
4216{
4217
4218 ;
4219 return 0;
4220}
4221_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004222if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004223
Matthias Kloseb9621712010-04-24 17:59:49 +00004224else
4225 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004226 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004227 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004228/* end confdefs.h. */
4229
4230int
4231main ()
4232{
4233
4234 ;
4235 return 0;
4236}
4237_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004238if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004239 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004240fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004241rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004242fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004243rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4244fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004245rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4246 ac_c_werror_flag=$ac_save_c_werror_flag
4247fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004248{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4249$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004250if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004251 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004252elif test $ac_cv_prog_cc_g = yes; then
4253 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004254 CFLAGS="-g -O2"
4255 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004256 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004257 fi
4258else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004259 if test "$GCC" = yes; then
4260 CFLAGS="-O2"
4261 else
4262 CFLAGS=
4263 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004264fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4266$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004267if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004268 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004269else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004270 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004271ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004272cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004273/* end confdefs.h. */
4274#include <stdarg.h>
4275#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004276struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004277/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4278struct buf { int x; };
4279FILE * (*rcsopen) (struct buf *, struct stat *, int);
4280static char *e (p, i)
4281 char **p;
4282 int i;
4283{
4284 return p[i];
4285}
4286static char *f (char * (*g) (char **, int), char **p, ...)
4287{
4288 char *s;
4289 va_list v;
4290 va_start (v,p);
4291 s = g (p, va_arg (v,int));
4292 va_end (v);
4293 return s;
4294}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004295
4296/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4297 function prototypes and stuff, but not '\xHH' hex character constants.
4298 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004299 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004300 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4301 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004302 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004303int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4304
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004305/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4306 inside strings and character constants. */
4307#define FOO(x) 'x'
4308int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4309
Skip Montanaro6dead952003-09-25 14:50:04 +00004310int test (int i, double x);
4311struct s1 {int (*f) (int a);};
4312struct s2 {int (*f) (double a);};
4313int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4314int argc;
4315char **argv;
4316int
4317main ()
4318{
4319return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4320 ;
4321 return 0;
4322}
4323_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004324for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4325 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004326do
4327 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004328 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004329 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004330fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004331rm -f core conftest.err conftest.$ac_objext
4332 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004333done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004334rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004335CC=$ac_save_CC
4336
4337fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004338# AC_CACHE_VAL
4339case "x$ac_cv_prog_cc_c89" in
4340 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4342$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004343 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4345$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004346 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004347 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4349$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004350esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004351if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004352
Matthias Kloseb9621712010-04-24 17:59:49 +00004353fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004354
Martin v. Löwis11437992002-04-12 09:54:03 +00004355ac_ext=c
4356ac_cpp='$CPP $CPPFLAGS'
4357ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4358ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4359ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004360
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004361
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004362
4363
Matthias Kloseb9621712010-04-24 17:59:49 +00004364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4365$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004366
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004367# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004368if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004369 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004370
4371 case $withval in
4372 no) with_cxx_main=no
4373 MAINCC='$(CC)';;
4374 yes) with_cxx_main=yes
4375 MAINCC='$(CXX)';;
4376 *) with_cxx_main=yes
4377 MAINCC=$withval
4378 if test -z "$CXX"
4379 then
4380 CXX=$withval
4381 fi;;
4382 esac
4383else
4384
4385 with_cxx_main=no
4386 MAINCC='$(CC)'
4387
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004388fi
4389
Matthias Kloseb9621712010-04-24 17:59:49 +00004390{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4391$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004392
4393preset_cxx="$CXX"
4394if test -z "$CXX"
4395then
4396 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004397 gcc) if test -n "$ac_tool_prefix"; then
4398 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4399set dummy ${ac_tool_prefix}g++; ac_word=$2
4400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4401$as_echo_n "checking for $ac_word... " >&6; }
4402if ${ac_cv_path_CXX+:} false; then :
4403 $as_echo_n "(cached) " >&6
4404else
4405 case $CXX in
4406 [\\/]* | ?:[\\/]*)
4407 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4408 ;;
4409 *)
4410 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4411for as_dir in notfound
4412do
4413 IFS=$as_save_IFS
4414 test -z "$as_dir" && as_dir=.
4415 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004416 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004417 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4418 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4419 break 2
4420 fi
4421done
4422 done
4423IFS=$as_save_IFS
4424
4425 ;;
4426esac
4427fi
4428CXX=$ac_cv_path_CXX
4429if test -n "$CXX"; then
4430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4431$as_echo "$CXX" >&6; }
4432else
4433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4434$as_echo "no" >&6; }
4435fi
4436
4437
4438fi
4439if test -z "$ac_cv_path_CXX"; then
4440 ac_pt_CXX=$CXX
4441 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004442set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4444$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004445if ${ac_cv_path_ac_pt_CXX+:} false; then :
4446 $as_echo_n "(cached) " >&6
4447else
4448 case $ac_pt_CXX in
4449 [\\/]* | ?:[\\/]*)
4450 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4451 ;;
4452 *)
4453 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4454for as_dir in notfound
4455do
4456 IFS=$as_save_IFS
4457 test -z "$as_dir" && as_dir=.
4458 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004459 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004460 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4461 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4462 break 2
4463 fi
4464done
4465 done
4466IFS=$as_save_IFS
4467
4468 ;;
4469esac
4470fi
4471ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4472if test -n "$ac_pt_CXX"; then
4473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4474$as_echo "$ac_pt_CXX" >&6; }
4475else
4476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4477$as_echo "no" >&6; }
4478fi
4479
4480 if test "x$ac_pt_CXX" = x; then
4481 CXX="g++"
4482 else
4483 case $cross_compiling:$ac_tool_warned in
4484yes:)
4485{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4486$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4487ac_tool_warned=yes ;;
4488esac
4489 CXX=$ac_pt_CXX
4490 fi
4491else
4492 CXX="$ac_cv_path_CXX"
4493fi
4494 ;;
4495 cc) if test -n "$ac_tool_prefix"; then
4496 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4497set dummy ${ac_tool_prefix}c++; ac_word=$2
4498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4499$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004500if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004501 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004502else
4503 case $CXX in
4504 [\\/]* | ?:[\\/]*)
4505 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4506 ;;
4507 *)
4508 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4509for as_dir in notfound
4510do
4511 IFS=$as_save_IFS
4512 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004513 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004514 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004515 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004516 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004517 break 2
4518 fi
4519done
Matthias Kloseb9621712010-04-24 17:59:49 +00004520 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004521IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004522
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004523 ;;
4524esac
4525fi
4526CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004527if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4529$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004530else
Matthias Kloseb9621712010-04-24 17:59:49 +00004531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4532$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004533fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004534
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004535
4536fi
4537if test -z "$ac_cv_path_CXX"; then
4538 ac_pt_CXX=$CXX
4539 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004540set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4542$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004543if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004544 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004545else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004546 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004547 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004548 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004549 ;;
4550 *)
4551 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4552for as_dir in notfound
4553do
4554 IFS=$as_save_IFS
4555 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004556 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004557 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004558 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004559 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004560 break 2
4561 fi
4562done
Matthias Kloseb9621712010-04-24 17:59:49 +00004563 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004564IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004565
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004566 ;;
4567esac
4568fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004569ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4570if test -n "$ac_pt_CXX"; then
4571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4572$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004573else
Matthias Kloseb9621712010-04-24 17:59:49 +00004574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4575$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004576fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004577
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004578 if test "x$ac_pt_CXX" = x; then
4579 CXX="c++"
4580 else
4581 case $cross_compiling:$ac_tool_warned in
4582yes:)
4583{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4584$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4585ac_tool_warned=yes ;;
4586esac
4587 CXX=$ac_pt_CXX
4588 fi
4589else
4590 CXX="$ac_cv_path_CXX"
4591fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004592 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004593 clang|*/clang) if test -n "$ac_tool_prefix"; then
4594 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4595set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4597$as_echo_n "checking for $ac_word... " >&6; }
4598if ${ac_cv_path_CXX+:} false; then :
4599 $as_echo_n "(cached) " >&6
4600else
4601 case $CXX in
4602 [\\/]* | ?:[\\/]*)
4603 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4604 ;;
4605 *)
4606 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4607for as_dir in notfound
4608do
4609 IFS=$as_save_IFS
4610 test -z "$as_dir" && as_dir=.
4611 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004612 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004613 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4614 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4615 break 2
4616 fi
4617done
4618 done
4619IFS=$as_save_IFS
4620
Ned Deilycbfb9a52012-06-23 16:02:19 -07004621 ;;
4622esac
4623fi
4624CXX=$ac_cv_path_CXX
4625if test -n "$CXX"; then
4626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4627$as_echo "$CXX" >&6; }
4628else
4629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4630$as_echo "no" >&6; }
4631fi
4632
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004633
4634fi
4635if test -z "$ac_cv_path_CXX"; then
4636 ac_pt_CXX=$CXX
4637 # Extract the first word of "clang++", so it can be a program name with args.
4638set dummy clang++; ac_word=$2
4639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4640$as_echo_n "checking for $ac_word... " >&6; }
4641if ${ac_cv_path_ac_pt_CXX+:} false; then :
4642 $as_echo_n "(cached) " >&6
4643else
4644 case $ac_pt_CXX in
4645 [\\/]* | ?:[\\/]*)
4646 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4647 ;;
4648 *)
4649 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4650for as_dir in notfound
4651do
4652 IFS=$as_save_IFS
4653 test -z "$as_dir" && as_dir=.
4654 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004655 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004656 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4657 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4658 break 2
4659 fi
4660done
4661 done
4662IFS=$as_save_IFS
4663
4664 ;;
4665esac
4666fi
4667ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4668if test -n "$ac_pt_CXX"; then
4669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4670$as_echo "$ac_pt_CXX" >&6; }
4671else
4672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4673$as_echo "no" >&6; }
4674fi
4675
4676 if test "x$ac_pt_CXX" = x; then
4677 CXX="clang++"
4678 else
4679 case $cross_compiling:$ac_tool_warned in
4680yes:)
4681{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4682$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4683ac_tool_warned=yes ;;
4684esac
4685 CXX=$ac_pt_CXX
4686 fi
4687else
4688 CXX="$ac_cv_path_CXX"
4689fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004690 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004691 esac
4692 if test "$CXX" = "notfound"
4693 then
4694 CXX=""
4695 fi
4696fi
4697if test -z "$CXX"
4698then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004699 if test -n "$ac_tool_prefix"; then
4700 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4701 do
4702 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4703set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4705$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004706if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004707 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004708else
4709 if test -n "$CXX"; then
4710 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4711else
4712as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4713for as_dir in $PATH
4714do
4715 IFS=$as_save_IFS
4716 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004717 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004718 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004719 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004720 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004721 break 2
4722 fi
4723done
Matthias Kloseb9621712010-04-24 17:59:49 +00004724 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004725IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004726
4727fi
4728fi
4729CXX=$ac_cv_prog_CXX
4730if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004731 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4732$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004733else
Matthias Kloseb9621712010-04-24 17:59:49 +00004734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4735$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004736fi
4737
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004738
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004739 test -n "$CXX" && break
4740 done
4741fi
4742if test -z "$CXX"; then
4743 ac_ct_CXX=$CXX
4744 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4745do
4746 # Extract the first word of "$ac_prog", so it can be a program name with args.
4747set dummy $ac_prog; ac_word=$2
4748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4749$as_echo_n "checking for $ac_word... " >&6; }
4750if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4751 $as_echo_n "(cached) " >&6
4752else
4753 if test -n "$ac_ct_CXX"; then
4754 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4755else
4756as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4757for as_dir in $PATH
4758do
4759 IFS=$as_save_IFS
4760 test -z "$as_dir" && as_dir=.
4761 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004762 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004763 ac_cv_prog_ac_ct_CXX="$ac_prog"
4764 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4765 break 2
4766 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004767done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004768 done
4769IFS=$as_save_IFS
4770
4771fi
4772fi
4773ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4774if test -n "$ac_ct_CXX"; then
4775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4776$as_echo "$ac_ct_CXX" >&6; }
4777else
4778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4779$as_echo "no" >&6; }
4780fi
4781
4782
4783 test -n "$ac_ct_CXX" && break
4784done
4785
4786 if test "x$ac_ct_CXX" = x; then
4787 CXX="notfound"
4788 else
4789 case $cross_compiling:$ac_tool_warned in
4790yes:)
4791{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4792$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4793ac_tool_warned=yes ;;
4794esac
4795 CXX=$ac_ct_CXX
4796 fi
4797fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004798
4799 if test "$CXX" = "notfound"
4800 then
4801 CXX=""
4802 fi
4803fi
4804if test "$preset_cxx" != "$CXX"
4805then
Matthias Kloseb9621712010-04-24 17:59:49 +00004806 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004807
4808 By default, distutils will build C++ extension modules with \"$CXX\".
4809 If this is not intended, then set CXX on the configure command line.
4810 " >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004811$as_echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004812
4813 By default, distutils will build C++ extension modules with \"$CXX\".
4814 If this is not intended, then set CXX on the configure command line.
4815 " >&2;}
4816fi
4817
4818
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
4820$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
4821save_LDFLAGS="$LDFLAGS"
4822LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00004823
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004824cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4825/* end confdefs.h. */
4826
4827int
4828main ()
4829{
4830
4831 ;
4832 return 0;
4833}
4834_ACEOF
4835if ac_fn_c_try_link "$LINENO"; then :
4836 NO_AS_NEEDED="-Wl,--no-as-needed"
4837 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4838$as_echo "yes" >&6; }
4839else
4840 NO_AS_NEEDED=""
4841 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4842$as_echo "no" >&6; }
4843fi
4844rm -f core conftest.err conftest.$ac_objext \
4845 conftest$ac_exeext conftest.$ac_ext
4846LDFLAGS="$save_LDFLAGS"
4847
4848
4849
4850# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004851ac_ext=c
4852ac_cpp='$CPP $CPPFLAGS'
4853ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4854ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4855ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Kloseb9621712010-04-24 17:59:49 +00004856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4857$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004858# On Suns, sometimes $CPP names a directory.
4859if test -n "$CPP" && test -d "$CPP"; then
4860 CPP=
4861fi
4862if test -z "$CPP"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02004863 if ${ac_cv_prog_CPP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004864 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004865else
Martin v. Löwis11437992002-04-12 09:54:03 +00004866 # Double quotes because CPP needs to be expanded
4867 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4868 do
4869 ac_preproc_ok=false
4870for ac_c_preproc_warn_flag in '' yes
4871do
4872 # Use a header file that comes with gcc, so configuring glibc
4873 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004874 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4875 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004876 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004877 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004878 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004879/* end confdefs.h. */
4880#ifdef __STDC__
4881# include <limits.h>
4882#else
4883# include <assert.h>
4884#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004885 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004886_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004887if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004888
Matthias Kloseb9621712010-04-24 17:59:49 +00004889else
Martin v. Löwis11437992002-04-12 09:54:03 +00004890 # Broken: fails on valid input.
4891continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004892fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004893rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004894
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004895 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004896 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004897 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004898/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004899#include <ac_nonexistent.h>
4900_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004901if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004902 # Broken: success on invalid input.
4903continue
4904else
Martin v. Löwis11437992002-04-12 09:54:03 +00004905 # Passes both tests.
4906ac_preproc_ok=:
4907break
4908fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004909rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004910
4911done
4912# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004913rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004914if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004915 break
4916fi
4917
4918 done
4919 ac_cv_prog_CPP=$CPP
4920
4921fi
4922 CPP=$ac_cv_prog_CPP
4923else
4924 ac_cv_prog_CPP=$CPP
4925fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004926{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4927$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004928ac_preproc_ok=false
4929for ac_c_preproc_warn_flag in '' yes
4930do
4931 # Use a header file that comes with gcc, so configuring glibc
4932 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004933 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4934 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004935 # On the NeXT, cc -E runs the code through the compiler's parser,
4936 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004937 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004938/* end confdefs.h. */
4939#ifdef __STDC__
4940# include <limits.h>
4941#else
4942# include <assert.h>
4943#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004944 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004945_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004946if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004947
Matthias Kloseb9621712010-04-24 17:59:49 +00004948else
Martin v. Löwis11437992002-04-12 09:54:03 +00004949 # Broken: fails on valid input.
4950continue
4951fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004952rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004953
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004954 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004955 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004956 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004957/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004958#include <ac_nonexistent.h>
4959_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004960if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004961 # Broken: success on invalid input.
4962continue
4963else
Martin v. Löwis11437992002-04-12 09:54:03 +00004964 # Passes both tests.
4965ac_preproc_ok=:
4966break
4967fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004968rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004969
4970done
4971# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004972rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004973if $ac_preproc_ok; then :
4974
Martin v. Löwis11437992002-04-12 09:54:03 +00004975else
Matthias Kloseb9621712010-04-24 17:59:49 +00004976 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4977$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004978as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
Victor Stinnere0be4232011-10-25 13:06:09 +02004979See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004980fi
4981
4982ac_ext=c
4983ac_cpp='$CPP $CPPFLAGS'
4984ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4985ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4986ac_compiler_gnu=$ac_cv_c_compiler_gnu
4987
4988
Matthias Kloseb9621712010-04-24 17:59:49 +00004989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4990$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004991if ${ac_cv_path_GREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004992 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004993else
Matthias Kloseb9621712010-04-24 17:59:49 +00004994 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004995 ac_path_GREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004996 # Loop through the user's path and test for each of PROGNAME-LIST
4997 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004998for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4999do
5000 IFS=$as_save_IFS
5001 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005002 for ac_prog in grep ggrep; do
5003 for ac_exec_ext in '' $ac_executable_extensions; do
5004 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005005 as_fn_executable_p "$ac_path_GREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005006# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005007 # Check for GNU $ac_path_GREP
5008case `"$ac_path_GREP" --version 2>&1` in
5009*GNU*)
5010 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5011*)
5012 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005013 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005014 while :
5015 do
5016 cat "conftest.in" "conftest.in" >"conftest.tmp"
5017 mv "conftest.tmp" "conftest.in"
5018 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005019 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005020 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5021 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005022 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005023 if test $ac_count -gt ${ac_path_GREP_max-0}; then
5024 # Best one so far, save it but keep looking for a better one
5025 ac_cv_path_GREP="$ac_path_GREP"
5026 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00005027 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005028 # 10*(2^10) chars as input seems more than enough
5029 test $ac_count -gt 10 && break
5030 done
5031 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5032esac
5033
Matthias Kloseb9621712010-04-24 17:59:49 +00005034 $ac_path_GREP_found && break 3
5035 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005036 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005037 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005038IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005039 if test -z "$ac_cv_path_GREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005040 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +00005041 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005042else
5043 ac_cv_path_GREP=$GREP
5044fi
5045
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005046fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005047{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5048$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005049 GREP="$ac_cv_path_GREP"
5050
5051
Matthias Kloseb9621712010-04-24 17:59:49 +00005052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5053$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005054if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005055 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005056else
5057 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5058 then ac_cv_path_EGREP="$GREP -E"
5059 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005060 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005061 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005062 # Loop through the user's path and test for each of PROGNAME-LIST
5063 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005064for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5065do
5066 IFS=$as_save_IFS
5067 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005068 for ac_prog in egrep; do
5069 for ac_exec_ext in '' $ac_executable_extensions; do
5070 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005071 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005072# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005073 # Check for GNU $ac_path_EGREP
5074case `"$ac_path_EGREP" --version 2>&1` in
5075*GNU*)
5076 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5077*)
5078 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005079 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005080 while :
5081 do
5082 cat "conftest.in" "conftest.in" >"conftest.tmp"
5083 mv "conftest.tmp" "conftest.in"
5084 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005085 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005086 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5087 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005088 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005089 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5090 # Best one so far, save it but keep looking for a better one
5091 ac_cv_path_EGREP="$ac_path_EGREP"
5092 ac_path_EGREP_max=$ac_count
5093 fi
5094 # 10*(2^10) chars as input seems more than enough
5095 test $ac_count -gt 10 && break
5096 done
5097 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5098esac
5099
Matthias Kloseb9621712010-04-24 17:59:49 +00005100 $ac_path_EGREP_found && break 3
5101 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005102 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005103 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005104IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005105 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005106 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +00005107 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005108else
5109 ac_cv_path_EGREP=$EGREP
5110fi
5111
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005112 fi
5113fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005114{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5115$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005116 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005117
5118
Matthias Kloseb9621712010-04-24 17:59:49 +00005119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5120$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005121if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005122 $as_echo_n "(cached) " >&6
5123else
5124 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005125/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005126#include <stdlib.h>
5127#include <stdarg.h>
5128#include <string.h>
5129#include <float.h>
5130
5131int
5132main ()
5133{
5134
5135 ;
5136 return 0;
5137}
5138_ACEOF
5139if ac_fn_c_try_compile "$LINENO"; then :
5140 ac_cv_header_stdc=yes
5141else
5142 ac_cv_header_stdc=no
5143fi
5144rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5145
5146if test $ac_cv_header_stdc = yes; then
5147 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5148 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5149/* end confdefs.h. */
5150#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005151
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005152_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005153if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005154 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005155
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005156else
Matthias Kloseb9621712010-04-24 17:59:49 +00005157 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005158fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005159rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005160
Matthias Kloseb9621712010-04-24 17:59:49 +00005161fi
5162
5163if test $ac_cv_header_stdc = yes; then
5164 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5165 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5166/* end confdefs.h. */
5167#include <stdlib.h>
5168
5169_ACEOF
5170if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5171 $EGREP "free" >/dev/null 2>&1; then :
5172
5173else
5174 ac_cv_header_stdc=no
5175fi
5176rm -f conftest*
5177
5178fi
5179
5180if test $ac_cv_header_stdc = yes; then
5181 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5182 if test "$cross_compiling" = yes; then :
5183 :
5184else
5185 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5186/* end confdefs.h. */
5187#include <ctype.h>
5188#include <stdlib.h>
5189#if ((' ' & 0x0FF) == 0x020)
5190# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5191# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5192#else
5193# define ISLOWER(c) \
5194 (('a' <= (c) && (c) <= 'i') \
5195 || ('j' <= (c) && (c) <= 'r') \
5196 || ('s' <= (c) && (c) <= 'z'))
5197# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5198#endif
5199
5200#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5201int
5202main ()
5203{
5204 int i;
5205 for (i = 0; i < 256; i++)
5206 if (XOR (islower (i), ISLOWER (i))
5207 || toupper (i) != TOUPPER (i))
5208 return 2;
5209 return 0;
5210}
5211_ACEOF
5212if ac_fn_c_try_run "$LINENO"; then :
5213
5214else
5215 ac_cv_header_stdc=no
5216fi
5217rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5218 conftest.$ac_objext conftest.beam conftest.$ac_ext
5219fi
5220
5221fi
5222fi
5223{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5224$as_echo "$ac_cv_header_stdc" >&6; }
5225if test $ac_cv_header_stdc = yes; then
5226
5227$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5228
5229fi
5230
5231# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5232for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5233 inttypes.h stdint.h unistd.h
5234do :
5235 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5236ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5237"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005238if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005239 cat >>confdefs.h <<_ACEOF
5240#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5241_ACEOF
5242
5243fi
5244
5245done
5246
5247
5248
5249 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02005250if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005251 MINIX=yes
5252else
5253 MINIX=
5254fi
5255
5256
5257 if test "$MINIX" = yes; then
5258
5259$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5260
5261
5262$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5263
5264
5265$as_echo "#define _MINIX 1" >>confdefs.h
5266
5267 fi
5268
5269
5270 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5271$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005272if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005273 $as_echo_n "(cached) " >&6
5274else
5275 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5276/* end confdefs.h. */
5277
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005278# define __EXTENSIONS__ 1
5279 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005280int
5281main ()
5282{
5283
5284 ;
5285 return 0;
5286}
5287_ACEOF
5288if ac_fn_c_try_compile "$LINENO"; then :
5289 ac_cv_safe_to_define___extensions__=yes
5290else
5291 ac_cv_safe_to_define___extensions__=no
5292fi
5293rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5294fi
5295{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5296$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5297 test $ac_cv_safe_to_define___extensions__ = yes &&
5298 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5299
5300 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5301
5302 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5303
5304 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5305
5306 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5307
5308
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005309
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005310# Check for unsupported systems
5311case $ac_sys_system/$ac_sys_release in
5312atheos*|Linux*/1*)
5313 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5314 echo See README for details.
5315 exit 1;;
5316esac
5317
5318
Matthias Kloseb9621712010-04-24 17:59:49 +00005319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5320$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005321
5322# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005323if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005324 withval=$with_suffix;
5325 case $withval in
5326 no) EXEEXT=;;
5327 yes) EXEEXT=.exe;;
5328 *) EXEEXT=$withval;;
5329 esac
5330fi
5331
Matthias Kloseb9621712010-04-24 17:59:49 +00005332{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5333$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005334
5335# Test whether we're running on a non-case-sensitive system, in which
5336# case we give a warning if no ext is given
5337
Matthias Kloseb9621712010-04-24 17:59:49 +00005338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5339$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005340if test ! -d CaseSensitiveTestDir; then
5341mkdir CaseSensitiveTestDir
5342fi
5343
5344if test -d casesensitivetestdir
5345then
Matthias Kloseb9621712010-04-24 17:59:49 +00005346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5347$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005348 BUILDEXEEXT=.exe
5349else
Matthias Kloseb9621712010-04-24 17:59:49 +00005350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5351$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005352 BUILDEXEEXT=$EXEEXT
5353fi
5354rmdir CaseSensitiveTestDir
5355
5356case $MACHDEP in
5357bsdos*)
5358 case $CC in
5359 gcc) CC="$CC -D_HAVE_BSDI";;
5360 esac;;
5361esac
5362
5363case $ac_sys_system in
5364hp*|HP*)
5365 case $CC in
5366 cc|*/cc) CC="$CC -Ae";;
5367 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005368esac
5369
doko@python.org3e6e2ac2013-01-25 13:12:29 +01005370MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5371
5372
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005373
5374
Matthias Kloseb9621712010-04-24 17:59:49 +00005375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5376$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005377if test -z "$LIBRARY"
5378then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005379 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005380fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005381{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5382$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005383
5384# LDLIBRARY is the name of the library to link against (as opposed to the
5385# name of the library into which to insert object files). BLDLIBRARY is also
5386# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5387# is blank as the main program is not linked directly against LDLIBRARY.
5388# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5389# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5390# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5391# DLLLIBRARY is the shared (i.e., DLL) library.
5392#
5393# RUNSHARED is used to run shared python without installed libraries
5394#
5395# INSTSONAME is the name of the shared library that will be use to install
5396# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005397#
5398# LDVERSION is the shared library version number, normally the Python version
5399# with the ABI build flags appended.
5400
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005401
5402
5403
5404
5405
5406
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005407
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005408LDLIBRARY="$LIBRARY"
5409BLDLIBRARY='$(LDLIBRARY)'
5410INSTSONAME='$(LDLIBRARY)'
5411DLLLIBRARY=''
5412LDLIBRARYDIR=''
5413RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005414LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005415
5416# LINKCC is the command that links the python executable -- default is $(CC).
5417# If CXX is set, and if it is needed to link a main function that was
5418# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5419# python might then depend on the C++ runtime
5420# This is altered for AIX in order to build the export list before
5421# linking.
5422
Matthias Kloseb9621712010-04-24 17:59:49 +00005423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5424$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005425if test -z "$LINKCC"
5426then
5427 LINKCC='$(PURIFY) $(MAINCC)'
5428 case $ac_sys_system in
5429 AIX*)
5430 exp_extra="\"\""
5431 if test $ac_sys_release -ge 5 -o \
5432 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5433 exp_extra="."
5434 fi
5435 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005436 QNX*)
5437 # qcc must be used because the other compilers do not
5438 # support -N.
5439 LINKCC=qcc;;
5440 esac
5441fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005442{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5443$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005444
5445# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5446# make sure we default having it set to "no": this is used by
5447# distutils.unixccompiler to know if it should add --enable-new-dtags
5448# to linker command lines, and failing to detect GNU ld simply results
5449# in the same bahaviour as before.
5450
Matthias Kloseb9621712010-04-24 17:59:49 +00005451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5452$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005453ac_prog=ld
5454if test "$GCC" = yes; then
5455 ac_prog=`$CC -print-prog-name=ld`
5456fi
5457case `"$ac_prog" -V 2>&1 < /dev/null` in
5458 *GNU*)
5459 GNULD=yes;;
5460 *)
5461 GNULD=no;;
5462esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005463{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5464$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005465
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
5467$as_echo_n "checking for inline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005468if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005469 $as_echo_n "(cached) " >&6
5470else
5471 ac_cv_c_inline=no
5472for ac_kw in inline __inline__ __inline; do
5473 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5474/* end confdefs.h. */
5475#ifndef __cplusplus
5476typedef int foo_t;
5477static $ac_kw foo_t static_foo () {return 0; }
5478$ac_kw foo_t foo () {return 0; }
5479#endif
5480
5481_ACEOF
5482if ac_fn_c_try_compile "$LINENO"; then :
5483 ac_cv_c_inline=$ac_kw
5484fi
5485rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5486 test "$ac_cv_c_inline" != no && break
5487done
5488
5489fi
5490{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
5491$as_echo "$ac_cv_c_inline" >&6; }
5492
5493case $ac_cv_c_inline in
5494 inline | yes) ;;
5495 *)
5496 case $ac_cv_c_inline in
5497 no) ac_val=;;
5498 *) ac_val=$ac_cv_c_inline;;
5499 esac
5500 cat >>confdefs.h <<_ACEOF
5501#ifndef __cplusplus
5502#define inline $ac_val
5503#endif
5504_ACEOF
5505 ;;
5506esac
5507
5508if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00005509
5510$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005511
5512
5513fi
5514
5515
Matthias Kloseb9621712010-04-24 17:59:49 +00005516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5517$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005518# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005519if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005520 enableval=$enable_shared;
5521fi
5522
5523
5524if test -z "$enable_shared"
5525then
5526 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005527 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005528 enable_shared="yes";;
5529 *)
5530 enable_shared="no";;
5531 esac
5532fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005533{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5534$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005535
Matthias Kloseb9621712010-04-24 17:59:49 +00005536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5537$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005538# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005539if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005540 enableval=$enable_profiling;
5541fi
5542
5543if test "x$enable_profiling" = xyes; then
5544 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005545 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005546 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005547/* end confdefs.h. */
5548int main() { return 0; }
5549_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005550if ac_fn_c_try_link "$LINENO"; then :
5551
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005552else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005553 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005554fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005555rm -f core conftest.err conftest.$ac_objext \
5556 conftest$ac_exeext conftest.$ac_ext
5557 CC="$ac_save_cc"
5558else
5559 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005560fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005561{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5562$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005563
doko@ubuntu.comba015832012-06-30 16:52:05 +02005564if test "x$enable_profiling" = xyes; then
5565 BASECFLAGS="-pg $BASECFLAGS"
5566 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005567fi
5568
Matthias Kloseb9621712010-04-24 17:59:49 +00005569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5570$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005571
5572# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5573# library that we build, but we do not want to link against it (we
5574# will find it with a -framework option). For this reason there is an
5575# extra variable BLDLIBRARY against which Python and the extension
5576# modules are linked, BLDLIBRARY. This is normally the same as
5577# LDLIBRARY, but empty for MacOSX framework builds.
5578if test "$enable_framework"
5579then
5580 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
5581 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
5582 BLDLIBRARY=''
5583else
5584 BLDLIBRARY='$(LDLIBRARY)'
5585fi
5586
5587# Other platforms follow
5588if test $enable_shared = "yes"; then
doko@python.org87421192013-01-26 11:39:31 +01005589 PY_ENABLE_SHARED=1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005590
Matthias Kloseb9621712010-04-24 17:59:49 +00005591$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005592
5593 case $ac_sys_system in
5594 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005595 LDLIBRARY='libpython$(LDVERSION).dll.a'
5596 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005597 ;;
5598 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005599 LDLIBRARY='libpython$(LDVERSION).so'
5600 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005601 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
5602 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005603 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005604 then
5605 PY3LIBRARY=libpython3.so
5606 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005607 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005608 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005609 LDLIBRARY='libpython$(LDVERSION).so'
5610 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005611 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
5612 case $ac_sys_system in
5613 FreeBSD*)
5614 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
5615 ;;
5616 esac
5617 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005618 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005619 then
5620 PY3LIBRARY=libpython3.so
5621 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005622 ;;
5623 hp*|HP*)
5624 case `uname -m` in
5625 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005626 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005627 ;;
5628 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005629 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005630 ;;
5631 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005632 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005633 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
5634 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005635 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005636 LDLIBRARY='libpython$(LDVERSION).dylib'
5637 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005638 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
5639 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005640 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005641 LDLIBRARY='libpython$(LDVERSION).so'
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005642 RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
5643 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005644
5645 esac
5646else # shared is disabled
doko@python.org87421192013-01-26 11:39:31 +01005647 PY_ENABLE_SHARED=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005648 case $ac_sys_system in
5649 CYGWIN*)
5650 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005651 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005652 ;;
5653 esac
5654fi
5655
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005656if test "$cross_compiling" = yes; then
5657 RUNSHARED=
5658fi
5659
Matthias Kloseb9621712010-04-24 17:59:49 +00005660{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5661$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005662
5663if test -n "$ac_tool_prefix"; then
5664 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5665set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5667$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005668if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005669 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005670else
5671 if test -n "$RANLIB"; then
5672 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5673else
5674as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5675for as_dir in $PATH
5676do
5677 IFS=$as_save_IFS
5678 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005679 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005680 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005681 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005682 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005683 break 2
5684 fi
5685done
Matthias Kloseb9621712010-04-24 17:59:49 +00005686 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005687IFS=$as_save_IFS
5688
5689fi
5690fi
5691RANLIB=$ac_cv_prog_RANLIB
5692if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5694$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005695else
Matthias Kloseb9621712010-04-24 17:59:49 +00005696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5697$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005698fi
5699
5700
5701fi
5702if test -z "$ac_cv_prog_RANLIB"; then
5703 ac_ct_RANLIB=$RANLIB
5704 # Extract the first word of "ranlib", so it can be a program name with args.
5705set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5707$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005708if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005709 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005710else
5711 if test -n "$ac_ct_RANLIB"; then
5712 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5713else
5714as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5715for as_dir in $PATH
5716do
5717 IFS=$as_save_IFS
5718 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005719 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005720 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005721 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005722 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005723 break 2
5724 fi
5725done
Matthias Kloseb9621712010-04-24 17:59:49 +00005726 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005727IFS=$as_save_IFS
5728
5729fi
5730fi
5731ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5732if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5734$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005735else
Matthias Kloseb9621712010-04-24 17:59:49 +00005736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5737$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005738fi
5739
5740 if test "x$ac_ct_RANLIB" = x; then
5741 RANLIB=":"
5742 else
5743 case $cross_compiling:$ac_tool_warned in
5744yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00005745{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5746$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005747ac_tool_warned=yes ;;
5748esac
5749 RANLIB=$ac_ct_RANLIB
5750 fi
5751else
5752 RANLIB="$ac_cv_prog_RANLIB"
5753fi
5754
5755
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005756if test -n "$ac_tool_prefix"; then
5757 for ac_prog in ar aal
5758 do
5759 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5760set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5762$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005763if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005764 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005765else
5766 if test -n "$AR"; then
5767 ac_cv_prog_AR="$AR" # Let the user override the test.
5768else
5769as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5770for as_dir in $PATH
5771do
5772 IFS=$as_save_IFS
5773 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005774 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005775 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005776 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005777 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005778 break 2
5779 fi
5780done
Matthias Kloseb9621712010-04-24 17:59:49 +00005781 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005782IFS=$as_save_IFS
5783
5784fi
5785fi
5786AR=$ac_cv_prog_AR
5787if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5789$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005790else
Matthias Kloseb9621712010-04-24 17:59:49 +00005791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5792$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005793fi
5794
5795
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005796 test -n "$AR" && break
5797 done
5798fi
5799if test -z "$AR"; then
5800 ac_ct_AR=$AR
5801 for ac_prog in ar aal
5802do
5803 # Extract the first word of "$ac_prog", so it can be a program name with args.
5804set dummy $ac_prog; ac_word=$2
5805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5806$as_echo_n "checking for $ac_word... " >&6; }
5807if ${ac_cv_prog_ac_ct_AR+:} false; then :
5808 $as_echo_n "(cached) " >&6
5809else
5810 if test -n "$ac_ct_AR"; then
5811 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5812else
5813as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5814for as_dir in $PATH
5815do
5816 IFS=$as_save_IFS
5817 test -z "$as_dir" && as_dir=.
5818 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005819 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005820 ac_cv_prog_ac_ct_AR="$ac_prog"
5821 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5822 break 2
5823 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005824done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005825 done
5826IFS=$as_save_IFS
5827
5828fi
5829fi
5830ac_ct_AR=$ac_cv_prog_ac_ct_AR
5831if test -n "$ac_ct_AR"; then
5832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5833$as_echo "$ac_ct_AR" >&6; }
5834else
5835 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5836$as_echo "no" >&6; }
5837fi
5838
5839
5840 test -n "$ac_ct_AR" && break
5841done
5842
5843 if test "x$ac_ct_AR" = x; then
5844 AR="ar"
5845 else
5846 case $cross_compiling:$ac_tool_warned in
5847yes:)
5848{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5849$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5850ac_tool_warned=yes ;;
5851esac
5852 AR=$ac_ct_AR
5853 fi
5854fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005855
5856
5857# tweak ARFLAGS only if the user didn't set it on the command line
5858
5859if test -z "$ARFLAGS"
5860then
5861 ARFLAGS="rc"
5862fi
5863
doko@ubuntu.com58844492012-06-30 18:25:32 +02005864if test -n "$ac_tool_prefix"; then
5865 for ac_prog in readelf
5866 do
5867 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5868set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5870$as_echo_n "checking for $ac_word... " >&6; }
5871if ${ac_cv_prog_READELF+:} false; then :
5872 $as_echo_n "(cached) " >&6
5873else
5874 if test -n "$READELF"; then
5875 ac_cv_prog_READELF="$READELF" # Let the user override the test.
5876else
5877as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5878for as_dir in $PATH
5879do
5880 IFS=$as_save_IFS
5881 test -z "$as_dir" && as_dir=.
5882 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005883 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02005884 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
5885 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5886 break 2
5887 fi
5888done
5889 done
5890IFS=$as_save_IFS
5891
5892fi
5893fi
5894READELF=$ac_cv_prog_READELF
5895if test -n "$READELF"; then
5896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
5897$as_echo "$READELF" >&6; }
5898else
5899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5900$as_echo "no" >&6; }
5901fi
5902
5903
5904 test -n "$READELF" && break
5905 done
5906fi
5907if test -z "$READELF"; then
5908 ac_ct_READELF=$READELF
5909 for ac_prog in readelf
5910do
5911 # Extract the first word of "$ac_prog", so it can be a program name with args.
5912set dummy $ac_prog; ac_word=$2
5913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5914$as_echo_n "checking for $ac_word... " >&6; }
5915if ${ac_cv_prog_ac_ct_READELF+:} false; then :
5916 $as_echo_n "(cached) " >&6
5917else
5918 if test -n "$ac_ct_READELF"; then
5919 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
5920else
5921as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5922for as_dir in $PATH
5923do
5924 IFS=$as_save_IFS
5925 test -z "$as_dir" && as_dir=.
5926 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005927 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02005928 ac_cv_prog_ac_ct_READELF="$ac_prog"
5929 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5930 break 2
5931 fi
5932done
5933 done
5934IFS=$as_save_IFS
5935
5936fi
5937fi
5938ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
5939if test -n "$ac_ct_READELF"; then
5940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
5941$as_echo "$ac_ct_READELF" >&6; }
5942else
5943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5944$as_echo "no" >&6; }
5945fi
5946
5947
5948 test -n "$ac_ct_READELF" && break
5949done
5950
5951 if test "x$ac_ct_READELF" = x; then
5952 READELF=":"
5953 else
5954 case $cross_compiling:$ac_tool_warned in
5955yes:)
5956{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5957$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5958ac_tool_warned=yes ;;
5959esac
5960 READELF=$ac_ct_READELF
5961 fi
5962fi
5963
5964if test "$cross_compiling" = yes; then
5965 case "$READELF" in
5966 readelf|:)
5967 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
5968 ;;
5969 esac
5970fi
5971
5972
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005973
Matthias Klosec4c48422012-10-21 23:05:35 +02005974for ac_prog in python$PACKAGE_VERSION python3 python
5975do
5976 # Extract the first word of "$ac_prog", so it can be a program name with args.
5977set dummy $ac_prog; ac_word=$2
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5979$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klosec4c48422012-10-21 23:05:35 +02005980if ${ac_cv_prog_PYTHON+:} false; then :
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005981 $as_echo_n "(cached) " >&6
5982else
Matthias Klosec4c48422012-10-21 23:05:35 +02005983 if test -n "$PYTHON"; then
5984 ac_cv_prog_PYTHON="$PYTHON" # Let the user override the test.
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005985else
5986as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5987for as_dir in $PATH
5988do
5989 IFS=$as_save_IFS
5990 test -z "$as_dir" && as_dir=.
5991 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005992 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Matthias Klosec4c48422012-10-21 23:05:35 +02005993 ac_cv_prog_PYTHON="$ac_prog"
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005994 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5995 break 2
5996 fi
5997done
5998 done
5999IFS=$as_save_IFS
6000
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006001fi
6002fi
Matthias Klosec4c48422012-10-21 23:05:35 +02006003PYTHON=$ac_cv_prog_PYTHON
6004if test -n "$PYTHON"; then
6005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
6006$as_echo "$PYTHON" >&6; }
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006007else
6008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6009$as_echo "no" >&6; }
6010fi
6011
6012
Matthias Klosec4c48422012-10-21 23:05:35 +02006013 test -n "$PYTHON" && break
6014done
6015test -n "$PYTHON" || PYTHON="not-found"
6016
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006017if test "$PYTHON" = not-found; then
Matthias Klosec4c48422012-10-21 23:05:35 +02006018 ASDLGEN="@echo python: $PYTHON! cannot run \$(srcdir)/Parser/asdl_c.py #"
6019else
6020 ASDLGEN="$PYTHON"
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006021fi
6022
6023
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006024case $MACHDEP in
6025bsdos*|hp*|HP*)
6026 # install -d does not work on BSDI or HP-UX
6027 if test -z "$INSTALL"
6028 then
6029 INSTALL="${srcdir}/install-sh -c"
6030 fi
6031esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006032# Find a good install program. We prefer a C program (faster),
6033# so one script is as good as another. But avoid the broken or
6034# incompatible versions:
6035# SysV /etc/install, /usr/sbin/install
6036# SunOS /usr/etc/install
6037# IRIX /sbin/install
6038# AIX /bin/install
6039# AmigaOS /C/install, which installs bootblocks on floppy discs
6040# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6041# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6042# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6043# OS/2's system install, which has a completely different semantic
6044# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006045# Reject install programs that cannot install multiple files.
6046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6047$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006048if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006049if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006050 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006051else
6052 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6053for as_dir in $PATH
6054do
6055 IFS=$as_save_IFS
6056 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006057 # Account for people who put trailing slashes in PATH elements.
6058case $as_dir/ in #((
6059 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006060 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006061 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006062 /usr/ucb/* ) ;;
6063 *)
6064 # OSF1 and SCO ODT 3.0 have their own names for install.
6065 # Don't use installbsd from OSF since it installs stuff as root
6066 # by default.
6067 for ac_prog in ginstall scoinst install; do
6068 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006069 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006070 if test $ac_prog = install &&
6071 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6072 # AIX install. It has an incompatible calling convention.
6073 :
6074 elif test $ac_prog = install &&
6075 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6076 # program-specific install script used by HP pwplus--don't use.
6077 :
6078 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006079 rm -rf conftest.one conftest.two conftest.dir
6080 echo one > conftest.one
6081 echo two > conftest.two
6082 mkdir conftest.dir
6083 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6084 test -s conftest.one && test -s conftest.two &&
6085 test -s conftest.dir/conftest.one &&
6086 test -s conftest.dir/conftest.two
6087 then
6088 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6089 break 3
6090 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006091 fi
6092 fi
6093 done
6094 done
6095 ;;
6096esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006097
6098 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006099IFS=$as_save_IFS
6100
Matthias Kloseb9621712010-04-24 17:59:49 +00006101rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006102
6103fi
6104 if test "${ac_cv_path_install+set}" = set; then
6105 INSTALL=$ac_cv_path_install
6106 else
6107 # As a last resort, use the slow shell script. Don't cache a
6108 # value for INSTALL within a source directory, because that will
6109 # break other packages using the cache if that directory is
6110 # removed, or if the value is a relative name.
6111 INSTALL=$ac_install_sh
6112 fi
6113fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006114{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6115$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006116
6117# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6118# It thinks the first close brace ends the variable substitution.
6119test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6120
6121test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6122
6123test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6124
Matthias Klose93a0ef12012-03-15 18:08:34 +01006125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6126$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6127if test -z "$MKDIR_P"; then
6128 if ${ac_cv_path_mkdir+:} false; then :
6129 $as_echo_n "(cached) " >&6
6130else
6131 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6132for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6133do
6134 IFS=$as_save_IFS
6135 test -z "$as_dir" && as_dir=.
6136 for ac_prog in mkdir gmkdir; do
6137 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006138 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006139 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6140 'mkdir (GNU coreutils) '* | \
6141 'mkdir (coreutils) '* | \
6142 'mkdir (fileutils) '4.1*)
6143 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6144 break 3;;
6145 esac
6146 done
6147 done
6148 done
6149IFS=$as_save_IFS
6150
6151fi
6152
6153 test -d ./--version && rmdir ./--version
6154 if test "${ac_cv_path_mkdir+set}" = set; then
6155 MKDIR_P="$ac_cv_path_mkdir -p"
6156 else
6157 # As a last resort, use the slow shell script. Don't cache a
6158 # value for MKDIR_P within a source directory, because that will
6159 # break other packages using the cache if that directory is
6160 # removed, or if the value is a relative name.
6161 MKDIR_P="$ac_install_sh -d"
6162 fi
6163fi
6164{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6165$as_echo "$MKDIR_P" >&6; }
6166
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006167
6168# Not every filesystem supports hard links
6169
6170if test -z "$LN" ; then
6171 case $ac_sys_system in
6172 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006173 *) LN=ln;;
6174 esac
6175fi
6176
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006177# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006178
6179ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006180
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006181# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6183$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006184
6185# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006186if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006187 withval=$with_pydebug;
6188if test "$withval" != no
6189then
6190
Matthias Kloseb9621712010-04-24 17:59:49 +00006191$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006192
Matthias Kloseb9621712010-04-24 17:59:49 +00006193 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6194$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006195 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006196 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006197else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6198$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006199fi
6200else
Matthias Kloseb9621712010-04-24 17:59:49 +00006201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6202$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006203fi
6204
6205
6206# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6207# merged with this chunk of code?
6208
6209# Optimizer/debugger flags
6210# ------------------------
6211# (The following bit of code is complicated enough - please keep things
6212# indented properly. Just pretend you're editing Python code. ;-)
6213
6214# There are two parallel sets of case statements below, one that checks to
6215# see if OPT was set and one that does BASECFLAGS setting based upon
6216# compiler and platform. BASECFLAGS tweaks need to be made even if the
6217# user set OPT.
6218
6219# tweak OPT based on compiler and platform, only if the user didn't set
6220# it on the command line
6221
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006222if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006223then
6224 case $GCC in
6225 yes)
6226 if test "$CC" != 'g++' ; then
6227 STRICT_PROTO="-Wstrict-prototypes"
6228 fi
6229 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6230 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6231 WRAP="-fwrapv"
6232 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006233
6234 # Clang also needs -fwrapv
Stefan Krahaf04ff22011-12-08 22:20:31 +01006235 case $CC in
6236 *clang*) WRAP="-fwrapv"
6237 ;;
6238 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006239
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006240 case $ac_cv_prog_cc_g in
6241 yes)
6242 if test "$Py_DEBUG" = 'true' ; then
6243 # Optimization messes up debuggers, so turn it off for
6244 # debug builds.
Mark Dickinsonb2153e92010-05-05 22:31:36 +00006245 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006246 else
6247 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
6248 fi
6249 ;;
6250 *)
6251 OPT="-O3 -Wall $STRICT_PROTO"
6252 ;;
6253 esac
6254 case $ac_sys_system in
6255 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6256 ;;
6257 esac
6258 ;;
6259
6260 *)
6261 OPT="-O"
6262 ;;
6263 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006264fi
6265
6266
6267
6268# The -arch flags for universal builds on OSX
6269UNIVERSAL_ARCH_FLAGS=
6270
6271
6272# tweak BASECFLAGS based on compiler and platform
6273case $GCC in
6274yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006275 # Python doesn't violate C99 aliasing rules, but older versions of
6276 # GCC produce warnings for legal Python code. Enable
6277 # -fno-strict-aliasing on versions of GCC that support but produce
6278 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006279 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6280$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006281 ac_save_cc="$CC"
6282 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006283 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006284 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006285 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006286else
Matthias Kloseb9621712010-04-24 17:59:49 +00006287 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006288/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006289
Matthias Kloseb159a552010-04-25 21:00:44 +00006290
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006291int
6292main ()
6293{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006294
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006295 ;
6296 return 0;
6297}
Matthias Kloseb159a552010-04-25 21:00:44 +00006298
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006299_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006300if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006301
6302 CC="$ac_save_cc -fstrict-aliasing"
6303 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6304 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006305/* end confdefs.h. */
6306
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006307 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006308int
6309main ()
6310{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006311double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006312 ;
6313 return 0;
6314}
Matthias Kloseb159a552010-04-25 21:00:44 +00006315
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006316_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006317if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006318
6319 ac_cv_no_strict_aliasing=no
6320
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006321else
Matthias Kloseb159a552010-04-25 21:00:44 +00006322
6323 ac_cv_no_strict_aliasing=yes
6324
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006325fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006326rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006327
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006328else
Matthias Kloseb159a552010-04-25 21:00:44 +00006329
6330 ac_cv_no_strict_aliasing=no
6331
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006332fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006333rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006334fi
6335
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006336 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006337 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6339$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006340 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006341 then
6342 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6343 fi
6344
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006345 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
6346$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
6347 ac_save_cc="$CC"
6348 CC="$CC -Wunused-result -Werror"
6349 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006350 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006351 $as_echo_n "(cached) " >&6
6352else
6353 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6354/* end confdefs.h. */
6355
6356
6357int
6358main ()
6359{
6360
6361 ;
6362 return 0;
6363}
6364
6365_ACEOF
6366if ac_fn_c_try_compile "$LINENO"; then :
6367
6368 ac_cv_disable_unused_result_warning=yes
6369
6370else
6371
6372 ac_cv_disable_unused_result_warning=no
6373
6374fi
6375rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6376fi
6377
6378 CFLAGS="$save_CFLAGS"
6379 CC="$ac_save_cc"
6380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
6381$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
6382
6383 if test $ac_cv_disable_unused_result_warning = yes
6384 then
6385 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
6386 fi
6387
Benjamin Petersoncc00e012013-05-20 08:22:04 -07006388 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Werror=declaration-after-statement" >&5
6389$as_echo_n "checking for -Werror=declaration-after-statement... " >&6; }
6390 ac_save_cc="$CC"
6391 CC="$CC -Werror=declaration-after-statement"
6392 save_CFLAGS="$CFLAGS"
6393 if ${ac_cv_declaration_after_statement_warning+:} false; then :
6394 $as_echo_n "(cached) " >&6
6395else
6396 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6397/* end confdefs.h. */
6398
6399
6400int
6401main ()
6402{
6403
6404 ;
6405 return 0;
6406}
6407
6408_ACEOF
6409if ac_fn_c_try_compile "$LINENO"; then :
6410
6411 ac_cv_declaration_after_statement_warning=yes
6412
6413else
6414
6415 ac_cv_declaration_after_statement_warning=no
6416
6417fi
6418rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6419fi
6420
6421 CFLAGS="$save_CFLAGS"
6422 CC="$ac_save_cc"
6423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_declaration_after_statement_warning" >&5
6424$as_echo "$ac_cv_declaration_after_statement_warning" >&6; }
6425
6426 if test $ac_cv_declaration_after_statement_warning = yes
6427 then
6428 BASECFLAGS="$BASECFLAGS -Werror=declaration-after-statement"
6429 fi
6430
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006431 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
6432 # support. Without this, treatment of subnormals doesn't follow
6433 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01006434 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006435 alpha*)
6436 BASECFLAGS="$BASECFLAGS -mieee"
6437 ;;
6438 esac
6439
6440 case $ac_sys_system in
6441 SCO_SV*)
6442 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
6443 ;;
Ned Deily87adb6e2013-10-18 21:09:56 -07006444
6445 # is there any other compiler on Darwin besides gcc?
6446 Darwin*)
6447 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
6448 # used to be here, but non-Apple gcc doesn't accept them.
6449 if test "${CC}" = gcc
6450 then
6451 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006452$as_echo_n "checking which compiler should be used... " >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07006453 case "${UNIVERSALSDK}" in
6454 */MacOSX10.4u.sdk)
6455 # Build using 10.4 SDK, force usage of gcc when the
6456 # compiler is gcc, otherwise the user will get very
6457 # confusing error messages when building on OSX 10.6
6458 CC=gcc-4.0
6459 CPP=cpp-4.0
6460 ;;
6461 esac
6462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006463$as_echo "$CC" >&6; }
Ned Deily87adb6e2013-10-18 21:09:56 -07006464 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006465
Ned Deily87adb6e2013-10-18 21:09:56 -07006466 if test "${enable_universalsdk}"
6467 then
6468 case "$UNIVERSAL_ARCHS" in
6469 32-bit)
6470 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
6471 LIPO_32BIT_FLAGS=""
6472 ARCH_RUN_32BIT=""
6473 ;;
6474 64-bit)
6475 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
6476 LIPO_32BIT_FLAGS=""
6477 ARCH_RUN_32BIT="true"
6478 ;;
6479 all)
6480 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
6481 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
6482 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
6483 ;;
6484 intel)
6485 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
6486 LIPO_32BIT_FLAGS="-extract i386"
6487 ARCH_RUN_32BIT="/usr/bin/arch -i386"
6488 ;;
6489 intel-32)
6490 UNIVERSAL_ARCH_FLAGS="-arch i386"
6491 LIPO_32BIT_FLAGS=""
6492 ARCH_RUN_32BIT=""
6493 ;;
6494 3-way)
6495 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
6496 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
6497 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
6498 ;;
6499 *)
6500 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
6501 ;;
6502 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006503
Ned Deily87adb6e2013-10-18 21:09:56 -07006504 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
6505 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
6506 if test "${UNIVERSALSDK}" != "/"
6507 then
6508 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
6509 fi
6510 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006511
Ned Deily87adb6e2013-10-18 21:09:56 -07006512 # Calculate an appropriate deployment target for this build:
6513 # The deployment target value is used explicitly to enable certain
6514 # features are enabled (such as builtin libedit support for readline)
6515 # through the use of Apple's Availabiliy Macros and is used as a
6516 # component of the string returned by distutils.get_platform().
6517 #
6518 # Use the value from:
6519 # 1. the MACOSX_DEPLOYMENT_TARGET environment variable if specified
6520 # 2. the operating system version of the build machine if >= 10.6
6521 # 3. If running on OS X 10.3 through 10.5, use the legacy tests
6522 # below to pick either 10.3, 10.4, or 10.5 as the target.
6523 # 4. If we are running on OS X 10.2 or earlier, good luck!
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006524
Ned Deily87adb6e2013-10-18 21:09:56 -07006525 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which MACOSX_DEPLOYMENT_TARGET to use" >&5
6526$as_echo_n "checking which MACOSX_DEPLOYMENT_TARGET to use... " >&6; }
6527 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
6528 if test ${cur_target} '>' 10.2 && \
6529 test ${cur_target} '<' 10.6
6530 then
6531 cur_target=10.3
6532 if test ${enable_universalsdk}
6533 then
6534 case "$UNIVERSAL_ARCHS" in
6535 all|3-way|intel|64-bit)
6536 # These configurations were first supported in 10.5
6537 cur_target='10.5'
6538 ;;
6539 esac
6540 else
6541 if test `/usr/bin/arch` = "i386"
6542 then
6543 # 10.4 was the first release to support Intel archs
6544 cur_target="10.4"
6545 fi
6546 fi
6547 fi
6548 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006549
Ned Deily87adb6e2013-10-18 21:09:56 -07006550 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
6551 # environment with a value that is the same as what we'll use
6552 # in the Makefile to ensure that we'll get the same compiler
6553 # environment during configure and build time.
6554 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
6555 export MACOSX_DEPLOYMENT_TARGET
6556 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
6557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACOSX_DEPLOYMENT_TARGET" >&5
6558$as_echo "$MACOSX_DEPLOYMENT_TARGET" >&6; }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006559
Ned Deily87adb6e2013-10-18 21:09:56 -07006560 # end of Darwin* tests
6561 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006562 esac
6563 ;;
6564
6565*)
6566 case $ac_sys_system in
6567 OpenUNIX*|UnixWare*)
6568 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
6569 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006570 SCO_SV*)
6571 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
6572 ;;
6573 esac
6574 ;;
6575esac
6576
6577if test "$Py_DEBUG" = 'true'; then
6578 :
6579else
6580 OPT="-DNDEBUG $OPT"
6581fi
6582
6583if test "$ac_arch_flags"
6584then
6585 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
6586fi
6587
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006588# On some compilers, pthreads are available without further options
6589# (e.g. MacOS X). On some of these systems, the compiler will not
6590# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
6591# So we have to see first whether pthreads are available without
6592# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00006593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
6594$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006595if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006596 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006597else
Matthias Kloseb9621712010-04-24 17:59:49 +00006598 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006599 ac_cv_pthread_is_default=no
6600else
Matthias Kloseb9621712010-04-24 17:59:49 +00006601 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006602/* end confdefs.h. */
6603
Stefan Krah7dba5942012-11-22 22:49:11 +01006604#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006605#include <pthread.h>
6606
6607void* routine(void* p){return NULL;}
6608
6609int main(){
6610 pthread_t p;
6611 if(pthread_create(&p,NULL,routine,NULL)!=0)
6612 return 1;
6613 (void)pthread_detach(p);
6614 return 0;
6615}
6616
6617_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006618if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006619
6620 ac_cv_pthread_is_default=yes
6621 ac_cv_kthread=no
6622 ac_cv_pthread=no
6623
6624else
Matthias Kloseb9621712010-04-24 17:59:49 +00006625 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006626fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006627rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6628 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006629fi
6630
6631
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006632fi
6633
Matthias Kloseb9621712010-04-24 17:59:49 +00006634{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
6635$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006636
6637
6638if test $ac_cv_pthread_is_default = yes
6639then
6640 ac_cv_kpthread=no
6641else
6642# -Kpthread, if available, provides the right #defines
6643# and linker options to make pthread_create available
6644# Some compilers won't report that they do not support -Kpthread,
6645# so we need to run a program to see whether it really made the
6646# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
6648$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006649if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006650 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006651else
6652 ac_save_cc="$CC"
6653CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006654if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006655 ac_cv_kpthread=no
6656else
Matthias Kloseb9621712010-04-24 17:59:49 +00006657 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006658/* end confdefs.h. */
6659
Stefan Krah7dba5942012-11-22 22:49:11 +01006660#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006661#include <pthread.h>
6662
6663void* routine(void* p){return NULL;}
6664
6665int main(){
6666 pthread_t p;
6667 if(pthread_create(&p,NULL,routine,NULL)!=0)
6668 return 1;
6669 (void)pthread_detach(p);
6670 return 0;
6671}
6672
6673_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006674if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006675 ac_cv_kpthread=yes
6676else
Matthias Kloseb9621712010-04-24 17:59:49 +00006677 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006678fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006679rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6680 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006681fi
6682
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006683CC="$ac_save_cc"
6684fi
6685
Matthias Kloseb9621712010-04-24 17:59:49 +00006686{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
6687$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006688fi
6689
6690if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
6691then
6692# -Kthread, if available, provides the right #defines
6693# and linker options to make pthread_create available
6694# Some compilers won't report that they do not support -Kthread,
6695# so we need to run a program to see whether it really made the
6696# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
6698$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006699if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006700 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006701else
6702 ac_save_cc="$CC"
6703CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006704if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006705 ac_cv_kthread=no
6706else
Matthias Kloseb9621712010-04-24 17:59:49 +00006707 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006708/* end confdefs.h. */
6709
Stefan Krah7dba5942012-11-22 22:49:11 +01006710#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006711#include <pthread.h>
6712
6713void* routine(void* p){return NULL;}
6714
6715int main(){
6716 pthread_t p;
6717 if(pthread_create(&p,NULL,routine,NULL)!=0)
6718 return 1;
6719 (void)pthread_detach(p);
6720 return 0;
6721}
6722
6723_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006724if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006725 ac_cv_kthread=yes
6726else
Matthias Kloseb9621712010-04-24 17:59:49 +00006727 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006728fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006729rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6730 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006731fi
6732
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006733CC="$ac_save_cc"
6734fi
6735
Matthias Kloseb9621712010-04-24 17:59:49 +00006736{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
6737$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006738fi
6739
6740if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
6741then
6742# -pthread, if available, provides the right #defines
6743# and linker options to make pthread_create available
6744# Some compilers won't report that they do not support -pthread,
6745# so we need to run a program to see whether it really made the
6746# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
6748$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01006749if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006750 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006751else
6752 ac_save_cc="$CC"
6753CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006754if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006755 ac_cv_pthread=no
6756else
Matthias Kloseb9621712010-04-24 17:59:49 +00006757 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006758/* end confdefs.h. */
6759
Stefan Krah7dba5942012-11-22 22:49:11 +01006760#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006761#include <pthread.h>
6762
6763void* routine(void* p){return NULL;}
6764
6765int main(){
6766 pthread_t p;
6767 if(pthread_create(&p,NULL,routine,NULL)!=0)
6768 return 1;
6769 (void)pthread_detach(p);
6770 return 0;
6771}
6772
6773_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006774if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006775 ac_cv_pthread=yes
6776else
Matthias Kloseb9621712010-04-24 17:59:49 +00006777 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006778fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006779rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6780 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006781fi
6782
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006783CC="$ac_save_cc"
6784fi
6785
Matthias Kloseb9621712010-04-24 17:59:49 +00006786{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
6787$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006788fi
6789
6790# If we have set a CC compiler flag for thread support then
6791# check if it works for CXX, too.
6792ac_cv_cxx_thread=no
6793if test ! -z "$CXX"
6794then
Matthias Kloseb9621712010-04-24 17:59:49 +00006795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
6796$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006797ac_save_cxx="$CXX"
6798
6799if test "$ac_cv_kpthread" = "yes"
6800then
6801 CXX="$CXX -Kpthread"
6802 ac_cv_cxx_thread=yes
6803elif test "$ac_cv_kthread" = "yes"
6804then
6805 CXX="$CXX -Kthread"
6806 ac_cv_cxx_thread=yes
6807elif test "$ac_cv_pthread" = "yes"
6808then
6809 CXX="$CXX -pthread"
6810 ac_cv_cxx_thread=yes
6811fi
6812
6813if test $ac_cv_cxx_thread = yes
6814then
6815 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
6816 $CXX -c conftest.$ac_ext 2>&5
6817 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
6818 && test -s conftest$ac_exeext && ./conftest$ac_exeext
6819 then
6820 ac_cv_cxx_thread=yes
6821 else
6822 ac_cv_cxx_thread=no
6823 fi
6824 rm -fr conftest*
6825fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006826{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
6827$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006828fi
6829CXX="$ac_save_cxx"
6830
6831
6832# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00006833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6834$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006835if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006836 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006837else
Matthias Kloseb9621712010-04-24 17:59:49 +00006838 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006839/* end confdefs.h. */
6840#include <stdlib.h>
6841#include <stdarg.h>
6842#include <string.h>
6843#include <float.h>
6844
6845int
6846main ()
6847{
6848
6849 ;
6850 return 0;
6851}
6852_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006853if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006854 ac_cv_header_stdc=yes
6855else
Matthias Kloseb9621712010-04-24 17:59:49 +00006856 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006857fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006858rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6859
6860if test $ac_cv_header_stdc = yes; then
6861 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006862 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006863/* end confdefs.h. */
6864#include <string.h>
6865
6866_ACEOF
6867if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006868 $EGREP "memchr" >/dev/null 2>&1; then :
6869
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006870else
6871 ac_cv_header_stdc=no
6872fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006873rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006874
6875fi
6876
6877if test $ac_cv_header_stdc = yes; then
6878 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
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 <stdlib.h>
6882
6883_ACEOF
6884if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006885 $EGREP "free" >/dev/null 2>&1; then :
6886
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006887else
6888 ac_cv_header_stdc=no
6889fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006890rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006891
6892fi
6893
6894if test $ac_cv_header_stdc = yes; then
6895 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00006896 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006897 :
6898else
Matthias Kloseb9621712010-04-24 17:59:49 +00006899 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006900/* end confdefs.h. */
6901#include <ctype.h>
6902#include <stdlib.h>
6903#if ((' ' & 0x0FF) == 0x020)
6904# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6905# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6906#else
6907# define ISLOWER(c) \
6908 (('a' <= (c) && (c) <= 'i') \
6909 || ('j' <= (c) && (c) <= 'r') \
6910 || ('s' <= (c) && (c) <= 'z'))
6911# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6912#endif
6913
6914#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6915int
6916main ()
6917{
6918 int i;
6919 for (i = 0; i < 256; i++)
6920 if (XOR (islower (i), ISLOWER (i))
6921 || toupper (i) != TOUPPER (i))
6922 return 2;
6923 return 0;
6924}
6925_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006926if ac_fn_c_try_run "$LINENO"; then :
6927
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006928else
Matthias Kloseb9621712010-04-24 17:59:49 +00006929 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006930fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006931rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6932 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006933fi
6934
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006935fi
6936fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006937{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6938$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006939if test $ac_cv_header_stdc = yes; then
6940
Matthias Kloseb9621712010-04-24 17:59:49 +00006941$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006942
6943fi
6944
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +02006945ac_save_cppflags="$CPPFLAGS"
6946CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
Benjamin Petersonb77fe172011-09-13 17:20:47 -04006947for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006948fcntl.h grp.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006949ieeefp.h io.h langinfo.h libintl.h ncurses.h process.h pthread.h \
Benjamin Peterson94b580d2011-08-02 17:30:04 -05006950sched.h shadow.h signal.h stdint.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006951unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006952poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01006953sys/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 +01006954sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006955sys/param.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01006956sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00006957sys/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 -07006958libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimesf0400ba2013-06-18 13:22:17 +02006959bluetooth/bluetooth.h linux/tipc.h spawn.h util.h alloca.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006960do :
6961 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6962ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006963if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006964 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006965#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006966_ACEOF
6967
6968fi
6969
Guido van Rossum627b2d71993-12-24 10:39:16 +00006970done
6971
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +02006972CPPFLAGS=$ac_save_cppflags
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006973ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006974for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00006975 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6977$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006978if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006979 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006980else
Matthias Kloseb9621712010-04-24 17:59:49 +00006981 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006982/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006983#include <sys/types.h>
6984#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006985
Martin v. Löwis11437992002-04-12 09:54:03 +00006986int
6987main ()
6988{
6989if ((DIR *) 0)
6990return 0;
6991 ;
6992 return 0;
6993}
6994_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006995if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006996 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006997else
Matthias Kloseb9621712010-04-24 17:59:49 +00006998 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006999fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007000rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007001fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007002eval ac_res=\$$as_ac_Header
7003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7004$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007005if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007006 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007007#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00007008_ACEOF
7009
7010ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00007011fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007012
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007013done
7014# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7015if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007016 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7017$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007018if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007019 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007020else
Martin v. Löwis11437992002-04-12 09:54:03 +00007021 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007022cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007023/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007024
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007025/* Override any GCC internal prototype to avoid an error.
7026 Use char because int might match the return type of a GCC
7027 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007028#ifdef __cplusplus
7029extern "C"
7030#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007031char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007032int
7033main ()
7034{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007035return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007036 ;
7037 return 0;
7038}
7039_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007040for ac_lib in '' dir; do
7041 if test -z "$ac_lib"; then
7042 ac_res="none required"
7043 else
7044 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007045 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007046 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007047 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007048 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007049fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007050rm -f core conftest.err conftest.$ac_objext \
7051 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007052 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007053 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007054fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007055done
Victor Stinnere0be4232011-10-25 13:06:09 +02007056if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007057
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007058else
7059 ac_cv_search_opendir=no
7060fi
7061rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007062LIBS=$ac_func_search_save_LIBS
7063fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007064{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7065$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007066ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007067if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007068 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007069
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007070fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007071
Michael W. Hudson54241132001-12-07 15:38:26 +00007072else
Matthias Kloseb9621712010-04-24 17:59:49 +00007073 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7074$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007075if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007076 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007077else
7078 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007079cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007080/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007081
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007082/* Override any GCC internal prototype to avoid an error.
7083 Use char because int might match the return type of a GCC
7084 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007085#ifdef __cplusplus
7086extern "C"
7087#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007088char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007089int
7090main ()
7091{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007092return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007093 ;
7094 return 0;
7095}
7096_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007097for ac_lib in '' x; do
7098 if test -z "$ac_lib"; then
7099 ac_res="none required"
7100 else
7101 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007102 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007103 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007104 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007105 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007106fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007107rm -f core conftest.err conftest.$ac_objext \
7108 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007109 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007110 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007111fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007112done
Victor Stinnere0be4232011-10-25 13:06:09 +02007113if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007114
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007115else
7116 ac_cv_search_opendir=no
7117fi
7118rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007119LIBS=$ac_func_search_save_LIBS
7120fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007121{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7122$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007123ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007124if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007125 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007126
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007127fi
7128
7129fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007130
Matthias Kloseb9621712010-04-24 17:59:49 +00007131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7132$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007133if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007134 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007135else
Matthias Kloseb9621712010-04-24 17:59:49 +00007136 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007137/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007138#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007139int
7140main ()
7141{
7142return makedev(0, 0);
7143 ;
7144 return 0;
7145}
7146_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007147if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007148 ac_cv_header_sys_types_h_makedev=yes
7149else
Matthias Kloseb9621712010-04-24 17:59:49 +00007150 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007151fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007152rm -f core conftest.err conftest.$ac_objext \
7153 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007154
7155fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007156{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7157$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007158
7159if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007160ac_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 +02007161if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007162
Matthias Kloseb9621712010-04-24 17:59:49 +00007163$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007164
7165fi
7166
7167
7168
7169 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007170 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 +02007171if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007172
Matthias Kloseb9621712010-04-24 17:59:49 +00007173$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007174
7175fi
7176
7177
7178 fi
7179fi
7180
Michael W. Hudson54241132001-12-07 15:38:26 +00007181
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007182# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
7183for ac_header in net/if.h
7184do :
7185 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
7186#ifdef STDC_HEADERS
7187# include <stdlib.h>
7188# include <stddef.h>
7189#else
7190# ifdef HAVE_STDLIB_H
7191# include <stdlib.h>
7192# endif
7193#endif
7194#ifdef HAVE_SYS_SOCKET_H
7195# include <sys/socket.h>
7196#endif
7197
7198"
Victor Stinnere0be4232011-10-25 13:06:09 +02007199if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007200 cat >>confdefs.h <<_ACEOF
7201#define HAVE_NET_IF_H 1
7202_ACEOF
7203
7204fi
7205
7206done
7207
7208
7209
Martin v. Löwisae2830c2004-09-18 09:54:52 +00007210# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00007211for ac_header in term.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007212do :
7213 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00007214#ifdef HAVE_CURSES_H
7215#include <curses.h>
7216#endif
7217
Matthias Kloseb9621712010-04-24 17:59:49 +00007218"
Victor Stinnere0be4232011-10-25 13:06:09 +02007219if test "x$ac_cv_header_term_h" = xyes; then :
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00007220 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007221#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00007222_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00007223
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00007224fi
7225
7226done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00007227
7228
Martin v. Löwis11017b12006-01-14 18:12:57 +00007229# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007230for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007231do :
7232 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 +00007233#ifdef HAVE_ASM_TYPES_H
7234#include <asm/types.h>
7235#endif
7236#ifdef HAVE_SYS_SOCKET_H
7237#include <sys/socket.h>
7238#endif
7239
Matthias Kloseb9621712010-04-24 17:59:49 +00007240"
Victor Stinnere0be4232011-10-25 13:06:09 +02007241if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007242 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007243#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007244_ACEOF
7245
7246fi
7247
7248done
7249
7250
Charles-François Natali47413c12011-10-06 19:47:44 +02007251# On Linux, can.h and can/raw.h require sys/socket.h
Charles-François Natali773e42d2013-02-05 19:42:01 +01007252for ac_header in linux/can.h linux/can/raw.h linux/can/bcm.h
Charles-François Natali47413c12011-10-06 19:47:44 +02007253do :
7254 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7255ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
7256#ifdef HAVE_SYS_SOCKET_H
7257#include <sys/socket.h>
7258#endif
7259
7260"
7261if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7262 cat >>confdefs.h <<_ACEOF
7263#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7264_ACEOF
7265
7266fi
7267
7268done
7269
7270
Guido van Rossum627b2d71993-12-24 10:39:16 +00007271# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00007272was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
7274$as_echo_n "checking for clock_t in time.h... " >&6; }
7275cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007276/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007277#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007278
7279_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007280if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007281 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00007282 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007283else
Martin v. Löwis11437992002-04-12 09:54:03 +00007284
7285
Matthias Kloseb9621712010-04-24 17:59:49 +00007286$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00007287
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007288
Guido van Rossum627b2d71993-12-24 10:39:16 +00007289fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007290rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007291
Matthias Kloseb9621712010-04-24 17:59:49 +00007292{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
7293$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00007294
Matthias Kloseb9621712010-04-24 17:59:49 +00007295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
7296$as_echo_n "checking for makedev... " >&6; }
7297cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007298/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007299
Jesus Cea740f53a2010-04-28 11:35:30 +00007300#if defined(MAJOR_IN_MKDEV)
7301#include <sys/mkdev.h>
7302#elif defined(MAJOR_IN_SYSMACROS)
7303#include <sys/sysmacros.h>
7304#else
7305#include <sys/types.h>
7306#endif
7307
Neal Norwitz11690112002-07-30 01:08:28 +00007308int
7309main ()
7310{
Jesus Cea740f53a2010-04-28 11:35:30 +00007311
7312 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00007313 ;
7314 return 0;
7315}
Matthias Kloseb159a552010-04-25 21:00:44 +00007316
Neal Norwitz11690112002-07-30 01:08:28 +00007317_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007318if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007319 ac_cv_has_makedev=yes
7320else
Matthias Kloseb9621712010-04-24 17:59:49 +00007321 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007322fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007323rm -f core conftest.err conftest.$ac_objext \
7324 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007325{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
7326$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007327if test "$ac_cv_has_makedev" = "yes"; then
7328
Matthias Kloseb9621712010-04-24 17:59:49 +00007329$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007330
7331fi
7332
Martin v. Löwis399a6892002-10-04 10:22:02 +00007333# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7334# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7335# defined, but the compiler does not support pragma redefine_extname,
7336# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7337# structures (such as rlimit64) without declaring them. As a
7338# work-around, disable LFS on such configurations
7339
7340use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00007341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
7342$as_echo_n "checking Solaris LFS bug... " >&6; }
7343cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007344/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007345
7346#define _LARGEFILE_SOURCE 1
7347#define _FILE_OFFSET_BITS 64
7348#include <sys/resource.h>
7349
Martin v. Löwis399a6892002-10-04 10:22:02 +00007350int
7351main ()
7352{
7353struct rlimit foo;
7354 ;
7355 return 0;
7356}
7357_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007358if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00007359 sol_lfs_bug=no
7360else
Matthias Kloseb9621712010-04-24 17:59:49 +00007361 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00007362fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007363rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007364{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
7365$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007366if test "$sol_lfs_bug" = "yes"; then
7367 use_lfs=no
7368fi
7369
7370if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00007371# Two defines needed to enable largefile support on various platforms
7372# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00007373case $ac_sys_system/$ac_sys_release in
7374AIX*)
7375
7376$as_echo "#define _LARGE_FILES 1" >>confdefs.h
7377
7378 ;;
7379esac
Guido van Rossum810cc512001-09-09 23:51:39 +00007380
Matthias Kloseb9621712010-04-24 17:59:49 +00007381$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007382
7383
Matthias Kloseb9621712010-04-24 17:59:49 +00007384$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00007385
Martin v. Löwis399a6892002-10-04 10:22:02 +00007386fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007387
Guido van Rossum84e7b241996-08-19 21:59:00 +00007388# Add some code to confdefs.h so that the test for off_t works on SCO
7389cat >> confdefs.h <<\EOF
7390#if defined(SCO_DS)
7391#undef _OFF_T
7392#endif
7393EOF
7394
Guido van Rossumef2255b2000-03-10 22:30:29 +00007395# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00007396ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007397if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007398
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007399else
Martin v. Löwis11437992002-04-12 09:54:03 +00007400
7401cat >>confdefs.h <<_ACEOF
7402#define mode_t int
7403_ACEOF
7404
7405fi
7406
Matthias Kloseb9621712010-04-24 17:59:49 +00007407ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007408if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007409
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007410else
Martin v. Löwis11437992002-04-12 09:54:03 +00007411
7412cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007413#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00007414_ACEOF
7415
7416fi
7417
Matthias Kloseb9621712010-04-24 17:59:49 +00007418ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007419if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007420
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007421else
Martin v. Löwis11437992002-04-12 09:54:03 +00007422
7423cat >>confdefs.h <<_ACEOF
7424#define pid_t int
7425_ACEOF
7426
7427fi
7428
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007429
Martin v. Löwis11437992002-04-12 09:54:03 +00007430cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00007431#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00007432_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007433
Matthias Kloseb9621712010-04-24 17:59:49 +00007434ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007435if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007436
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007437else
Martin v. Löwis11437992002-04-12 09:54:03 +00007438
7439cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007440#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007441_ACEOF
7442
7443fi
7444
Matthias Kloseb9621712010-04-24 17:59:49 +00007445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
7446$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007447if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007448 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007449else
Matthias Kloseb9621712010-04-24 17:59:49 +00007450 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007451/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007452#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007453
7454_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007455if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007456 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007457 ac_cv_type_uid_t=yes
7458else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007459 ac_cv_type_uid_t=no
7460fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007461rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007462
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007463fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007464{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
7465$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007466if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007467
Matthias Kloseb9621712010-04-24 17:59:49 +00007468$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007469
7470
Matthias Kloseb9621712010-04-24 17:59:49 +00007471$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007472
7473fi
7474
Mark Dickinson983bc162012-12-02 12:11:38 +00007475
7476# There are two separate checks for each of the exact-width integer types we
7477# need. First we check whether the type is available using the usual
7478# AC_CHECK_TYPE macro with the default includes (which includes <inttypes.h>
7479# and <stdint.h> where available). We then also use the special type checks of
7480# the form AC_TYPE_UINT32_T, which in the case that uint32_t is not available
7481# directly, #define's uint32_t to be a suitable type.
7482
7483ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
7484if test "x$ac_cv_type_uint32_t" = xyes; then :
7485
7486$as_echo "#define HAVE_UINT32_T 1" >>confdefs.h
7487
7488fi
7489
Matthias Kloseb9621712010-04-24 17:59:49 +00007490ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
7491case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007492 no|yes) ;; #(
7493 *)
7494
Matthias Kloseb9621712010-04-24 17:59:49 +00007495$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00007496
7497
7498cat >>confdefs.h <<_ACEOF
7499#define uint32_t $ac_cv_c_uint32_t
7500_ACEOF
7501;;
7502 esac
7503
Mark Dickinson983bc162012-12-02 12:11:38 +00007504
7505ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
7506if test "x$ac_cv_type_uint64_t" = xyes; then :
7507
7508$as_echo "#define HAVE_UINT64_T 1" >>confdefs.h
7509
7510fi
7511
Matthias Kloseb9621712010-04-24 17:59:49 +00007512ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
7513case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007514 no|yes) ;; #(
7515 *)
7516
Matthias Kloseb9621712010-04-24 17:59:49 +00007517$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00007518
7519
7520cat >>confdefs.h <<_ACEOF
7521#define uint64_t $ac_cv_c_uint64_t
7522_ACEOF
7523;;
7524 esac
7525
Mark Dickinson983bc162012-12-02 12:11:38 +00007526
7527ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
7528if test "x$ac_cv_type_int32_t" = xyes; then :
7529
7530$as_echo "#define HAVE_INT32_T 1" >>confdefs.h
7531
7532fi
7533
Matthias Kloseb9621712010-04-24 17:59:49 +00007534ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
7535case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007536 no|yes) ;; #(
7537 *)
7538
7539cat >>confdefs.h <<_ACEOF
7540#define int32_t $ac_cv_c_int32_t
7541_ACEOF
7542;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00007543esac
7544
Mark Dickinson983bc162012-12-02 12:11:38 +00007545
7546ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
7547if test "x$ac_cv_type_int64_t" = xyes; then :
7548
7549$as_echo "#define HAVE_INT64_T 1" >>confdefs.h
7550
7551fi
7552
Matthias Kloseb9621712010-04-24 17:59:49 +00007553ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
7554case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007555 no|yes) ;; #(
7556 *)
7557
7558cat >>confdefs.h <<_ACEOF
7559#define int64_t $ac_cv_c_int64_t
7560_ACEOF
7561;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007562esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00007563
Mark Dickinson983bc162012-12-02 12:11:38 +00007564
Matthias Kloseb9621712010-04-24 17:59:49 +00007565ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007566if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007567
Matthias Kloseb9621712010-04-24 17:59:49 +00007568$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00007569
7570fi
7571
Stefan Krah1919b7e2012-03-21 18:25:23 +01007572ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
7573if test "x$ac_cv_type___uint128_t" = xyes; then :
7574
7575$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
7576
7577fi
7578
Jack Jansendd19cf82001-12-06 22:36:17 +00007579
Michael W. Hudson54241132001-12-07 15:38:26 +00007580# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007581# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007582# The cast to long int works around a bug in the HP C Compiler
7583# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7584# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7585# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
7587$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007588if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007589 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007590else
Matthias Kloseb9621712010-04-24 17:59:49 +00007591 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 +00007592
Martin v. Löwis11437992002-04-12 09:54:03 +00007593else
Matthias Kloseb9621712010-04-24 17:59:49 +00007594 if test "$ac_cv_type_int" = yes; then
7595 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7596$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007597as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02007598See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007599 else
7600 ac_cv_sizeof_int=0
7601 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007602fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007603
Martin v. Löwis11437992002-04-12 09:54:03 +00007604fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007605{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
7606$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007607
7608
7609
Martin v. Löwis11437992002-04-12 09:54:03 +00007610cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007611#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007612_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007613
7614
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007615# The cast to long int works around a bug in the HP C Compiler
7616# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7617# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7618# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
7620$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007621if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007622 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007623else
Matthias Kloseb9621712010-04-24 17:59:49 +00007624 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 +00007625
Martin v. Löwis11437992002-04-12 09:54:03 +00007626else
Matthias Kloseb9621712010-04-24 17:59:49 +00007627 if test "$ac_cv_type_long" = yes; then
7628 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7629$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007630as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02007631See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007632 else
7633 ac_cv_sizeof_long=0
7634 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007635fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007636
Martin v. Löwis11437992002-04-12 09:54:03 +00007637fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007638{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
7639$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007640
7641
7642
Martin v. Löwis11437992002-04-12 09:54:03 +00007643cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007644#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007645_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007646
7647
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007648# The cast to long int works around a bug in the HP C Compiler
7649# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7650# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7651# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
7653$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007654if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007655 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007656else
Matthias Kloseb9621712010-04-24 17:59:49 +00007657 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 +00007658
Martin v. Löwis11437992002-04-12 09:54:03 +00007659else
Matthias Kloseb9621712010-04-24 17:59:49 +00007660 if test "$ac_cv_type_void_p" = yes; then
7661 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7662$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007663as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02007664See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007665 else
7666 ac_cv_sizeof_void_p=0
7667 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007668fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007669
Martin v. Löwis11437992002-04-12 09:54:03 +00007670fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007671{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
7672$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007673
7674
7675
Martin v. Löwis11437992002-04-12 09:54:03 +00007676cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007677#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00007678_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007679
7680
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007681# The cast to long int works around a bug in the HP C Compiler
7682# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7683# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7684# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
7686$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007687if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007688 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007689else
Matthias Kloseb9621712010-04-24 17:59:49 +00007690 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 +00007691
Martin v. Löwis11437992002-04-12 09:54:03 +00007692else
Matthias Kloseb9621712010-04-24 17:59:49 +00007693 if test "$ac_cv_type_short" = yes; then
7694 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7695$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007696as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02007697See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007698 else
7699 ac_cv_sizeof_short=0
7700 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007701fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007702
Martin v. Löwis11437992002-04-12 09:54:03 +00007703fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007704{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
7705$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007706
7707
7708
Martin v. Löwis11437992002-04-12 09:54:03 +00007709cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007710#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007711_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007712
7713
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007714# The cast to long int works around a bug in the HP C Compiler
7715# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7716# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7717# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
7719$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007720if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007721 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007722else
Matthias Kloseb9621712010-04-24 17:59:49 +00007723 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 +00007724
Martin v. Löwis11437992002-04-12 09:54:03 +00007725else
Matthias Kloseb9621712010-04-24 17:59:49 +00007726 if test "$ac_cv_type_float" = yes; then
7727 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7728$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007729as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02007730See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007731 else
7732 ac_cv_sizeof_float=0
7733 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007734fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007735
Martin v. Löwis11437992002-04-12 09:54:03 +00007736fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007737{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
7738$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007739
7740
7741
Martin v. Löwis11437992002-04-12 09:54:03 +00007742cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007743#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007744_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007745
7746
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007747# The cast to long int works around a bug in the HP C Compiler
7748# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7749# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7750# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
7752$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007753if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007754 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007755else
Matthias Kloseb9621712010-04-24 17:59:49 +00007756 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 +00007757
Martin v. Löwis11437992002-04-12 09:54:03 +00007758else
Matthias Kloseb9621712010-04-24 17:59:49 +00007759 if test "$ac_cv_type_double" = yes; then
7760 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7761$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007762as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02007763See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007764 else
7765 ac_cv_sizeof_double=0
7766 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007767fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007768
Martin v. Löwis11437992002-04-12 09:54:03 +00007769fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007770{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
7771$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007772
7773
7774
Martin v. Löwis11437992002-04-12 09:54:03 +00007775cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007776#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007777_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007778
7779
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007780# The cast to long int works around a bug in the HP C Compiler
7781# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7782# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7783# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
7785$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007786if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007787 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007788else
Matthias Kloseb9621712010-04-24 17:59:49 +00007789 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 +00007790
Martin v. Löwis11437992002-04-12 09:54:03 +00007791else
Matthias Kloseb9621712010-04-24 17:59:49 +00007792 if test "$ac_cv_type_fpos_t" = yes; then
7793 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7794$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007795as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007796See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007797 else
7798 ac_cv_sizeof_fpos_t=0
7799 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007800fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007801
Martin v. Löwis11437992002-04-12 09:54:03 +00007802fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007803{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
7804$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007805
7806
7807
Martin v. Löwis11437992002-04-12 09:54:03 +00007808cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007809#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007810_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007811
Michael W. Hudson54241132001-12-07 15:38:26 +00007812
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007813# The cast to long int works around a bug in the HP C Compiler
7814# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7815# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7816# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
7818$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007819if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007820 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007821else
Matthias Kloseb9621712010-04-24 17:59:49 +00007822 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 +00007823
Martin v. Löwis18e16552006-02-15 17:27:45 +00007824else
Matthias Kloseb9621712010-04-24 17:59:49 +00007825 if test "$ac_cv_type_size_t" = yes; then
7826 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7827$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007828as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007829See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007830 else
7831 ac_cv_sizeof_size_t=0
7832 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00007833fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007834
Martin v. Löwis18e16552006-02-15 17:27:45 +00007835fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007836{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
7837$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007838
7839
7840
Martin v. Löwis18e16552006-02-15 17:27:45 +00007841cat >>confdefs.h <<_ACEOF
7842#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
7843_ACEOF
7844
7845
Christian Heimes400adb02008-02-01 08:12:03 +00007846# The cast to long int works around a bug in the HP C Compiler
7847# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7848# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7849# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
7851$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007852if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007853 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00007854else
Matthias Kloseb9621712010-04-24 17:59:49 +00007855 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 +00007856
Christian Heimes400adb02008-02-01 08:12:03 +00007857else
Matthias Kloseb9621712010-04-24 17:59:49 +00007858 if test "$ac_cv_type_pid_t" = yes; then
7859 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7860$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007861as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007862See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00007863 else
7864 ac_cv_sizeof_pid_t=0
7865 fi
7866fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007867
Christian Heimes400adb02008-02-01 08:12:03 +00007868fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007869{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
7870$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00007871
7872
7873
7874cat >>confdefs.h <<_ACEOF
7875#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
7876_ACEOF
7877
7878
Michael W. Hudson54241132001-12-07 15:38:26 +00007879
Matthias Kloseb9621712010-04-24 17:59:49 +00007880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
7881$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007882have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007883cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007884/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007885
Martin v. Löwis11437992002-04-12 09:54:03 +00007886int
7887main ()
7888{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007889long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007890 ;
7891 return 0;
7892}
7893_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007894if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007895
7896
Matthias Kloseb9621712010-04-24 17:59:49 +00007897$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007898
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007899 have_long_long=yes
7900
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007901fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007902rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007903{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
7904$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007905if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007906# The cast to long int works around a bug in the HP C Compiler
7907# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7908# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7909# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
7911$as_echo_n "checking size of long long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007912if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007913 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007914else
Matthias Kloseb9621712010-04-24 17:59:49 +00007915 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 +00007916
Martin v. Löwis11437992002-04-12 09:54:03 +00007917else
Matthias Kloseb9621712010-04-24 17:59:49 +00007918 if test "$ac_cv_type_long_long" = yes; then
7919 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7920$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007921as_fn_error 77 "cannot compute sizeof (long long)
Victor Stinnere0be4232011-10-25 13:06:09 +02007922See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007923 else
7924 ac_cv_sizeof_long_long=0
7925 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007926fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007927
Martin v. Löwis11437992002-04-12 09:54:03 +00007928fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007929{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
7930$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007931
7932
7933
Martin v. Löwis11437992002-04-12 09:54:03 +00007934cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007935#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007936_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007937
Michael W. Hudson54241132001-12-07 15:38:26 +00007938
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007939fi
7940
Matthias Kloseb9621712010-04-24 17:59:49 +00007941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
7942$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007943have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007944cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007945/* end confdefs.h. */
7946
7947int
7948main ()
7949{
7950long double x; x = (long double)0;
7951 ;
7952 return 0;
7953}
7954_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007955if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007956
7957
Matthias Kloseb9621712010-04-24 17:59:49 +00007958$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007959
7960 have_long_double=yes
7961
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007962fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007963rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007964{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
7965$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007966if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007967# The cast to long int works around a bug in the HP C Compiler
7968# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7969# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7970# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
7972$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007973if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007974 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007975else
Matthias Kloseb9621712010-04-24 17:59:49 +00007976 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 +00007977
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007978else
Matthias Kloseb9621712010-04-24 17:59:49 +00007979 if test "$ac_cv_type_long_double" = yes; then
7980 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7981$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007982as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02007983See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007984 else
7985 ac_cv_sizeof_long_double=0
7986 fi
7987fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007988
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007989fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007990{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
7991$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007992
7993
7994
7995cat >>confdefs.h <<_ACEOF
7996#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7997_ACEOF
7998
7999
8000fi
8001
8002
Matthias Kloseb9621712010-04-24 17:59:49 +00008003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
8004$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008005have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008006cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00008007/* end confdefs.h. */
8008
8009int
8010main ()
8011{
8012_Bool x; x = (_Bool)0;
8013 ;
8014 return 0;
8015}
8016_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008017if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00008018
8019
Matthias Kloseb9621712010-04-24 17:59:49 +00008020$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00008021
8022 have_c99_bool=yes
8023
Thomas Woutersb2137042007-02-01 18:02:27 +00008024fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008025rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008026{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
8027$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008028if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008029# The cast to long int works around a bug in the HP C Compiler
8030# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8031# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8032# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8034$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008035if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008036 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008037else
Matthias Kloseb9621712010-04-24 17:59:49 +00008038 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 +00008039
Thomas Woutersb2137042007-02-01 18:02:27 +00008040else
Matthias Kloseb9621712010-04-24 17:59:49 +00008041 if test "$ac_cv_type__Bool" = yes; then
8042 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8043$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008044as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008045See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008046 else
8047 ac_cv_sizeof__Bool=0
8048 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008049fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008050
Thomas Woutersb2137042007-02-01 18:02:27 +00008051fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008052{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8053$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008054
8055
8056
Thomas Woutersb2137042007-02-01 18:02:27 +00008057cat >>confdefs.h <<_ACEOF
8058#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8059_ACEOF
8060
8061
8062fi
8063
Matthias Kloseb9621712010-04-24 17:59:49 +00008064ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00008065 #include <stdint.h>
8066 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00008067 #ifdef HAVE_INTTYPES_H
8068 #include <inttypes.h>
8069 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00008070"
Victor Stinnere0be4232011-10-25 13:06:09 +02008071if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00008072
8073cat >>confdefs.h <<_ACEOF
8074#define HAVE_UINTPTR_T 1
8075_ACEOF
8076
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008077# The cast to long int works around a bug in the HP C Compiler
8078# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8079# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8080# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8082$as_echo_n "checking size of uintptr_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008083if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008084 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008085else
Matthias Kloseb9621712010-04-24 17:59:49 +00008086 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 +00008087
Martin v. Löwis11437992002-04-12 09:54:03 +00008088else
Matthias Kloseb9621712010-04-24 17:59:49 +00008089 if test "$ac_cv_type_uintptr_t" = yes; then
8090 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8091$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008092as_fn_error 77 "cannot compute sizeof (uintptr_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008093See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008094 else
8095 ac_cv_sizeof_uintptr_t=0
8096 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008097fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008098
Martin v. Löwis11437992002-04-12 09:54:03 +00008099fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008100{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8101$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008102
8103
8104
Martin v. Löwis11437992002-04-12 09:54:03 +00008105cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008106#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008107_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008108
Michael W. Hudson54241132001-12-07 15:38:26 +00008109
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008110fi
8111
Thomas Wouters89f507f2006-12-13 04:49:30 +00008112
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008113# The cast to long int works around a bug in the HP C Compiler
8114# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8115# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8116# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8118$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008119if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008120 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008121else
Matthias Kloseb9621712010-04-24 17:59:49 +00008122 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008123#ifdef HAVE_SYS_TYPES_H
8124#include <sys/types.h>
8125#endif
8126
Matthias Kloseb9621712010-04-24 17:59:49 +00008127"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008128
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008129else
Matthias Kloseb9621712010-04-24 17:59:49 +00008130 if test "$ac_cv_type_off_t" = yes; then
8131 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8132$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008133as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008134See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008135 else
8136 ac_cv_sizeof_off_t=0
8137 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008138fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008139
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008140fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008141{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8142$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008143
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008144
8145
Martin v. Löwis11437992002-04-12 09:54:03 +00008146cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008147#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008148_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008149
Michael W. Hudson54241132001-12-07 15:38:26 +00008150
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008151
Matthias Kloseb9621712010-04-24 17:59:49 +00008152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8153$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008154if test "$have_long_long" = yes
8155then
8156if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008157 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008158
Matthias Kloseb9621712010-04-24 17:59:49 +00008159$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008160
Matthias Kloseb9621712010-04-24 17:59:49 +00008161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8162$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008163else
Matthias Kloseb9621712010-04-24 17:59:49 +00008164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8165$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008166fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00008167else
Matthias Kloseb9621712010-04-24 17:59:49 +00008168 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8169$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008170fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008171
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008172# The cast to long int works around a bug in the HP C Compiler
8173# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8174# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8175# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8177$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008178if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008179 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008180else
Matthias Kloseb9621712010-04-24 17:59:49 +00008181 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008182#ifdef HAVE_SYS_TYPES_H
8183#include <sys/types.h>
8184#endif
8185#ifdef HAVE_TIME_H
8186#include <time.h>
8187#endif
8188
Matthias Kloseb9621712010-04-24 17:59:49 +00008189"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008190
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008191else
Matthias Kloseb9621712010-04-24 17:59:49 +00008192 if test "$ac_cv_type_time_t" = yes; then
8193 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8194$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008195as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008196See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008197 else
8198 ac_cv_sizeof_time_t=0
8199 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008200fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008201
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008202fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008203{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8204$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008205
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008206
8207
Martin v. Löwis11437992002-04-12 09:54:03 +00008208cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008209#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008210_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008211
Michael W. Hudson54241132001-12-07 15:38:26 +00008212
8213
Trent Mick635f6fb2000-08-23 21:33:05 +00008214# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008215ac_save_cc="$CC"
8216if test "$ac_cv_kpthread" = "yes"
8217then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008218elif test "$ac_cv_kthread" = "yes"
8219then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008220elif test "$ac_cv_pthread" = "yes"
8221then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008222fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008223
Matthias Kloseb9621712010-04-24 17:59:49 +00008224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8225$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008226have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008227cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008228/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008229
8230 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008231int
8232main ()
8233{
Guido van Rossum12580492000-09-24 16:47:19 +00008234pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008235 ;
8236 return 0;
8237}
Matthias Kloseb159a552010-04-25 21:00:44 +00008238
Martin v. Löwis11437992002-04-12 09:54:03 +00008239_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008240if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008241 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008242fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008243rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008244{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8245$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008246if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008247 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008248# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8249# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8250# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8252$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008253if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008254 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008255else
Matthias Kloseb9621712010-04-24 17:59:49 +00008256 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008257#ifdef HAVE_PTHREAD_H
8258#include <pthread.h>
8259#endif
8260
Matthias Kloseb9621712010-04-24 17:59:49 +00008261"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008262
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008263else
Matthias Kloseb9621712010-04-24 17:59:49 +00008264 if test "$ac_cv_type_pthread_t" = yes; then
8265 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8266$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008267as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008268See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008269 else
8270 ac_cv_sizeof_pthread_t=0
8271 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008272fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008273
Trent Mick635f6fb2000-08-23 21:33:05 +00008274fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008275{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8276$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008277
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008278
8279
Martin v. Löwis11437992002-04-12 09:54:03 +00008280cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008281#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008282_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008283
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008284
Trent Mick635f6fb2000-08-23 21:33:05 +00008285fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008286CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008287
Michael W. Hudson54241132001-12-07 15:38:26 +00008288
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008289case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008290 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008291 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8292 ;;
8293 Darwin/*)
8294 OTHER_LIBTOOL_OPT=""
8295 ;;
8296esac
8297
8298
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008299
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008300case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008301 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00008302 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8303 if test "${enable_universalsdk}"; then
8304 :
8305 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008306 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008307 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008308 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008309 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008310 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00008311 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008312 if test ${gcc_version} '<' 4.0
8313 then
8314 LIBTOOL_CRUFT="-lcc_dynamic"
8315 else
8316 LIBTOOL_CRUFT=""
8317 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008318 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008319 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008320else
Matthias Kloseb9621712010-04-24 17:59:49 +00008321 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008322/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008323
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008324 #include <unistd.h>
8325 int main(int argc, char*argv[])
8326 {
8327 if (sizeof(long) == 4) {
8328 return 0;
8329 } else {
8330 return 1;
8331 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008332 }
8333
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008334_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008335if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008336 ac_osx_32bit=yes
8337else
Matthias Kloseb9621712010-04-24 17:59:49 +00008338 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008339fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008340rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8341 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008342fi
8343
8344
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008345 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008346 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008347 i386)
8348 MACOSX_DEFAULT_ARCH="i386"
8349 ;;
8350 ppc)
8351 MACOSX_DEFAULT_ARCH="ppc"
8352 ;;
8353 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008354 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008355 ;;
8356 esac
8357 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008358 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008359 i386)
8360 MACOSX_DEFAULT_ARCH="x86_64"
8361 ;;
8362 ppc)
8363 MACOSX_DEFAULT_ARCH="ppc64"
8364 ;;
8365 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008366 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008367 ;;
8368 esac
8369
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008370 fi
8371
8372 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00008373 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008374 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008375esac
Matthias Kloseb9621712010-04-24 17:59:49 +00008376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
8377$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008378if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008379then
Skip Montanarodecc6a42003-01-01 20:07:49 +00008380 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00008381 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008382 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008383
Matthias Kloseb9621712010-04-24 17:59:49 +00008384$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008385
Matthias Kloseb9621712010-04-24 17:59:49 +00008386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8387$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00008388 if test $enable_shared = "yes"
8389 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008390 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 +00008391 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008392else
Matthias Kloseb9621712010-04-24 17:59:49 +00008393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8394$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008395fi
8396
Matthias Kloseb9621712010-04-24 17:59:49 +00008397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
8398$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008399case $ac_sys_system/$ac_sys_release in
8400 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008401
Matthias Kloseb9621712010-04-24 17:59:49 +00008402$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008403
Matthias Kloseb9621712010-04-24 17:59:49 +00008404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
8405$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008406 ;;
8407 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00008408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8409$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008410 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008411esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008412
Guido van Rossum0a516c91994-09-12 10:58:40 +00008413# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008414
Michael W. Hudson54241132001-12-07 15:38:26 +00008415
8416
8417
8418
Benjamin Peterson99f03762010-04-11 22:15:28 +00008419
Thomas Wouters477c8d52006-05-27 19:21:47 +00008420
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07008421# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
8422# -- usually .so, .sl on HP-UX, .dll on Cygwin
8423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
8424$as_echo_n "checking the extension of shared libraries... " >&6; }
8425if test -z "$SHLIB_SUFFIX"; then
8426 case $ac_sys_system in
8427 hp*|HP*)
8428 case `uname -m` in
8429 ia64) SHLIB_SUFFIX=.so;;
8430 *) SHLIB_SUFFIX=.sl;;
8431 esac
8432 ;;
8433 CYGWIN*) SHLIB_SUFFIX=.dll;;
8434 *) SHLIB_SUFFIX=.so;;
8435 esac
8436fi
8437{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
8438$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00008439
Guido van Rossum0a516c91994-09-12 10:58:40 +00008440# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00008441# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008442# (Shared libraries in this instance are shared modules to be loaded into
8443# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00008444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
8445$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008446if test -z "$LDSHARED"
8447then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008448 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008449 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00008450 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00008451 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008452 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008453 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008454 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008455 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008456 if test "$GCC" = "yes" ; then
8457 LDSHARED='$(CC) -shared'
8458 LDCXXSHARED='$(CXX) -shared'
8459 else
8460 LDSHARED='$(CC) -G'
8461 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00008462 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008463 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008464 if test "$GCC" = "yes" ; then
8465 LDSHARED='$(CC) -shared'
8466 LDCXXSHARED='$(CXX) -shared'
8467 else
8468 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008469 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00008470 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008471 LDSHARED='$(CC) -bundle'
8472 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00008473 if test "$enable_framework" ; then
8474 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008475 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8476 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008477 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008478 else
8479 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008480 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00008481 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008482 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008483 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008484 LDSHARED='$(CC) -bundle'
8485 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00008486 if test "$enable_framework" ; then
8487 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008488 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8489 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008490 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008491 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008492 # No framework, use the Python app as bundle-loader
8493 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00008494 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008495 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008496 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008497 Darwin/*)
8498 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
8499 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00008500
Benjamin Peterson14ae9592008-07-16 02:20:15 +00008501 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00008502 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008503 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
8504 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00008505 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00008506 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00008507 LDSHARED='$(CC) -bundle'
8508 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00008509 if test "$enable_framework" ; then
8510 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008511 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8512 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008513 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008514 else
8515 # No framework, use the Python app as bundle-loader
8516 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8517 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008518 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008519 fi
8520 fi
8521 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008522 Linux*|GNU*|QNX*)
8523 LDSHARED='$(CC) -shared'
8524 LDCXXSHARED='$(CXX) -shared';;
8525 BSD/OS*/4*)
8526 LDSHARED="gcc -shared"
8527 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008528 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008529 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008530 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008531 LDSHARED='$(CC) -shared'
8532 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00008533 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00008534 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00008535 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008536 OpenBSD*)
8537 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8538 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008539 LDSHARED='$(CC) -shared $(CCSHARED)'
8540 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008541 else
8542 case `uname -r` in
8543 [01].* | 2.[0-7] | 2.[0-7].*)
8544 LDSHARED="ld -Bshareable ${LDFLAGS}"
8545 ;;
8546 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008547 LDSHARED='$(CC) -shared $(CCSHARED)'
8548 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008549 ;;
8550 esac
8551 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008552 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00008553 LDSHARED='$(CC) -shared'
8554 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008555 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008556 if test "$GCC" = "yes" ; then
8557 LDSHARED='$(CC) -shared'
8558 LDCXXSHARED='$(CXX) -shared'
8559 else
8560 LDSHARED='$(CC) -G'
8561 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00008562 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008563 SCO_SV*)
8564 LDSHARED='$(CC) -Wl,-G,-Bexport'
8565 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
8566 CYGWIN*)
8567 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
8568 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008569 *) LDSHARED="ld";;
8570 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008571fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008572{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
8573$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00008574LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008575BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008576# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008577# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
8579$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008580if test -z "$CCSHARED"
8581then
Guido van Rossum07397971997-04-29 21:49:50 +00008582 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008583 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008584 then CCSHARED="-fPIC";
8585 elif test `uname -p` = sparc;
8586 then CCSHARED="-xcode=pic32";
8587 else CCSHARED="-Kpic";
8588 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00008589 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00008590 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00008591 else CCSHARED="+z";
8592 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008593 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008594 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008595 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008596 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008597 if test "$GCC" = "yes"
8598 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008599 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008600 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008601 SCO_SV*)
8602 if test "$GCC" = "yes"
8603 then CCSHARED="-fPIC"
8604 else CCSHARED="-Kpic -belf"
8605 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008606 IRIX*/6*) case $CC in
8607 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00008608 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008609 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008610 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008611fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008612{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
8613$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008614# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008615# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
8617$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008618if test -z "$LINKFORSHARED"
8619then
Guido van Rossum07397971997-04-29 21:49:50 +00008620 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008621 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008622 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00008623 LINKFORSHARED="-Wl,-E -Wl,+s";;
8624# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008625 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008626 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008627 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00008628 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00008629 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Łukasz Langa335ab5b2013-05-30 20:58:53 +02008630
8631 # Issue #18075: the default maximum stack size (8MBytes) is too
8632 # small for the default recursion limit. Increase the stack size
8633 # to ensure that tests don't crash
8634 LINKFORSHARED="-Wl,-stack_size,1000000 $LINKFORSHARED"
8635
Jack Jansene578a632001-08-15 01:27:14 +00008636 if test "$enable_framework"
8637 then
Jack Jansenda49e192005-01-07 13:08:22 +00008638 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008639 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008640 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008641 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008642 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00008643 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008644 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00008645 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8646 then
8647 LINKFORSHARED="-Wl,--export-dynamic"
8648 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008649 SunOS/5*) case $CC in
8650 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00008651 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00008652 then
8653 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008654 fi;;
8655 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00008656 CYGWIN*)
8657 if test $enable_shared = "no"
8658 then
8659 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
8660 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00008661 QNX*)
8662 # -Wl,-E causes the symbols to be added to the dynamic
8663 # symbol table so that they can be found when a module
8664 # is loaded. -N 2048K causes the stack size to be set
8665 # to 2048 kilobytes so that the stack doesn't overflow
8666 # when running test_compile.py.
8667 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008668 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008669fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008670{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
8671$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008672
Michael W. Hudson54241132001-12-07 15:38:26 +00008673
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00008674
Matthias Kloseb9621712010-04-24 17:59:49 +00008675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
8676$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008677if test ! "$LIBRARY" = "$LDLIBRARY"
8678then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00008679 case $ac_sys_system in
8680 CYGWIN*)
8681 # Cygwin needs CCSHARED when building extension DLLs
8682 # but not when building the interpreter DLL.
8683 CFLAGSFORSHARED='';;
8684 *)
8685 CFLAGSFORSHARED='$(CCSHARED)'
8686 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008687fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008688{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
8689$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008690
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008691# SHLIBS are libraries (except -lc and -lm) to link to the python shared
8692# library (with --enable-shared).
8693# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008694# symbols, this must be set to $(LIBS) (expanded by make). We do this even
8695# if it is not required, since it creates a dependency of the shared library
8696# to LIBS. This, in turn, means that applications linking the shared libpython
8697# don't need to link LIBS explicitly. The default should be only changed
8698# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008699
Matthias Kloseb9621712010-04-24 17:59:49 +00008700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
8701$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008702case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008703 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008704 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008705esac
Matthias Kloseb9621712010-04-24 17:59:49 +00008706{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
8707$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008708
8709
Guido van Rossum627b2d71993-12-24 10:39:16 +00008710# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00008711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
8712$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008713if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00008714 $as_echo_n "(cached) " >&6
8715else
8716 ac_check_lib_save_LIBS=$LIBS
8717LIBS="-lsendfile $LIBS"
8718cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8719/* end confdefs.h. */
8720
8721/* Override any GCC internal prototype to avoid an error.
8722 Use char because int might match the return type of a GCC
8723 builtin and then its argument prototype would still apply. */
8724#ifdef __cplusplus
8725extern "C"
8726#endif
8727char sendfile ();
8728int
8729main ()
8730{
8731return sendfile ();
8732 ;
8733 return 0;
8734}
8735_ACEOF
8736if ac_fn_c_try_link "$LINENO"; then :
8737 ac_cv_lib_sendfile_sendfile=yes
8738else
8739 ac_cv_lib_sendfile_sendfile=no
8740fi
8741rm -f core conftest.err conftest.$ac_objext \
8742 conftest$ac_exeext conftest.$ac_ext
8743LIBS=$ac_check_lib_save_LIBS
8744fi
8745{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
8746$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008747if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00008748 cat >>confdefs.h <<_ACEOF
8749#define HAVE_LIBSENDFILE 1
8750_ACEOF
8751
8752 LIBS="-lsendfile $LIBS"
8753
8754fi
8755
Matthias Kloseb9621712010-04-24 17:59:49 +00008756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
8757$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008758if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008759 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008760else
Martin v. Löwis11437992002-04-12 09:54:03 +00008761 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008762LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008763cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008764/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008765
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008766/* Override any GCC internal prototype to avoid an error.
8767 Use char because int might match the return type of a GCC
8768 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008769#ifdef __cplusplus
8770extern "C"
8771#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008772char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008773int
8774main ()
8775{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008776return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008777 ;
8778 return 0;
8779}
8780_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008781if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008782 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008783else
Matthias Kloseb9621712010-04-24 17:59:49 +00008784 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008785fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008786rm -f core conftest.err conftest.$ac_objext \
8787 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008788LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008789fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008790{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
8791$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008792if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008793 cat >>confdefs.h <<_ACEOF
8794#define HAVE_LIBDL 1
8795_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008796
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008797 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00008798
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008799fi
8800 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00008801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
8802$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008803if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008804 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008805else
Martin v. Löwis11437992002-04-12 09:54:03 +00008806 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008807LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008808cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008809/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008810
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008811/* Override any GCC internal prototype to avoid an error.
8812 Use char because int might match the return type of a GCC
8813 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008814#ifdef __cplusplus
8815extern "C"
8816#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008817char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008818int
8819main ()
8820{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008821return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008822 ;
8823 return 0;
8824}
8825_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008826if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008827 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008828else
Matthias Kloseb9621712010-04-24 17:59:49 +00008829 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008830fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008831rm -f core conftest.err conftest.$ac_objext \
8832 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008833LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008834fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008835{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
8836$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008837if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008838 cat >>confdefs.h <<_ACEOF
8839#define HAVE_LIBDLD 1
8840_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008841
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008842 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008843
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008844fi
8845 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00008846
Georg Brandlb1441c72009-01-03 22:33:39 +00008847# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00008848if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008849 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
8850$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008851if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008852 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008853else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008854 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008855cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008856/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008857
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008858/* Override any GCC internal prototype to avoid an error.
8859 Use char because int might match the return type of a GCC
8860 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008861#ifdef __cplusplus
8862extern "C"
8863#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008864char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008865int
8866main ()
8867{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008868return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008869 ;
8870 return 0;
8871}
8872_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008873for ac_lib in '' pthread rt posix4; do
8874 if test -z "$ac_lib"; then
8875 ac_res="none required"
8876 else
8877 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008878 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008879 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008880 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008881 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008882fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008883rm -f core conftest.err conftest.$ac_objext \
8884 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008885 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008886 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008887fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008888done
Victor Stinnere0be4232011-10-25 13:06:09 +02008889if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008890
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008891else
8892 ac_cv_search_sem_init=no
8893fi
8894rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008895LIBS=$ac_func_search_save_LIBS
8896fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008897{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
8898$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008899ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00008900if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008901 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008902
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008903fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00008904 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00008905 # posix4 on Solaris 2.6
8906 # pthread (first!) on Linux
8907fi
8908
Martin v. Löwis19d17342003-06-14 21:03:05 +00008909# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00008910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
8911$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008912if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008913 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00008914else
8915 ac_check_lib_save_LIBS=$LIBS
8916LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008917cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008918/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008919
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008920/* Override any GCC internal prototype to avoid an error.
8921 Use char because int might match the return type of a GCC
8922 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008923#ifdef __cplusplus
8924extern "C"
8925#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00008926char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008927int
8928main ()
8929{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008930return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008931 ;
8932 return 0;
8933}
8934_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008935if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008936 ac_cv_lib_intl_textdomain=yes
8937else
Matthias Kloseb9621712010-04-24 17:59:49 +00008938 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00008939fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008940rm -f core conftest.err conftest.$ac_objext \
8941 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00008942LIBS=$ac_check_lib_save_LIBS
8943fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008944{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
8945$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008946if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008947
Matthias Kloseb9621712010-04-24 17:59:49 +00008948$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00008949
Brett Cannonc6d936e2009-06-07 20:09:53 +00008950 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00008951fi
8952
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008953
8954# checks for system dependent C++ extensions support
8955case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00008956 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
8957$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
8958 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008959/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008960
Georg Brandl59e87bd2011-02-15 19:48:59 +00008961 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008962int
8963main ()
8964{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008965loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00008966 ;
8967 return 0;
8968}
Matthias Kloseb159a552010-04-25 21:00:44 +00008969
Martin v. Löwis11437992002-04-12 09:54:03 +00008970_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008971if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008972
Matthias Kloseb159a552010-04-25 21:00:44 +00008973
Matthias Kloseb9621712010-04-24 17:59:49 +00008974$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008975
Matthias Kloseb159a552010-04-25 21:00:44 +00008976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008977$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008978
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008979else
Matthias Kloseb159a552010-04-25 21:00:44 +00008980
8981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008982$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008983
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008984fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008985rm -f core conftest.err conftest.$ac_objext \
8986 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008987 *) ;;
8988esac
8989
Guido van Rossum70c7f481998-03-26 18:44:10 +00008990# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00008991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
8992$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008993if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008994 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008995else
Martin v. Löwis11437992002-04-12 09:54:03 +00008996 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008997LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008998cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008999/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009000
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009001/* Override any GCC internal prototype to avoid an error.
9002 Use char because int might match the return type of a GCC
9003 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009004#ifdef __cplusplus
9005extern "C"
9006#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009007char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009008int
9009main ()
9010{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009011return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009012 ;
9013 return 0;
9014}
9015_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009016if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009017 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009018else
Matthias Kloseb9621712010-04-24 17:59:49 +00009019 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009020fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009021rm -f core conftest.err conftest.$ac_objext \
9022 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009023LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009024fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009025{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
9026$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009027if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009028 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009029fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009030 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00009031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9032$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009033if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009034 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009035else
Martin v. Löwis11437992002-04-12 09:54:03 +00009036 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009037LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009038cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009039/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009040
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009041/* Override any GCC internal prototype to avoid an error.
9042 Use char because int might match the return type of a GCC
9043 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009044#ifdef __cplusplus
9045extern "C"
9046#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009047char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009048int
9049main ()
9050{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009051return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009052 ;
9053 return 0;
9054}
9055_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009056if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009057 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009058else
Matthias Kloseb9621712010-04-24 17:59:49 +00009059 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009060fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009061rm -f core conftest.err conftest.$ac_objext \
9062 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009063LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009064fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009065{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9066$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009067if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009068 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009069fi
9070 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009071
Matthias Kloseb9621712010-04-24 17:59:49 +00009072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9073$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009074
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009075# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009076if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009077 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009078{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9079$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009080LIBS="$withval $LIBS"
9081
9082else
Matthias Kloseb9621712010-04-24 17:59:49 +00009083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9084$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009085fi
9086
Guido van Rossum7f43da71994-08-01 12:15:30 +00009087
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009088if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009089 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9090set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9092$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009093if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009094 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00009095else
9096 case $PKG_CONFIG in
9097 [\\/]* | ?:[\\/]*)
9098 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9099 ;;
9100 *)
9101 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9102for as_dir in $PATH
9103do
9104 IFS=$as_save_IFS
9105 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009106 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00009107 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009108 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00009109 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00009110 break 2
9111 fi
9112done
Matthias Kloseb9621712010-04-24 17:59:49 +00009113 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00009114IFS=$as_save_IFS
9115
9116 ;;
9117esac
9118fi
9119PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9120if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9122$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009123else
Matthias Kloseb9621712010-04-24 17:59:49 +00009124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9125$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009126fi
9127
9128
9129fi
9130if test -z "$ac_cv_path_PKG_CONFIG"; then
9131 ac_pt_PKG_CONFIG=$PKG_CONFIG
9132 # Extract the first word of "pkg-config", so it can be a program name with args.
9133set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9135$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009136if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009137 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00009138else
9139 case $ac_pt_PKG_CONFIG in
9140 [\\/]* | ?:[\\/]*)
9141 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9142 ;;
9143 *)
9144 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9145for as_dir in $PATH
9146do
9147 IFS=$as_save_IFS
9148 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009149 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00009150 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009151 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00009152 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00009153 break 2
9154 fi
9155done
Matthias Kloseb9621712010-04-24 17:59:49 +00009156 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00009157IFS=$as_save_IFS
9158
9159 ;;
9160esac
9161fi
9162ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9163if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9165$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009166else
Matthias Kloseb9621712010-04-24 17:59:49 +00009167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9168$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009169fi
9170
9171 if test "x$ac_pt_PKG_CONFIG" = x; then
9172 PKG_CONFIG=""
9173 else
9174 case $cross_compiling:$ac_tool_warned in
9175yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00009176{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9177$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00009178ac_tool_warned=yes ;;
9179esac
9180 PKG_CONFIG=$ac_pt_PKG_CONFIG
9181 fi
9182else
9183 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9184fi
9185
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009186
9187# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00009188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
9189$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009190
9191# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009192if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009193 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00009194else
9195 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009196fi
9197
9198
Matthias Kloseb9621712010-04-24 17:59:49 +00009199{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
9200$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009201
9202# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00009203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
9204$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009205
9206# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009207if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009208 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00009209else
9210 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009211fi
9212
9213
9214if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009215 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
9216else
9217 LIBFFI_INCLUDEDIR=""
9218fi
9219
9220
Matthias Kloseb9621712010-04-24 17:59:49 +00009221{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
9222$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009223
Stefan Krah60187b52012-03-23 19:06:27 +01009224# Check for use of the system libmpdec library
9225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
9226$as_echo_n "checking for --with-system-libmpdec... " >&6; }
9227
9228# Check whether --with-system_libmpdec was given.
9229if test "${with_system_libmpdec+set}" = set; then :
9230 withval=$with_system_libmpdec;
9231else
9232 with_system_libmpdec="no"
9233fi
9234
9235
9236{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
9237$as_echo "$with_system_libmpdec" >&6; }
9238
Benjamin Peterson076ed002010-10-31 17:11:02 +00009239# Check for support for loadable sqlite extensions
9240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
9241$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
9242# Check whether --enable-loadable-sqlite-extensions was given.
9243if test "${enable_loadable_sqlite_extensions+set}" = set; then :
9244 enableval=$enable_loadable_sqlite_extensions;
9245else
9246 enable_loadable_sqlite_extensions="no"
9247fi
9248
9249
9250{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
9251$as_echo "$enable_loadable_sqlite_extensions" >&6; }
9252
Ned Deilyd819b932013-09-06 01:07:05 -07009253# Check for --with-tcltk-includes=path and --with-tcltk-libs=path
9254
9255
9256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-includes" >&5
9257$as_echo_n "checking for --with-tcltk-includes... " >&6; }
9258
9259# Check whether --with-tcltk-includes was given.
9260if test "${with_tcltk_includes+set}" = set; then :
9261 withval=$with_tcltk_includes;
9262else
9263 with_tcltk_includes="default"
9264fi
9265
9266{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_includes" >&5
9267$as_echo "$with_tcltk_includes" >&6; }
9268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tcltk-libs" >&5
9269$as_echo_n "checking for --with-tcltk-libs... " >&6; }
9270
9271# Check whether --with-tcltk-libs was given.
9272if test "${with_tcltk_libs+set}" = set; then :
9273 withval=$with_tcltk_libs;
9274else
9275 with_tcltk_libs="default"
9276fi
9277
9278{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_tcltk_libs" >&5
9279$as_echo "$with_tcltk_libs" >&6; }
9280if test "x$with_tcltk_includes" = xdefault || test "x$with_tcltk_libs" = xdefault
9281then
9282 if test "x$with_tcltk_includes" != "x$with_tcltk_libs"
9283 then
9284 as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
9285 fi
9286 TCLTK_INCLUDES=""
9287 TCLTK_LIBS=""
9288else
9289 TCLTK_INCLUDES="$with_tcltk_includes"
9290 TCLTK_LIBS="$with_tcltk_libs"
9291fi
9292
Matthias Klose55708cc2009-04-30 08:06:49 +00009293# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00009294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
9295$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009296
9297# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009298if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00009299 withval=$with_dbmliborder;
9300if test x$with_dbmliborder = xyes
9301then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009302as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009303else
9304 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
9305 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
9306 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009307 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009308 fi
9309 done
9310fi
9311fi
9312
Matthias Kloseb9621712010-04-24 17:59:49 +00009313{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
9314$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009315
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009316# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009317
9318
Matthias Kloseb9621712010-04-24 17:59:49 +00009319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
9320$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009321
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009322# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009323if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009324 withval=$with_signal_module;
9325fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009326
9327
9328if test -z "$with_signal_module"
9329then with_signal_module="yes"
9330fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009331{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
9332$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009333
9334if test "${with_signal_module}" = "yes"; then
9335 USE_SIGNAL_MODULE=""
9336 SIGNAL_OBJS=""
9337else
9338 USE_SIGNAL_MODULE="#"
9339 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9340fi
9341
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009342# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009343
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009344USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009345
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009346
Martin v. Löwis11437992002-04-12 09:54:03 +00009347
9348# Templates for things AC_DEFINEd more than once.
9349# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009350
9351
Martin v. Löwis11437992002-04-12 09:54:03 +00009352
Matthias Kloseb9621712010-04-24 17:59:49 +00009353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
9354$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009355
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009356# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009357if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009358 withval=$with_threads;
9359fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009360
9361
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009362# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009363
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009364# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009365if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009366 withval=$with_thread; with_threads=$with_thread
9367fi
9368
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009369
9370if test -z "$with_threads"
9371then with_threads="yes"
9372fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009373{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
9374$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009375
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009376
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009377if test "$with_threads" = "no"
9378then
9379 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009380elif test "$ac_cv_pthread_is_default" = yes
9381then
Matthias Kloseb9621712010-04-24 17:59:49 +00009382 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009383
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009384 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00009385 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009386
9387 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009388 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009389elif test "$ac_cv_kpthread" = "yes"
9390then
9391 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009392 if test "$ac_cv_cxx_thread" = "yes"; then
9393 CXX="$CXX -Kpthread"
9394 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009395 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009396
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009397 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009398 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009399elif test "$ac_cv_kthread" = "yes"
9400then
9401 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009402 if test "$ac_cv_cxx_thread" = "yes"; then
9403 CXX="$CXX -Kthread"
9404 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009405 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009406
9407 posix_threads=yes
9408 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009409elif test "$ac_cv_pthread" = "yes"
9410then
9411 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009412 if test "$ac_cv_cxx_thread" = "yes"; then
9413 CXX="$CXX -pthread"
9414 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009415 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009416
9417 posix_threads=yes
9418 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009419else
9420 if test ! -z "$with_threads" -a -d "$with_threads"
9421 then LDFLAGS="$LDFLAGS -L$with_threads"
9422 fi
9423 if test ! -z "$withval" -a -d "$withval"
9424 then LDFLAGS="$LDFLAGS -L$withval"
9425 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009426
9427 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00009428 # define _POSIX_THREADS in unistd.h. Some apparently don't
9429 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00009430 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
9431$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
9432 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009433/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009434
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009435#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009436#ifdef _POSIX_THREADS
9437yes
9438#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009439
9440_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009441if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009442 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009443 unistd_defines_pthreads=yes
9444else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009445 unistd_defines_pthreads=no
9446fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009447rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009448
Matthias Kloseb9621712010-04-24 17:59:49 +00009449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
9450$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009451
Matthias Kloseb9621712010-04-24 17:59:49 +00009452 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009453
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009454 # Just looking for pthread_create in libpthread is not enough:
9455 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
9456 # So we really have to include pthread.h, and then link.
9457 _libs=$LIBS
9458 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00009459 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
9460$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
9461 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009462/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +01009463
9464#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009465#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00009466
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009467void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00009468int
9469main ()
9470{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009471
9472pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00009473 ;
9474 return 0;
9475}
9476_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009477if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009478
Matthias Kloseb9621712010-04-24 17:59:49 +00009479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9480$as_echo "yes" >&6; }
9481 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00009482
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009483 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009484 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009485else
Martin v. Löwis11437992002-04-12 09:54:03 +00009486
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009487 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00009488 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +02009489if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009490 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00009491
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009492 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009493 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00009494else
Guido van Rossumad678af1998-10-02 14:42:15 +00009495
Matthias Kloseb9621712010-04-24 17:59:49 +00009496 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
9497$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009498if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009499 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009500else
Martin v. Löwis11437992002-04-12 09:54:03 +00009501 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009502LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009503cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009504/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009505
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009506/* Override any GCC internal prototype to avoid an error.
9507 Use char because int might match the return type of a GCC
9508 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009509#ifdef __cplusplus
9510extern "C"
9511#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009512char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009513int
9514main ()
9515{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009516return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009517 ;
9518 return 0;
9519}
9520_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009521if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009522 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00009523else
Matthias Kloseb9621712010-04-24 17:59:49 +00009524 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00009525fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009526rm -f core conftest.err conftest.$ac_objext \
9527 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009528LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009529fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009530{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
9531$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009532if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009533 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00009534
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009535 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009536 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009537 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00009538else
Greg Steinadf63d62000-07-05 10:38:09 +00009539
Matthias Kloseb9621712010-04-24 17:59:49 +00009540 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
9541$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009542if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009543 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00009544else
Martin v. Löwis11437992002-04-12 09:54:03 +00009545 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009546LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009547cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009548/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009549
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009550/* Override any GCC internal prototype to avoid an error.
9551 Use char because int might match the return type of a GCC
9552 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009553#ifdef __cplusplus
9554extern "C"
9555#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009556char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009557int
9558main ()
9559{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009560return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009561 ;
9562 return 0;
9563}
9564_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009565if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009566 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00009567else
Matthias Kloseb9621712010-04-24 17:59:49 +00009568 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00009569fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009570rm -f core conftest.err conftest.$ac_objext \
9571 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009572LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00009573fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009574{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
9575$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009576if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009577 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00009578
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009579 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009580 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009581 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009582else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009583
Matthias Kloseb9621712010-04-24 17:59:49 +00009584 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
9585$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009586if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009587 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009588else
Martin v. Löwis11437992002-04-12 09:54:03 +00009589 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009590LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009591cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009592/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009593
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009594/* Override any GCC internal prototype to avoid an error.
9595 Use char because int might match the return type of a GCC
9596 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009597#ifdef __cplusplus
9598extern "C"
9599#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009600char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009601int
9602main ()
9603{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009604return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009605 ;
9606 return 0;
9607}
9608_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009609if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009610 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009611else
Matthias Kloseb9621712010-04-24 17:59:49 +00009612 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009613fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009614rm -f core conftest.err conftest.$ac_objext \
9615 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009616LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009617fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009618{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
9619$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009620if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009621 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009622
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009623 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009624 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009625 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009626else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009627
Matthias Kloseb9621712010-04-24 17:59:49 +00009628 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
9629$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009630if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009631 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00009632else
Martin v. Löwis11437992002-04-12 09:54:03 +00009633 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009634LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009635cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009636/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009637
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009638/* Override any GCC internal prototype to avoid an error.
9639 Use char because int might match the return type of a GCC
9640 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009641#ifdef __cplusplus
9642extern "C"
9643#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009644char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009645int
9646main ()
9647{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009648return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009649 ;
9650 return 0;
9651}
9652_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009653if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009654 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00009655else
Matthias Kloseb9621712010-04-24 17:59:49 +00009656 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00009657fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009658rm -f core conftest.err conftest.$ac_objext \
9659 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009660LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009661fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009662{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
9663$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009664if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009665 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00009666
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009667 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009668 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009669 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00009670else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00009671
Martin v. Löwis130fb172001-07-19 11:00:41 +00009672 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00009673fi
9674
Guido van Rossum627b2d71993-12-24 10:39:16 +00009675
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009676fi
9677
Guido van Rossum0be3e491997-05-22 20:33:33 +00009678fi
9679
Guido van Rossum49545951997-12-02 19:28:29 +00009680fi
9681
Guido van Rossumb93a8621998-05-07 13:27:32 +00009682fi
9683
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009684fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009685rm -f core conftest.err conftest.$ac_objext \
9686 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00009687
Matthias Kloseb9621712010-04-24 17:59:49 +00009688 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
9689$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009690if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009691 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009692else
Martin v. Löwis11437992002-04-12 09:54:03 +00009693 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009694LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009695cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009696/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009697
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009698/* Override any GCC internal prototype to avoid an error.
9699 Use char because int might match the return type of a GCC
9700 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009701#ifdef __cplusplus
9702extern "C"
9703#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009704char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009705int
9706main ()
9707{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009708return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009709 ;
9710 return 0;
9711}
9712_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009713if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009714 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009715else
Matthias Kloseb9621712010-04-24 17:59:49 +00009716 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009717fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009718rm -f core conftest.err conftest.$ac_objext \
9719 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009720LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009721fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009722{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
9723$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009724if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009725 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009726
Martin v. Löwis130fb172001-07-19 11:00:41 +00009727 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009728 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009729 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009730fi
9731
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009732
Neal Norwitza978ab02002-11-02 16:58:05 +00009733 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009734 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
9735$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009736if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009737 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009738else
Martin v. Löwis11437992002-04-12 09:54:03 +00009739 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009740LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009741cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009742/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009743
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009744/* Override any GCC internal prototype to avoid an error.
9745 Use char because int might match the return type of a GCC
9746 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009747#ifdef __cplusplus
9748extern "C"
9749#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009750char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009751int
9752main ()
9753{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009754return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009755 ;
9756 return 0;
9757}
9758_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009759if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009760 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009761else
Matthias Kloseb9621712010-04-24 17:59:49 +00009762 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009763fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009764rm -f core conftest.err conftest.$ac_objext \
9765 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009766LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009767fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009768{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
9769$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009770if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009771 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009772
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009773 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009774 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009775 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009776fi
9777
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009778 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009779fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009780
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009781if test "$posix_threads" = "yes"; then
9782 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009783
Matthias Kloseb9621712010-04-24 17:59:49 +00009784$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009785
9786 fi
9787
9788 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
9789 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +02009790 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00009791$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009792
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009793 ;;
9794 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00009795$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009796
9797 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +02009798 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +00009799$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00009800
9801 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009802 esac
9803
Matthias Kloseb9621712010-04-24 17:59:49 +00009804 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
9805$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009806 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009807 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009808else
Matthias Kloseb9621712010-04-24 17:59:49 +00009809 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009810 ac_cv_pthread_system_supported=no
9811else
Matthias Kloseb9621712010-04-24 17:59:49 +00009812 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009813/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +01009814
9815 #include <stdio.h>
9816 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009817 void *foo(void *parm) {
9818 return NULL;
9819 }
9820 main() {
9821 pthread_attr_t attr;
9822 pthread_t id;
9823 if (pthread_attr_init(&attr)) exit(-1);
9824 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
9825 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
9826 exit(0);
9827 }
9828_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009829if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009830 ac_cv_pthread_system_supported=yes
9831else
Matthias Kloseb9621712010-04-24 17:59:49 +00009832 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009833fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009834rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9835 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009836fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009837
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009838
Guido van Rossum627b2d71993-12-24 10:39:16 +00009839fi
9840
Matthias Kloseb9621712010-04-24 17:59:49 +00009841 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
9842$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009843 if test "$ac_cv_pthread_system_supported" = "yes"; then
9844
Matthias Kloseb9621712010-04-24 17:59:49 +00009845$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009846
9847 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009848 for ac_func in pthread_sigmask
9849do :
9850 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +02009851if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009852 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009853#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009854_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00009855 case $ac_sys_system in
9856 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009857
Matthias Kloseb9621712010-04-24 17:59:49 +00009858$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00009859
9860 ;;
9861 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009862fi
9863done
9864
Christian Heimesf77b4b22013-08-21 13:26:05 +02009865 for ac_func in pthread_atfork
9866do :
9867 ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork"
9868if test "x$ac_cv_func_pthread_atfork" = xyes; then :
9869 cat >>confdefs.h <<_ACEOF
9870#define HAVE_PTHREAD_ATFORK 1
9871_ACEOF
9872
9873fi
9874done
9875
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009876fi
9877
9878
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009879# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00009880
Matthias Kloseb9621712010-04-24 17:59:49 +00009881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
9882$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009883# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009884if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009885 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009886 no)
Matthias Kloseb9621712010-04-24 17:59:49 +00009887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9888$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009889 ipv6=no
9890 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00009891 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9892$as_echo "yes" >&6; }
9893 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009894
9895 ipv6=yes
9896 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009897 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009898else
Martin v. Löwis11437992002-04-12 09:54:03 +00009899
Matthias Kloseb9621712010-04-24 17:59:49 +00009900 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009901/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009902 /* AF_INET6 available check */
9903#include <sys/types.h>
9904#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +01009905int
9906main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009907{
Charles-François Natalif6fd7942013-01-08 19:49:42 +01009908int domain = AF_INET6;
9909 ;
9910 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009911}
Martin v. Löwis11437992002-04-12 09:54:03 +00009912_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +01009913if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009914
Matthias Kloseb9621712010-04-24 17:59:49 +00009915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9916$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009917 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +00009918
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009919else
Matthias Kloseb159a552010-04-25 21:00:44 +00009920
Matthias Kloseb9621712010-04-24 17:59:49 +00009921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9922$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009923 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +00009924
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009925fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +01009926rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009927
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009928if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009929 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
9930$as_echo_n "checking if RFC2553 API is available... " >&6; }
9931 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009932/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009933
9934 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009935#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009936int
9937main ()
9938{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009939struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +00009940 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00009941 ;
9942 return 0;
9943}
Matthias Kloseb159a552010-04-25 21:00:44 +00009944
Martin v. Löwis11437992002-04-12 09:54:03 +00009945_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009946if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009947
9948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009949$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009950 ipv6=yes
9951
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009952else
Matthias Kloseb159a552010-04-25 21:00:44 +00009953
9954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009955$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009956 ipv6=no
9957
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009958fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009959rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009960fi
9961
9962if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009963 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009964
9965fi
9966
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009967fi
9968
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009969
9970ipv6type=unknown
9971ipv6lib=none
9972ipv6trylibc=no
9973
9974if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009975 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
9976$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00009977 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
9978 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009979 case $i in
9980 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +00009981 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009982/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009983
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009984#include <netinet/in.h>
9985#ifdef IPV6_INRIA_VERSION
9986yes
9987#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009988_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009989if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009990 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009991 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009992fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009993rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009994
9995 ;;
9996 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +00009997 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009998/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009999
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010000#include <netinet/in.h>
10001#ifdef __KAME__
10002yes
10003#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010004_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010005if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010006 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010007 ipv6type=$i;
10008 ipv6lib=inet6
10009 ipv6libdir=/usr/local/v6/lib
10010 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010011fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010012rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010013
10014 ;;
10015 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +000010016 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010017/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010018
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010019#include <features.h>
10020#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
10021yes
10022#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010023_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010024if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010025 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010026 ipv6type=$i;
10027 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010028fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010029rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010030
10031 ;;
10032 linux-inet6)
10033 if test -d /usr/inet6; then
10034 ipv6type=$i
10035 ipv6lib=inet6
10036 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000010037 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010038 fi
10039 ;;
10040 solaris)
10041 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +000010042 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010043 ipv6type=$i
10044 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010045 fi
10046 fi
10047 ;;
10048 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +000010049 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010050/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010051
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010052#include <sys/param.h>
10053#ifdef _TOSHIBA_INET6
10054yes
10055#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010056_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010057if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010058 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010059 ipv6type=$i;
10060 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010061 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010062fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010063rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010064
10065 ;;
10066 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +000010067 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010068/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010069
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010070#include </usr/local/v6/include/sys/v6config.h>
10071#ifdef __V6D__
10072yes
10073#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010074_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010075if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010076 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010077 ipv6type=$i;
10078 ipv6lib=v6;
10079 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010080 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010081fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010082rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010083
10084 ;;
10085 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010086 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010087/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010088
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010089#include <sys/param.h>
10090#ifdef _ZETA_MINAMI_INET6
10091yes
10092#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010093_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010094if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010095 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010096 ipv6type=$i;
10097 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010098 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010099fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010100rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010101
10102 ;;
10103 esac
10104 if test "$ipv6type" != "unknown"; then
10105 break
10106 fi
10107 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10109$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010110fi
10111
10112if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10113 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10114 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10115 echo "using lib$ipv6lib"
10116 else
10117 if test $ipv6trylibc = "yes"; then
10118 echo "using libc"
10119 else
10120 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10121 echo "You need to fetch lib$ipv6lib.a from appropriate"
10122 echo 'ipv6 kit and compile beforehand.'
10123 exit 1
10124 fi
10125 fi
10126fi
10127
Matthias Kloseb9621712010-04-24 17:59:49 +000010128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
10129$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
10130cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010131/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010132
10133 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010134int
10135main ()
10136{
10137FSIORefNum fRef = 0
10138 ;
10139 return 0;
10140}
Matthias Kloseb159a552010-04-25 21:00:44 +000010141
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010142_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010143if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010144
Matthias Kloseb159a552010-04-25 21:00:44 +000010145
Matthias Kloseb9621712010-04-24 17:59:49 +000010146$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010147
Matthias Kloseb9621712010-04-24 17:59:49 +000010148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10149$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010150
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010151else
Matthias Kloseb159a552010-04-25 21:00:44 +000010152
Matthias Kloseb9621712010-04-24 17:59:49 +000010153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10154$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010155
10156fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010157rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10158
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010159# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000010160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10161$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010162
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010163# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010164if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010165 withval=$with_doc_strings;
10166fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010167
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010168
10169if test -z "$with_doc_strings"
10170then with_doc_strings="yes"
10171fi
10172if test "$with_doc_strings" != "no"
10173then
10174
Matthias Kloseb9621712010-04-24 17:59:49 +000010175$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010176
10177fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010178{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10179$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010180
Antoine Pitrou042b1282010-08-13 21:15:58 +000010181# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +000010182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
10183$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010184
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010185# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010186if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010187 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010188if test "$withval" != no
10189then
10190
Matthias Kloseb9621712010-04-24 17:59:49 +000010191$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010192
Matthias Kloseb9621712010-04-24 17:59:49 +000010193 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10194$as_echo "yes" >&6; }
10195else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10196$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010197fi
10198else
Matthias Kloseb9621712010-04-24 17:59:49 +000010199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10200$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010201fi
10202
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010203
10204# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000010205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10206$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010207
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010208# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010209if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010210 withval=$with_pymalloc;
10211fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010212
Neil Schemenauera35c6882001-02-27 04:45:05 +000010213
Neil Schemenauer16c22972002-03-22 15:34:49 +000010214if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000010215then
10216 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010217fi
10218if test "$with_pymalloc" != "no"
10219then
Martin v. Löwis11437992002-04-12 09:54:03 +000010220
Matthias Kloseb9621712010-04-24 17:59:49 +000010221$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010222
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010223 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010224fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010225{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10226$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010227
Benjamin Peterson05159c42009-12-03 03:01:27 +000010228# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000010229{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
10230$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010231
10232# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010233if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010234 withval=$with_valgrind;
10235else
10236 with_valgrind=no
10237fi
10238
Matthias Kloseb9621712010-04-24 17:59:49 +000010239{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
10240$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010241if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010242 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 +020010243if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010244
Matthias Kloseb9621712010-04-24 17:59:49 +000010245$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000010246
10247else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010248 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000010249
10250fi
10251
10252
Jeffrey Yasskin39370832010-05-03 19:29:34 +000010253 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000010254fi
10255
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010256# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000010257
Guido van Rossum98935bf2001-09-05 19:13:16 +000010258DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000010259
Guido van Rossume97ee181999-12-20 21:27:22 +000010260# the dlopen() function means we might want to use dynload_shlib.o. some
10261# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000010262for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000010263do :
10264 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020010265if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010266 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010267#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010268_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000010269
Guido van Rossume97ee181999-12-20 21:27:22 +000010270fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010271done
Guido van Rossume97ee181999-12-20 21:27:22 +000010272
Michael W. Hudson54241132001-12-07 15:38:26 +000010273
Guido van Rossume97ee181999-12-20 21:27:22 +000010274# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
10275# loading of modules.
10276
Matthias Kloseb9621712010-04-24 17:59:49 +000010277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
10278$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010279if test -z "$DYNLOADFILE"
10280then
10281 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000010282 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
10283 if test "$ac_cv_func_dlopen" = yes
10284 then DYNLOADFILE="dynload_shlib.o"
10285 else DYNLOADFILE="dynload_aix.o"
10286 fi
10287 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000010288 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000010289 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
10290 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000010291 *)
10292 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
10293 # out any dynamic loading
10294 if test "$ac_cv_func_dlopen" = yes
10295 then DYNLOADFILE="dynload_shlib.o"
10296 else DYNLOADFILE="dynload_stub.o"
10297 fi
10298 ;;
10299 esac
10300fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010301{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
10302$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010303if test "$DYNLOADFILE" != "dynload_stub.o"
10304then
Martin v. Löwis11437992002-04-12 09:54:03 +000010305
Matthias Kloseb9621712010-04-24 17:59:49 +000010306$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000010307
10308fi
10309
Neil Schemenauer4e425612001-06-19 15:44:15 +000010310# MACHDEP_OBJS can be set to platform-specific object files needed by Python
10311
Michael W. Hudson54241132001-12-07 15:38:26 +000010312
Matthias Kloseb9621712010-04-24 17:59:49 +000010313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
10314$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010315if test -z "$MACHDEP_OBJS"
10316then
Jack Jansene578a632001-08-15 01:27:14 +000010317 MACHDEP_OBJS=$extra_machdep_objs
10318else
10319 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000010320fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010321if test -z "$MACHDEP_OBJS"; then
10322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
10323$as_echo "none" >&6; }
10324else
10325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
10326$as_echo "$MACHDEP_OBJS" >&6; }
10327fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000010328
Guido van Rossum627b2d71993-12-24 10:39:16 +000010329# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000010330for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Victor Stinnerdaf45552013-08-28 00:53:59 +020010331 clock confstr ctermid dup3 execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010332 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010333 futimens futimes gai_strerror \
10334 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000010335 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070010336 if_nameindex \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010010337 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
10338 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020010339 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010340 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020010341 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +000010342 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000010343 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000010344 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010345 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
10346 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020010347 sigaction sigaltstack siginterrupt sigpending sigrelse \
10348 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000010349 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010350 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
Victor Stinnercd777ea2013-04-08 22:43:44 +020010351 wcscoll wcsftime wcsxfrm wmemcmp writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010352do :
10353 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10354ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010355if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010356 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010357#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010358_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010359
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010360fi
10361done
10362
Michael W. Hudson54241132001-12-07 15:38:26 +000010363
Gregory P. Smithdf300d52012-01-21 18:20:15 -080010364ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
10365 #include <dirent.h>
10366"
10367if test "x$ac_cv_have_decl_dirfd" = xyes; then :
10368
10369$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
10370
10371fi
10372
10373
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010374# For some functions, having a definition is not sufficient, since
10375# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000010376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
10377$as_echo_n "checking for chroot... " >&6; }
10378cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010379/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010380#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010381int
10382main ()
10383{
10384void *x=chroot
10385 ;
10386 return 0;
10387}
10388_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010389if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010390
Matthias Kloseb9621712010-04-24 17:59:49 +000010391$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010392
Matthias Kloseb159a552010-04-25 21:00:44 +000010393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010394$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010395else
Matthias Kloseb9621712010-04-24 17:59:49 +000010396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10397$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010398
10399fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010400rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
10402$as_echo_n "checking for link... " >&6; }
10403cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010404/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010405#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010406int
10407main ()
10408{
10409void *x=link
10410 ;
10411 return 0;
10412}
10413_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010414if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010415
Matthias Kloseb9621712010-04-24 17:59:49 +000010416$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010417
Matthias Kloseb159a552010-04-25 21:00:44 +000010418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010419$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010420else
Matthias Kloseb9621712010-04-24 17:59:49 +000010421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10422$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010423
10424fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010425rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
10427$as_echo_n "checking for symlink... " >&6; }
10428cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010429/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010430#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010431int
10432main ()
10433{
10434void *x=symlink
10435 ;
10436 return 0;
10437}
10438_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010439if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010440
Matthias Kloseb9621712010-04-24 17:59:49 +000010441$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010442
Matthias Kloseb159a552010-04-25 21:00:44 +000010443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010444$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010445else
Matthias Kloseb9621712010-04-24 17:59:49 +000010446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10447$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010448
10449fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010450rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
10452$as_echo_n "checking for fchdir... " >&6; }
10453cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010454/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010455#include <unistd.h>
10456int
10457main ()
10458{
10459void *x=fchdir
10460 ;
10461 return 0;
10462}
10463_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010464if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010465
Matthias Kloseb9621712010-04-24 17:59:49 +000010466$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010467
Matthias Kloseb159a552010-04-25 21:00:44 +000010468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010469$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010470else
Matthias Kloseb9621712010-04-24 17:59:49 +000010471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10472$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010473
10474fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010475rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
10477$as_echo_n "checking for fsync... " >&6; }
10478cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010479/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010480#include <unistd.h>
10481int
10482main ()
10483{
10484void *x=fsync
10485 ;
10486 return 0;
10487}
10488_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010489if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010490
Matthias Kloseb9621712010-04-24 17:59:49 +000010491$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010492
Matthias Kloseb159a552010-04-25 21:00:44 +000010493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010494$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010495else
Matthias Kloseb9621712010-04-24 17:59:49 +000010496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10497$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010498
10499fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010500rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
10502$as_echo_n "checking for fdatasync... " >&6; }
10503cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010504/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010505#include <unistd.h>
10506int
10507main ()
10508{
10509void *x=fdatasync
10510 ;
10511 return 0;
10512}
10513_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010514if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010515
Matthias Kloseb9621712010-04-24 17:59:49 +000010516$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010517
Matthias Kloseb159a552010-04-25 21:00:44 +000010518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010519$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010520else
Matthias Kloseb9621712010-04-24 17:59:49 +000010521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10522$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010523
10524fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010525rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
10527$as_echo_n "checking for epoll... " >&6; }
10528cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010529/* end confdefs.h. */
10530#include <sys/epoll.h>
10531int
10532main ()
10533{
10534void *x=epoll_create
10535 ;
10536 return 0;
10537}
10538_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010539if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010540
Matthias Kloseb9621712010-04-24 17:59:49 +000010541$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010542
Matthias Kloseb159a552010-04-25 21:00:44 +000010543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010544$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010545else
Matthias Kloseb9621712010-04-24 17:59:49 +000010546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10547$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010548
10549fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010550rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060010551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
10552$as_echo_n "checking for epoll_create1... " >&6; }
10553cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10554/* end confdefs.h. */
10555#include <sys/epoll.h>
10556int
10557main ()
10558{
10559void *x=epoll_create1
10560 ;
10561 return 0;
10562}
10563_ACEOF
10564if ac_fn_c_try_compile "$LINENO"; then :
10565
10566$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
10567
10568 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10569$as_echo "yes" >&6; }
10570else
10571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10572$as_echo "no" >&6; }
10573
10574fi
10575rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
10577$as_echo_n "checking for kqueue... " >&6; }
10578cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010579/* end confdefs.h. */
10580
10581#include <sys/types.h>
10582#include <sys/event.h>
10583
10584int
10585main ()
10586{
10587int x=kqueue()
10588 ;
10589 return 0;
10590}
10591_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010592if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010593
Matthias Kloseb9621712010-04-24 17:59:49 +000010594$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010595
Matthias Kloseb159a552010-04-25 21:00:44 +000010596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010597$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010598else
Matthias Kloseb9621712010-04-24 17:59:49 +000010599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10600$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010601
10602fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010603rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010604# On some systems (eg. FreeBSD 5), we would find a definition of the
10605# functions ctermid_r, setgroups in the library, but no prototype
10606# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
10607# address to avoid compiler warnings and potential miscompilations
10608# because of the missing prototypes.
10609
Matthias Kloseb9621712010-04-24 17:59:49 +000010610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
10611$as_echo_n "checking for ctermid_r... " >&6; }
10612cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010613/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010614
Martin v. Löwisd5843682002-11-21 20:41:28 +000010615#include <stdio.h>
10616
Martin v. Löwisd5843682002-11-21 20:41:28 +000010617int
10618main ()
10619{
10620void* p = ctermid_r
10621 ;
10622 return 0;
10623}
10624_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010625if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010626
Matthias Kloseb9621712010-04-24 17:59:49 +000010627$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010628
Matthias Kloseb159a552010-04-25 21:00:44 +000010629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010630$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010631else
Matthias Kloseb9621712010-04-24 17:59:49 +000010632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10633$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010634
10635fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010636rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10637
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
10639$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010640if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010641 $as_echo_n "(cached) " >&6
10642else
10643 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010644/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010645#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010646int
10647main ()
10648{
10649void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010650
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010651 ;
10652 return 0;
10653}
10654_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010655if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010656 ac_cv_flock_decl=yes
10657else
10658 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010659
10660fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010661rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000010662
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010663fi
10664{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
10665$as_echo "$ac_cv_flock_decl" >&6; }
10666if test "x${ac_cv_flock_decl}" = xyes; then
10667 for ac_func in flock
10668do :
10669 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020010670if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010671 cat >>confdefs.h <<_ACEOF
10672#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000010673_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010674
Antoine Pitroua3000072010-09-07 14:52:42 +000010675else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010676 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000010677$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010678if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000010679 $as_echo_n "(cached) " >&6
10680else
10681 ac_check_lib_save_LIBS=$LIBS
10682LIBS="-lbsd $LIBS"
10683cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10684/* end confdefs.h. */
10685
10686/* Override any GCC internal prototype to avoid an error.
10687 Use char because int might match the return type of a GCC
10688 builtin and then its argument prototype would still apply. */
10689#ifdef __cplusplus
10690extern "C"
10691#endif
10692char flock ();
10693int
10694main ()
10695{
10696return flock ();
10697 ;
10698 return 0;
10699}
10700_ACEOF
10701if ac_fn_c_try_link "$LINENO"; then :
10702 ac_cv_lib_bsd_flock=yes
10703else
10704 ac_cv_lib_bsd_flock=no
10705fi
10706rm -f core conftest.err conftest.$ac_objext \
10707 conftest$ac_exeext conftest.$ac_ext
10708LIBS=$ac_check_lib_save_LIBS
10709fi
10710{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
10711$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010712if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010713 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000010714
10715
10716$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
10717
10718
10719fi
10720
10721
10722fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010723done
10724
Antoine Pitroua3000072010-09-07 14:52:42 +000010725fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010726
Matthias Kloseb9621712010-04-24 17:59:49 +000010727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
10728$as_echo_n "checking for getpagesize... " >&6; }
10729cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010730/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010731
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010732#include <unistd.h>
10733
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010734int
10735main ()
10736{
10737void* p = getpagesize
10738 ;
10739 return 0;
10740}
10741_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010742if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010743
Matthias Kloseb9621712010-04-24 17:59:49 +000010744$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010745
Matthias Kloseb159a552010-04-25 21:00:44 +000010746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010747$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010748else
Matthias Kloseb9621712010-04-24 17:59:49 +000010749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10750$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010751
10752fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010753rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010754
Victor Stinner984890f2011-11-24 13:53:38 +010010755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
10756$as_echo_n "checking for broken unsetenv... " >&6; }
10757cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10758/* end confdefs.h. */
10759
10760#include <stdlib.h>
10761
10762int
10763main ()
10764{
10765int res = unsetenv("DUMMY")
10766 ;
10767 return 0;
10768}
10769_ACEOF
10770if ac_fn_c_try_compile "$LINENO"; then :
10771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10772$as_echo "no" >&6; }
10773else
10774
10775$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
10776
10777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10778$as_echo "yes" >&6; }
10779
10780fi
10781rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10782
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010783for ac_prog in true
10784do
10785 # Extract the first word of "$ac_prog", so it can be a program name with args.
10786set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000010787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10788$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010789if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010790 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010791else
10792 if test -n "$TRUE"; then
10793 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
10794else
10795as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10796for as_dir in $PATH
10797do
10798 IFS=$as_save_IFS
10799 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000010800 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000010801 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010802 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000010803 $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 +000010804 break 2
10805 fi
10806done
Matthias Kloseb9621712010-04-24 17:59:49 +000010807 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010808IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010809
10810fi
10811fi
10812TRUE=$ac_cv_prog_TRUE
10813if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
10815$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010816else
Matthias Kloseb9621712010-04-24 17:59:49 +000010817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10818$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010819fi
10820
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010821
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010822 test -n "$TRUE" && break
10823done
10824test -n "$TRUE" || TRUE="/bin/true"
10825
10826
Matthias Kloseb9621712010-04-24 17:59:49 +000010827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
10828$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010829if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010830 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010831else
10832 ac_check_lib_save_LIBS=$LIBS
10833LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010834cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010835/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010836
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010837/* Override any GCC internal prototype to avoid an error.
10838 Use char because int might match the return type of a GCC
10839 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010840#ifdef __cplusplus
10841extern "C"
10842#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010843char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010844int
10845main ()
10846{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010847return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010848 ;
10849 return 0;
10850}
10851_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010852if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010853 ac_cv_lib_c_inet_aton=yes
10854else
Matthias Kloseb9621712010-04-24 17:59:49 +000010855 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010856fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010857rm -f core conftest.err conftest.$ac_objext \
10858 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010859LIBS=$ac_check_lib_save_LIBS
10860fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010861{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
10862$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010863if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010864 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010865else
Matthias Kloseb9621712010-04-24 17:59:49 +000010866 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
10867$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010868if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010869 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010870else
10871 ac_check_lib_save_LIBS=$LIBS
10872LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010873cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010874/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010875
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010876/* Override any GCC internal prototype to avoid an error.
10877 Use char because int might match the return type of a GCC
10878 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010879#ifdef __cplusplus
10880extern "C"
10881#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010882char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010883int
10884main ()
10885{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010886return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010887 ;
10888 return 0;
10889}
10890_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010891if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010892 ac_cv_lib_resolv_inet_aton=yes
10893else
Matthias Kloseb9621712010-04-24 17:59:49 +000010894 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010895fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010896rm -f core conftest.err conftest.$ac_objext \
10897 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010898LIBS=$ac_check_lib_save_LIBS
10899fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010900{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
10901$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010902if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010903 cat >>confdefs.h <<_ACEOF
10904#define HAVE_LIBRESOLV 1
10905_ACEOF
10906
10907 LIBS="-lresolv $LIBS"
10908
10909fi
10910
10911
10912fi
10913
10914
Christian Heimesd0764e22007-12-04 15:00:33 +000010915# On Tru64, chflags seems to be present, but calling it will
10916# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000010917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
10918$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010919if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010920 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010921else
Matthias Kloseb9621712010-04-24 17:59:49 +000010922 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010923 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000010924else
Matthias Kloseb9621712010-04-24 17:59:49 +000010925 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000010926/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070010927
Christian Heimesd0764e22007-12-04 15:00:33 +000010928#include <sys/stat.h>
10929#include <unistd.h>
10930int main(int argc, char*argv[])
10931{
10932 if(chflags(argv[0], 0) != 0)
10933 return 1;
10934 return 0;
10935}
Ned Deily3eb67d52011-06-28 00:00:28 -070010936
Christian Heimesd0764e22007-12-04 15:00:33 +000010937_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010938if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010939 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010940else
Matthias Kloseb9621712010-04-24 17:59:49 +000010941 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010942fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010943rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10944 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010945fi
10946
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010947
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010948fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010949{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
10950$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010951if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010952 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020010953if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010954 ac_cv_have_chflags="yes"
10955else
10956 ac_cv_have_chflags="no"
10957fi
10958
10959fi
10960if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010961
Matthias Kloseb9621712010-04-24 17:59:49 +000010962$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010963
10964fi
10965
Matthias Kloseb9621712010-04-24 17:59:49 +000010966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
10967$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010968if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010969 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010970else
Matthias Kloseb9621712010-04-24 17:59:49 +000010971 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010972 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000010973else
Matthias Kloseb9621712010-04-24 17:59:49 +000010974 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000010975/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070010976
Christian Heimesd0764e22007-12-04 15:00:33 +000010977#include <sys/stat.h>
10978#include <unistd.h>
10979int main(int argc, char*argv[])
10980{
10981 if(lchflags(argv[0], 0) != 0)
10982 return 1;
10983 return 0;
10984}
Ned Deily3eb67d52011-06-28 00:00:28 -070010985
Christian Heimesd0764e22007-12-04 15:00:33 +000010986_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010987if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010988 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010989else
Matthias Kloseb9621712010-04-24 17:59:49 +000010990 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000010991fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010992rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10993 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010994fi
10995
10996
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010997fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010998{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
10999$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011000if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000011001 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020011002if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000011003 ac_cv_have_lchflags="yes"
11004else
11005 ac_cv_have_lchflags="no"
11006fi
11007
11008fi
11009if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011010
Matthias Kloseb9621712010-04-24 17:59:49 +000011011$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011012
11013fi
11014
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011015case $ac_sys_system/$ac_sys_release in
11016Darwin/*)
11017 _CUR_CFLAGS="${CFLAGS}"
11018 _CUR_LDFLAGS="${LDFLAGS}"
11019 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
11020 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
11021 ;;
11022esac
11023
Matthias Kloseb9621712010-04-24 17:59:49 +000011024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
11025$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011026if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011027 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011028else
11029 ac_check_lib_save_LIBS=$LIBS
11030LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011031cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011032/* end confdefs.h. */
11033
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011034/* Override any GCC internal prototype to avoid an error.
11035 Use char because int might match the return type of a GCC
11036 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011037#ifdef __cplusplus
11038extern "C"
11039#endif
11040char inflateCopy ();
11041int
11042main ()
11043{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011044return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011045 ;
11046 return 0;
11047}
11048_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011049if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011050 ac_cv_lib_z_inflateCopy=yes
11051else
Matthias Kloseb9621712010-04-24 17:59:49 +000011052 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011053fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011054rm -f core conftest.err conftest.$ac_objext \
11055 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011056LIBS=$ac_check_lib_save_LIBS
11057fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011058{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
11059$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011060if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011061
Matthias Kloseb9621712010-04-24 17:59:49 +000011062$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000011063
11064fi
11065
11066
11067case $ac_sys_system/$ac_sys_release in
11068Darwin/*)
11069 CFLAGS="${_CUR_CFLAGS}"
11070 LDFLAGS="${_CUR_LDFLAGS}"
11071 ;;
11072esac
11073
Matthias Kloseb9621712010-04-24 17:59:49 +000011074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
11075$as_echo_n "checking for hstrerror... " >&6; }
11076cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011077/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011078
Martin v. Löwise9416172003-05-03 10:12:45 +000011079#include <netdb.h>
11080
Martin v. Löwise9416172003-05-03 10:12:45 +000011081int
11082main ()
11083{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011084void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011085 ;
11086 return 0;
11087}
11088_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011089if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011090
Matthias Kloseb9621712010-04-24 17:59:49 +000011091$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011092
Matthias Kloseb159a552010-04-25 21:00:44 +000011093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011094$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011095else
Matthias Kloseb9621712010-04-24 17:59:49 +000011096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11097$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011098
11099fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011100rm -f core conftest.err conftest.$ac_objext \
11101 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011102
Matthias Kloseb9621712010-04-24 17:59:49 +000011103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
11104$as_echo_n "checking for inet_aton... " >&6; }
11105cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011106/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011107
Martin v. Löwis86d66262006-02-17 08:40:11 +000011108#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011109#include <sys/socket.h>
11110#include <netinet/in.h>
11111#include <arpa/inet.h>
11112
Martin v. Löwise9416172003-05-03 10:12:45 +000011113int
11114main ()
11115{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011116void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011117 ;
11118 return 0;
11119}
11120_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011121if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011122
Matthias Kloseb9621712010-04-24 17:59:49 +000011123$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011124
Matthias Kloseb159a552010-04-25 21:00:44 +000011125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011126$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011127else
Matthias Kloseb9621712010-04-24 17:59:49 +000011128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11129$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011130
11131fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011132rm -f core conftest.err conftest.$ac_objext \
11133 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011134
Matthias Kloseb9621712010-04-24 17:59:49 +000011135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
11136$as_echo_n "checking for inet_pton... " >&6; }
11137cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011138/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011139
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011140#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011141#include <sys/socket.h>
11142#include <netinet/in.h>
11143#include <arpa/inet.h>
11144
Martin v. Löwise9416172003-05-03 10:12:45 +000011145int
11146main ()
11147{
11148void* p = inet_pton
11149 ;
11150 return 0;
11151}
11152_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011153if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011154
Matthias Kloseb9621712010-04-24 17:59:49 +000011155$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011156
Matthias Kloseb159a552010-04-25 21:00:44 +000011157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011158$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011159else
Matthias Kloseb9621712010-04-24 17:59:49 +000011160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11161$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011162
11163fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011164rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000011165
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011166# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000011167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
11168$as_echo_n "checking for setgroups... " >&6; }
11169cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011170/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011171
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011172#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011173#ifdef HAVE_GRP_H
11174#include <grp.h>
11175#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000011176
Martin v. Löwisd5843682002-11-21 20:41:28 +000011177int
11178main ()
11179{
11180void* p = setgroups
11181 ;
11182 return 0;
11183}
11184_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011185if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011186
Matthias Kloseb9621712010-04-24 17:59:49 +000011187$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011188
Matthias Kloseb159a552010-04-25 21:00:44 +000011189 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011190$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011191else
Matthias Kloseb9621712010-04-24 17:59:49 +000011192 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11193$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011194
11195fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011196rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000011197
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011198# check for openpty and forkpty
11199
11200for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011201do :
11202 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011203if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011204 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011205#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011206_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011207
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011208else
Matthias Kloseb9621712010-04-24 17:59:49 +000011209 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
11210$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011211if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011212 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011213else
Martin v. Löwis11437992002-04-12 09:54:03 +000011214 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011215LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011216cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011217/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011218
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011219/* Override any GCC internal prototype to avoid an error.
11220 Use char because int might match the return type of a GCC
11221 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011222#ifdef __cplusplus
11223extern "C"
11224#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011225char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011226int
11227main ()
11228{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011229return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011230 ;
11231 return 0;
11232}
11233_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011234if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011235 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011236else
Matthias Kloseb9621712010-04-24 17:59:49 +000011237 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011238fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011239rm -f core conftest.err conftest.$ac_objext \
11240 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011241LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011242fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011243{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
11244$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011245if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011246 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011247 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011248else
Matthias Kloseb9621712010-04-24 17:59:49 +000011249 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
11250$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011251if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011252 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011253else
11254 ac_check_lib_save_LIBS=$LIBS
11255LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011256cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011257/* end confdefs.h. */
11258
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011259/* Override any GCC internal prototype to avoid an error.
11260 Use char because int might match the return type of a GCC
11261 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011262#ifdef __cplusplus
11263extern "C"
11264#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011265char openpty ();
11266int
11267main ()
11268{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011269return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011270 ;
11271 return 0;
11272}
11273_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011274if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011275 ac_cv_lib_bsd_openpty=yes
11276else
Matthias Kloseb9621712010-04-24 17:59:49 +000011277 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011278fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011279rm -f core conftest.err conftest.$ac_objext \
11280 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011281LIBS=$ac_check_lib_save_LIBS
11282fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011283{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
11284$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011285if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011286 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011287 LIBS="$LIBS -lbsd"
11288fi
11289
11290
11291fi
11292
Fred Drake8cef4cf2000-06-28 16:40:38 +000011293
11294fi
11295done
11296
11297for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011298do :
11299 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011300if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011301 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011302#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011303_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011304
Fred Drake8cef4cf2000-06-28 16:40:38 +000011305else
Matthias Kloseb9621712010-04-24 17:59:49 +000011306 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
11307$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011308if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011309 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011310else
Martin v. Löwis11437992002-04-12 09:54:03 +000011311 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011312LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011313cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011314/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011315
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011316/* Override any GCC internal prototype to avoid an error.
11317 Use char because int might match the return type of a GCC
11318 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011319#ifdef __cplusplus
11320extern "C"
11321#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011322char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011323int
11324main ()
11325{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011326return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011327 ;
11328 return 0;
11329}
11330_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011331if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011332 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011333else
Matthias Kloseb9621712010-04-24 17:59:49 +000011334 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011335fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011336rm -f core conftest.err conftest.$ac_objext \
11337 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011338LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011339fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011340{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
11341$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011342if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011343 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011344 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011345else
Matthias Kloseb9621712010-04-24 17:59:49 +000011346 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
11347$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011348if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011349 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011350else
11351 ac_check_lib_save_LIBS=$LIBS
11352LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011353cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011354/* end confdefs.h. */
11355
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011356/* Override any GCC internal prototype to avoid an error.
11357 Use char because int might match the return type of a GCC
11358 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011359#ifdef __cplusplus
11360extern "C"
11361#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011362char forkpty ();
11363int
11364main ()
11365{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011366return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011367 ;
11368 return 0;
11369}
11370_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011371if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011372 ac_cv_lib_bsd_forkpty=yes
11373else
Matthias Kloseb9621712010-04-24 17:59:49 +000011374 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011375fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011376rm -f core conftest.err conftest.$ac_objext \
11377 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011378LIBS=$ac_check_lib_save_LIBS
11379fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011380{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
11381$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011382if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011383 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011384 LIBS="$LIBS -lbsd"
11385fi
11386
11387
11388fi
11389
Fred Drake8cef4cf2000-06-28 16:40:38 +000011390
11391fi
11392done
11393
Jack Jansendd19cf82001-12-06 22:36:17 +000011394
Christian Heimesb186d002008-03-18 15:15:01 +000011395# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000011396for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000011397do :
11398 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020011399if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000011400 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011401#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000011402_ACEOF
11403
11404fi
11405done
11406
11407
Michael W. Hudson54241132001-12-07 15:38:26 +000011408# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000011409for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000011410do :
11411 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11412ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011413if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011414 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011415#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011416_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000011417
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011418fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000011419done
11420
Michael W. Hudson54241132001-12-07 15:38:26 +000011421
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011422ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020011423if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011424 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000011425
Martin v. Löwis1142de32002-03-29 16:28:31 +000011426else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011427 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011428 *" dup2.$ac_objext "* ) ;;
11429 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011430 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011431esac
11432
Martin v. Löwis1142de32002-03-29 16:28:31 +000011433fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011434
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011435ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020011436if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011437 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
11438
11439else
11440 case " $LIBOBJS " in
11441 *" strdup.$ac_objext "* ) ;;
11442 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
11443 ;;
11444esac
11445
11446fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000011447
11448
11449for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000011450do :
11451 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020011452if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011453 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011454#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011455_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011456 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011457/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011458#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011459int
11460main ()
11461{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011462getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011463 ;
11464 return 0;
11465}
11466_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011467if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011468
Matthias Kloseb9621712010-04-24 17:59:49 +000011469$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011470
Guido van Rossum627b2d71993-12-24 10:39:16 +000011471fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011472rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011473
Guido van Rossum627b2d71993-12-24 10:39:16 +000011474fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011475done
Guido van Rossum627b2d71993-12-24 10:39:16 +000011476
Jack Jansen150753c2003-03-29 22:07:47 +000011477for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000011478do :
11479 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020011480if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000011481 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011482#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000011483_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011484 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011485/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000011486#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000011487int
11488main ()
11489{
11490setpgrp(0,0);
11491 ;
11492 return 0;
11493}
11494_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011495if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011496
Matthias Kloseb9621712010-04-24 17:59:49 +000011497$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011498
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011499fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011500rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000011501
11502fi
11503done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011504
Thomas Wouters3a584202000-08-05 23:28:51 +000011505for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000011506do :
11507 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020011508if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011509 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011510#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011511_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011512 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011513/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011514#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011515int
11516main ()
11517{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011518gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011519 ;
11520 return 0;
11521}
11522_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011523if ac_fn_c_try_compile "$LINENO"; then :
11524
Guido van Rossum627b2d71993-12-24 10:39:16 +000011525else
Skip Montanaro6dead952003-09-25 14:50:04 +000011526
Matthias Kloseb9621712010-04-24 17:59:49 +000011527$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011528
Martin v. Löwis11437992002-04-12 09:54:03 +000011529
Guido van Rossum627b2d71993-12-24 10:39:16 +000011530fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011531rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011532
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011533fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011534done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011535
Michael W. Hudson54241132001-12-07 15:38:26 +000011536
Victor Stinnere0be4232011-10-25 13:06:09 +020011537for ac_func in clock_gettime
11538do :
11539 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
11540if test "x$ac_cv_func_clock_gettime" = xyes; then :
11541 cat >>confdefs.h <<_ACEOF
11542#define HAVE_CLOCK_GETTIME 1
11543_ACEOF
11544
11545else
11546
11547 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
11548$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
11549if ${ac_cv_lib_rt_clock_gettime+:} false; then :
11550 $as_echo_n "(cached) " >&6
11551else
11552 ac_check_lib_save_LIBS=$LIBS
11553LIBS="-lrt $LIBS"
11554cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11555/* end confdefs.h. */
11556
11557/* Override any GCC internal prototype to avoid an error.
11558 Use char because int might match the return type of a GCC
11559 builtin and then its argument prototype would still apply. */
11560#ifdef __cplusplus
11561extern "C"
11562#endif
11563char clock_gettime ();
11564int
11565main ()
11566{
11567return clock_gettime ();
11568 ;
11569 return 0;
11570}
11571_ACEOF
11572if ac_fn_c_try_link "$LINENO"; then :
11573 ac_cv_lib_rt_clock_gettime=yes
11574else
11575 ac_cv_lib_rt_clock_gettime=no
11576fi
11577rm -f core conftest.err conftest.$ac_objext \
11578 conftest$ac_exeext conftest.$ac_ext
11579LIBS=$ac_check_lib_save_LIBS
11580fi
11581{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
11582$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
11583if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
11584
11585 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
11586
11587
11588$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
11589
11590
11591fi
11592
11593
11594fi
11595done
11596
11597
11598for ac_func in clock_getres
11599do :
11600 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
11601if test "x$ac_cv_func_clock_getres" = xyes; then :
11602 cat >>confdefs.h <<_ACEOF
11603#define HAVE_CLOCK_GETRES 1
11604_ACEOF
11605
11606else
11607
11608 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
11609$as_echo_n "checking for clock_getres in -lrt... " >&6; }
11610if ${ac_cv_lib_rt_clock_getres+:} false; then :
11611 $as_echo_n "(cached) " >&6
11612else
11613 ac_check_lib_save_LIBS=$LIBS
11614LIBS="-lrt $LIBS"
11615cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11616/* end confdefs.h. */
11617
11618/* Override any GCC internal prototype to avoid an error.
11619 Use char because int might match the return type of a GCC
11620 builtin and then its argument prototype would still apply. */
11621#ifdef __cplusplus
11622extern "C"
11623#endif
11624char clock_getres ();
11625int
11626main ()
11627{
11628return clock_getres ();
11629 ;
11630 return 0;
11631}
11632_ACEOF
11633if ac_fn_c_try_link "$LINENO"; then :
11634 ac_cv_lib_rt_clock_getres=yes
11635else
11636 ac_cv_lib_rt_clock_getres=no
11637fi
11638rm -f core conftest.err conftest.$ac_objext \
11639 conftest$ac_exeext conftest.$ac_ext
11640LIBS=$ac_check_lib_save_LIBS
11641fi
11642{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
11643$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
11644if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
11645
11646 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
11647
11648
11649fi
11650
11651
11652fi
11653done
11654
11655
Matthias Kloseb9621712010-04-24 17:59:49 +000011656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
11657$as_echo_n "checking for major... " >&6; }
11658cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011659/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011660
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011661#if defined(MAJOR_IN_MKDEV)
11662#include <sys/mkdev.h>
11663#elif defined(MAJOR_IN_SYSMACROS)
11664#include <sys/sysmacros.h>
11665#else
11666#include <sys/types.h>
11667#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011668
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011669int
11670main ()
11671{
11672
11673 makedev(major(0),minor(0));
11674
11675 ;
11676 return 0;
11677}
11678_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011679if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011680
11681
Matthias Kloseb9621712010-04-24 17:59:49 +000011682$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011683
Matthias Kloseb9621712010-04-24 17:59:49 +000011684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11685$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011686
11687else
Skip Montanaro6dead952003-09-25 14:50:04 +000011688
Matthias Kloseb9621712010-04-24 17:59:49 +000011689 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11690$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011691
11692fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011693rm -f core conftest.err conftest.$ac_objext \
11694 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011695
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011696# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000011697# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000011698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
11699$as_echo_n "checking for getaddrinfo... " >&6; }
11700cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011701/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011702
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011703#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011704#include <sys/socket.h>
11705#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011706#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011707
Martin v. Löwis11437992002-04-12 09:54:03 +000011708int
11709main ()
11710{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011711getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000011712 ;
11713 return 0;
11714}
11715_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011716if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011717 have_getaddrinfo=yes
11718else
Matthias Kloseb9621712010-04-24 17:59:49 +000011719 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011720fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011721rm -f core conftest.err conftest.$ac_objext \
11722 conftest$ac_exeext conftest.$ac_ext
11723{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
11724$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011725if test $have_getaddrinfo = yes
11726then
Matthias Kloseb9621712010-04-24 17:59:49 +000011727 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
11728$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011729 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011730 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011731else
Matthias Kloseb9621712010-04-24 17:59:49 +000011732 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010011733
11734if test "${enable_ipv6+set}" = set; then
11735 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
11736else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011737 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010011738fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011739else
Matthias Kloseb9621712010-04-24 17:59:49 +000011740 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011741/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011742
Stefan Krah19c21392012-11-22 23:47:32 +010011743#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011744#include <sys/types.h>
11745#include <netdb.h>
11746#include <string.h>
11747#include <sys/socket.h>
11748#include <netinet/in.h>
11749
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011750int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011751{
11752 int passive, gaierr, inet4 = 0, inet6 = 0;
11753 struct addrinfo hints, *ai, *aitop;
11754 char straddr[INET6_ADDRSTRLEN], strport[16];
11755
11756 for (passive = 0; passive <= 1; passive++) {
11757 memset(&hints, 0, sizeof(hints));
11758 hints.ai_family = AF_UNSPEC;
11759 hints.ai_flags = passive ? AI_PASSIVE : 0;
11760 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000011761 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011762 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
11763 (void)gai_strerror(gaierr);
11764 goto bad;
11765 }
11766 for (ai = aitop; ai; ai = ai->ai_next) {
11767 if (ai->ai_addr == NULL ||
11768 ai->ai_addrlen == 0 ||
11769 getnameinfo(ai->ai_addr, ai->ai_addrlen,
11770 straddr, sizeof(straddr), strport, sizeof(strport),
11771 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
11772 goto bad;
11773 }
11774 switch (ai->ai_family) {
11775 case AF_INET:
11776 if (strcmp(strport, "54321") != 0) {
11777 goto bad;
11778 }
11779 if (passive) {
11780 if (strcmp(straddr, "0.0.0.0") != 0) {
11781 goto bad;
11782 }
11783 } else {
11784 if (strcmp(straddr, "127.0.0.1") != 0) {
11785 goto bad;
11786 }
11787 }
11788 inet4++;
11789 break;
11790 case AF_INET6:
11791 if (strcmp(strport, "54321") != 0) {
11792 goto bad;
11793 }
11794 if (passive) {
11795 if (strcmp(straddr, "::") != 0) {
11796 goto bad;
11797 }
11798 } else {
11799 if (strcmp(straddr, "::1") != 0) {
11800 goto bad;
11801 }
11802 }
11803 inet6++;
11804 break;
11805 case AF_UNSPEC:
11806 goto bad;
11807 break;
11808 default:
11809 /* another family support? */
11810 break;
11811 }
11812 }
11813 }
11814
11815 if (!(inet4 == 0 || inet4 == 2))
11816 goto bad;
11817 if (!(inet6 == 0 || inet6 == 2))
11818 goto bad;
11819
11820 if (aitop)
11821 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011822 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011823
11824 bad:
11825 if (aitop)
11826 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011827 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011828}
11829
Martin v. Löwis11437992002-04-12 09:54:03 +000011830_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011831if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011832 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011833else
Matthias Kloseb9621712010-04-24 17:59:49 +000011834 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011835fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011836rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11837 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011838fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011839
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011840fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011841
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011842fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011843
Benjamin Petersond4694ed2010-11-01 01:44:30 +000011844{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
11845$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
11846
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011847if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011848then
11849 if test $ipv6 = yes
11850 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011851 echo 'Fatal: You must get working getaddrinfo() function.'
11852 echo ' or you can specify "--disable-ipv6"'.
11853 exit 1
11854 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011855else
Martin v. Löwis11437992002-04-12 09:54:03 +000011856
Matthias Kloseb9621712010-04-24 17:59:49 +000011857$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011858
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011859fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000011860
Jack Jansen9a66b6d2001-08-08 13:56:14 +000011861for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000011862do :
11863 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020011864if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011865 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011866#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011867_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011868
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011869fi
11870done
11871
Michael W. Hudson54241132001-12-07 15:38:26 +000011872
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011873# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000011874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
11875$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011876if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011877 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011878else
Matthias Kloseb9621712010-04-24 17:59:49 +000011879 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011880/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011881#include <sys/types.h>
11882#include <sys/time.h>
11883#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011884
Martin v. Löwis11437992002-04-12 09:54:03 +000011885int
11886main ()
11887{
11888if ((struct tm *) 0)
11889return 0;
11890 ;
11891 return 0;
11892}
11893_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011894if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011895 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011896else
Matthias Kloseb9621712010-04-24 17:59:49 +000011897 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011898fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011899rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011900fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011901{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
11902$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011903if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011904
Matthias Kloseb9621712010-04-24 17:59:49 +000011905$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011906
11907fi
11908
Matthias Kloseb9621712010-04-24 17:59:49 +000011909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
11910$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011911if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011912 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011913else
Matthias Kloseb9621712010-04-24 17:59:49 +000011914 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011915/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011916#include <sys/types.h>
11917#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011918
Martin v. Löwis11437992002-04-12 09:54:03 +000011919int
11920main ()
11921{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011922struct tm tm;
11923 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000011924 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000011925 ;
11926 return 0;
11927}
11928_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011929if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011930 ac_cv_struct_tm=time.h
11931else
Matthias Kloseb9621712010-04-24 17:59:49 +000011932 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011933fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011934rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011935fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011936{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
11937$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011938if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011939
Matthias Kloseb9621712010-04-24 17:59:49 +000011940$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011941
11942fi
11943
Matthias Kloseb9621712010-04-24 17:59:49 +000011944ac_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 +000011945#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000011946
Matthias Kloseb9621712010-04-24 17:59:49 +000011947"
Victor Stinnere0be4232011-10-25 13:06:09 +020011948if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011949
11950cat >>confdefs.h <<_ACEOF
11951#define HAVE_STRUCT_TM_TM_ZONE 1
11952_ACEOF
11953
11954
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011955fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011956
Martin v. Löwis11437992002-04-12 09:54:03 +000011957if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
11958
Matthias Kloseb9621712010-04-24 17:59:49 +000011959$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011960
11961else
Matthias Kloseb9621712010-04-24 17:59:49 +000011962 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
11963"
Victor Stinnere0be4232011-10-25 13:06:09 +020011964if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011965 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011966else
Matthias Kloseb9621712010-04-24 17:59:49 +000011967 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011968fi
11969
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011970cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011971#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011972_ACEOF
11973
Matthias Kloseb9621712010-04-24 17:59:49 +000011974 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
11975$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011976if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011977 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011978else
Matthias Kloseb9621712010-04-24 17:59:49 +000011979 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011980/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011981#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011982#if !HAVE_DECL_TZNAME
11983extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000011984#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011985
Martin v. Löwis11437992002-04-12 09:54:03 +000011986int
11987main ()
11988{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011989return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000011990 ;
11991 return 0;
11992}
11993_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011994if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011995 ac_cv_var_tzname=yes
11996else
Matthias Kloseb9621712010-04-24 17:59:49 +000011997 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011998fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011999rm -f core conftest.err conftest.$ac_objext \
12000 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000012001fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012002{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
12003$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000012004 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012005
Matthias Kloseb9621712010-04-24 17:59:49 +000012006$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012007
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012008 fi
12009fi
12010
Matthias Kloseb9621712010-04-24 17:59:49 +000012011ac_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 +020012012if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012013
12014cat >>confdefs.h <<_ACEOF
12015#define HAVE_STRUCT_STAT_ST_RDEV 1
12016_ACEOF
12017
12018
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012019fi
12020
Matthias Kloseb9621712010-04-24 17:59:49 +000012021ac_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 +020012022if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012023
Martin v. Löwis11437992002-04-12 09:54:03 +000012024cat >>confdefs.h <<_ACEOF
12025#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
12026_ACEOF
12027
12028
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012029fi
12030
Matthias Kloseb9621712010-04-24 17:59:49 +000012031ac_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 +020012032if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000012033
12034cat >>confdefs.h <<_ACEOF
12035#define HAVE_STRUCT_STAT_ST_FLAGS 1
12036_ACEOF
12037
12038
12039fi
12040
Matthias Kloseb9621712010-04-24 17:59:49 +000012041ac_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 +020012042if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012043
12044cat >>confdefs.h <<_ACEOF
12045#define HAVE_STRUCT_STAT_ST_GEN 1
12046_ACEOF
12047
12048
12049fi
12050
Matthias Kloseb9621712010-04-24 17:59:49 +000012051ac_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 +020012052if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000012053
12054cat >>confdefs.h <<_ACEOF
12055#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
12056_ACEOF
12057
12058
12059fi
12060
Matthias Kloseb9621712010-04-24 17:59:49 +000012061ac_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 +020012062if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000012063
Martin v. Löwis11437992002-04-12 09:54:03 +000012064cat >>confdefs.h <<_ACEOF
12065#define HAVE_STRUCT_STAT_ST_BLOCKS 1
12066_ACEOF
12067
12068
Matthias Kloseb9621712010-04-24 17:59:49 +000012069$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012070
12071else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012072 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000012073 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012074 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
12075 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012076esac
12077
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012078fi
12079
Michael W. Hudson54241132001-12-07 15:38:26 +000012080
Martin v. Löwis11437992002-04-12 09:54:03 +000012081
Matthias Kloseb9621712010-04-24 17:59:49 +000012082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
12083$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012084if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012085 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012086else
Matthias Kloseb159a552010-04-25 21:00:44 +000012087
Matthias Kloseb9621712010-04-24 17:59:49 +000012088 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012089/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012090#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012091int
12092main ()
12093{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012094return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000012095 ;
12096 return 0;
12097}
12098_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012099if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012100 ac_cv_header_time_altzone=yes
12101else
Matthias Kloseb9621712010-04-24 17:59:49 +000012102 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000012103fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012104rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000012105
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012106fi
12107
Matthias Kloseb9621712010-04-24 17:59:49 +000012108{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
12109$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012110if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012111
Matthias Kloseb9621712010-04-24 17:59:49 +000012112$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012113
12114fi
12115
Guido van Rossumda88dad1995-01-26 00:46:29 +000012116was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
12118$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
12119cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012120/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012121
12122#include <sys/types.h>
12123#include <sys/select.h>
12124#include <sys/time.h>
12125
Martin v. Löwis11437992002-04-12 09:54:03 +000012126int
12127main ()
12128{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012129;
Martin v. Löwis11437992002-04-12 09:54:03 +000012130 ;
12131 return 0;
12132}
12133_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012134if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012135
12136
Matthias Kloseb9621712010-04-24 17:59:49 +000012137$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012138
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012139 was_it_defined=yes
12140
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012141fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012142rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012143{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
12144$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012145
Matthias Kloseb9621712010-04-24 17:59:49 +000012146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
12147$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012148if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012149 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012150else
Matthias Kloseb9621712010-04-24 17:59:49 +000012151 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012152/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000012153#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012154int
12155main ()
12156{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012157struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000012158 ;
12159 return 0;
12160}
12161_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012162if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012163 ac_cv_struct_addrinfo=yes
12164else
Matthias Kloseb9621712010-04-24 17:59:49 +000012165 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012166fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012167rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12168fi
12169
Matthias Kloseb9621712010-04-24 17:59:49 +000012170{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
12171$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012172if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012173
Matthias Kloseb9621712010-04-24 17:59:49 +000012174$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012175
12176fi
12177
Matthias Kloseb9621712010-04-24 17:59:49 +000012178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
12179$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012180if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012181 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012182else
Matthias Kloseb9621712010-04-24 17:59:49 +000012183 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012184/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012185
12186# include <sys/types.h>
12187# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012188int
12189main ()
12190{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012191struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000012192 ;
12193 return 0;
12194}
12195_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012196if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012197 ac_cv_struct_sockaddr_storage=yes
12198else
Matthias Kloseb9621712010-04-24 17:59:49 +000012199 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012200fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012201rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12202fi
12203
Matthias Kloseb9621712010-04-24 17:59:49 +000012204{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
12205$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012206if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012207
Matthias Kloseb9621712010-04-24 17:59:49 +000012208$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012209
12210fi
12211
Guido van Rossum627b2d71993-12-24 10:39:16 +000012212# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000012213
Matthias Kloseb9621712010-04-24 17:59:49 +000012214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
12215$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012216if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012217 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000012218else
Matthias Kloseb9621712010-04-24 17:59:49 +000012219 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012220/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012221$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012222int
12223main ()
12224{
12225static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012226test_array [0] = 0;
12227return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012228
12229 ;
12230 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000012231}
Martin v. Löwis11437992002-04-12 09:54:03 +000012232_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012233if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012234 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012235else
Matthias Kloseb9621712010-04-24 17:59:49 +000012236 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012237fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012238rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012239fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012240{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
12241$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012242if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012243 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012244
12245fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000012246
Matthias Kloseb9621712010-04-24 17:59:49 +000012247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12248$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012249if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012250 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012251else
Matthias Kloseb9621712010-04-24 17:59:49 +000012252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012253/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012254
Martin v. Löwis11437992002-04-12 09:54:03 +000012255int
12256main ()
12257{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012258
Martin v. Löwis11437992002-04-12 09:54:03 +000012259#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012260 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012261 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012262 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000012263 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012264 char const *const *pcpcc;
12265 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000012266 /* NEC SVR4.0.2 mips cc rejects this. */
12267 struct point {int x, y;};
12268 static struct point const zero = {0,0};
12269 /* AIX XL C 1.02.0.0 rejects this.
12270 It does not let you subtract one const X* pointer from another in
12271 an arm of an if-expression whose if-part is not a constant
12272 expression */
12273 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012274 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012275 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012276 ++pcpcc;
12277 ppc = (char**) pcpcc;
12278 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012279 { /* SCO 3.2v4 cc rejects this sort of thing. */
12280 char tx;
12281 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000012282 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012283
Martin v. Löwis11437992002-04-12 09:54:03 +000012284 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012285 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012286 }
12287 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12288 int x[] = {25, 17};
12289 const int *foo = &x[0];
12290 ++foo;
12291 }
12292 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12293 typedef const int *iptr;
12294 iptr p = 0;
12295 ++p;
12296 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012297 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000012298 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012299 struct s { int j; const int *ap[3]; } bx;
12300 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000012301 }
12302 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12303 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012304 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012305 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012306 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000012307#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000012308
Martin v. Löwis11437992002-04-12 09:54:03 +000012309 ;
12310 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012311}
Martin v. Löwis11437992002-04-12 09:54:03 +000012312_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012313if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012314 ac_cv_c_const=yes
12315else
Matthias Kloseb9621712010-04-24 17:59:49 +000012316 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012317fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012318rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012319fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012320{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12321$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012322if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012323
Matthias Kloseb9621712010-04-24 17:59:49 +000012324$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012325
12326fi
12327
Michael W. Hudson54241132001-12-07 15:38:26 +000012328
Guido van Rossumda88dad1995-01-26 00:46:29 +000012329works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
12331$as_echo_n "checking for working volatile... " >&6; }
12332cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012333/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012334
Martin v. Löwis11437992002-04-12 09:54:03 +000012335int
12336main ()
12337{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012338volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012339 ;
12340 return 0;
12341}
12342_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012343if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012344 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012345else
Skip Montanaro6dead952003-09-25 14:50:04 +000012346
Matthias Kloseb9621712010-04-24 17:59:49 +000012347$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012348
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012349
Guido van Rossum627b2d71993-12-24 10:39:16 +000012350fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012351rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012352{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12353$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012354
Guido van Rossumda88dad1995-01-26 00:46:29 +000012355works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
12357$as_echo_n "checking for working signed char... " >&6; }
12358cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012359/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012360
Martin v. Löwis11437992002-04-12 09:54:03 +000012361int
12362main ()
12363{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012364signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000012365 ;
12366 return 0;
12367}
12368_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012369if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012370 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012371else
Skip Montanaro6dead952003-09-25 14:50:04 +000012372
Matthias Kloseb9621712010-04-24 17:59:49 +000012373$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000012374
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012375
Guido van Rossum7f43da71994-08-01 12:15:30 +000012376fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012377rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012378{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12379$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012380
Guido van Rossumda88dad1995-01-26 00:46:29 +000012381have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
12383$as_echo_n "checking for prototypes... " >&6; }
12384cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012385/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012386int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012387int
12388main ()
12389{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012390return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000012391 ;
12392 return 0;
12393}
12394_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012395if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012396
Matthias Kloseb9621712010-04-24 17:59:49 +000012397$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012398
Matthias Kloseb159a552010-04-25 21:00:44 +000012399 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012400fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012401rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012402{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
12403$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012404
Guido van Rossumda88dad1995-01-26 00:46:29 +000012405works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
12407$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
12408cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012409/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012410
12411#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000012412int foo(int x, ...) {
12413 va_list va;
12414 va_start(va, x);
12415 va_arg(va, int);
12416 va_arg(va, char *);
12417 va_arg(va, double);
12418 return 0;
12419}
Guido van Rossum7f43da71994-08-01 12:15:30 +000012420
Martin v. Löwis11437992002-04-12 09:54:03 +000012421int
12422main ()
12423{
Guido van Rossum90eea071996-08-30 20:58:57 +000012424return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000012425 ;
12426 return 0;
12427}
12428_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012429if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012430
12431
Matthias Kloseb9621712010-04-24 17:59:49 +000012432$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012433
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012434 works=yes
12435
Guido van Rossum627b2d71993-12-24 10:39:16 +000012436fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012437rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012438{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12439$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012440
Martin v. Löwisd6320502004-08-12 13:45:08 +000012441# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000012442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
12443$as_echo_n "checking for socketpair... " >&6; }
12444cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012445/* end confdefs.h. */
12446
12447#include <sys/types.h>
12448#include <sys/socket.h>
12449
12450int
12451main ()
12452{
12453void *x=socketpair
12454 ;
12455 return 0;
12456}
12457_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012458if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000012459
Matthias Kloseb9621712010-04-24 17:59:49 +000012460$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000012461
Matthias Kloseb159a552010-04-25 21:00:44 +000012462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012463$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012464else
Matthias Kloseb9621712010-04-24 17:59:49 +000012465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12466$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012467
12468fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012469rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012470
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012471# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000012472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
12473$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
12474cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012475/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012476#include <sys/types.h>
12477#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012478int
12479main ()
12480{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012481struct sockaddr x;
12482x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012483 ;
12484 return 0;
12485}
12486_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012487if ac_fn_c_try_compile "$LINENO"; then :
12488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12489$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012490
Matthias Kloseb9621712010-04-24 17:59:49 +000012491$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012492
12493else
Matthias Kloseb9621712010-04-24 17:59:49 +000012494 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12495$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000012496
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012497fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012498rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012499
Guido van Rossumda88dad1995-01-26 00:46:29 +000012500va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
12502$as_echo_n "checking whether va_list is an array... " >&6; }
12503cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012504/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012505
12506#ifdef HAVE_STDARG_PROTOTYPES
12507#include <stdarg.h>
12508#else
12509#include <varargs.h>
12510#endif
12511
Martin v. Löwis11437992002-04-12 09:54:03 +000012512int
12513main ()
12514{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012515va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000012516 ;
12517 return 0;
12518}
12519_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012520if ac_fn_c_try_compile "$LINENO"; then :
12521
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012522else
Skip Montanaro6dead952003-09-25 14:50:04 +000012523
Martin v. Löwis11437992002-04-12 09:54:03 +000012524
Matthias Kloseb9621712010-04-24 17:59:49 +000012525$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012526
Guido van Rossumda88dad1995-01-26 00:46:29 +000012527 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012528
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012529fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012530rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012531{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
12532$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012533
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012534# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000012535
12536
Matthias Kloseb9621712010-04-24 17:59:49 +000012537ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020012538if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012539
Matthias Kloseb9621712010-04-24 17:59:49 +000012540 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000012541
Matthias Kloseb9621712010-04-24 17:59:49 +000012542 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
12543$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012544 OLD_CFLAGS=$CFLAGS
12545 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012546 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012547/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012548
12549# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012550
Martin v. Löwis11437992002-04-12 09:54:03 +000012551int
12552main ()
12553{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012554
12555 char *name;
12556 struct hostent *he, *res;
12557 char buffer[2048];
12558 int buflen = 2048;
12559 int h_errnop;
12560
12561 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012562
12563 ;
12564 return 0;
12565}
12566_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012567if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012568
Matthias Kloseb9621712010-04-24 17:59:49 +000012569 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012570
Martin v. Löwis11437992002-04-12 09:54:03 +000012571
Matthias Kloseb9621712010-04-24 17:59:49 +000012572$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012573
Matthias Kloseb9621712010-04-24 17:59:49 +000012574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12575$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012576
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012577else
Skip Montanaro6dead952003-09-25 14:50:04 +000012578
Matthias Kloseb9621712010-04-24 17:59:49 +000012579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12580$as_echo "no" >&6; }
12581 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
12582$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
12583 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012584/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012585
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012586# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012587
Martin v. Löwis11437992002-04-12 09:54:03 +000012588int
12589main ()
12590{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012591
12592 char *name;
12593 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000012594 char buffer[2048];
12595 int buflen = 2048;
12596 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012597
Matthias Kloseb159a552010-04-25 21:00:44 +000012598 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012599
12600 ;
12601 return 0;
12602}
12603_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012604if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012605
Matthias Kloseb9621712010-04-24 17:59:49 +000012606 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012607
Martin v. Löwis11437992002-04-12 09:54:03 +000012608
Matthias Kloseb159a552010-04-25 21:00:44 +000012609$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012610
Matthias Kloseb9621712010-04-24 17:59:49 +000012611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12612$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012613
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012614else
Skip Montanaro6dead952003-09-25 14:50:04 +000012615
Matthias Kloseb9621712010-04-24 17:59:49 +000012616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12617$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000012618 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
12619$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
12620 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12621/* end confdefs.h. */
12622
12623# include <netdb.h>
12624
12625int
12626main ()
12627{
12628
12629 char *name;
12630 struct hostent *he;
12631 struct hostent_data data;
12632
12633 (void) gethostbyname_r(name, he, &data);
12634
12635 ;
12636 return 0;
12637}
12638_ACEOF
12639if ac_fn_c_try_compile "$LINENO"; then :
12640
12641 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
12642
12643
12644$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
12645
12646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12647$as_echo "yes" >&6; }
12648
12649else
12650
12651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12652$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012653
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012654fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012655rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012656
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012657fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012658rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012659
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012660fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012661rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012662 CFLAGS=$OLD_CFLAGS
12663
12664else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012665
Matthias Kloseb9621712010-04-24 17:59:49 +000012666 for ac_func in gethostbyname
12667do :
12668 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020012669if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012670 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012671#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012672_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012673
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012674fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012675done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012676
Michael W. Hudson54241132001-12-07 15:38:26 +000012677
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012678fi
12679
Michael W. Hudson54241132001-12-07 15:38:26 +000012680
12681
12682
12683
12684
12685
Guido van Rossum627b2d71993-12-24 10:39:16 +000012686# checks for system services
12687# (none yet)
12688
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012689# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000012690ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020012691if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012692
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012693else
Matthias Kloseb9621712010-04-24 17:59:49 +000012694 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
12695$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012696if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012697 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012698else
Martin v. Löwis11437992002-04-12 09:54:03 +000012699 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012700LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012701cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012702/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012703
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012704/* Override any GCC internal prototype to avoid an error.
12705 Use char because int might match the return type of a GCC
12706 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012707#ifdef __cplusplus
12708extern "C"
12709#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012710char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012711int
12712main ()
12713{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012714return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012715 ;
12716 return 0;
12717}
12718_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012719if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012720 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012721else
Matthias Kloseb9621712010-04-24 17:59:49 +000012722 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012723fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012724rm -f core conftest.err conftest.$ac_objext \
12725 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012726LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012727fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012728{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
12729$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012730if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012731 cat >>confdefs.h <<_ACEOF
12732#define HAVE_LIBIEEE 1
12733_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012734
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012735 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012736
Guido van Rossum627b2d71993-12-24 10:39:16 +000012737fi
12738
Michael W. Hudson54241132001-12-07 15:38:26 +000012739
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012740fi
12741
Michael W. Hudson54241132001-12-07 15:38:26 +000012742
Guido van Rossum7f253911997-05-09 02:42:48 +000012743# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000012744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
12745$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012746
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012747# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012748if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012749 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000012750if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000012751then
12752
Matthias Kloseb9621712010-04-24 17:59:49 +000012753$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012754
Matthias Kloseb9621712010-04-24 17:59:49 +000012755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12756$as_echo "yes" >&6; }
12757else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12758$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012759fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000012760else
Matthias Kloseb9621712010-04-24 17:59:49 +000012761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12762$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012763fi
12764
Guido van Rossum7f253911997-05-09 02:42:48 +000012765
Guido van Rossum7f43da71994-08-01 12:15:30 +000012766# check for --with-libm=...
12767
Guido van Rossum563e7081996-09-10 18:20:48 +000012768case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000012769Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000012770*) LIBM=-lm
12771esac
Matthias Kloseb9621712010-04-24 17:59:49 +000012772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
12773$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012774
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012775# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012776if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012777 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000012778if test "$withval" = no
12779then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000012780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
12781$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012782elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012783then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000012784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
12785$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012786else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012787fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012788else
Matthias Kloseb9621712010-04-24 17:59:49 +000012789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
12790$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012791fi
12792
Guido van Rossum7f43da71994-08-01 12:15:30 +000012793
12794# check for --with-libc=...
12795
Matthias Kloseb9621712010-04-24 17:59:49 +000012796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
12797$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012798
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012799# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012800if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012801 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000012802if test "$withval" = no
12803then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000012804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
12805$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012806elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012807then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000012808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
12809$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012810else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012811fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012812else
Matthias Kloseb9621712010-04-24 17:59:49 +000012813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
12814$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012815fi
12816
Guido van Rossum7f43da71994-08-01 12:15:30 +000012817
Stefan Krah1919b7e2012-03-21 18:25:23 +010012818# **************************************
12819# * Check for gcc x64 inline assembler *
12820# **************************************
12821
12822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
12823$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
12824cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12825/* end confdefs.h. */
12826
12827int
12828main ()
12829{
12830
12831 __asm__ __volatile__ ("movq %rcx, %rax");
12832
12833 ;
12834 return 0;
12835}
12836_ACEOF
12837if ac_fn_c_try_compile "$LINENO"; then :
12838 have_gcc_asm_for_x64=yes
12839else
12840 have_gcc_asm_for_x64=no
12841fi
12842rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12843{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
12844$as_echo "$have_gcc_asm_for_x64" >&6; }
12845if test "$have_gcc_asm_for_x64" = yes
12846then
12847
12848$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
12849
12850fi
12851
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012852# **************************************************
12853# * Check for various properties of floating point *
12854# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012855
Matthias Kloseb9621712010-04-24 17:59:49 +000012856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
12857$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012858if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012859 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012860else
12861
Matthias Kloseb9621712010-04-24 17:59:49 +000012862if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012863 ac_cv_little_endian_double=no
12864else
Matthias Kloseb9621712010-04-24 17:59:49 +000012865 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012866/* end confdefs.h. */
12867
12868#include <string.h>
12869int main() {
12870 double x = 9006104071832581.0;
12871 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
12872 return 0;
12873 else
12874 return 1;
12875}
12876
12877_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012878if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012879 ac_cv_little_endian_double=yes
12880else
Matthias Kloseb9621712010-04-24 17:59:49 +000012881 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012882fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012883rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12884 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012885fi
12886
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012887fi
12888
Matthias Kloseb9621712010-04-24 17:59:49 +000012889{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
12890$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012891if test "$ac_cv_little_endian_double" = yes
12892then
12893
Matthias Kloseb9621712010-04-24 17:59:49 +000012894$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012895
12896fi
12897
Matthias Kloseb9621712010-04-24 17:59:49 +000012898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
12899$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012900if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012901 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012902else
12903
Matthias Kloseb9621712010-04-24 17:59:49 +000012904if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012905 ac_cv_big_endian_double=no
12906else
Matthias Kloseb9621712010-04-24 17:59:49 +000012907 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012908/* end confdefs.h. */
12909
12910#include <string.h>
12911int main() {
12912 double x = 9006104071832581.0;
12913 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
12914 return 0;
12915 else
12916 return 1;
12917}
12918
12919_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012920if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012921 ac_cv_big_endian_double=yes
12922else
Matthias Kloseb9621712010-04-24 17:59:49 +000012923 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012924fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012925rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12926 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012927fi
12928
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012929fi
12930
Matthias Kloseb9621712010-04-24 17:59:49 +000012931{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
12932$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012933if test "$ac_cv_big_endian_double" = yes
12934then
12935
Matthias Kloseb9621712010-04-24 17:59:49 +000012936$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012937
12938fi
12939
12940# Some ARM platforms use a mixed-endian representation for doubles.
12941# While Python doesn't currently have full support for these platforms
12942# (see e.g., issue 1762561), we can at least make sure that float <-> string
12943# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000012944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
12945$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012946if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012947 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012948else
12949
Matthias Kloseb9621712010-04-24 17:59:49 +000012950if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012951 ac_cv_mixed_endian_double=no
12952else
Matthias Kloseb9621712010-04-24 17:59:49 +000012953 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012954/* end confdefs.h. */
12955
12956#include <string.h>
12957int main() {
12958 double x = 9006104071832581.0;
12959 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
12960 return 0;
12961 else
12962 return 1;
12963}
12964
12965_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012966if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012967 ac_cv_mixed_endian_double=yes
12968else
Matthias Kloseb9621712010-04-24 17:59:49 +000012969 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012970fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012971rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12972 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012973fi
12974
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012975fi
12976
Matthias Kloseb9621712010-04-24 17:59:49 +000012977{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
12978$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012979if test "$ac_cv_mixed_endian_double" = yes
12980then
12981
Matthias Kloseb9621712010-04-24 17:59:49 +000012982$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012983
12984fi
12985
Mark Dickinson7abf8d42009-04-18 20:17:52 +000012986# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000012987# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000012988# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000012989# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012990# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000012991# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012992
12993# This inline assembler syntax may also work for suncc and icc,
12994# so we try it on all platforms.
12995
Matthias Kloseb9621712010-04-24 17:59:49 +000012996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
12997$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
12998cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012999/* end confdefs.h. */
13000
13001int
13002main ()
13003{
13004
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013005 unsigned short cw;
13006 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
13007 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013008
13009 ;
13010 return 0;
13011}
13012_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013013if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013014 have_gcc_asm_for_x87=yes
13015else
Matthias Kloseb9621712010-04-24 17:59:49 +000013016 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013017fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013018rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013019{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
13020$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000013021if test "$have_gcc_asm_for_x87" = yes
13022then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013023
Matthias Kloseb9621712010-04-24 17:59:49 +000013024$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013025
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013026fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013027
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013028# Detect whether system arithmetic is subject to x87-style double
13029# rounding issues. The result of this test has little meaning on non
13030# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
13031# mode is round-to-nearest and double rounding issues are present, and
13032# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000013033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
13034$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013035# $BASECFLAGS may affect the result
13036ac_save_cc="$CC"
13037CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013038if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013039 ac_cv_x87_double_rounding=no
13040else
Matthias Kloseb9621712010-04-24 17:59:49 +000013041 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013042/* end confdefs.h. */
13043
13044#include <stdlib.h>
13045#include <math.h>
13046int main() {
13047 volatile double x, y, z;
13048 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
13049 x = 0.99999999999999989; /* 1-2**-53 */
13050 y = 1./x;
13051 if (y != 1.)
13052 exit(0);
13053 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
13054 x = 1e16;
13055 y = 2.99999;
13056 z = x + y;
13057 if (z != 1e16+4.)
13058 exit(0);
13059 /* both tests show evidence of double rounding */
13060 exit(1);
13061}
13062
13063_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013064if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013065 ac_cv_x87_double_rounding=no
13066else
Matthias Kloseb9621712010-04-24 17:59:49 +000013067 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013068fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013069rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13070 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013071fi
13072
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013073CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000013074{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
13075$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013076if test "$ac_cv_x87_double_rounding" = yes
13077then
13078
Matthias Kloseb9621712010-04-24 17:59:49 +000013079$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013080
13081fi
13082
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013083# ************************************
13084# * Check for mathematical functions *
13085# ************************************
13086
13087LIBS_SAVE=$LIBS
13088LIBS="$LIBS $LIBM"
13089
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013090for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
13091do :
13092 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13093ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013094if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013095 cat >>confdefs.h <<_ACEOF
13096#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13097_ACEOF
13098
13099fi
13100done
13101
Victor Stinner8f9f8d62011-05-09 12:45:41 +020013102for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013103do :
13104 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13105ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013106if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013107 cat >>confdefs.h <<_ACEOF
13108#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13109_ACEOF
13110
13111fi
13112done
13113
13114ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
13115"
Victor Stinnere0be4232011-10-25 13:06:09 +020013116if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013117 ac_have_decl=1
13118else
13119 ac_have_decl=0
13120fi
13121
13122cat >>confdefs.h <<_ACEOF
13123#define HAVE_DECL_ISINF $ac_have_decl
13124_ACEOF
13125ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
13126"
Victor Stinnere0be4232011-10-25 13:06:09 +020013127if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013128 ac_have_decl=1
13129else
13130 ac_have_decl=0
13131fi
13132
13133cat >>confdefs.h <<_ACEOF
13134#define HAVE_DECL_ISNAN $ac_have_decl
13135_ACEOF
13136ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
13137"
Victor Stinnere0be4232011-10-25 13:06:09 +020013138if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013139 ac_have_decl=1
13140else
13141 ac_have_decl=0
13142fi
13143
13144cat >>confdefs.h <<_ACEOF
13145#define HAVE_DECL_ISFINITE $ac_have_decl
13146_ACEOF
13147
13148
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013149# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
13150# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000013151{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
13152$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013153if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013154 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013155else
13156
Matthias Kloseb9621712010-04-24 17:59:49 +000013157if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013158 ac_cv_tanh_preserves_zero_sign=no
13159else
Matthias Kloseb9621712010-04-24 17:59:49 +000013160 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013161/* end confdefs.h. */
13162
13163#include <math.h>
13164#include <stdlib.h>
13165int main() {
13166 /* return 0 if either negative zeros don't exist
13167 on this platform or if negative zeros exist
13168 and tanh(-0.) == -0. */
13169 if (atan2(0., -1.) == atan2(-0., -1.) ||
13170 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
13171 else exit(1);
13172}
13173
13174_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013175if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013176 ac_cv_tanh_preserves_zero_sign=yes
13177else
Matthias Kloseb9621712010-04-24 17:59:49 +000013178 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013179fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013180rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13181 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013182fi
13183
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013184fi
13185
Matthias Kloseb9621712010-04-24 17:59:49 +000013186{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
13187$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013188if test "$ac_cv_tanh_preserves_zero_sign" = yes
13189then
13190
Matthias Kloseb9621712010-04-24 17:59:49 +000013191$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013192
13193fi
13194
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013195if test "$ac_cv_func_log1p" = yes
13196then
13197 # On some versions of AIX, log1p(-0.) returns 0. instead of
13198 # -0. See issue #9920.
13199 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
13200$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013201 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013202 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013203else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013204
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013205 if test "$cross_compiling" = yes; then :
13206 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013207else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013208 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13209/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013210
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013211 #include <math.h>
13212 #include <stdlib.h>
13213 int main() {
13214 /* Fail if the signs of log1p(-0.) and -0. can be
13215 distinguished. */
13216 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
13217 return 0;
13218 else
13219 return 1;
13220 }
13221
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013222_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013223if ac_fn_c_try_run "$LINENO"; then :
13224 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013225else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013226 ac_cv_log1p_drops_zero_sign=yes
13227fi
13228rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13229 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013230fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013231
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013232fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013233
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
13235$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
13236fi
13237if test "$ac_cv_log1p_drops_zero_sign" = yes
13238then
13239
13240$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
13241
13242fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013243
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000013244LIBS=$LIBS_SAVE
13245
Mark Dickinsona614f042009-11-28 12:48:43 +000013246# For multiprocessing module, check that sem_open
13247# actually works. For FreeBSD versions <= 7.2,
13248# the kernel module that provides POSIX semaphores
13249# isn't loaded by default, so an attempt to call
13250# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000013251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
13252$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013253if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013254 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000013255else
Matthias Kloseb9621712010-04-24 17:59:49 +000013256 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013257 ac_cv_posix_semaphores_enabled=yes
13258else
Matthias Kloseb9621712010-04-24 17:59:49 +000013259 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013260/* end confdefs.h. */
13261
13262#include <unistd.h>
13263#include <fcntl.h>
13264#include <stdio.h>
13265#include <semaphore.h>
13266#include <sys/stat.h>
13267
13268int main(void) {
13269 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
13270 if (a == SEM_FAILED) {
13271 perror("sem_open");
13272 return 1;
13273 }
13274 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013275 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000013276 return 0;
13277}
13278
13279_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013280if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013281 ac_cv_posix_semaphores_enabled=yes
13282else
Matthias Kloseb9621712010-04-24 17:59:49 +000013283 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000013284fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013285rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13286 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013287fi
13288
13289
Mark Dickinsona614f042009-11-28 12:48:43 +000013290fi
13291
Matthias Kloseb9621712010-04-24 17:59:49 +000013292{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
13293$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000013294if test $ac_cv_posix_semaphores_enabled = no
13295then
13296
Matthias Kloseb9621712010-04-24 17:59:49 +000013297$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000013298
13299fi
13300
Mark Dickinson10683072009-04-18 21:18:19 +000013301# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000013302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
13303$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013304if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013305 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013306else
Matthias Kloseb9621712010-04-24 17:59:49 +000013307 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013308 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000013309else
Matthias Kloseb9621712010-04-24 17:59:49 +000013310 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000013311/* end confdefs.h. */
13312
13313#include <unistd.h>
13314#include <fcntl.h>
13315#include <stdio.h>
13316#include <semaphore.h>
13317#include <sys/stat.h>
13318
13319int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000013320 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000013321 int count;
13322 int res;
13323 if(a==SEM_FAILED){
13324 perror("sem_open");
13325 return 1;
13326
13327 }
13328 res = sem_getvalue(a, &count);
13329 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013330 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000013331 return res==-1 ? 1 : 0;
13332}
13333
Mark Dickinson10683072009-04-18 21:18:19 +000013334_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013335if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013336 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000013337else
Matthias Kloseb9621712010-04-24 17:59:49 +000013338 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013339fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013340rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13341 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013342fi
13343
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013344
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013345fi
13346
Matthias Kloseb9621712010-04-24 17:59:49 +000013347{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
13348$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013349if test $ac_cv_broken_sem_getvalue = yes
13350then
13351
Matthias Kloseb9621712010-04-24 17:59:49 +000013352$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013353
13354fi
13355
Mark Dickinsonbd792642009-03-18 20:06:12 +000013356# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000013357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
13358$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013359# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013360if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000013361 enableval=$enable_big_digits; case $enable_big_digits in
13362yes)
13363 enable_big_digits=30 ;;
13364no)
13365 enable_big_digits=15 ;;
1336615|30)
13367 ;;
13368*)
Victor Stinnere0be4232011-10-25 13:06:09 +020013369 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 +000013370esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013371{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
13372$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013373
13374cat >>confdefs.h <<_ACEOF
13375#define PYLONG_BITS_IN_DIGIT $enable_big_digits
13376_ACEOF
13377
13378
13379else
Matthias Kloseb9621712010-04-24 17:59:49 +000013380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13381$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013382fi
13383
13384
Guido van Rossumef2255b2000-03-10 22:30:29 +000013385# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000013386ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020013387if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013388
13389
Matthias Kloseb9621712010-04-24 17:59:49 +000013390$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013391
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013392 wchar_h="yes"
13393
Guido van Rossumef2255b2000-03-10 22:30:29 +000013394else
Martin v. Löwis11437992002-04-12 09:54:03 +000013395 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000013396
13397fi
13398
Michael W. Hudson54241132001-12-07 15:38:26 +000013399
Martin v. Löwis11437992002-04-12 09:54:03 +000013400
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013401# determine wchar_t size
13402if test "$wchar_h" = yes
13403then
Matthias Kloseb9621712010-04-24 17:59:49 +000013404 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013405# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13406# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13407# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000013408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
13409$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013410if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013411 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013412else
Matthias Kloseb9621712010-04-24 17:59:49 +000013413 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
13414"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013415
Martin v. Löwis11437992002-04-12 09:54:03 +000013416else
Matthias Kloseb9621712010-04-24 17:59:49 +000013417 if test "$ac_cv_type_wchar_t" = yes; then
13418 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13419$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013420as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020013421See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013422 else
13423 ac_cv_sizeof_wchar_t=0
13424 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013425fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013426
Martin v. Löwis11437992002-04-12 09:54:03 +000013427fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013428{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
13429$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013430
13431
13432
Martin v. Löwis11437992002-04-12 09:54:03 +000013433cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013434#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013435_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013436
Michael W. Hudson54241132001-12-07 15:38:26 +000013437
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013438fi
13439
Matthias Kloseb9621712010-04-24 17:59:49 +000013440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
13441$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013442have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013443cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013444/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013445
13446#include <tcl.h>
13447#if TCL_UTF_MAX != 6
13448# error "NOT UCS4_TCL"
13449#endif
13450int
13451main ()
13452{
13453
13454 ;
13455 return 0;
13456}
13457_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013458if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013459
13460
Matthias Kloseb9621712010-04-24 17:59:49 +000013461$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013462
13463 have_ucs4_tcl=yes
13464
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013465fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013466rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013467{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
13468$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013469
Skip Montanaro6dead952003-09-25 14:50:04 +000013470# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013471if test "$wchar_h" = yes
13472then
13473 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000013474 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
13475$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013476 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013477 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013478else
13479
Matthias Kloseb9621712010-04-24 17:59:49 +000013480 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013481 ac_cv_wchar_t_signed=yes
13482else
Matthias Kloseb9621712010-04-24 17:59:49 +000013483 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013484/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013485
13486 #include <wchar.h>
13487 int main()
13488 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000013489 /* Success: exit code 0 */
13490 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013491 }
13492
13493_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013494if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013495 ac_cv_wchar_t_signed=yes
13496else
Matthias Kloseb9621712010-04-24 17:59:49 +000013497 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013498fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013499rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13500 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013501fi
13502
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013503fi
13504
Matthias Kloseb9621712010-04-24 17:59:49 +000013505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
13506$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013507fi
13508
Georg Brandl52d168a2008-01-07 18:10:24 +000013509# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013510if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000013511 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000013512then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013513 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013514
Matthias Kloseb9621712010-04-24 17:59:49 +000013515$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013516
Georg Brandl52d168a2008-01-07 18:10:24 +000013517else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013518 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013519fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013520{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
13521$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000013522
13523# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000013524 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13525$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013526if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013527 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000013528else
Matthias Kloseb9621712010-04-24 17:59:49 +000013529 ac_cv_c_bigendian=unknown
13530 # See if we're dealing with a universal compiler.
13531 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13532/* end confdefs.h. */
13533#ifndef __APPLE_CC__
13534 not a universal capable compiler
13535 #endif
13536 typedef int dummy;
13537
Skip Montanaro6dead952003-09-25 14:50:04 +000013538_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013539if ac_fn_c_try_compile "$LINENO"; then :
13540
13541 # Check for potential -arch flags. It is not universal unless
13542 # there are at least two -arch flags with different values.
13543 ac_arch=
13544 ac_prev=
13545 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13546 if test -n "$ac_prev"; then
13547 case $ac_word in
13548 i?86 | x86_64 | ppc | ppc64)
13549 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13550 ac_arch=$ac_word
13551 else
13552 ac_cv_c_bigendian=universal
13553 break
13554 fi
13555 ;;
13556 esac
13557 ac_prev=
13558 elif test "x$ac_word" = "x-arch"; then
13559 ac_prev=arch
13560 fi
13561 done
13562fi
13563rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13564 if test $ac_cv_c_bigendian = unknown; then
13565 # See if sys/param.h defines the BYTE_ORDER macro.
13566 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013567/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013568#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000013569 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013570
Martin v. Löwis11437992002-04-12 09:54:03 +000013571int
13572main ()
13573{
Matthias Kloseb9621712010-04-24 17:59:49 +000013574#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13575 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13576 && LITTLE_ENDIAN)
13577 bogus endian macros
13578 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013579
13580 ;
13581 return 0;
13582}
13583_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013584if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013585 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000013586 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013587/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013588#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000013589 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013590
Martin v. Löwis11437992002-04-12 09:54:03 +000013591int
13592main ()
13593{
Guido van Rossumef2255b2000-03-10 22:30:29 +000013594#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000013595 not big endian
13596 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013597
13598 ;
13599 return 0;
13600}
13601_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013602if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013603 ac_cv_c_bigendian=yes
13604else
Matthias Kloseb9621712010-04-24 17:59:49 +000013605 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000013606fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013607rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013608fi
13609rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13610 fi
13611 if test $ac_cv_c_bigendian = unknown; then
13612 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13613 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013614/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000013615#include <limits.h>
13616
Martin v. Löwis11437992002-04-12 09:54:03 +000013617int
13618main ()
13619{
Matthias Kloseb9621712010-04-24 17:59:49 +000013620#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13621 bogus endian macros
13622 #endif
13623
Martin v. Löwis11437992002-04-12 09:54:03 +000013624 ;
13625 return 0;
13626}
13627_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013628if ac_fn_c_try_compile "$LINENO"; then :
13629 # It does; now see whether it defined to _BIG_ENDIAN or not.
13630 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13631/* end confdefs.h. */
13632#include <limits.h>
13633
13634int
13635main ()
13636{
13637#ifndef _BIG_ENDIAN
13638 not big endian
13639 #endif
13640
13641 ;
13642 return 0;
13643}
13644_ACEOF
13645if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013646 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013647else
Matthias Kloseb9621712010-04-24 17:59:49 +000013648 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013649fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013650rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13651fi
13652rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13653 fi
13654 if test $ac_cv_c_bigendian = unknown; then
13655 # Compile a test program.
13656 if test "$cross_compiling" = yes; then :
13657 # Try to guess by grepping values from an object file.
13658 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13659/* end confdefs.h. */
13660short int ascii_mm[] =
13661 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13662 short int ascii_ii[] =
13663 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13664 int use_ascii (int i) {
13665 return ascii_mm[i] + ascii_ii[i];
13666 }
13667 short int ebcdic_ii[] =
13668 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13669 short int ebcdic_mm[] =
13670 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13671 int use_ebcdic (int i) {
13672 return ebcdic_mm[i] + ebcdic_ii[i];
13673 }
13674 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013675
Matthias Kloseb9621712010-04-24 17:59:49 +000013676int
13677main ()
13678{
13679return use_ascii (foo) == use_ebcdic (foo);
13680 ;
13681 return 0;
13682}
13683_ACEOF
13684if ac_fn_c_try_compile "$LINENO"; then :
13685 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13686 ac_cv_c_bigendian=yes
13687 fi
13688 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13689 if test "$ac_cv_c_bigendian" = unknown; then
13690 ac_cv_c_bigendian=no
13691 else
13692 # finding both strings is unlikely to happen, but who knows?
13693 ac_cv_c_bigendian=unknown
13694 fi
13695 fi
13696fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013697rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013698else
Matthias Kloseb9621712010-04-24 17:59:49 +000013699 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013700/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013701$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013702int
13703main ()
13704{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013705
Matthias Kloseb9621712010-04-24 17:59:49 +000013706 /* Are we little or big endian? From Harbison&Steele. */
13707 union
13708 {
13709 long int l;
13710 char c[sizeof (long int)];
13711 } u;
13712 u.l = 1;
13713 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013714
13715 ;
13716 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000013717}
Martin v. Löwis11437992002-04-12 09:54:03 +000013718_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013719if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013720 ac_cv_c_bigendian=no
13721else
Matthias Kloseb9621712010-04-24 17:59:49 +000013722 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000013723fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013724rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13725 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000013726fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013727
Matthias Kloseb9621712010-04-24 17:59:49 +000013728 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013729fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013730{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
13731$as_echo "$ac_cv_c_bigendian" >&6; }
13732 case $ac_cv_c_bigendian in #(
13733 yes)
13734 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
13735;; #(
13736 no)
13737 ;; #(
13738 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013739
Matthias Kloseb9621712010-04-24 17:59:49 +000013740$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013741
Matthias Kloseb9621712010-04-24 17:59:49 +000013742 ;; #(
13743 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013744 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020013745 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000013746 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000013747
Michael W. Hudson54241132001-12-07 15:38:26 +000013748
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013749# ABI version string for Python extension modules. This appears between the
13750# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
13751# from the following attributes which affect the ABI of this Python build (in
13752# this order):
13753#
13754# * The Python implementation (always 'cpython-' for us)
13755# * The major and minor version numbers
13756# * --with-pydebug (adds a 'd')
13757# * --with-pymalloc (adds a 'm')
13758# * --with-wide-unicode (adds a 'u')
13759#
13760# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000013761# would get a shared library ABI version tag of 'cpython-32dmu' and shared
13762# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013763
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
13765$as_echo_n "checking ABIFLAGS... " >&6; }
13766{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
13767$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
13769$as_echo_n "checking SOABI... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013770SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013771{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
13772$as_echo "$SOABI" >&6; }
13773
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070013774
13775case $ac_sys_system in
13776 Linux*|GNU*)
13777 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
13778 *)
13779 EXT_SUFFIX=${SHLIB_SUFFIX};;
13780esac
13781
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
13783$as_echo_n "checking LDVERSION... " >&6; }
13784LDVERSION='$(VERSION)$(ABIFLAGS)'
13785{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
13786$as_echo "$LDVERSION" >&6; }
13787
doko@python.org87421192013-01-26 11:39:31 +010013788
13789LIBPL="${prefix}/lib/python${VERSION}/config-${LDVERSION}"
13790
13791
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013792# Check whether right shifting a negative integer extends the sign bit
13793# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000013794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
13795$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013796if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013797 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000013798else
Martin v. Löwis11437992002-04-12 09:54:03 +000013799
Matthias Kloseb9621712010-04-24 17:59:49 +000013800if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013801 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013802else
Matthias Kloseb9621712010-04-24 17:59:49 +000013803 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013804/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013805
13806int main()
13807{
Vladimir Marangozova6180282000-07-12 05:05:06 +000013808 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013809}
13810
Martin v. Löwis11437992002-04-12 09:54:03 +000013811_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013812if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000013813 ac_cv_rshift_extends_sign=yes
13814else
Matthias Kloseb9621712010-04-24 17:59:49 +000013815 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000013816fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013817rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13818 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000013819fi
13820
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013821fi
13822
Matthias Kloseb9621712010-04-24 17:59:49 +000013823{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
13824$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000013825if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013826then
Martin v. Löwis11437992002-04-12 09:54:03 +000013827
Matthias Kloseb9621712010-04-24 17:59:49 +000013828$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013829
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013830fi
13831
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013832# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000013833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
13834$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013835if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013836 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013837else
Martin v. Löwis11437992002-04-12 09:54:03 +000013838
Matthias Kloseb9621712010-04-24 17:59:49 +000013839cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013840/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013841#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013842int
13843main ()
13844{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013845
13846 FILE *f = fopen("/dev/null", "r");
13847 flockfile(f);
13848 getc_unlocked(f);
13849 funlockfile(f);
13850
Martin v. Löwis11437992002-04-12 09:54:03 +000013851 ;
13852 return 0;
13853}
13854_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013855if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013856 ac_cv_have_getc_unlocked=yes
13857else
Matthias Kloseb9621712010-04-24 17:59:49 +000013858 ac_cv_have_getc_unlocked=no
13859fi
13860rm -f core conftest.err conftest.$ac_objext \
13861 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013862fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013863
Matthias Kloseb9621712010-04-24 17:59:49 +000013864{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
13865$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013866if test "$ac_cv_have_getc_unlocked" = yes
13867then
Martin v. Löwis11437992002-04-12 09:54:03 +000013868
Matthias Kloseb9621712010-04-24 17:59:49 +000013869$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013870
13871fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013872
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013873# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000013874# save the value of LIBS so we don't actually link Python with readline
13875LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013876
Gregory P. Smith18820942008-09-07 06:24:49 +000013877# On some systems we need to link readline to a termcap compatible
13878# library. NOTE: Keep the precedence of listed libraries synchronised
13879# with setup.py.
13880py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
13882$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020013883for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000013884 if test -z "$py_libtermcap"; then
13885 READLINE_LIBS="-lreadline"
13886 else
13887 READLINE_LIBS="-lreadline -l$py_libtermcap"
13888 fi
13889 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000013890 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013891/* end confdefs.h. */
13892
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013893/* Override any GCC internal prototype to avoid an error.
13894 Use char because int might match the return type of a GCC
13895 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013896#ifdef __cplusplus
13897extern "C"
13898#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013899char readline ();
13900int
13901main ()
13902{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013903return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013904 ;
13905 return 0;
13906}
13907_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013908if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000013909 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013910fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013911rm -f core conftest.err conftest.$ac_objext \
13912 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000013913 if test $py_cv_lib_readline = yes; then
13914 break
13915 fi
13916done
13917# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
13918#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000013919if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
13921$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000013922else
Matthias Kloseb9621712010-04-24 17:59:49 +000013923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
13924$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000013925
Matthias Kloseb9621712010-04-24 17:59:49 +000013926$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013927
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013928fi
13929
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013930# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000013931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
13932$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013933if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013934 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013935else
13936 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013937LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013938cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013939/* end confdefs.h. */
13940
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013941/* Override any GCC internal prototype to avoid an error.
13942 Use char because int might match the return type of a GCC
13943 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013944#ifdef __cplusplus
13945extern "C"
13946#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013947char rl_callback_handler_install ();
13948int
13949main ()
13950{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013951return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013952 ;
13953 return 0;
13954}
13955_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013956if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013957 ac_cv_lib_readline_rl_callback_handler_install=yes
13958else
Matthias Kloseb9621712010-04-24 17:59:49 +000013959 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013960fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013961rm -f core conftest.err conftest.$ac_objext \
13962 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013963LIBS=$ac_check_lib_save_LIBS
13964fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013965{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
13966$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013967if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013968
Matthias Kloseb9621712010-04-24 17:59:49 +000013969$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013970
13971fi
13972
13973
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013974# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013975cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013976/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013977#include <readline/readline.h>
13978_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013979if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013980 have_readline=yes
13981else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013982 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000013983
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013984fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013985rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013986if test $have_readline = yes
13987then
Matthias Kloseb9621712010-04-24 17:59:49 +000013988 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013989/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013990#include <readline/readline.h>
13991
13992_ACEOF
13993if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013994 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013995
Matthias Kloseb9621712010-04-24 17:59:49 +000013996$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013997
13998fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013999rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014000
Matthias Kloseb9621712010-04-24 17:59:49 +000014001 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000014002/* end confdefs.h. */
14003#include <readline/readline.h>
14004
14005_ACEOF
14006if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014007 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000014008
Matthias Kloseb9621712010-04-24 17:59:49 +000014009$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000014010
14011fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014012rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000014013
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000014014fi
14015
Martin v. Löwis0daad592001-09-30 21:09:59 +000014016# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
14018$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014019if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014020 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000014021else
Martin v. Löwis11437992002-04-12 09:54:03 +000014022 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014023LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014024cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014025/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014026
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014027/* Override any GCC internal prototype to avoid an error.
14028 Use char because int might match the return type of a GCC
14029 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014030#ifdef __cplusplus
14031extern "C"
14032#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014033char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014034int
14035main ()
14036{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014037return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014038 ;
14039 return 0;
14040}
14041_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014042if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014043 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000014044else
Matthias Kloseb9621712010-04-24 17:59:49 +000014045 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000014046fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014047rm -f core conftest.err conftest.$ac_objext \
14048 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014049LIBS=$ac_check_lib_save_LIBS
14050fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014051{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
14052$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014053if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014054
Matthias Kloseb9621712010-04-24 17:59:49 +000014055$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000014056
Martin v. Löwis0daad592001-09-30 21:09:59 +000014057fi
14058
Michael W. Hudson54241132001-12-07 15:38:26 +000014059
Thomas Wouters89d996e2007-09-08 17:39:28 +000014060# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
14062$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014063if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014064 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000014065else
14066 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014067LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014068cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014069/* end confdefs.h. */
14070
14071/* Override any GCC internal prototype to avoid an error.
14072 Use char because int might match the return type of a GCC
14073 builtin and then its argument prototype would still apply. */
14074#ifdef __cplusplus
14075extern "C"
14076#endif
14077char rl_completion_display_matches_hook ();
14078int
14079main ()
14080{
14081return rl_completion_display_matches_hook ();
14082 ;
14083 return 0;
14084}
14085_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014086if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014087 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
14088else
Matthias Kloseb9621712010-04-24 17:59:49 +000014089 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000014090fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014091rm -f core conftest.err conftest.$ac_objext \
14092 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014093LIBS=$ac_check_lib_save_LIBS
14094fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014095{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
14096$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014097if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014098
Matthias Kloseb9621712010-04-24 17:59:49 +000014099$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000014100
14101fi
14102
14103
Martin v. Löwis0daad592001-09-30 21:09:59 +000014104# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
14106$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014107if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014108 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000014109else
Martin v. Löwis11437992002-04-12 09:54:03 +000014110 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014111LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014112cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014113/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014114
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014115/* Override any GCC internal prototype to avoid an error.
14116 Use char because int might match the return type of a GCC
14117 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014118#ifdef __cplusplus
14119extern "C"
14120#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014121char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014122int
14123main ()
14124{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014125return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014126 ;
14127 return 0;
14128}
14129_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014130if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014131 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000014132else
Matthias Kloseb9621712010-04-24 17:59:49 +000014133 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000014134fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014135rm -f core conftest.err conftest.$ac_objext \
14136 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014137LIBS=$ac_check_lib_save_LIBS
14138fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014139{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
14140$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014141if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014142
Matthias Kloseb9621712010-04-24 17:59:49 +000014143$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000014144
Guido van Rossum353ae582001-07-10 16:45:32 +000014145fi
14146
Jack Jansendd19cf82001-12-06 22:36:17 +000014147
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014148# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014149cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014150/* end confdefs.h. */
14151#include <readline/readline.h>
14152_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014153if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014154 have_readline=yes
14155else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014156 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014157
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014158fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014159rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014160if test $have_readline = yes
14161then
Matthias Kloseb9621712010-04-24 17:59:49 +000014162 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014163/* end confdefs.h. */
14164#include <readline/readline.h>
14165
14166_ACEOF
14167if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014168 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014169
Matthias Kloseb9621712010-04-24 17:59:49 +000014170$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014171
14172fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014173rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014174
14175fi
14176
Martin v. Löwis82bca632006-02-10 20:49:30 +000014177# End of readline checks: restore LIBS
14178LIBS=$LIBS_no_readline
14179
Matthias Kloseb9621712010-04-24 17:59:49 +000014180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
14181$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014182if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014183 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014184else
Martin v. Löwis11437992002-04-12 09:54:03 +000014185
Matthias Kloseb9621712010-04-24 17:59:49 +000014186if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014187 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014188else
Matthias Kloseb9621712010-04-24 17:59:49 +000014189 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014190/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014191
14192int main()
14193{
14194 int val1 = nice(1);
14195 if (val1 != -1 && val1 == nice(2))
14196 exit(0);
14197 exit(1);
14198}
14199
Martin v. Löwis11437992002-04-12 09:54:03 +000014200_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014201if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014202 ac_cv_broken_nice=yes
14203else
Matthias Kloseb9621712010-04-24 17:59:49 +000014204 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014205fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014206rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14207 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014208fi
14209
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014210fi
14211
Matthias Kloseb9621712010-04-24 17:59:49 +000014212{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
14213$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014214if test "$ac_cv_broken_nice" = yes
14215then
Martin v. Löwis11437992002-04-12 09:54:03 +000014216
Matthias Kloseb9621712010-04-24 17:59:49 +000014217$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014218
14219fi
14220
Matthias Kloseb9621712010-04-24 17:59:49 +000014221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
14222$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014223if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014224 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014225else
Matthias Kloseb9621712010-04-24 17:59:49 +000014226 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014227 ac_cv_broken_poll=no
14228else
Matthias Kloseb9621712010-04-24 17:59:49 +000014229 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014230/* end confdefs.h. */
14231
14232#include <poll.h>
14233
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014234int main()
14235{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014236 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014237 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014238
14239 close (42);
14240
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014241 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014242 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014243 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014244 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014245 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014246 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014247 return 1;
14248}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014249
14250_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014251if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014252 ac_cv_broken_poll=yes
14253else
Matthias Kloseb9621712010-04-24 17:59:49 +000014254 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014255fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014256rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14257 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014258fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014259
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014260fi
14261
Matthias Kloseb9621712010-04-24 17:59:49 +000014262{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
14263$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014264if test "$ac_cv_broken_poll" = yes
14265then
14266
Matthias Kloseb9621712010-04-24 17:59:49 +000014267$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014268
14269fi
14270
Brett Cannon43802422005-02-10 20:48:03 +000014271# 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 +000014272# (which is not required by ISO C or UNIX spec) and/or if we support
14273# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000014274ac_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 +000014275#include <$ac_cv_struct_tm>
14276
Matthias Kloseb9621712010-04-24 17:59:49 +000014277"
Victor Stinnere0be4232011-10-25 13:06:09 +020014278if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000014279
14280cat >>confdefs.h <<_ACEOF
14281#define HAVE_STRUCT_TM_TM_ZONE 1
14282_ACEOF
14283
14284
14285fi
14286
14287if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14288
Matthias Kloseb9621712010-04-24 17:59:49 +000014289$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014290
14291else
Matthias Kloseb9621712010-04-24 17:59:49 +000014292 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
14293"
Victor Stinnere0be4232011-10-25 13:06:09 +020014294if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014295 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014296else
Matthias Kloseb9621712010-04-24 17:59:49 +000014297 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014298fi
14299
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014300cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014301#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014302_ACEOF
14303
Matthias Kloseb9621712010-04-24 17:59:49 +000014304 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
14305$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014306if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014307 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014308else
Matthias Kloseb9621712010-04-24 17:59:49 +000014309 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014310/* end confdefs.h. */
14311#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014312#if !HAVE_DECL_TZNAME
14313extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000014314#endif
14315
14316int
14317main ()
14318{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014319return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000014320 ;
14321 return 0;
14322}
14323_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014324if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000014325 ac_cv_var_tzname=yes
14326else
Matthias Kloseb9621712010-04-24 17:59:49 +000014327 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000014328fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014329rm -f core conftest.err conftest.$ac_objext \
14330 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014331fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014332{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
14333$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000014334 if test $ac_cv_var_tzname = yes; then
14335
Matthias Kloseb9621712010-04-24 17:59:49 +000014336$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014337
14338 fi
14339fi
14340
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014341
Martin v. Löwis1d459062005-03-14 21:23:33 +000014342# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000014343{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
14344$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014345if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014346 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014347else
14348
Matthias Kloseb9621712010-04-24 17:59:49 +000014349if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014350 ac_cv_working_tzset=no
14351else
Matthias Kloseb9621712010-04-24 17:59:49 +000014352 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014353/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014354
14355#include <stdlib.h>
14356#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000014357#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000014358
14359#if HAVE_TZNAME
14360extern char *tzname[];
14361#endif
14362
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014363int main()
14364{
Brett Cannon18367812003-09-19 00:59:16 +000014365 /* Note that we need to ensure that not only does tzset(3)
14366 do 'something' with localtime, but it works as documented
14367 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000014368 This includes making sure that tzname is set properly if
14369 tm->tm_zone does not exist since it is the alternative way
14370 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000014371
14372 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000014373 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000014374 */
14375
Martin v. Löwis1d459062005-03-14 21:23:33 +000014376 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000014377 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
14378
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014379 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014380 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014381 if (localtime(&groundhogday)->tm_hour != 0)
14382 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014383#if HAVE_TZNAME
14384 /* For UTC, tzname[1] is sometimes "", sometimes " " */
14385 if (strcmp(tzname[0], "UTC") ||
14386 (tzname[1][0] != 0 && tzname[1][0] != ' '))
14387 exit(1);
14388#endif
Brett Cannon18367812003-09-19 00:59:16 +000014389
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014390 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014391 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014392 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014393 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014394#if HAVE_TZNAME
14395 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
14396 exit(1);
14397#endif
Brett Cannon18367812003-09-19 00:59:16 +000014398
14399 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
14400 tzset();
14401 if (localtime(&groundhogday)->tm_hour != 11)
14402 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014403#if HAVE_TZNAME
14404 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
14405 exit(1);
14406#endif
14407
14408#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000014409 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
14410 exit(1);
14411 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
14412 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014413#endif
Brett Cannon18367812003-09-19 00:59:16 +000014414
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014415 exit(0);
14416}
14417
14418_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014419if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014420 ac_cv_working_tzset=yes
14421else
Matthias Kloseb9621712010-04-24 17:59:49 +000014422 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014423fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014424rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14425 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014426fi
14427
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014428fi
14429
Matthias Kloseb9621712010-04-24 17:59:49 +000014430{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
14431$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014432if test "$ac_cv_working_tzset" = yes
14433then
14434
Matthias Kloseb9621712010-04-24 17:59:49 +000014435$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014436
14437fi
14438
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014439# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000014440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
14441$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014442if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014443 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014444else
Matthias Kloseb9621712010-04-24 17:59:49 +000014445 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014446/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014447#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014448int
14449main ()
14450{
14451
14452struct stat st;
14453st.st_mtim.tv_nsec = 1;
14454
14455 ;
14456 return 0;
14457}
14458_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014459if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000014460 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014461else
Matthias Kloseb9621712010-04-24 17:59:49 +000014462 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014463fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014464rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14465fi
14466
Matthias Kloseb9621712010-04-24 17:59:49 +000014467{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
14468$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014469if test "$ac_cv_stat_tv_nsec" = yes
14470then
14471
Matthias Kloseb9621712010-04-24 17:59:49 +000014472$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014473
14474fi
14475
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014476# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000014477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
14478$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014479if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014480 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014481else
Matthias Kloseb9621712010-04-24 17:59:49 +000014482 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014483/* end confdefs.h. */
14484#include <sys/stat.h>
14485int
14486main ()
14487{
14488
14489struct stat st;
14490st.st_mtimespec.tv_nsec = 1;
14491
14492 ;
14493 return 0;
14494}
14495_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014496if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014497 ac_cv_stat_tv_nsec2=yes
14498else
Matthias Kloseb9621712010-04-24 17:59:49 +000014499 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014500fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014501rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14502fi
14503
Matthias Kloseb9621712010-04-24 17:59:49 +000014504{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
14505$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014506if test "$ac_cv_stat_tv_nsec2" = yes
14507then
14508
Matthias Kloseb9621712010-04-24 17:59:49 +000014509$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014510
14511fi
14512
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020014513ac_save_cppflags="$CPPFLAGS"
14514CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
Jack Jansen666b1e72001-10-31 12:11:48 +000014515# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000014516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
14517$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014518if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014519 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014520else
Matthias Kloseb9621712010-04-24 17:59:49 +000014521 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014522/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014523#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014524int
14525main ()
14526{
Jack Jansen666b1e72001-10-31 12:11:48 +000014527
14528 int rtn;
14529 rtn = mvwdelch(0,0,0);
14530
Martin v. Löwis11437992002-04-12 09:54:03 +000014531 ;
14532 return 0;
14533}
14534_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014535if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014536 ac_cv_mvwdelch_is_expression=yes
14537else
Matthias Kloseb9621712010-04-24 17:59:49 +000014538 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014539fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014540rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14541fi
14542
Matthias Kloseb9621712010-04-24 17:59:49 +000014543{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
14544$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000014545
14546if test "$ac_cv_mvwdelch_is_expression" = yes
14547then
Martin v. Löwis11437992002-04-12 09:54:03 +000014548
Matthias Kloseb9621712010-04-24 17:59:49 +000014549$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014550
14551fi
14552
Matthias Kloseb9621712010-04-24 17:59:49 +000014553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
14554$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014555if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014556 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014557else
Matthias Kloseb9621712010-04-24 17:59:49 +000014558 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014559/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014560#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014561int
14562main ()
14563{
Jack Jansen666b1e72001-10-31 12:11:48 +000014564
14565 WINDOW *w;
14566 w->_flags = 0;
14567
Martin v. Löwis11437992002-04-12 09:54:03 +000014568 ;
14569 return 0;
14570}
14571_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014572if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014573 ac_cv_window_has_flags=yes
14574else
Matthias Kloseb9621712010-04-24 17:59:49 +000014575 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014576fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014577rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14578fi
14579
Matthias Kloseb9621712010-04-24 17:59:49 +000014580{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
14581$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000014582
Jack Jansen666b1e72001-10-31 12:11:48 +000014583
14584if test "$ac_cv_window_has_flags" = yes
14585then
Martin v. Löwis11437992002-04-12 09:54:03 +000014586
Matthias Kloseb9621712010-04-24 17:59:49 +000014587$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014588
14589fi
14590
Matthias Kloseb9621712010-04-24 17:59:49 +000014591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
14592$as_echo_n "checking for is_term_resized... " >&6; }
14593cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014594/* end confdefs.h. */
14595#include <curses.h>
14596int
14597main ()
14598{
14599void *x=is_term_resized
14600 ;
14601 return 0;
14602}
14603_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014604if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014605
Matthias Kloseb9621712010-04-24 17:59:49 +000014606$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014607
Matthias Kloseb159a552010-04-25 21:00:44 +000014608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014609$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014610else
Matthias Kloseb9621712010-04-24 17:59:49 +000014611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14612$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014613
14614fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014615rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14616
Matthias Kloseb9621712010-04-24 17:59:49 +000014617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
14618$as_echo_n "checking for resize_term... " >&6; }
14619cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014620/* end confdefs.h. */
14621#include <curses.h>
14622int
14623main ()
14624{
14625void *x=resize_term
14626 ;
14627 return 0;
14628}
14629_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014630if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014631
Matthias Kloseb9621712010-04-24 17:59:49 +000014632$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014633
Matthias Kloseb159a552010-04-25 21:00:44 +000014634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014635$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014636else
Matthias Kloseb9621712010-04-24 17:59:49 +000014637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14638$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014639
14640fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014641rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14642
Matthias Kloseb9621712010-04-24 17:59:49 +000014643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
14644$as_echo_n "checking for resizeterm... " >&6; }
14645cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014646/* end confdefs.h. */
14647#include <curses.h>
14648int
14649main ()
14650{
14651void *x=resizeterm
14652 ;
14653 return 0;
14654}
14655_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014656if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014657
Matthias Kloseb9621712010-04-24 17:59:49 +000014658$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014659
Matthias Kloseb159a552010-04-25 21:00:44 +000014660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014661$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014662else
Matthias Kloseb9621712010-04-24 17:59:49 +000014663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14664$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014665
14666fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014667rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020014668# last curses configure check
14669CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014670
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
14672$as_echo "$as_me: checking for device files" >&6;}
14673
14674if test "x$cross_compiling" = xyes; then
14675 if test "${ac_cv_file__dev_ptmx+set}" != set; then
14676 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14677$as_echo_n "checking for /dev/ptmx... " >&6; }
14678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14679$as_echo "not set" >&6; }
14680 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14681 fi
14682 if test "${ac_cv_file__dev_ptc+set}" != set; then
14683 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14684$as_echo_n "checking for /dev/ptc... " >&6; }
14685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14686$as_echo "not set" >&6; }
14687 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14688 fi
14689fi
14690
Matthias Kloseb9621712010-04-24 17:59:49 +000014691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14692$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014693if ${ac_cv_file__dev_ptmx+:} false; then :
14694 $as_echo_n "(cached) " >&6
14695else
14696 test "$cross_compiling" = yes &&
14697 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14698if test -r "/dev/ptmx"; then
14699 ac_cv_file__dev_ptmx=yes
14700else
14701 ac_cv_file__dev_ptmx=no
14702fi
14703fi
14704{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
14705$as_echo "$ac_cv_file__dev_ptmx" >&6; }
14706if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000014707
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014708fi
14709
14710if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014711
Matthias Kloseb9621712010-04-24 17:59:49 +000014712$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014713
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014714fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14716$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014717if ${ac_cv_file__dev_ptc+:} false; then :
14718 $as_echo_n "(cached) " >&6
14719else
14720 test "$cross_compiling" = yes &&
14721 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14722if test -r "/dev/ptc"; then
14723 ac_cv_file__dev_ptc=yes
14724else
14725 ac_cv_file__dev_ptc=no
14726fi
14727fi
14728{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
14729$as_echo "$ac_cv_file__dev_ptc" >&6; }
14730if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000014731
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014732fi
14733
14734if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000014735
Matthias Kloseb9621712010-04-24 17:59:49 +000014736$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000014737
Neal Norwitz865400f2003-03-21 01:42:58 +000014738fi
14739
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014740if test "$have_long_long" = yes
14741then
Matthias Kloseb9621712010-04-24 17:59:49 +000014742 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
14743$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014744 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014745 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014746else
Matthias Kloseb9621712010-04-24 17:59:49 +000014747 if test "$cross_compiling" = yes; then :
Matthias Klose3b739b12012-03-15 19:31:06 +010014748 ac_cv_have_long_long_format="cross -- assuming no"
14749 if test x$GCC = xyes; then
14750 save_CFLAGS=$CFLAGS
14751 CFLAGS="$CFLAGS -Werror -Wformat"
14752 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14753/* end confdefs.h. */
14754
14755 #include <stdio.h>
14756 #include <stddef.h>
14757
14758int
14759main ()
14760{
14761
14762 char *buffer;
14763 sprintf(buffer, "%lld", (long long)123);
14764 sprintf(buffer, "%lld", (long long)-123);
14765 sprintf(buffer, "%llu", (unsigned long long)123);
14766
14767 ;
14768 return 0;
14769}
14770_ACEOF
14771if ac_fn_c_try_compile "$LINENO"; then :
14772 ac_cv_have_long_long_format=yes
14773
14774fi
14775rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14776 CFLAGS=$save_CFLAGS
14777 fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014778else
Matthias Kloseb9621712010-04-24 17:59:49 +000014779 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014780/* end confdefs.h. */
14781
14782 #include <stdio.h>
14783 #include <stddef.h>
14784 #include <string.h>
14785
14786 #ifdef HAVE_SYS_TYPES_H
14787 #include <sys/types.h>
14788 #endif
14789
14790 int main()
14791 {
14792 char buffer[256];
14793
14794 if (sprintf(buffer, "%lld", (long long)123) < 0)
14795 return 1;
14796 if (strcmp(buffer, "123"))
14797 return 1;
14798
14799 if (sprintf(buffer, "%lld", (long long)-123) < 0)
14800 return 1;
14801 if (strcmp(buffer, "-123"))
14802 return 1;
14803
14804 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
14805 return 1;
14806 if (strcmp(buffer, "123"))
14807 return 1;
14808
14809 return 0;
14810 }
14811
14812_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014813if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014814 ac_cv_have_long_long_format=yes
14815else
Matthias Kloseb9621712010-04-24 17:59:49 +000014816 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014817fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014818rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14819 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014820fi
14821
14822
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014823fi
14824
Matthias Kloseb9621712010-04-24 17:59:49 +000014825 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
14826$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014827fi
14828
Mark Dickinson89d7d412009-12-31 20:50:59 +000014829if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014830then
14831
Matthias Kloseb9621712010-04-24 17:59:49 +000014832$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014833
14834fi
14835
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000014836if test $ac_sys_system = Darwin
14837then
14838 LIBS="$LIBS -framework CoreFoundation"
14839fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014840
Matthias Kloseb9621712010-04-24 17:59:49 +000014841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
14842$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014843if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014844 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014845else
Matthias Kloseb9621712010-04-24 17:59:49 +000014846 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000014847 ac_cv_have_size_t_format="cross -- assuming yes"
14848
Thomas Wouters477c8d52006-05-27 19:21:47 +000014849else
Matthias Kloseb9621712010-04-24 17:59:49 +000014850 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000014851/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014852
Thomas Wouters477c8d52006-05-27 19:21:47 +000014853#include <stdio.h>
14854#include <stddef.h>
14855#include <string.h>
14856
Christian Heimes2c181612007-12-17 20:04:13 +000014857#ifdef HAVE_SYS_TYPES_H
14858#include <sys/types.h>
14859#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000014860
14861#ifdef HAVE_SSIZE_T
14862typedef ssize_t Py_ssize_t;
14863#elif SIZEOF_VOID_P == SIZEOF_LONG
14864typedef long Py_ssize_t;
14865#else
14866typedef int Py_ssize_t;
14867#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000014868
Christian Heimes2c181612007-12-17 20:04:13 +000014869int main()
14870{
14871 char buffer[256];
14872
Thomas Wouters477c8d52006-05-27 19:21:47 +000014873 if(sprintf(buffer, "%zd", (size_t)123) < 0)
14874 return 1;
14875
Thomas Wouters89f507f2006-12-13 04:49:30 +000014876 if (strcmp(buffer, "123"))
14877 return 1;
14878
14879 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
14880 return 1;
14881
14882 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000014883 return 1;
14884
14885 return 0;
14886}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014887
Thomas Wouters477c8d52006-05-27 19:21:47 +000014888_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014889if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014890 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014891else
Matthias Kloseb9621712010-04-24 17:59:49 +000014892 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014893fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014894rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14895 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014896fi
14897
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014898fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014899{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
14900$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000014901if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014902
Matthias Kloseb9621712010-04-24 17:59:49 +000014903$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014904
14905fi
14906
Matthias Kloseb9621712010-04-24 17:59:49 +000014907ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000014908#ifdef HAVE_SYS_TYPES_H
14909#include <sys/types.h>
14910#endif
14911#ifdef HAVE_SYS_SOCKET_H
14912#include <sys/socket.h>
14913#endif
14914
Matthias Kloseb9621712010-04-24 17:59:49 +000014915"
Victor Stinnere0be4232011-10-25 13:06:09 +020014916if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000014917
Martin v. Löwis11437992002-04-12 09:54:03 +000014918else
Guido van Rossum95713eb2000-05-18 20:53:31 +000014919
Matthias Kloseb9621712010-04-24 17:59:49 +000014920$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000014921
14922fi
14923
Michael W. Hudson54241132001-12-07 15:38:26 +000014924
Matthias Kloseb9621712010-04-24 17:59:49 +000014925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
14926$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014927if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014928 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014929else
Matthias Kloseb9621712010-04-24 17:59:49 +000014930 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000014931 ac_cv_broken_mbstowcs=no
14932else
Matthias Kloseb9621712010-04-24 17:59:49 +000014933 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000014934/* end confdefs.h. */
14935
Stefan Krah19c21392012-11-22 23:47:32 +010014936#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000014937#include<stdlib.h>
14938int main() {
14939 size_t len = -1;
14940 const char *str = "text";
14941 len = mbstowcs(NULL, str, 0);
14942 return (len != 4);
14943}
14944
14945_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014946if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000014947 ac_cv_broken_mbstowcs=no
14948else
Matthias Kloseb9621712010-04-24 17:59:49 +000014949 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000014950fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014951rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14952 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000014953fi
14954
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014955fi
14956
Matthias Kloseb9621712010-04-24 17:59:49 +000014957{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
14958$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000014959if test "$ac_cv_broken_mbstowcs" = yes
14960then
14961
Matthias Kloseb9621712010-04-24 17:59:49 +000014962$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000014963
14964fi
14965
Antoine Pitroub52ec782009-01-25 16:34:23 +000014966# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000014967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
14968$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014969
14970# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014971if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000014972 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000014973if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000014974then
14975
Matthias Kloseb9621712010-04-24 17:59:49 +000014976$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000014977
Matthias Kloseb9621712010-04-24 17:59:49 +000014978 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14979$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014980fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000014981if test "$withval" = no
14982then
14983
14984$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
14985
Matthias Kloseb9621712010-04-24 17:59:49 +000014986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14987$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014988fi
14989
Antoine Pitrou042b1282010-08-13 21:15:58 +000014990else
14991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14992$as_echo "no value specified" >&6; }
14993fi
14994
Antoine Pitroub52ec782009-01-25 16:34:23 +000014995
Matthias Kloseb17289e2012-03-15 19:51:34 +010014996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
14997$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
14998if ${ac_cv_computed_gotos+:} false; then :
14999 $as_echo_n "(cached) " >&6
15000else
15001 if test "$cross_compiling" = yes; then :
15002 if test "${with_computed_gotos+set}" = set; then
15003 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
15004 else
15005 ac_cv_computed_gotos=no
15006 fi
15007else
15008 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15009/* end confdefs.h. */
15010
15011int main(int argc, char **argv)
15012{
15013 static void *targets[1] = { &&LABEL1 };
15014 goto LABEL2;
15015LABEL1:
15016 return 0;
15017LABEL2:
15018 goto *targets[0];
15019 return 1;
15020}
15021
15022_ACEOF
15023if ac_fn_c_try_run "$LINENO"; then :
15024 ac_cv_computed_gotos=yes
15025else
15026 ac_cv_computed_gotos=no
15027fi
15028rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15029 conftest.$ac_objext conftest.beam conftest.$ac_ext
15030fi
15031
15032fi
15033
15034{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
15035$as_echo "$ac_cv_computed_gotos" >&6; }
15036case "$ac_cv_computed_gotos" in yes*)
15037
15038$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
15039
15040esac
15041
Benjamin Petersond8d835b2010-10-15 23:14:46 +000015042case $ac_sys_system in
15043AIX*)
15044
15045$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
15046 ;;
15047esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000015048
Michael W. Hudson54241132001-12-07 15:38:26 +000015049
Mark Dickinsonb2153e92010-05-05 22:31:36 +000015050
15051
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000015052for h in `(cd $srcdir;echo Python/thread_*.h)`
15053do
15054 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
15055done
15056
Michael W. Hudson54241132001-12-07 15:38:26 +000015057
Neal Norwitzd24499d2005-12-18 21:36:39 +000015058SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000015059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
15060$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015061for dir in $SRCDIRS; do
15062 if test ! -d $dir; then
15063 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000015064 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015065done
Matthias Kloseb9621712010-04-24 17:59:49 +000015066{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
15067$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000015068
Stefan Krah1919b7e2012-03-21 18:25:23 +010015069# Availability of -O2:
15070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
15071$as_echo_n "checking for -O2... " >&6; }
15072saved_cflags="$CFLAGS"
15073CFLAGS="-O2"
15074cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15075/* end confdefs.h. */
15076
15077int
15078main ()
15079{
15080
15081
15082 ;
15083 return 0;
15084}
15085_ACEOF
15086if ac_fn_c_try_compile "$LINENO"; then :
15087 have_O2=yes
15088else
15089 have_O2=no
15090fi
15091rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15092{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
15093$as_echo "$have_O2" >&6; }
15094CFLAGS="$saved_cflags"
15095
15096# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
15097# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
15098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
15099$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
15100saved_cflags="$CFLAGS"
15101CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
15102if test "$have_O2" = no; then
15103 CFLAGS=""
15104fi
15105if test "$cross_compiling" = yes; then :
15106 have_glibc_memmove_bug=undefined
15107else
15108 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15109/* end confdefs.h. */
15110
15111#include <stdio.h>
15112#include <stdlib.h>
15113#include <string.h>
15114void foo(void *p, void *q) { memmove(p, q, 19); }
15115int main() {
15116 char a[32] = "123456789000000000";
15117 foo(&a[9], a);
15118 if (strcmp(a, "123456789123456789000000000") != 0)
15119 return 1;
15120 foo(a, &a[9]);
15121 if (strcmp(a, "123456789000000000") != 0)
15122 return 1;
15123 return 0;
15124}
15125
15126_ACEOF
15127if ac_fn_c_try_run "$LINENO"; then :
15128 have_glibc_memmove_bug=no
15129else
15130 have_glibc_memmove_bug=yes
15131fi
15132rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15133 conftest.$ac_objext conftest.beam conftest.$ac_ext
15134fi
15135
15136CFLAGS="$saved_cflags"
15137{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
15138$as_echo "$have_glibc_memmove_bug" >&6; }
15139if test "$have_glibc_memmove_bug" = yes; then
15140
15141$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
15142
15143fi
15144
15145if test "$have_gcc_asm_for_x87" = yes; then
15146 # Some versions of gcc miscompile inline asm:
15147 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
15148 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
15149 case $CC in
15150 *gcc*)
15151 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
15152$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
15153 saved_cflags="$CFLAGS"
15154 CFLAGS="-O2"
15155 if test "$cross_compiling" = yes; then :
15156 have_ipa_pure_const_bug=undefined
15157else
15158 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15159/* end confdefs.h. */
15160
15161 __attribute__((noinline)) int
15162 foo(int *p) {
15163 int r;
15164 asm ( "movl \$6, (%1)\n\t"
15165 "xorl %0, %0\n\t"
15166 : "=r" (r) : "r" (p) : "memory"
15167 );
15168 return r;
15169 }
15170 int main() {
15171 int p = 8;
15172 if ((foo(&p) ? : p) != 6)
15173 return 1;
15174 return 0;
15175 }
15176
15177_ACEOF
15178if ac_fn_c_try_run "$LINENO"; then :
15179 have_ipa_pure_const_bug=no
15180else
15181 have_ipa_pure_const_bug=yes
15182fi
15183rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15184 conftest.$ac_objext conftest.beam conftest.$ac_ext
15185fi
15186
15187 CFLAGS="$saved_cflags"
15188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
15189$as_echo "$have_ipa_pure_const_bug" >&6; }
15190 if test "$have_ipa_pure_const_bug" = yes; then
15191
15192$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
15193
15194 fi
15195 ;;
15196 esac
15197fi
15198
Guido van Rossum627b2d71993-12-24 10:39:16 +000015199# generate output files
doko@python.org87421192013-01-26 11:39:31 +010015200ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc Misc/python-config.sh"
Martin v. Löwis88afe662002-10-26 13:47:44 +000015201
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015202ac_config_files="$ac_config_files Modules/ld_so_aix"
15203
Martin v. Löwis11437992002-04-12 09:54:03 +000015204cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015205# This file is a shell script that caches the results of configure
15206# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000015207# scripts and configure runs, see configure's option --config-cache.
15208# It is not useful on other systems. If it contains results you don't
15209# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015210#
Martin v. Löwis11437992002-04-12 09:54:03 +000015211# config.status only pays attention to the cache file if you give it
15212# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015213#
Skip Montanaro6dead952003-09-25 14:50:04 +000015214# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000015215# loading this file, other *unset* `ac_cv_foo' will be assigned the
15216# following values.
15217
15218_ACEOF
15219
Guido van Rossumf78abae1997-01-21 22:02:36 +000015220# The following way of writing the cache mishandles newlines in values,
15221# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015222# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015223# Ultrix sh set writes to stderr and can't be redirected directly,
15224# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015225(
15226 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
15227 eval ac_val=\$$ac_var
15228 case $ac_val in #(
15229 *${as_nl}*)
15230 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000015231 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
15232$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015233 esac
15234 case $ac_var in #(
15235 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000015236 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
15237 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015238 esac ;;
15239 esac
15240 done
15241
Martin v. Löwis11437992002-04-12 09:54:03 +000015242 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015243 case $as_nl`(ac_space=' '; set) 2>&1` in #(
15244 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000015245 # `set' does not quote correctly, so add quotes: double-quote
15246 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000015247 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015248 "s/'/'\\\\''/g;
15249 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015250 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000015251 *)
15252 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015253 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000015254 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015255 esac |
15256 sort
15257) |
Martin v. Löwis11437992002-04-12 09:54:03 +000015258 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015259 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000015260 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015261 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000015262 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15263 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015264 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15265 :end' >>confcache
15266if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
15267 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020015268 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015269 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
15270$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020015271 if test ! -f "$cache_file" || test -h "$cache_file"; then
15272 cat confcache >"$cache_file"
15273 else
15274 case $cache_file in #(
15275 */* | ?:*)
15276 mv -f confcache "$cache_file"$$ &&
15277 mv -f "$cache_file"$$ "$cache_file" ;; #(
15278 *)
15279 mv -f confcache "$cache_file" ;;
15280 esac
15281 fi
15282 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015283 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015284 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
15285$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015286 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015287fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015288rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000015289
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015290test "x$prefix" = xNONE && prefix=$ac_default_prefix
15291# Let make expand exec_prefix.
15292test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000015293
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015294DEFS=-DHAVE_CONFIG_H
15295
Skip Montanaro6dead952003-09-25 14:50:04 +000015296ac_libobjs=
15297ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015298U=
Skip Montanaro6dead952003-09-25 14:50:04 +000015299for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
15300 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015301 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000015302 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015303 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
15304 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000015305 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
15306 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000015307done
15308LIBOBJS=$ac_libobjs
15309
15310LTLIBOBJS=$ac_ltlibobjs
15311
15312
Martin v. Löwis11437992002-04-12 09:54:03 +000015313
Matthias Kloseb9621712010-04-24 17:59:49 +000015314
Victor Stinnere0be4232011-10-25 13:06:09 +020015315: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000015316ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000015317ac_clean_files_save=$ac_clean_files
15318ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015319{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
15320$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
15321as_write_fail=0
15322cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015323#! $SHELL
15324# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015325# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015326# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000015327# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015328
Martin v. Löwis11437992002-04-12 09:54:03 +000015329debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000015330ac_cs_recheck=false
15331ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000015332
Matthias Kloseb9621712010-04-24 17:59:49 +000015333SHELL=\${CONFIG_SHELL-$SHELL}
15334export SHELL
15335_ASEOF
15336cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
15337## -------------------- ##
15338## M4sh Initialization. ##
15339## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000015340
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015341# Be more Bourne compatible
15342DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000015343if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015344 emulate sh
15345 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000015346 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000015347 # is contrary to our usage. Disable this feature.
15348 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015349 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015350else
Matthias Kloseb9621712010-04-24 17:59:49 +000015351 case `(set -o) 2>/dev/null` in #(
15352 *posix*) :
15353 set -o posix ;; #(
15354 *) :
15355 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015356esac
Michael W. Hudson54241132001-12-07 15:38:26 +000015357fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000015358
15359
Matthias Kloseb9621712010-04-24 17:59:49 +000015360as_nl='
15361'
15362export as_nl
15363# Printing a long string crashes Solaris 7 /usr/bin/printf.
15364as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
15365as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
15366as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
15367# Prefer a ksh shell builtin over an external printf program on Solaris,
15368# but without wasting forks for bash or zsh.
15369if test -z "$BASH_VERSION$ZSH_VERSION" \
15370 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
15371 as_echo='print -r --'
15372 as_echo_n='print -rn --'
15373elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
15374 as_echo='printf %s\n'
15375 as_echo_n='printf %s'
15376else
15377 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
15378 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
15379 as_echo_n='/usr/ucb/echo -n'
15380 else
15381 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
15382 as_echo_n_body='eval
15383 arg=$1;
15384 case $arg in #(
15385 *"$as_nl"*)
15386 expr "X$arg" : "X\\(.*\\)$as_nl";
15387 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
15388 esac;
15389 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
15390 '
15391 export as_echo_n_body
15392 as_echo_n='sh -c $as_echo_n_body as_echo'
15393 fi
15394 export as_echo_body
15395 as_echo='sh -c $as_echo_body as_echo'
15396fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015397
15398# The user is always right.
15399if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015400 PATH_SEPARATOR=:
15401 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
15402 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
15403 PATH_SEPARATOR=';'
15404 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015405fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015406
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015407
15408# IFS
15409# We need space, tab and new line, in precisely that order. Quoting is
15410# there to prevent editors from complaining about space-tab.
15411# (If _AS_PATH_WALK were called with IFS unset, it would disable word
15412# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015413IFS=" "" $as_nl"
15414
15415# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020015416as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000015417case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015418 *[\\/]* ) as_myself=$0 ;;
15419 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000015420for as_dir in $PATH
15421do
15422 IFS=$as_save_IFS
15423 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000015424 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15425 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015426IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000015427
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015428 ;;
15429esac
15430# We did not find ourselves, most probably we were run as `sh COMMAND'
15431# in which case we are not to be found in the path.
15432if test "x$as_myself" = x; then
15433 as_myself=$0
15434fi
15435if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015436 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
15437 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015438fi
15439
Matthias Kloseb9621712010-04-24 17:59:49 +000015440# Unset variables that we do not need and which cause bugs (e.g. in
15441# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
15442# suppresses any "Segmentation fault" message there. '((' could
15443# trigger a bug in pdksh 5.2.14.
15444for as_var in BASH_ENV ENV MAIL MAILPATH
15445do eval test x\${$as_var+set} = xset \
15446 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015447done
15448PS1='$ '
15449PS2='> '
15450PS4='+ '
15451
15452# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000015453LC_ALL=C
15454export LC_ALL
15455LANGUAGE=C
15456export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015457
Matthias Kloseb9621712010-04-24 17:59:49 +000015458# CDPATH.
15459(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
15460
15461
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015462# as_fn_error STATUS ERROR [LINENO LOG_FD]
15463# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000015464# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
15465# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015466# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000015467as_fn_error ()
15468{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015469 as_status=$1; test $as_status -eq 0 && as_status=1
15470 if test "$4"; then
15471 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
15472 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000015473 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015474 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000015475 as_fn_exit $as_status
15476} # as_fn_error
15477
15478
15479# as_fn_set_status STATUS
15480# -----------------------
15481# Set $? to STATUS, without forking.
15482as_fn_set_status ()
15483{
15484 return $1
15485} # as_fn_set_status
15486
15487# as_fn_exit STATUS
15488# -----------------
15489# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
15490as_fn_exit ()
15491{
15492 set +e
15493 as_fn_set_status $1
15494 exit $1
15495} # as_fn_exit
15496
15497# as_fn_unset VAR
15498# ---------------
15499# Portably unset VAR.
15500as_fn_unset ()
15501{
15502 { eval $1=; unset $1;}
15503}
15504as_unset=as_fn_unset
15505# as_fn_append VAR VALUE
15506# ----------------------
15507# Append the text in VALUE to the end of the definition contained in VAR. Take
15508# advantage of any shell optimizations that allow amortized linear growth over
15509# repeated appends, instead of the typical quadratic growth present in naive
15510# implementations.
15511if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
15512 eval 'as_fn_append ()
15513 {
15514 eval $1+=\$2
15515 }'
15516else
15517 as_fn_append ()
15518 {
15519 eval $1=\$$1\$2
15520 }
15521fi # as_fn_append
15522
15523# as_fn_arith ARG...
15524# ------------------
15525# Perform arithmetic evaluation on the ARGs, and store the result in the
15526# global $as_val. Take advantage of shells that can avoid forks. The arguments
15527# must be portable across $(()) and expr.
15528if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
15529 eval 'as_fn_arith ()
15530 {
15531 as_val=$(( $* ))
15532 }'
15533else
15534 as_fn_arith ()
15535 {
15536 as_val=`expr "$@" || test $? -eq 1`
15537 }
15538fi # as_fn_arith
15539
15540
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015541if expr a : '\(a\)' >/dev/null 2>&1 &&
15542 test "X`expr 00001 : '.*\(...\)'`" = X001; then
15543 as_expr=expr
15544else
15545 as_expr=false
15546fi
15547
15548if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
15549 as_basename=basename
15550else
15551 as_basename=false
15552fi
15553
Matthias Kloseb9621712010-04-24 17:59:49 +000015554if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
15555 as_dirname=dirname
15556else
15557 as_dirname=false
15558fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015559
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015560as_me=`$as_basename -- "$0" ||
15561$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15562 X"$0" : 'X\(//\)$' \| \
15563 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000015564$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015565 sed '/^.*\/\([^/][^/]*\)\/*$/{
15566 s//\1/
15567 q
15568 }
15569 /^X\/\(\/\/\)$/{
15570 s//\1/
15571 q
15572 }
15573 /^X\/\(\/\).*/{
15574 s//\1/
15575 q
15576 }
15577 s/.*/./; q'`
15578
Matthias Kloseb9621712010-04-24 17:59:49 +000015579# Avoid depending upon Character Ranges.
15580as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15581as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15582as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15583as_cr_digits='0123456789'
15584as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015585
15586ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000015587case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015588-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015589 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015590 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000015591 xy) ECHO_C='\c';;
15592 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
15593 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015594 esac;;
15595*)
15596 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000015597esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015598
Martin v. Löwis11437992002-04-12 09:54:03 +000015599rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015600if test -d conf$$.dir; then
15601 rm -f conf$$.dir/conf$$.file
15602else
15603 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000015604 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015605fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015606if (echo >conf$$.file) 2>/dev/null; then
15607 if ln -s conf$$.file conf$$ 2>/dev/null; then
15608 as_ln_s='ln -s'
15609 # ... but there are two gotchas:
15610 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
15611 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015612 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000015613 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015614 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000015615 elif ln conf$$.file conf$$ 2>/dev/null; then
15616 as_ln_s=ln
15617 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015618 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000015619 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015620else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015621 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000015622fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015623rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
15624rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000015625
Matthias Kloseb9621712010-04-24 17:59:49 +000015626
15627# as_fn_mkdir_p
15628# -------------
15629# Create "$as_dir" as a directory, including parents if necessary.
15630as_fn_mkdir_p ()
15631{
15632
15633 case $as_dir in #(
15634 -*) as_dir=./$as_dir;;
15635 esac
15636 test -d "$as_dir" || eval $as_mkdir_p || {
15637 as_dirs=
15638 while :; do
15639 case $as_dir in #(
15640 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
15641 *) as_qdir=$as_dir;;
15642 esac
15643 as_dirs="'$as_qdir' $as_dirs"
15644 as_dir=`$as_dirname -- "$as_dir" ||
15645$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15646 X"$as_dir" : 'X\(//\)[^/]' \| \
15647 X"$as_dir" : 'X\(//\)$' \| \
15648 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
15649$as_echo X"$as_dir" |
15650 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15651 s//\1/
15652 q
15653 }
15654 /^X\(\/\/\)[^/].*/{
15655 s//\1/
15656 q
15657 }
15658 /^X\(\/\/\)$/{
15659 s//\1/
15660 q
15661 }
15662 /^X\(\/\).*/{
15663 s//\1/
15664 q
15665 }
15666 s/.*/./; q'`
15667 test -d "$as_dir" && break
15668 done
15669 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015670 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000015671
15672
15673} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000015674if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015675 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000015676else
Skip Montanarof0d5f792004-08-15 14:08:23 +000015677 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000015678 as_mkdir_p=false
15679fi
15680
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015681
15682# as_fn_executable_p FILE
15683# -----------------------
15684# Test if FILE is an executable regular file.
15685as_fn_executable_p ()
15686{
15687 test -f "$1" && test -x "$1"
15688} # as_fn_executable_p
15689as_test_x='test -x'
15690as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015691
15692# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015693as_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 +000015694
15695# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015696as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015697
15698
Martin v. Löwis11437992002-04-12 09:54:03 +000015699exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000015700## ----------------------------------- ##
15701## Main body of $CONFIG_STATUS script. ##
15702## ----------------------------------- ##
15703_ASEOF
15704test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015705
Matthias Kloseb9621712010-04-24 17:59:49 +000015706cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15707# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000015708# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015709# values after options handling.
15710ac_log="
Georg Brandl08a90122012-09-29 09:34:13 +020015711This file was extended by python $as_me 3.4, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015712generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000015713
15714 CONFIG_FILES = $CONFIG_FILES
15715 CONFIG_HEADERS = $CONFIG_HEADERS
15716 CONFIG_LINKS = $CONFIG_LINKS
15717 CONFIG_COMMANDS = $CONFIG_COMMANDS
15718 $ $0 $@
15719
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015720on `(hostname || uname -n) 2>/dev/null | sed 1q`
15721"
15722
Martin v. Löwis11437992002-04-12 09:54:03 +000015723_ACEOF
15724
Matthias Kloseb9621712010-04-24 17:59:49 +000015725case $ac_config_files in *"
15726"*) set x $ac_config_files; shift; ac_config_files=$*;;
15727esac
15728
15729case $ac_config_headers in *"
15730"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
15731esac
15732
15733
15734cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015735# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010015736config_files="$ac_config_files"
15737config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000015738
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015739_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015740
Matthias Kloseb9621712010-04-24 17:59:49 +000015741cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015742ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000015743\`$as_me' instantiates files and other configuration actions
15744from templates according to the current configuration. Unless the files
15745and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000015746
Matthias Kloseb9621712010-04-24 17:59:49 +000015747Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000015748
15749 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015750 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000015751 --config print configuration, then exit
15752 -q, --quiet, --silent
15753 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000015754 -d, --debug don't remove temporary files
15755 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000015756 --file=FILE[:TEMPLATE]
15757 instantiate the configuration file FILE
15758 --header=FILE[:TEMPLATE]
15759 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000015760
15761Configuration files:
15762$config_files
15763
15764Configuration headers:
15765$config_headers
15766
Matthias Kloseb9621712010-04-24 17:59:49 +000015767Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015768
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015769_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015770cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15771ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000015772ac_cs_version="\\
Georg Brandl08a90122012-09-29 09:34:13 +020015773python config.status 3.4
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015774configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000015775 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000015776
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015777Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000015778This config.status script is free software; the Free Software Foundation
15779gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015780
15781ac_pwd='$ac_pwd'
15782srcdir='$srcdir'
15783INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010015784MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000015785test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000015786_ACEOF
15787
Matthias Kloseb9621712010-04-24 17:59:49 +000015788cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15789# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000015790ac_need_defaults=:
15791while test $# != 0
15792do
15793 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015794 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015795 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15796 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000015797 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000015798 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015799 --*=)
15800 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15801 ac_optarg=
15802 ac_shift=:
15803 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015804 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000015805 ac_option=$1
15806 ac_optarg=$2
15807 ac_shift=shift
15808 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015809 esac
15810
Skip Montanaro6dead952003-09-25 14:50:04 +000015811 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000015812 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000015813 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15814 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015815 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000015816 $as_echo "$ac_cs_version"; exit ;;
15817 --config | --confi | --conf | --con | --co | --c )
15818 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015819 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000015820 debug=: ;;
15821 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000015822 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000015823 case $ac_optarg in
15824 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015825 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000015826 esac
15827 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015828 ac_need_defaults=false;;
15829 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000015830 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000015831 case $ac_optarg in
15832 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15833 esac
15834 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015835 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015836 --he | --h)
15837 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015838 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000015839Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015840 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000015841 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000015842 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
15843 | -silent | --silent | --silen | --sile | --sil | --si | --s)
15844 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015845
15846 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015847 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000015848Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015849
Matthias Kloseb9621712010-04-24 17:59:49 +000015850 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015851 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015852
15853 esac
15854 shift
15855done
15856
Skip Montanaro6dead952003-09-25 14:50:04 +000015857ac_configure_extra_args=
15858
15859if $ac_cs_silent; then
15860 exec 6>/dev/null
15861 ac_configure_extra_args="$ac_configure_extra_args --silent"
15862fi
15863
15864_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015865cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000015866if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015867 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000015868 shift
15869 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
15870 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015871 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000015872 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000015873fi
15874
Martin v. Löwis11437992002-04-12 09:54:03 +000015875_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015876cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015877exec 5>>config.log
15878{
15879 echo
15880 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
15881## Running $as_me. ##
15882_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000015883 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015884} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015885
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015886_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015887cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015888_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015889
Matthias Kloseb9621712010-04-24 17:59:49 +000015890cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015891
15892# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000015893for ac_config_target in $ac_config_targets
15894do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015895 case $ac_config_target in
15896 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
15897 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
15898 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000015899 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
15900 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015901 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
15902 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000015903 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
doko@python.org87421192013-01-26 11:39:31 +010015904 "Misc/python-config.sh") CONFIG_FILES="$CONFIG_FILES Misc/python-config.sh" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015905 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015906
Victor Stinnere0be4232011-10-25 13:06:09 +020015907 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015908 esac
15909done
15910
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015911
Martin v. Löwis11437992002-04-12 09:54:03 +000015912# If the user did not use the arguments to specify the items to instantiate,
15913# then the envvar interface is used. Set only those that are not.
15914# We use the long form for the default assignment because of an extremely
15915# bizarre bug on SunOS 4.1.3.
15916if $ac_need_defaults; then
15917 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15918 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15919fi
15920
Skip Montanaro6dead952003-09-25 14:50:04 +000015921# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015922# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000015923# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015924# Hook for its removal unless debugging.
15925# Note that there is a small window in which the directory will not be cleaned:
15926# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000015927$debug ||
15928{
Victor Stinnere0be4232011-10-25 13:06:09 +020015929 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015930 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020015931 : "${ac_tmp:=$tmp}"
15932 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015933' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000015934 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000015935}
Martin v. Löwis11437992002-04-12 09:54:03 +000015936# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000015937
Martin v. Löwis11437992002-04-12 09:54:03 +000015938{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015939 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020015940 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000015941} ||
15942{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015943 tmp=./conf$$-$RANDOM
15944 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015945} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020015946ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000015947
Matthias Kloseb9621712010-04-24 17:59:49 +000015948# Set up the scripts for CONFIG_FILES section.
15949# No need to generate them if there are no CONFIG_FILES.
15950# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015951if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015952
Matthias Kloseb9621712010-04-24 17:59:49 +000015953
15954ac_cr=`echo X | tr X '\015'`
15955# On cygwin, bash can eat \r inside `` if the user requested igncr.
15956# But we know of no other shell where ac_cr would be empty at this
15957# point, so we can use a bashism as a fallback.
15958if test "x$ac_cr" = x; then
15959 eval ac_cr=\$\'\\r\'
15960fi
15961ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
15962if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015963 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000015964else
15965 ac_cs_awk_cr=$ac_cr
15966fi
15967
Victor Stinnere0be4232011-10-25 13:06:09 +020015968echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000015969_ACEOF
15970
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015971
Matthias Kloseb9621712010-04-24 17:59:49 +000015972{
15973 echo "cat >conf$$subs.awk <<_ACEOF" &&
15974 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
15975 echo "_ACEOF"
15976} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015977 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15978ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015979ac_delim='%!_!# '
15980for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000015981 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015982 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015983
Matthias Kloseb9621712010-04-24 17:59:49 +000015984 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
15985 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015986 break
15987 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015988 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015989 else
15990 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000015991 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015992done
Matthias Kloseb9621712010-04-24 17:59:49 +000015993rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015994
Matthias Kloseb9621712010-04-24 17:59:49 +000015995cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020015996cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015997_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015998sed -n '
15999h
16000s/^/S["/; s/!.*/"]=/
16001p
16002g
16003s/^[^!]*!//
16004:repl
16005t repl
16006s/'"$ac_delim"'$//
16007t delim
16008:nl
16009h
16010s/\(.\{148\}\)..*/\1/
16011t more1
16012s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
16013p
16014n
16015b repl
16016:more1
16017s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16018p
16019g
16020s/.\{148\}//
16021t nl
16022:delim
16023h
16024s/\(.\{148\}\)..*/\1/
16025t more2
16026s/["\\]/\\&/g; s/^/"/; s/$/"/
16027p
16028b
16029:more2
16030s/["\\]/\\&/g; s/^/"/; s/$/"\\/
16031p
16032g
16033s/.\{148\}//
16034t delim
16035' <conf$$subs.awk | sed '
16036/^[^""]/{
16037 N
16038 s/\n//
16039}
16040' >>$CONFIG_STATUS || ac_write_fail=1
16041rm -f conf$$subs.awk
16042cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16043_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020016044cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000016045 for (key in S) S_is_set[key] = 1
16046 FS = ""
16047
16048}
16049{
16050 line = $ 0
16051 nfields = split(line, field, "@")
16052 substed = 0
16053 len = length(field[1])
16054 for (i = 2; i < nfields; i++) {
16055 key = field[i]
16056 keylen = length(key)
16057 if (S_is_set[key]) {
16058 value = S[key]
16059 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
16060 len += length(value) + length(field[++i])
16061 substed = 1
16062 } else
16063 len += 1 + keylen
16064 }
16065
16066 print line
16067}
16068
16069_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016070_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016071cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16072if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
16073 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
16074else
16075 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020016076fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016077 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016078_ACEOF
16079
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016080# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
16081# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016082# trailing colons and then remove the whole line if VPATH becomes empty
16083# (actually we leave an empty line to preserve line numbers).
16084if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016085 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
16086h
16087s///
16088s/^/:/
16089s/[ ]*$/:/
16090s/:\$(srcdir):/:/g
16091s/:\${srcdir}:/:/g
16092s/:@srcdir@:/:/g
16093s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016094s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016095x
16096s/\(=[ ]*\).*/\1/
16097G
16098s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016099s/^[^=]*=[ ]*$//
16100}'
16101fi
16102
Matthias Kloseb9621712010-04-24 17:59:49 +000016103cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016104fi # test -n "$CONFIG_FILES"
16105
Matthias Kloseb9621712010-04-24 17:59:49 +000016106# Set up the scripts for CONFIG_HEADERS section.
16107# No need to generate them if there are no CONFIG_HEADERS.
16108# This happens for instance with `./config.status Makefile'.
16109if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016110cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016111BEGIN {
16112_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016113
Matthias Kloseb9621712010-04-24 17:59:49 +000016114# Transform confdefs.h into an awk script `defines.awk', embedded as
16115# here-document in config.status, that substitutes the proper values into
16116# config.h.in to produce config.h.
16117
16118# Create a delimiter string that does not exist in confdefs.h, to ease
16119# handling of long lines.
16120ac_delim='%!_!# '
16121for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020016122 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
16123 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016124 break
16125 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016126 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016127 else
16128 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16129 fi
16130done
16131
16132# For the awk script, D is an array of macro values keyed by name,
16133# likewise P contains macro parameters if any. Preserve backslash
16134# newline sequences.
16135
16136ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
16137sed -n '
16138s/.\{148\}/&'"$ac_delim"'/g
16139t rset
16140:rset
16141s/^[ ]*#[ ]*define[ ][ ]*/ /
16142t def
16143d
16144:def
16145s/\\$//
16146t bsnl
16147s/["\\]/\\&/g
16148s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16149D["\1"]=" \3"/p
16150s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
16151d
16152:bsnl
16153s/["\\]/\\&/g
16154s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16155D["\1"]=" \3\\\\\\n"\\/p
16156t cont
16157s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
16158t cont
16159d
16160:cont
16161n
16162s/.\{148\}/&'"$ac_delim"'/g
16163t clear
16164:clear
16165s/\\$//
16166t bsnlc
16167s/["\\]/\\&/g; s/^/"/; s/$/"/p
16168d
16169:bsnlc
16170s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
16171b cont
16172' <confdefs.h | sed '
16173s/'"$ac_delim"'/"\\\
16174"/g' >>$CONFIG_STATUS || ac_write_fail=1
16175
16176cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16177 for (key in D) D_is_set[key] = 1
16178 FS = ""
16179}
16180/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
16181 line = \$ 0
16182 split(line, arg, " ")
16183 if (arg[1] == "#") {
16184 defundef = arg[2]
16185 mac1 = arg[3]
16186 } else {
16187 defundef = substr(arg[1], 2)
16188 mac1 = arg[2]
16189 }
16190 split(mac1, mac2, "(") #)
16191 macro = mac2[1]
16192 prefix = substr(line, 1, index(line, defundef) - 1)
16193 if (D_is_set[macro]) {
16194 # Preserve the white space surrounding the "#".
16195 print prefix "define", macro P[macro] D[macro]
16196 next
16197 } else {
16198 # Replace #undef with comments. This is necessary, for example,
16199 # in the case of _POSIX_SOURCE, which is predefined and required
16200 # on some systems where configure will not decide to define it.
16201 if (defundef == "undef") {
16202 print "/*", prefix defundef, macro, "*/"
16203 next
16204 }
16205 }
16206}
16207{ print }
16208_ACAWK
16209_ACEOF
16210cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016211 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016212fi # test -n "$CONFIG_HEADERS"
16213
16214
16215eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
16216shift
16217for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016218do
16219 case $ac_tag in
16220 :[FHLC]) ac_mode=$ac_tag; continue;;
16221 esac
16222 case $ac_mode$ac_tag in
16223 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020016224 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016225 :[FH]-) ac_tag=-:-;;
16226 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
16227 esac
16228 ac_save_IFS=$IFS
16229 IFS=:
16230 set x $ac_tag
16231 IFS=$ac_save_IFS
16232 shift
16233 ac_file=$1
16234 shift
16235
16236 case $ac_mode in
16237 :L) ac_source=$1;;
16238 :[FH])
16239 ac_file_inputs=
16240 for ac_f
16241 do
16242 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020016243 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016244 *) # Look for the file first in the build tree, then in the source tree
16245 # (if the path is not absolute). The absolute path cannot be DOS-style,
16246 # because $ac_f cannot contain `:'.
16247 test -f "$ac_f" ||
16248 case $ac_f in
16249 [\\/$]*) false;;
16250 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
16251 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020016252 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016253 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000016254 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
16255 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016256 done
16257
16258 # Let's still pretend it is `configure' which instantiates (i.e., don't
16259 # use $as_me), people would be surprised to read:
16260 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000016261 configure_input='Generated from '`
16262 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
16263 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016264 if test x"$ac_file" != x-; then
16265 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000016266 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
16267$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016268 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016269 # Neutralize special characters interpreted by sed in replacement strings.
16270 case $configure_input in #(
16271 *\&* | *\|* | *\\* )
16272 ac_sed_conf_input=`$as_echo "$configure_input" |
16273 sed 's/[\\\\&|]/\\\\&/g'`;; #(
16274 *) ac_sed_conf_input=$configure_input;;
16275 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016276
16277 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020016278 *:-:* | *:-) cat >"$ac_tmp/stdin" \
16279 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016280 esac
16281 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016282 esac
16283
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016284 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000016285$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016286 X"$ac_file" : 'X\(//\)[^/]' \| \
16287 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016288 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016289$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016290 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16291 s//\1/
16292 q
16293 }
16294 /^X\(\/\/\)[^/].*/{
16295 s//\1/
16296 q
16297 }
16298 /^X\(\/\/\)$/{
16299 s//\1/
16300 q
16301 }
16302 /^X\(\/\).*/{
16303 s//\1/
16304 q
16305 }
16306 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000016307 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000016308 ac_builddir=.
16309
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016310case "$ac_dir" in
16311.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
16312*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016313 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016314 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000016315 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016316 case $ac_top_builddir_sub in
16317 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
16318 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
16319 esac ;;
16320esac
16321ac_abs_top_builddir=$ac_pwd
16322ac_abs_builddir=$ac_pwd$ac_dir_suffix
16323# for backward compatibility:
16324ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000016325
16326case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016327 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000016328 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016329 ac_top_srcdir=$ac_top_builddir_sub
16330 ac_abs_top_srcdir=$ac_pwd ;;
16331 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000016332 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016333 ac_top_srcdir=$srcdir
16334 ac_abs_top_srcdir=$srcdir ;;
16335 *) # Relative name.
16336 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
16337 ac_top_srcdir=$ac_top_build_prefix$srcdir
16338 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016339esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016340ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000016341
Martin v. Löwis11437992002-04-12 09:54:03 +000016342
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016343 case $ac_mode in
16344 :F)
16345 #
16346 # CONFIG_FILE
16347 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016348
16349 case $INSTALL in
16350 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016351 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016352 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010016353 ac_MKDIR_P=$MKDIR_P
16354 case $MKDIR_P in
16355 [\\/$]* | ?:[\\/]* ) ;;
16356 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
16357 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000016358_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016359
Matthias Kloseb9621712010-04-24 17:59:49 +000016360cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016361# If the template does not know about datarootdir, expand it.
16362# FIXME: This hack should be removed a few years after 2.60.
16363ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000016364ac_sed_dataroot='
16365/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016366 p
16367 q
16368}
16369/@datadir@/p
16370/@docdir@/p
16371/@infodir@/p
16372/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000016373/@mandir@/p'
16374case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016375*datarootdir*) ac_datarootdir_seen=yes;;
16376*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016377 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
16378$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016379_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016380cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016381 ac_datarootdir_hack='
16382 s&@datadir@&$datadir&g
16383 s&@docdir@&$docdir&g
16384 s&@infodir@&$infodir&g
16385 s&@localedir@&$localedir&g
16386 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000016387 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016388esac
16389_ACEOF
16390
16391# Neutralize VPATH when `$srcdir' = `.'.
16392# Shell code in configure.ac might set extrasub.
16393# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000016394cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16395ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000016396$extrasub
16397_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016398cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016399:t
16400/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000016401s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016402s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000016403s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016404s&@srcdir@&$ac_srcdir&;t t
16405s&@abs_srcdir@&$ac_abs_srcdir&;t t
16406s&@top_srcdir@&$ac_top_srcdir&;t t
16407s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
16408s&@builddir@&$ac_builddir&;t t
16409s&@abs_builddir@&$ac_abs_builddir&;t t
16410s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
16411s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010016412s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016413$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000016414"
Victor Stinnere0be4232011-10-25 13:06:09 +020016415eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
16416 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016417
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016418test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020016419 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
16420 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
16421 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000016422 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016423which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016424$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016425which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016426
Victor Stinnere0be4232011-10-25 13:06:09 +020016427 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000016428 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020016429 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
16430 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000016431 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016432 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016433 ;;
16434 :H)
16435 #
16436 # CONFIG_HEADER
16437 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016438 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016439 {
16440 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020016441 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
16442 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016443 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020016444 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016445 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
16446$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016447 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016448 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020016449 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016450 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016451 fi
16452 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016453 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020016454 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016455 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016456 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016457 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000016458
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016459
16460 esac
16461
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016462
16463 case $ac_file$ac_mode in
16464 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
16465
16466 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016467done # for ac_tag
16468
Guido van Rossum627b2d71993-12-24 10:39:16 +000016469
Matthias Kloseb9621712010-04-24 17:59:49 +000016470as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000016471_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016472ac_clean_files=$ac_clean_files_save
16473
Matthias Kloseb9621712010-04-24 17:59:49 +000016474test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016475 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016476
Martin v. Löwis11437992002-04-12 09:54:03 +000016477
16478# configure is writing to config.log, and then calls config.status.
16479# config.status does its own redirection, appending to config.log.
16480# Unfortunately, on DOS this fails, as config.log is still kept open
16481# by configure, so config.status won't be able to write to it; its
16482# output is simply discarded. So we exec the FD to /dev/null,
16483# effectively closing config.log, so it can be properly (re)opened and
16484# appended to by config.status. When coming back to configure, we
16485# need to make the FD available again.
16486if test "$no_create" != yes; then
16487 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000016488 ac_config_status_args=
16489 test "$silent" = yes &&
16490 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000016491 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000016492 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000016493 exec 5>>config.log
16494 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16495 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016496 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000016497fi
16498if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
16499 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
16500$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016501fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000016502
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016503
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000016504echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016505if test ! -f Modules/Setup
16506then
16507 cp $srcdir/Modules/Setup.dist Modules/Setup
16508fi
16509
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000016510echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016511if test ! -f Modules/Setup.local
16512then
16513 echo "# Edit this file for local setup changes" >Modules/Setup.local
16514fi
16515
16516echo "creating Makefile"
16517$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
16518 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000016519 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000016520mv config.c Modules