blob: a1b7bff2d285bac3c045af64829efdf567b880eb [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Guido van Rossum627b2d71993-12-24 10:39:16 +00002# Guess values for system-dependent variables and create Makefiles.
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00003# Generated by GNU Autoconf 2.69 for python 3.3.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004#
Georg Brandle2e15612009-05-20 18:25:10 +00005# Report bugs to <http://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00006#
Matthias Kloseb9621712010-04-24 17:59:49 +00007#
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00008# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
Matthias Kloseb9621712010-04-24 17:59:49 +00009#
10#
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011# This configure script is free software; the Free Software Foundation
12# gives unlimited permission to copy, distribute and modify it.
Matthias Kloseb9621712010-04-24 17:59:49 +000013## -------------------- ##
14## M4sh Initialization. ##
15## -------------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +000016
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017# Be more Bourne compatible
18DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000019if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000020 emulate sh
21 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000022 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000023 # is contrary to our usage. Disable this feature.
24 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000026else
Matthias Kloseb9621712010-04-24 17:59:49 +000027 case `(set -o) 2>/dev/null` in #(
28 *posix*) :
29 set -o posix ;; #(
30 *) :
31 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000032esac
Martin v. Löwis11437992002-04-12 09:54:03 +000033fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000034
35
Matthias Kloseb9621712010-04-24 17:59:49 +000036as_nl='
37'
38export as_nl
39# Printing a long string crashes Solaris 7 /usr/bin/printf.
40as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
41as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
42as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
43# Prefer a ksh shell builtin over an external printf program on Solaris,
44# but without wasting forks for bash or zsh.
45if test -z "$BASH_VERSION$ZSH_VERSION" \
46 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
47 as_echo='print -r --'
48 as_echo_n='print -rn --'
49elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
50 as_echo='printf %s\n'
51 as_echo_n='printf %s'
52else
53 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
54 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
55 as_echo_n='/usr/ucb/echo -n'
56 else
57 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
58 as_echo_n_body='eval
59 arg=$1;
60 case $arg in #(
61 *"$as_nl"*)
62 expr "X$arg" : "X\\(.*\\)$as_nl";
63 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
64 esac;
65 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66 '
67 export as_echo_n_body
68 as_echo_n='sh -c $as_echo_n_body as_echo'
69 fi
70 export as_echo_body
71 as_echo='sh -c $as_echo_body as_echo'
72fi
Martin v. Löwis11437992002-04-12 09:54:03 +000073
74# The user is always right.
75if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000076 PATH_SEPARATOR=:
77 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
78 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
79 PATH_SEPARATOR=';'
80 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000081fi
Martin v. Löwis11437992002-04-12 09:54:03 +000082
Thomas Wouters47b49bf2007-08-30 22:15:33 +000083
84# IFS
85# We need space, tab and new line, in precisely that order. Quoting is
86# there to prevent editors from complaining about space-tab.
87# (If _AS_PATH_WALK were called with IFS unset, it would disable word
88# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000089IFS=" "" $as_nl"
90
91# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020092as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000093case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000094 *[\\/]* ) as_myself=$0 ;;
95 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000096for as_dir in $PATH
97do
98 IFS=$as_save_IFS
99 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +0000100 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
101 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000102IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +0000103
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000104 ;;
105esac
106# We did not find ourselves, most probably we were run as `sh COMMAND'
107# in which case we are not to be found in the path.
108if test "x$as_myself" = x; then
109 as_myself=$0
110fi
111if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000112 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
113 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000114fi
115
Matthias Kloseb9621712010-04-24 17:59:49 +0000116# Unset variables that we do not need and which cause bugs (e.g. in
117# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
118# suppresses any "Segmentation fault" message there. '((' could
119# trigger a bug in pdksh 5.2.14.
120for as_var in BASH_ENV ENV MAIL MAILPATH
121do eval test x\${$as_var+set} = xset \
122 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000123done
124PS1='$ '
125PS2='> '
126PS4='+ '
127
128# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +0000129LC_ALL=C
130export LC_ALL
131LANGUAGE=C
132export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000133
Matthias Kloseb9621712010-04-24 17:59:49 +0000134# CDPATH.
135(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
136
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000137# Use a proper internal environment variable to ensure we don't fall
138 # into an infinite loop, continuously re-executing ourselves.
139 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
140 _as_can_reexec=no; export _as_can_reexec;
141 # We cannot yet assume a decent shell, so we have to provide a
142# neutralization value for shells without unset; and this also
143# works around shells that cannot unset nonexistent variables.
144# Preserve -v and -x to the replacement shell.
145BASH_ENV=/dev/null
146ENV=/dev/null
147(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
148case $- in # ((((
149 *v*x* | *x*v* ) as_opts=-vx ;;
150 *v* ) as_opts=-v ;;
151 *x* ) as_opts=-x ;;
152 * ) as_opts= ;;
153esac
154exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
155# Admittedly, this is quite paranoid, since all the known shells bail
156# out after a failed `exec'.
157$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
158as_fn_exit 255
159 fi
160 # We don't want this to propagate to other subprocesses.
161 { _as_can_reexec=; unset _as_can_reexec;}
Matthias Kloseb9621712010-04-24 17:59:49 +0000162if test "x$CONFIG_SHELL" = x; then
163 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
164 emulate sh
165 NULLCMD=:
166 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
167 # is contrary to our usage. Disable this feature.
168 alias -g '\${1+\"\$@\"}'='\"\$@\"'
169 setopt NO_GLOB_SUBST
170else
171 case \`(set -o) 2>/dev/null\` in #(
172 *posix*) :
173 set -o posix ;; #(
174 *) :
175 ;;
176esac
177fi
178"
179 as_required="as_fn_return () { (exit \$1); }
180as_fn_success () { as_fn_return 0; }
181as_fn_failure () { as_fn_return 1; }
182as_fn_ret_success () { return 0; }
183as_fn_ret_failure () { return 1; }
184
185exitcode=0
186as_fn_success || { exitcode=1; echo as_fn_success failed.; }
187as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
188as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
189as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
190if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
191
192else
193 exitcode=1; echo positional parameters were not saved.
194fi
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000195test x\$exitcode = x0 || exit 1
196test -x / || exit 1"
Matthias Kloseb9621712010-04-24 17:59:49 +0000197 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
198 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
199 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
200 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
201test \$(( 1 + 1 )) = 2 || exit 1"
202 if (eval "$as_required") 2>/dev/null; then :
203 as_have_required=yes
204else
205 as_have_required=no
206fi
207 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
208
209else
210 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
211as_found=false
212for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
213do
214 IFS=$as_save_IFS
215 test -z "$as_dir" && as_dir=.
216 as_found=:
217 case $as_dir in #(
218 /*)
219 for as_base in sh bash ksh sh5; do
220 # Try only shells that exist, to save several forks.
221 as_shell=$as_dir/$as_base
222 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
223 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
224 CONFIG_SHELL=$as_shell as_have_required=yes
225 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
226 break 2
227fi
228fi
229 done;;
230 esac
231 as_found=false
232done
233$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
234 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
235 CONFIG_SHELL=$SHELL as_have_required=yes
236fi; }
237IFS=$as_save_IFS
238
239
240 if test "x$CONFIG_SHELL" != x; then :
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000241 export CONFIG_SHELL
242 # We cannot yet assume a decent shell, so we have to provide a
243# neutralization value for shells without unset; and this also
244# works around shells that cannot unset nonexistent variables.
245# Preserve -v and -x to the replacement shell.
246BASH_ENV=/dev/null
247ENV=/dev/null
248(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
249case $- in # ((((
250 *v*x* | *x*v* ) as_opts=-vx ;;
251 *v* ) as_opts=-v ;;
252 *x* ) as_opts=-x ;;
253 * ) as_opts= ;;
254esac
255exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
256# Admittedly, this is quite paranoid, since all the known shells bail
257# out after a failed `exec'.
258$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
259exit 255
Matthias Kloseb9621712010-04-24 17:59:49 +0000260fi
261
262 if test x$as_have_required = xno; then :
263 $as_echo "$0: This script requires a shell more modern than all"
264 $as_echo "$0: the shells that I found on your system."
265 if test x${ZSH_VERSION+set} = xset ; then
266 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
267 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
268 else
269 $as_echo "$0: Please tell bug-autoconf@gnu.org and
270$0: http://bugs.python.org/ about your system, including
271$0: any error possibly output before this message. Then
272$0: install a modern shell, or manually run the script
273$0: under such a shell if you do have one."
274 fi
275 exit 1
276fi
277fi
278fi
279SHELL=${CONFIG_SHELL-/bin/sh}
280export SHELL
281# Unset more variables known to interfere with behavior of common tools.
282CLICOLOR_FORCE= GREP_OPTIONS=
283unset CLICOLOR_FORCE GREP_OPTIONS
284
285## --------------------- ##
286## M4sh Shell Functions. ##
287## --------------------- ##
288# as_fn_unset VAR
289# ---------------
290# Portably unset VAR.
291as_fn_unset ()
292{
293 { eval $1=; unset $1;}
294}
295as_unset=as_fn_unset
296
297# as_fn_set_status STATUS
298# -----------------------
299# Set $? to STATUS, without forking.
300as_fn_set_status ()
301{
302 return $1
303} # as_fn_set_status
304
305# as_fn_exit STATUS
306# -----------------
307# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
308as_fn_exit ()
309{
310 set +e
311 as_fn_set_status $1
312 exit $1
313} # as_fn_exit
314
315# as_fn_mkdir_p
316# -------------
317# Create "$as_dir" as a directory, including parents if necessary.
318as_fn_mkdir_p ()
319{
320
321 case $as_dir in #(
322 -*) as_dir=./$as_dir;;
323 esac
324 test -d "$as_dir" || eval $as_mkdir_p || {
325 as_dirs=
326 while :; do
327 case $as_dir in #(
328 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
329 *) as_qdir=$as_dir;;
330 esac
331 as_dirs="'$as_qdir' $as_dirs"
332 as_dir=`$as_dirname -- "$as_dir" ||
333$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
334 X"$as_dir" : 'X\(//\)[^/]' \| \
335 X"$as_dir" : 'X\(//\)$' \| \
336 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
337$as_echo X"$as_dir" |
338 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
339 s//\1/
340 q
341 }
342 /^X\(\/\/\)[^/].*/{
343 s//\1/
344 q
345 }
346 /^X\(\/\/\)$/{
347 s//\1/
348 q
349 }
350 /^X\(\/\).*/{
351 s//\1/
352 q
353 }
354 s/.*/./; q'`
355 test -d "$as_dir" && break
356 done
357 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200358 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +0000359
360
361} # as_fn_mkdir_p
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000362
363# as_fn_executable_p FILE
364# -----------------------
365# Test if FILE is an executable regular file.
366as_fn_executable_p ()
367{
368 test -f "$1" && test -x "$1"
369} # as_fn_executable_p
Matthias Kloseb9621712010-04-24 17:59:49 +0000370# as_fn_append VAR VALUE
371# ----------------------
372# Append the text in VALUE to the end of the definition contained in VAR. Take
373# advantage of any shell optimizations that allow amortized linear growth over
374# repeated appends, instead of the typical quadratic growth present in naive
375# implementations.
376if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
377 eval 'as_fn_append ()
378 {
379 eval $1+=\$2
380 }'
381else
382 as_fn_append ()
383 {
384 eval $1=\$$1\$2
385 }
386fi # as_fn_append
387
388# as_fn_arith ARG...
389# ------------------
390# Perform arithmetic evaluation on the ARGs, and store the result in the
391# global $as_val. Take advantage of shells that can avoid forks. The arguments
392# must be portable across $(()) and expr.
393if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
394 eval 'as_fn_arith ()
395 {
396 as_val=$(( $* ))
397 }'
398else
399 as_fn_arith ()
400 {
401 as_val=`expr "$@" || test $? -eq 1`
402 }
403fi # as_fn_arith
404
405
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200406# as_fn_error STATUS ERROR [LINENO LOG_FD]
407# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +0000408# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
409# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200410# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +0000411as_fn_error ()
412{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200413 as_status=$1; test $as_status -eq 0 && as_status=1
414 if test "$4"; then
415 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
416 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +0000417 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200418 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +0000419 as_fn_exit $as_status
420} # as_fn_error
421
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000422if expr a : '\(a\)' >/dev/null 2>&1 &&
423 test "X`expr 00001 : '.*\(...\)'`" = X001; then
424 as_expr=expr
425else
426 as_expr=false
427fi
428
429if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
430 as_basename=basename
431else
432 as_basename=false
433fi
434
Matthias Kloseb9621712010-04-24 17:59:49 +0000435if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
436 as_dirname=dirname
437else
438 as_dirname=false
439fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000440
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000441as_me=`$as_basename -- "$0" ||
442$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
443 X"$0" : 'X\(//\)$' \| \
444 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000445$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000446 sed '/^.*\/\([^/][^/]*\)\/*$/{
447 s//\1/
448 q
449 }
450 /^X\/\(\/\/\)$/{
451 s//\1/
452 q
453 }
454 /^X\/\(\/\).*/{
455 s//\1/
456 q
457 }
458 s/.*/./; q'`
459
Matthias Kloseb9621712010-04-24 17:59:49 +0000460# Avoid depending upon Character Ranges.
461as_cr_letters='abcdefghijklmnopqrstuvwxyz'
462as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
463as_cr_Letters=$as_cr_letters$as_cr_LETTERS
464as_cr_digits='0123456789'
465as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000466
467
Matthias Kloseb9621712010-04-24 17:59:49 +0000468 as_lineno_1=$LINENO as_lineno_1a=$LINENO
469 as_lineno_2=$LINENO as_lineno_2a=$LINENO
470 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
471 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
472 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000473 sed -n '
474 p
475 /[$]LINENO/=
476 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000477 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000478 s/[$]LINENO.*/&-/
479 t lineno
480 b
481 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000482 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000483 :loop
484 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000485 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000486 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000487 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000488 chmod +x "$as_me.lineno" ||
Matthias Kloseb9621712010-04-24 17:59:49 +0000489 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
Martin v. Löwis11437992002-04-12 09:54:03 +0000490
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000491 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
492 # already done that, so ensure we don't try to do so again and fall
493 # in an infinite loop. This has already happened in practice.
494 _as_can_reexec=no; export _as_can_reexec
Martin v. Löwis11437992002-04-12 09:54:03 +0000495 # Don't try to exec as it changes $[0], causing all sort of problems
496 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000497 # original and so on. Autoconf is especially sensitive to this).
498 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000499 # Exit status is that of the last command.
500 exit
501}
502
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000503ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +0000504case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000505-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000506 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000507 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +0000508 xy) ECHO_C='\c';;
509 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
510 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000511 esac;;
512*)
513 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000514esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000515
Martin v. Löwis11437992002-04-12 09:54:03 +0000516rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000517if test -d conf$$.dir; then
518 rm -f conf$$.dir/conf$$.file
519else
520 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +0000521 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000522fi
Matthias Kloseb9621712010-04-24 17:59:49 +0000523if (echo >conf$$.file) 2>/dev/null; then
524 if ln -s conf$$.file conf$$ 2>/dev/null; then
525 as_ln_s='ln -s'
526 # ... but there are two gotchas:
527 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
528 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000529 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +0000530 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000531 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +0000532 elif ln conf$$.file conf$$ 2>/dev/null; then
533 as_ln_s=ln
534 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000535 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +0000536 fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000537else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000538 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +0000539fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000540rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
541rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000542
Skip Montanaro6dead952003-09-25 14:50:04 +0000543if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +0000544 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +0000545else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000546 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000547 as_mkdir_p=false
548fi
549
Ross Lagerwall1b863eb2012-10-29 17:31:54 +0000550as_test_x='test -x'
551as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +0000552
553# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000554as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000555
556# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000557as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000558
559
Matthias Kloseb9621712010-04-24 17:59:49 +0000560test -n "$DJDIR" || exec 7<&0 </dev/null
561exec 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000562
563# Name of the host.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200564# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
Martin v. Löwis11437992002-04-12 09:54:03 +0000565# so uname gets run too.
566ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
567
Martin v. Löwis11437992002-04-12 09:54:03 +0000568#
569# Initializations.
570#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000571ac_default_prefix=/usr/local
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000572ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000573ac_config_libobj_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000574LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000575cross_compiling=no
576subdirs=
577MFLAGS=
578MAKEFLAGS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000579
Martin v. Löwis11437992002-04-12 09:54:03 +0000580# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000581PACKAGE_NAME='python'
582PACKAGE_TARNAME='python'
Georg Brandl3ebb6b32011-02-20 10:37:07 +0000583PACKAGE_VERSION='3.3'
584PACKAGE_STRING='python 3.3'
Georg Brandle2e15612009-05-20 18:25:10 +0000585PACKAGE_BUGREPORT='http://bugs.python.org/'
Matthias Kloseb9621712010-04-24 17:59:49 +0000586PACKAGE_URL=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000587
588ac_unique_file="Include/object.h"
589# Factoring default headers for most tests.
590ac_includes_default="\
591#include <stdio.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000592#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000593# include <sys/types.h>
594#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000595#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000596# include <sys/stat.h>
597#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000598#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000599# include <stdlib.h>
600# include <stddef.h>
601#else
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000602# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000603# include <stdlib.h>
604# endif
605#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000606#ifdef HAVE_STRING_H
607# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000608# include <memory.h>
609# endif
610# include <string.h>
611#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000612#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000613# include <strings.h>
614#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000615#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000616# include <inttypes.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +0000617#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000618#ifdef HAVE_STDINT_H
619# include <stdint.h>
620#endif
621#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000622# include <unistd.h>
623#endif"
624
Matthias Kloseb9621712010-04-24 17:59:49 +0000625ac_subst_vars='LTLIBOBJS
Ronald Oussoren74f29b42009-09-20 20:09:26 +0000626SRCDIRS
Matthias Kloseb9621712010-04-24 17:59:49 +0000627THREADHEADERS
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700628EXT_SUFFIX
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000629SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000630LIBC
631LIBM
632HAVE_GETHOSTBYNAME
633HAVE_GETHOSTBYNAME_R
634HAVE_GETHOSTBYNAME_R_3_ARG
635HAVE_GETHOSTBYNAME_R_5_ARG
636HAVE_GETHOSTBYNAME_R_6_ARG
637LIBOBJS
638TRUE
639MACHDEP_OBJS
640DYNLOADFILE
641DLINCLDIR
642THREADOBJ
643LDLAST
644USE_THREAD_MODULE
645SIGNAL_OBJS
646USE_SIGNAL_MODULE
647LIBFFI_INCLUDEDIR
648PKG_CONFIG
649SHLIBS
650CFLAGSFORSHARED
651LINKFORSHARED
652CCSHARED
653BLDSHARED
654LDCXXSHARED
655LDSHARED
doko@ubuntu.comd5537d02013-03-21 13:21:49 -0700656SHLIB_SUFFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000657LIBTOOL_CRUFT
658OTHER_LIBTOOL_OPT
659UNIVERSAL_ARCH_FLAGS
660BASECFLAGS
661OPT
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000662ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000663LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100664MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000665INSTALL_DATA
666INSTALL_SCRIPT
667INSTALL_PROGRAM
Matthias Klosec4c48422012-10-21 23:05:35 +0200668PYTHON
669ASDLGEN
doko@ubuntu.com58844492012-06-30 18:25:32 +0200670ac_ct_READELF
671READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000672ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200673ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000674AR
675RANLIB
Daniel Stutzbacha606faa2010-08-31 19:51:07 +0000676USE_INLINE
Matthias Kloseb9621712010-04-24 17:59:49 +0000677GNULD
678LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000679LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000680RUNSHARED
681INSTSONAME
682LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000683PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000684BLDLIBRARY
685DLLLIBRARY
686LDLIBRARY
687LIBRARY
doko@python.org3e6e2ac2013-01-25 13:12:29 +0100688MULTIARCH
Matthias Kloseb9621712010-04-24 17:59:49 +0000689BUILDEXEEXT
690EGREP
691GREP
692CPP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200693NO_AS_NEEDED
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200694ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000695MAINCC
696CXX
697OBJEXT
698EXEEXT
699ac_ct_CC
700CPPFLAGS
701LDFLAGS
702CFLAGS
703CC
704EXPORT_MACOSX_DEPLOYMENT_TARGET
705CONFIGURE_MACOSX_DEPLOYMENT_TARGET
706SGI_ABI
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200707_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000708MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000709FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000710FRAMEWORKUNIXTOOLSPREFIX
711FRAMEWORKALTINSTALLLAST
712FRAMEWORKALTINSTALLFIRST
713FRAMEWORKINSTALLLAST
714FRAMEWORKINSTALLFIRST
715PYTHONFRAMEWORKINSTALLDIR
716PYTHONFRAMEWORKPREFIX
717PYTHONFRAMEWORKDIR
718PYTHONFRAMEWORKIDENTIFIER
719PYTHONFRAMEWORK
720LIPO_32BIT_FLAGS
721ARCH_RUN_32BIT
722UNIVERSALSDK
723CONFIG_ARGS
724SOVERSION
725VERSION
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200726PYTHON_FOR_BUILD
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100727host_os
728host_vendor
729host_cpu
730host
731build_os
732build_vendor
733build_cpu
734build
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -0500735HAS_HG
736HGBRANCH
737HGTAG
738HGVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400739BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000740target_alias
741host_alias
742build_alias
743LIBS
744ECHO_T
745ECHO_N
746ECHO_C
747DEFS
748mandir
749localedir
750libdir
751psdir
752pdfdir
753dvidir
754htmldir
755infodir
756docdir
757oldincludedir
758includedir
759localstatedir
760sharedstatedir
761sysconfdir
762datadir
763datarootdir
764libexecdir
765sbindir
766bindir
767program_transform_name
768prefix
769exec_prefix
770PACKAGE_URL
771PACKAGE_BUGREPORT
772PACKAGE_STRING
773PACKAGE_VERSION
774PACKAGE_TARNAME
775PACKAGE_NAME
776PATH_SEPARATOR
777SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000778ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000779ac_user_opts='
780enable_option_checking
781enable_universalsdk
782with_universal_archs
783with_framework_name
784enable_framework
785with_gcc
786with_cxx_main
787with_suffix
788enable_shared
789enable_profiling
790with_pydebug
791with_libs
792with_system_expat
793with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100794with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000795enable_loadable_sqlite_extensions
Matthias Kloseb9621712010-04-24 17:59:49 +0000796with_dbmliborder
797with_signal_module
Matthias Kloseb9621712010-04-24 17:59:49 +0000798with_threads
799with_thread
800enable_ipv6
801with_doc_strings
802with_tsc
803with_pymalloc
804with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000805with_fpectl
806with_libm
807with_libc
808enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000809with_computed_gotos
810'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000811 ac_precious_vars='build_alias
812host_alias
813target_alias
doko@python.orgeab42bf2013-01-26 18:57:19 +0100814MACHDEP
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000815CC
816CFLAGS
817LDFLAGS
818LIBS
819CPPFLAGS
Charles-François Natali47413c12011-10-06 19:47:44 +0200820CPP'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000821
Guido van Rossum627b2d71993-12-24 10:39:16 +0000822
Guido van Rossum7f43da71994-08-01 12:15:30 +0000823# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000824ac_init_help=
825ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000826ac_unrecognized_opts=
827ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000828# The variables have the same names as the options, with
829# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000830cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000831exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000832no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000833no_recursion=
834prefix=NONE
835program_prefix=NONE
836program_suffix=NONE
837program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000838silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000839site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000840srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000841verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000842x_includes=NONE
843x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000844
845# Installation directory options.
846# These are left unexpanded so users can "make install exec_prefix=/foo"
847# and all the variables that are supposed to be based on exec_prefix
848# by default will actually change.
849# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000850# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000851bindir='${exec_prefix}/bin'
852sbindir='${exec_prefix}/sbin'
853libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000854datarootdir='${prefix}/share'
855datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000856sysconfdir='${prefix}/etc'
857sharedstatedir='${prefix}/com'
858localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000859includedir='${prefix}/include'
860oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000861docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
862infodir='${datarootdir}/info'
863htmldir='${docdir}'
864dvidir='${docdir}'
865pdfdir='${docdir}'
866psdir='${docdir}'
867libdir='${exec_prefix}/lib'
868localedir='${datarootdir}/locale'
869mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000870
Guido van Rossum7f43da71994-08-01 12:15:30 +0000871ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000872ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000873for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000874do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000875 # If the previous option needs an argument, assign it.
876 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000877 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000878 ac_prev=
879 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000880 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000881
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000882 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200883 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
884 *=) ac_optarg= ;;
885 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000886 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000887
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000888 # Accept the important Cygnus configure options, so we can diagnose typos.
889
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000890 case $ac_dashdash$ac_option in
891 --)
892 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000893
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000894 -bindir | --bindir | --bindi | --bind | --bin | --bi)
895 ac_prev=bindir ;;
896 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000897 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000898
899 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000900 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000901 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000902 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000903
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000904 -cache-file | --cache-file | --cache-fil | --cache-fi \
905 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
906 ac_prev=cache_file ;;
907 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
908 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000909 cache_file=$ac_optarg ;;
910
911 --config-cache | -C)
912 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000913
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000914 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000915 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000916 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000917 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000918
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000919 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
920 | --dataroo | --dataro | --datar)
921 ac_prev=datarootdir ;;
922 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
923 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
924 datarootdir=$ac_optarg ;;
925
Guido van Rossum7f43da71994-08-01 12:15:30 +0000926 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000927 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000928 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000929 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200930 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000931 ac_useropt_orig=$ac_useropt
932 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
933 case $ac_user_opts in
934 *"
935"enable_$ac_useropt"
936"*) ;;
937 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
938 ac_unrecognized_sep=', ';;
939 esac
940 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000941
942 -docdir | --docdir | --docdi | --doc | --do)
943 ac_prev=docdir ;;
944 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
945 docdir=$ac_optarg ;;
946
947 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
948 ac_prev=dvidir ;;
949 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
950 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000951
952 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000953 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000954 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000955 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200956 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000957 ac_useropt_orig=$ac_useropt
958 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
959 case $ac_user_opts in
960 *"
961"enable_$ac_useropt"
962"*) ;;
963 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
964 ac_unrecognized_sep=', ';;
965 esac
966 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000967
Guido van Rossum7f43da71994-08-01 12:15:30 +0000968 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
969 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
970 | --exec | --exe | --ex)
971 ac_prev=exec_prefix ;;
972 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
973 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
974 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000975 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000976
977 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000978 # Obsolete; use --with-gas.
979 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000980
Martin v. Löwis11437992002-04-12 09:54:03 +0000981 -help | --help | --hel | --he | -h)
982 ac_init_help=long ;;
983 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
984 ac_init_help=recursive ;;
985 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
986 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000987
988 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000989 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000990 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000991 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000992
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000993 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
994 ac_prev=htmldir ;;
995 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
996 | --ht=*)
997 htmldir=$ac_optarg ;;
998
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000999 -includedir | --includedir | --includedi | --included | --include \
1000 | --includ | --inclu | --incl | --inc)
1001 ac_prev=includedir ;;
1002 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1003 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001004 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001005
1006 -infodir | --infodir | --infodi | --infod | --info | --inf)
1007 ac_prev=infodir ;;
1008 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001009 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001010
1011 -libdir | --libdir | --libdi | --libd)
1012 ac_prev=libdir ;;
1013 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001014 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001015
1016 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1017 | --libexe | --libex | --libe)
1018 ac_prev=libexecdir ;;
1019 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1020 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001021 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001022
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001023 -localedir | --localedir | --localedi | --localed | --locale)
1024 ac_prev=localedir ;;
1025 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1026 localedir=$ac_optarg ;;
1027
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001028 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001029 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001030 ac_prev=localstatedir ;;
1031 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001032 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001033 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001034
1035 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1036 ac_prev=mandir ;;
1037 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001038 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001039
Guido van Rossum7f43da71994-08-01 12:15:30 +00001040 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001041 # Obsolete; use --without-fp.
1042 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001043
1044 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001045 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001046 no_create=yes ;;
1047
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001048 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1049 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1050 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001051
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001052 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1053 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1054 | --oldin | --oldi | --old | --ol | --o)
1055 ac_prev=oldincludedir ;;
1056 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1057 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1058 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001059 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001060
Guido van Rossum7f43da71994-08-01 12:15:30 +00001061 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1062 ac_prev=prefix ;;
1063 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001064 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001065
1066 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1067 | --program-pre | --program-pr | --program-p)
1068 ac_prev=program_prefix ;;
1069 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1070 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001071 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001072
1073 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1074 | --program-suf | --program-su | --program-s)
1075 ac_prev=program_suffix ;;
1076 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1077 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001078 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001079
1080 -program-transform-name | --program-transform-name \
1081 | --program-transform-nam | --program-transform-na \
1082 | --program-transform-n | --program-transform- \
1083 | --program-transform | --program-transfor \
1084 | --program-transfo | --program-transf \
1085 | --program-trans | --program-tran \
1086 | --progr-tra | --program-tr | --program-t)
1087 ac_prev=program_transform_name ;;
1088 -program-transform-name=* | --program-transform-name=* \
1089 | --program-transform-nam=* | --program-transform-na=* \
1090 | --program-transform-n=* | --program-transform-=* \
1091 | --program-transform=* | --program-transfor=* \
1092 | --program-transfo=* | --program-transf=* \
1093 | --program-trans=* | --program-tran=* \
1094 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001095 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001096
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001097 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1098 ac_prev=pdfdir ;;
1099 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1100 pdfdir=$ac_optarg ;;
1101
1102 -psdir | --psdir | --psdi | --psd | --ps)
1103 ac_prev=psdir ;;
1104 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1105 psdir=$ac_optarg ;;
1106
Guido van Rossum7f43da71994-08-01 12:15:30 +00001107 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1108 | -silent | --silent | --silen | --sile | --sil)
1109 silent=yes ;;
1110
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001111 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1112 ac_prev=sbindir ;;
1113 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1114 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001115 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001116
1117 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1118 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1119 | --sharedst | --shareds | --shared | --share | --shar \
1120 | --sha | --sh)
1121 ac_prev=sharedstatedir ;;
1122 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1123 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1124 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1125 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001126 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001127
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001128 -site | --site | --sit)
1129 ac_prev=site ;;
1130 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001131 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001132
Guido van Rossum7f43da71994-08-01 12:15:30 +00001133 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1134 ac_prev=srcdir ;;
1135 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001136 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001137
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001138 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1139 | --syscon | --sysco | --sysc | --sys | --sy)
1140 ac_prev=sysconfdir ;;
1141 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1142 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001143 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001144
Guido van Rossum7f43da71994-08-01 12:15:30 +00001145 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001146 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001147 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001148 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001149
1150 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1151 verbose=yes ;;
1152
Martin v. Löwis11437992002-04-12 09:54:03 +00001153 -version | --version | --versio | --versi | --vers | -V)
1154 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001155
1156 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001157 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001158 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001159 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001160 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001161 ac_useropt_orig=$ac_useropt
1162 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1163 case $ac_user_opts in
1164 *"
1165"with_$ac_useropt"
1166"*) ;;
1167 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1168 ac_unrecognized_sep=', ';;
1169 esac
1170 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001171
1172 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001173 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001174 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001175 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001176 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001177 ac_useropt_orig=$ac_useropt
1178 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1179 case $ac_user_opts in
1180 *"
1181"with_$ac_useropt"
1182"*) ;;
1183 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1184 ac_unrecognized_sep=', ';;
1185 esac
1186 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001187
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001188 --x)
1189 # Obsolete; use --with-x.
1190 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001191
1192 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1193 | --x-incl | --x-inc | --x-in | --x-i)
1194 ac_prev=x_includes ;;
1195 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1196 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001197 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001198
1199 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1200 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1201 ac_prev=x_libraries ;;
1202 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1203 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001204 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001205
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001206 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1207Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001208 ;;
1209
Martin v. Löwis11437992002-04-12 09:54:03 +00001210 *=*)
1211 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1212 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001213 case $ac_envvar in #(
1214 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001215 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001216 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001217 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001218 export $ac_envvar ;;
1219
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001220 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001221 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001222 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001223 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001224 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001225 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001226 ;;
1227
1228 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001229done
1230
Guido van Rossum7f43da71994-08-01 12:15:30 +00001231if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001232 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001233 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001234fi
1235
Matthias Kloseb9621712010-04-24 17:59:49 +00001236if test -n "$ac_unrecognized_opts"; then
1237 case $enable_option_checking in
1238 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001239 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001240 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1241 esac
1242fi
1243
1244# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001245for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1246 datadir sysconfdir sharedstatedir localstatedir includedir \
1247 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1248 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001249do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001250 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001251 # Remove trailing slashes.
1252 case $ac_val in
1253 */ )
1254 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1255 eval $ac_var=\$ac_val;;
1256 esac
1257 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001258 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001259 [\\/$]* | ?:[\\/]* ) continue;;
1260 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001261 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001262 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001263done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001264
Martin v. Löwis11437992002-04-12 09:54:03 +00001265# There might be people who depend on the old broken behavior: `$host'
1266# used to hold the argument of --host etc.
1267# FIXME: To remove some day.
1268build=$build_alias
1269host=$host_alias
1270target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001271
Martin v. Löwis11437992002-04-12 09:54:03 +00001272# FIXME: To remove some day.
1273if test "x$host_alias" != x; then
1274 if test "x$build_alias" = x; then
1275 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001276 elif test "x$build_alias" != "x$host_alias"; then
1277 cross_compiling=yes
1278 fi
1279fi
1280
1281ac_tool_prefix=
1282test -n "$host_alias" && ac_tool_prefix=$host_alias-
1283
1284test "$silent" = yes && exec 6>/dev/null
1285
Guido van Rossum627b2d71993-12-24 10:39:16 +00001286
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001287ac_pwd=`pwd` && test -n "$ac_pwd" &&
1288ac_ls_di=`ls -di .` &&
1289ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001290 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001291test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001292 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001293
1294
Guido van Rossum627b2d71993-12-24 10:39:16 +00001295# Find the source files, if location was not specified.
1296if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001297 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001298 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001299 ac_confdir=`$as_dirname -- "$as_myself" ||
1300$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1301 X"$as_myself" : 'X\(//\)[^/]' \| \
1302 X"$as_myself" : 'X\(//\)$' \| \
1303 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1304$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001305 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1306 s//\1/
1307 q
1308 }
1309 /^X\(\/\/\)[^/].*/{
1310 s//\1/
1311 q
1312 }
1313 /^X\(\/\/\)$/{
1314 s//\1/
1315 q
1316 }
1317 /^X\(\/\).*/{
1318 s//\1/
1319 q
1320 }
1321 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001322 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001323 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001324 srcdir=..
1325 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001326else
1327 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001328fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001329if test ! -r "$srcdir/$ac_unique_file"; then
1330 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001331 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001332fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001333ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1334ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001335 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001336 pwd)`
1337# When building in place, set srcdir=.
1338if test "$ac_abs_confdir" = "$ac_pwd"; then
1339 srcdir=.
1340fi
1341# Remove unnecessary trailing slashes from srcdir.
1342# Double slashes in file names in object file debugging info
1343# mess up M-x gdb in Emacs.
1344case $srcdir in
1345*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1346esac
1347for ac_var in $ac_precious_vars; do
1348 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1349 eval ac_env_${ac_var}_value=\$${ac_var}
1350 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1351 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1352done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001353
Martin v. Löwis11437992002-04-12 09:54:03 +00001354#
1355# Report the --help message.
1356#
1357if test "$ac_init_help" = "long"; then
1358 # Omit some internal or obsolete options to make the list less imposing.
1359 # This message is too long to be a string in the A/UX 3.1 sh.
1360 cat <<_ACEOF
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001361\`configure' configures python 3.3 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001362
1363Usage: $0 [OPTION]... [VAR=VALUE]...
1364
1365To assign environment variables (e.g., CC, CFLAGS...), specify them as
1366VAR=VALUE. See below for descriptions of some of the useful variables.
1367
1368Defaults for the options are specified in brackets.
1369
1370Configuration:
1371 -h, --help display this help and exit
1372 --help=short display options specific to this package
1373 --help=recursive display the short help of all the included packages
1374 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001375 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001376 --cache-file=FILE cache test results in FILE [disabled]
1377 -C, --config-cache alias for \`--cache-file=config.cache'
1378 -n, --no-create do not create output files
1379 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1380
Martin v. Löwis11437992002-04-12 09:54:03 +00001381Installation directories:
1382 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001383 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001384 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001385 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001386
1387By default, \`make install' will install all the files in
1388\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1389an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1390for instance \`--prefix=\$HOME'.
1391
1392For better control, use the options below.
1393
1394Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001395 --bindir=DIR user executables [EPREFIX/bin]
1396 --sbindir=DIR system admin executables [EPREFIX/sbin]
1397 --libexecdir=DIR program executables [EPREFIX/libexec]
1398 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1399 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1400 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1401 --libdir=DIR object code libraries [EPREFIX/lib]
1402 --includedir=DIR C header files [PREFIX/include]
1403 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1404 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1405 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1406 --infodir=DIR info documentation [DATAROOTDIR/info]
1407 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1408 --mandir=DIR man documentation [DATAROOTDIR/man]
1409 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1410 --htmldir=DIR html documentation [DOCDIR]
1411 --dvidir=DIR dvi documentation [DOCDIR]
1412 --pdfdir=DIR pdf documentation [DOCDIR]
1413 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001414_ACEOF
1415
1416 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001417
1418System types:
1419 --build=BUILD configure for building on BUILD [guessed]
1420 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001421_ACEOF
1422fi
1423
1424if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001425 case $ac_init_help in
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001426 short | recursive ) echo "Configuration of python 3.3:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001427 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001428 cat <<\_ACEOF
1429
1430Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001431 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001432 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1433 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001434 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001435 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001436 --enable-framework[=INSTALLDIR]
1437 Build (MacOSX|Darwin) framework
1438 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001439 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001440 --enable-loadable-sqlite-extensions
1441 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001442 --enable-ipv6 Enable ipv6 (with ipv4) support
1443 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001444 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001445 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001446
1447Optional Packages:
1448 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1449 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001450 --with-universal-archs=ARCH
1451 select architectures for universal build ("32-bit",
Ronald Oussoren3c064c12009-09-08 07:12:42 +00001452 "64-bit", "3-way", "intel" or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001453 --with-framework-name=FRAMEWORK
1454 specify an alternate name of the framework built
1455 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001456 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001457 --with-cxx-main=<compiler>
1458 compile main() and link python executable with C++
1459 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001460 --with-suffix=.exe set executable suffix
1461 --with-pydebug build with Py_DEBUG defined
1462 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001463 --with-system-expat build pyexpat module using an installed expat
1464 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001465 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001466 --with-system-libmpdec build _decimal module using an installed libmpdec
1467 library
Matthias Klose55708cc2009-04-30 08:06:49 +00001468 --with-dbmliborder=db1:db2:...
1469 order to check db backends for dbm. Valid value is a
1470 colon separated string with the backend names
1471 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001472 --with-signal-module disable/enable signal module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001473 --with(out)-threads[=DIRECTORY]
1474 disable/enable thread support
1475 --with(out)-thread[=DIRECTORY]
1476 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001477 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001478 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001479 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001480 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001481 --with-fpectl enable SIGFPE catching
1482 --with-libm=STRING math library
1483 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001484 --with(out)-computed-gotos
1485 Use computed gotos in evaluation loop (enabled by
1486 default on supported compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001487
1488Some influential environment variables:
doko@python.orgeab42bf2013-01-26 18:57:19 +01001489 MACHDEP name for machine-dependent library files
Martin v. Löwis11437992002-04-12 09:54:03 +00001490 CC C compiler command
1491 CFLAGS C compiler flags
1492 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1493 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001494 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001495 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001496 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001497 CPP C preprocessor
1498
1499Use these variables to override the choices made by `configure' or to help
1500it to find libraries and programs with nonstandard names/locations.
1501
Georg Brandle2e15612009-05-20 18:25:10 +00001502Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001503_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001504ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001505fi
1506
1507if test "$ac_init_help" = "recursive"; then
1508 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001509 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001510 test -d "$ac_dir" ||
1511 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1512 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001513 ac_builddir=.
1514
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001515case "$ac_dir" in
1516.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1517*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001518 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001519 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001520 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001521 case $ac_top_builddir_sub in
1522 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1523 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1524 esac ;;
1525esac
1526ac_abs_top_builddir=$ac_pwd
1527ac_abs_builddir=$ac_pwd$ac_dir_suffix
1528# for backward compatibility:
1529ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001530
1531case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001532 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001533 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001534 ac_top_srcdir=$ac_top_builddir_sub
1535 ac_abs_top_srcdir=$ac_pwd ;;
1536 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001537 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001538 ac_top_srcdir=$srcdir
1539 ac_abs_top_srcdir=$srcdir ;;
1540 *) # Relative name.
1541 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1542 ac_top_srcdir=$ac_top_build_prefix$srcdir
1543 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001544esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001545ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001546
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001547 cd "$ac_dir" || { ac_status=$?; continue; }
1548 # Check for guested configure.
1549 if test -f "$ac_srcdir/configure.gnu"; then
1550 echo &&
1551 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1552 elif test -f "$ac_srcdir/configure"; then
1553 echo &&
1554 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001555 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001556 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001557 fi || ac_status=$?
1558 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001559 done
1560fi
1561
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001562test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001563if $ac_init_version; then
1564 cat <<\_ACEOF
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001565python configure 3.3
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001566generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001567
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001568Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001569This configure script is free software; the Free Software Foundation
1570gives unlimited permission to copy, distribute and modify it.
1571_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001572 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001573fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001574
1575## ------------------------ ##
1576## Autoconf initialization. ##
1577## ------------------------ ##
1578
1579# ac_fn_c_try_compile LINENO
1580# --------------------------
1581# Try to compile conftest.$ac_ext, and return whether this succeeded.
1582ac_fn_c_try_compile ()
1583{
1584 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1585 rm -f conftest.$ac_objext
1586 if { { ac_try="$ac_compile"
1587case "(($ac_try" in
1588 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1589 *) ac_try_echo=$ac_try;;
1590esac
1591eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1592$as_echo "$ac_try_echo"; } >&5
1593 (eval "$ac_compile") 2>conftest.err
1594 ac_status=$?
1595 if test -s conftest.err; then
1596 grep -v '^ *+' conftest.err >conftest.er1
1597 cat conftest.er1 >&5
1598 mv -f conftest.er1 conftest.err
1599 fi
1600 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1601 test $ac_status = 0; } && {
1602 test -z "$ac_c_werror_flag" ||
1603 test ! -s conftest.err
1604 } && test -s conftest.$ac_objext; then :
1605 ac_retval=0
1606else
1607 $as_echo "$as_me: failed program was:" >&5
1608sed 's/^/| /' conftest.$ac_ext >&5
1609
1610 ac_retval=1
1611fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001612 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001613 as_fn_set_status $ac_retval
1614
1615} # ac_fn_c_try_compile
1616
Matthias Kloseb9621712010-04-24 17:59:49 +00001617# ac_fn_c_try_link LINENO
1618# -----------------------
1619# Try to link conftest.$ac_ext, and return whether this succeeded.
1620ac_fn_c_try_link ()
1621{
1622 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1623 rm -f conftest.$ac_objext conftest$ac_exeext
1624 if { { ac_try="$ac_link"
1625case "(($ac_try" in
1626 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1627 *) ac_try_echo=$ac_try;;
1628esac
1629eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1630$as_echo "$ac_try_echo"; } >&5
1631 (eval "$ac_link") 2>conftest.err
1632 ac_status=$?
1633 if test -s conftest.err; then
1634 grep -v '^ *+' conftest.err >conftest.er1
1635 cat conftest.er1 >&5
1636 mv -f conftest.er1 conftest.err
1637 fi
1638 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1639 test $ac_status = 0; } && {
1640 test -z "$ac_c_werror_flag" ||
1641 test ! -s conftest.err
1642 } && test -s conftest$ac_exeext && {
1643 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001644 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001645 }; then :
1646 ac_retval=0
1647else
1648 $as_echo "$as_me: failed program was:" >&5
1649sed 's/^/| /' conftest.$ac_ext >&5
1650
1651 ac_retval=1
1652fi
1653 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1654 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1655 # interfere with the next link command; also delete a directory that is
1656 # left behind by Apple's compiler. We do this before executing the actions.
1657 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001658 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001659 as_fn_set_status $ac_retval
1660
1661} # ac_fn_c_try_link
1662
Matthias Kloseb9621712010-04-24 17:59:49 +00001663# ac_fn_c_try_cpp LINENO
1664# ----------------------
1665# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1666ac_fn_c_try_cpp ()
1667{
1668 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1669 if { { ac_try="$ac_cpp conftest.$ac_ext"
1670case "(($ac_try" in
1671 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1672 *) ac_try_echo=$ac_try;;
1673esac
1674eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1675$as_echo "$ac_try_echo"; } >&5
1676 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1677 ac_status=$?
1678 if test -s conftest.err; then
1679 grep -v '^ *+' conftest.err >conftest.er1
1680 cat conftest.er1 >&5
1681 mv -f conftest.er1 conftest.err
1682 fi
1683 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001684 test $ac_status = 0; } > conftest.i && {
Matthias Kloseb9621712010-04-24 17:59:49 +00001685 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1686 test ! -s conftest.err
1687 }; then :
1688 ac_retval=0
1689else
1690 $as_echo "$as_me: failed program was:" >&5
1691sed 's/^/| /' conftest.$ac_ext >&5
1692
1693 ac_retval=1
1694fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001695 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001696 as_fn_set_status $ac_retval
1697
1698} # ac_fn_c_try_cpp
1699
1700# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1701# -------------------------------------------------------
1702# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1703# the include files in INCLUDES and setting the cache variable VAR
1704# accordingly.
1705ac_fn_c_check_header_mongrel ()
1706{
1707 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001708 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001709 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1710$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001711if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001712 $as_echo_n "(cached) " >&6
1713fi
1714eval ac_res=\$$3
1715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1716$as_echo "$ac_res" >&6; }
1717else
1718 # Is the header compilable?
1719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1720$as_echo_n "checking $2 usability... " >&6; }
1721cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1722/* end confdefs.h. */
1723$4
1724#include <$2>
1725_ACEOF
1726if ac_fn_c_try_compile "$LINENO"; then :
1727 ac_header_compiler=yes
1728else
1729 ac_header_compiler=no
1730fi
1731rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1732{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1733$as_echo "$ac_header_compiler" >&6; }
1734
1735# Is the header present?
1736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1737$as_echo_n "checking $2 presence... " >&6; }
1738cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1739/* end confdefs.h. */
1740#include <$2>
1741_ACEOF
1742if ac_fn_c_try_cpp "$LINENO"; then :
1743 ac_header_preproc=yes
1744else
1745 ac_header_preproc=no
1746fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001747rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001748{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1749$as_echo "$ac_header_preproc" >&6; }
1750
1751# So? What about this header?
1752case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1753 yes:no: )
1754 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1755$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1756 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1757$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1758 ;;
1759 no:yes:* )
1760 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1761$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1762 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1763$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1764 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1765$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1766 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1767$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1768 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1769$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001770( $as_echo "## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001771## Report this to http://bugs.python.org/ ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001772## -------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001773 ) | sed "s/^/$as_me: WARNING: /" >&2
1774 ;;
1775esac
1776 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1777$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001778if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001779 $as_echo_n "(cached) " >&6
1780else
1781 eval "$3=\$ac_header_compiler"
1782fi
1783eval ac_res=\$$3
1784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1785$as_echo "$ac_res" >&6; }
1786fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001787 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001788
1789} # ac_fn_c_check_header_mongrel
1790
1791# ac_fn_c_try_run LINENO
1792# ----------------------
1793# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1794# that executables *can* be run.
1795ac_fn_c_try_run ()
1796{
1797 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1798 if { { ac_try="$ac_link"
1799case "(($ac_try" in
1800 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1801 *) ac_try_echo=$ac_try;;
1802esac
1803eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1804$as_echo "$ac_try_echo"; } >&5
1805 (eval "$ac_link") 2>&5
1806 ac_status=$?
1807 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1808 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1809 { { case "(($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_try") 2>&5
1816 ac_status=$?
1817 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1818 test $ac_status = 0; }; }; then :
1819 ac_retval=0
1820else
1821 $as_echo "$as_me: program exited with status $ac_status" >&5
1822 $as_echo "$as_me: failed program was:" >&5
1823sed 's/^/| /' conftest.$ac_ext >&5
1824
1825 ac_retval=$ac_status
1826fi
1827 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001828 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001829 as_fn_set_status $ac_retval
1830
1831} # ac_fn_c_try_run
1832
1833# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1834# -------------------------------------------------------
1835# Tests whether HEADER exists and can be compiled using the include files in
1836# INCLUDES, setting the cache variable VAR accordingly.
1837ac_fn_c_check_header_compile ()
1838{
1839 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1840 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1841$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001842if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001843 $as_echo_n "(cached) " >&6
1844else
1845 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1846/* end confdefs.h. */
1847$4
1848#include <$2>
1849_ACEOF
1850if ac_fn_c_try_compile "$LINENO"; then :
1851 eval "$3=yes"
1852else
1853 eval "$3=no"
1854fi
1855rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1856fi
1857eval ac_res=\$$3
1858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1859$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001860 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001861
1862} # ac_fn_c_check_header_compile
1863
Matthias Kloseb9621712010-04-24 17:59:49 +00001864# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1865# -------------------------------------------
1866# Tests whether TYPE exists after having included INCLUDES, setting cache
1867# variable VAR accordingly.
1868ac_fn_c_check_type ()
1869{
1870 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1871 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1872$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001873if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001874 $as_echo_n "(cached) " >&6
1875else
1876 eval "$3=no"
1877 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1878/* end confdefs.h. */
1879$4
1880int
1881main ()
1882{
1883if (sizeof ($2))
1884 return 0;
1885 ;
1886 return 0;
1887}
1888_ACEOF
1889if ac_fn_c_try_compile "$LINENO"; then :
1890 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1891/* end confdefs.h. */
1892$4
1893int
1894main ()
1895{
1896if (sizeof (($2)))
1897 return 0;
1898 ;
1899 return 0;
1900}
1901_ACEOF
1902if ac_fn_c_try_compile "$LINENO"; then :
1903
1904else
1905 eval "$3=yes"
1906fi
1907rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1908fi
1909rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1910fi
1911eval ac_res=\$$3
1912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1913$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001914 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001915
1916} # ac_fn_c_check_type
1917
1918# ac_fn_c_find_uintX_t LINENO BITS VAR
1919# ------------------------------------
1920# Finds an unsigned integer type with width BITS, setting cache variable VAR
1921# accordingly.
1922ac_fn_c_find_uintX_t ()
1923{
1924 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1925 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1926$as_echo_n "checking for uint$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001927if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001928 $as_echo_n "(cached) " >&6
1929else
1930 eval "$3=no"
1931 # Order is important - never check a type that is potentially smaller
1932 # than half of the expected target width.
1933 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1934 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1935 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1936/* end confdefs.h. */
1937$ac_includes_default
1938int
1939main ()
1940{
1941static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001942test_array [0] = 0;
1943return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00001944
1945 ;
1946 return 0;
1947}
1948_ACEOF
1949if ac_fn_c_try_compile "$LINENO"; then :
1950 case $ac_type in #(
1951 uint$2_t) :
1952 eval "$3=yes" ;; #(
1953 *) :
1954 eval "$3=\$ac_type" ;;
1955esac
1956fi
1957rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001958 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001959
1960else
1961 break
1962fi
1963 done
1964fi
1965eval ac_res=\$$3
1966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1967$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001968 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001969
1970} # ac_fn_c_find_uintX_t
1971
1972# ac_fn_c_find_intX_t LINENO BITS VAR
1973# -----------------------------------
1974# Finds a signed integer type with width BITS, setting cache variable VAR
1975# accordingly.
1976ac_fn_c_find_intX_t ()
1977{
1978 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1979 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1980$as_echo_n "checking for int$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001981if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001982 $as_echo_n "(cached) " >&6
1983else
1984 eval "$3=no"
1985 # Order is important - never check a type that is potentially smaller
1986 # than half of the expected target width.
1987 for ac_type in int$2_t 'int' 'long int' \
1988 'long long int' 'short int' 'signed char'; do
1989 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1990/* end confdefs.h. */
1991$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001992 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001993int
1994main ()
1995{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001996static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001997test_array [0] = 0;
1998return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00001999
2000 ;
2001 return 0;
2002}
2003_ACEOF
2004if ac_fn_c_try_compile "$LINENO"; then :
2005 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2006/* end confdefs.h. */
2007$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002008 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00002009int
2010main ()
2011{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002012static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00002013 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002014test_array [0] = 0;
2015return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002016
2017 ;
2018 return 0;
2019}
2020_ACEOF
2021if ac_fn_c_try_compile "$LINENO"; then :
2022
2023else
2024 case $ac_type in #(
2025 int$2_t) :
2026 eval "$3=yes" ;; #(
2027 *) :
2028 eval "$3=\$ac_type" ;;
2029esac
2030fi
2031rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2032fi
2033rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002034 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002035
2036else
2037 break
2038fi
2039 done
2040fi
2041eval ac_res=\$$3
2042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2043$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002044 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002045
2046} # ac_fn_c_find_intX_t
2047
2048# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2049# --------------------------------------------
2050# Tries to find the compile-time value of EXPR in a program that includes
2051# INCLUDES, setting VAR accordingly. Returns whether the value could be
2052# computed
2053ac_fn_c_compute_int ()
2054{
2055 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2056 if test "$cross_compiling" = yes; then
2057 # Depending upon the size, compute the lo and hi bounds.
2058cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2059/* end confdefs.h. */
2060$4
2061int
2062main ()
2063{
2064static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002065test_array [0] = 0;
2066return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002067
2068 ;
2069 return 0;
2070}
2071_ACEOF
2072if ac_fn_c_try_compile "$LINENO"; then :
2073 ac_lo=0 ac_mid=0
2074 while :; do
2075 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2076/* end confdefs.h. */
2077$4
2078int
2079main ()
2080{
2081static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002082test_array [0] = 0;
2083return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002084
2085 ;
2086 return 0;
2087}
2088_ACEOF
2089if ac_fn_c_try_compile "$LINENO"; then :
2090 ac_hi=$ac_mid; break
2091else
2092 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2093 if test $ac_lo -le $ac_mid; then
2094 ac_lo= ac_hi=
2095 break
2096 fi
2097 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2098fi
2099rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2100 done
2101else
2102 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2103/* end confdefs.h. */
2104$4
2105int
2106main ()
2107{
2108static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002109test_array [0] = 0;
2110return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002111
2112 ;
2113 return 0;
2114}
2115_ACEOF
2116if ac_fn_c_try_compile "$LINENO"; then :
2117 ac_hi=-1 ac_mid=-1
2118 while :; do
2119 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2120/* end confdefs.h. */
2121$4
2122int
2123main ()
2124{
2125static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002126test_array [0] = 0;
2127return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002128
2129 ;
2130 return 0;
2131}
2132_ACEOF
2133if ac_fn_c_try_compile "$LINENO"; then :
2134 ac_lo=$ac_mid; break
2135else
2136 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2137 if test $ac_mid -le $ac_hi; then
2138 ac_lo= ac_hi=
2139 break
2140 fi
2141 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2142fi
2143rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2144 done
2145else
2146 ac_lo= ac_hi=
2147fi
2148rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2149fi
2150rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2151# Binary search between lo and hi bounds.
2152while test "x$ac_lo" != "x$ac_hi"; do
2153 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2154 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2155/* end confdefs.h. */
2156$4
2157int
2158main ()
2159{
2160static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002161test_array [0] = 0;
2162return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002163
2164 ;
2165 return 0;
2166}
2167_ACEOF
2168if ac_fn_c_try_compile "$LINENO"; then :
2169 ac_hi=$ac_mid
2170else
2171 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2172fi
2173rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2174done
2175case $ac_lo in #((
2176?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2177'') ac_retval=1 ;;
2178esac
2179 else
2180 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2181/* end confdefs.h. */
2182$4
2183static long int longval () { return $2; }
2184static unsigned long int ulongval () { return $2; }
2185#include <stdio.h>
2186#include <stdlib.h>
2187int
2188main ()
2189{
2190
2191 FILE *f = fopen ("conftest.val", "w");
2192 if (! f)
2193 return 1;
2194 if (($2) < 0)
2195 {
2196 long int i = longval ();
2197 if (i != ($2))
2198 return 1;
2199 fprintf (f, "%ld", i);
2200 }
2201 else
2202 {
2203 unsigned long int i = ulongval ();
2204 if (i != ($2))
2205 return 1;
2206 fprintf (f, "%lu", i);
2207 }
2208 /* Do not output a trailing newline, as this causes \r\n confusion
2209 on some platforms. */
2210 return ferror (f) || fclose (f) != 0;
2211
2212 ;
2213 return 0;
2214}
2215_ACEOF
2216if ac_fn_c_try_run "$LINENO"; then :
2217 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2218else
2219 ac_retval=1
2220fi
2221rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2222 conftest.$ac_objext conftest.beam conftest.$ac_ext
2223rm -f conftest.val
2224
2225 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002226 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002227 as_fn_set_status $ac_retval
2228
2229} # ac_fn_c_compute_int
2230
2231# ac_fn_c_check_func LINENO FUNC VAR
2232# ----------------------------------
2233# Tests whether FUNC exists, setting the cache variable VAR accordingly
2234ac_fn_c_check_func ()
2235{
2236 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2237 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2238$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002239if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002240 $as_echo_n "(cached) " >&6
2241else
2242 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2243/* end confdefs.h. */
2244/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2245 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2246#define $2 innocuous_$2
2247
2248/* System header to define __stub macros and hopefully few prototypes,
2249 which can conflict with char $2 (); below.
2250 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2251 <limits.h> exists even on freestanding compilers. */
2252
2253#ifdef __STDC__
2254# include <limits.h>
2255#else
2256# include <assert.h>
2257#endif
2258
2259#undef $2
2260
2261/* Override any GCC internal prototype to avoid an error.
2262 Use char because int might match the return type of a GCC
2263 builtin and then its argument prototype would still apply. */
2264#ifdef __cplusplus
2265extern "C"
2266#endif
2267char $2 ();
2268/* The GNU C library defines this for functions which it implements
2269 to always fail with ENOSYS. Some functions are actually named
2270 something starting with __ and the normal name is an alias. */
2271#if defined __stub_$2 || defined __stub___$2
2272choke me
2273#endif
2274
2275int
2276main ()
2277{
2278return $2 ();
2279 ;
2280 return 0;
2281}
2282_ACEOF
2283if ac_fn_c_try_link "$LINENO"; then :
2284 eval "$3=yes"
2285else
2286 eval "$3=no"
2287fi
2288rm -f core conftest.err conftest.$ac_objext \
2289 conftest$ac_exeext conftest.$ac_ext
2290fi
2291eval ac_res=\$$3
2292 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2293$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002294 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002295
2296} # ac_fn_c_check_func
2297
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002298# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2299# ---------------------------------------------
2300# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2301# accordingly.
2302ac_fn_c_check_decl ()
2303{
2304 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2305 as_decl_name=`echo $2|sed 's/ *(.*//'`
2306 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2307 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2308$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2309if eval \${$3+:} false; then :
2310 $as_echo_n "(cached) " >&6
2311else
2312 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2313/* end confdefs.h. */
2314$4
2315int
2316main ()
2317{
2318#ifndef $as_decl_name
2319#ifdef __cplusplus
2320 (void) $as_decl_use;
2321#else
2322 (void) $as_decl_name;
2323#endif
2324#endif
2325
2326 ;
2327 return 0;
2328}
2329_ACEOF
2330if ac_fn_c_try_compile "$LINENO"; then :
2331 eval "$3=yes"
2332else
2333 eval "$3=no"
2334fi
2335rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2336fi
2337eval ac_res=\$$3
2338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2339$as_echo "$ac_res" >&6; }
2340 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2341
2342} # ac_fn_c_check_decl
2343
Matthias Kloseb9621712010-04-24 17:59:49 +00002344# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2345# ----------------------------------------------------
2346# Tries to find if the field MEMBER exists in type AGGR, after including
2347# INCLUDES, setting cache variable VAR accordingly.
2348ac_fn_c_check_member ()
2349{
2350 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2351 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2352$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002353if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002354 $as_echo_n "(cached) " >&6
2355else
2356 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2357/* end confdefs.h. */
2358$5
2359int
2360main ()
2361{
2362static $2 ac_aggr;
2363if (ac_aggr.$3)
2364return 0;
2365 ;
2366 return 0;
2367}
2368_ACEOF
2369if ac_fn_c_try_compile "$LINENO"; then :
2370 eval "$4=yes"
2371else
2372 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2373/* end confdefs.h. */
2374$5
2375int
2376main ()
2377{
2378static $2 ac_aggr;
2379if (sizeof ac_aggr.$3)
2380return 0;
2381 ;
2382 return 0;
2383}
2384_ACEOF
2385if ac_fn_c_try_compile "$LINENO"; then :
2386 eval "$4=yes"
2387else
2388 eval "$4=no"
2389fi
2390rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2391fi
2392rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2393fi
2394eval ac_res=\$$4
2395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2396$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002397 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002398
2399} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002400cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002401This file contains any messages produced by compilers while
2402running configure, to aid debugging if configure makes a mistake.
2403
Georg Brandl3ebb6b32011-02-20 10:37:07 +00002404It was created by python $as_me 3.3, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002405generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002406
2407 $ $0 $@
2408
2409_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002410exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002411{
2412cat <<_ASUNAME
2413## --------- ##
2414## Platform. ##
2415## --------- ##
2416
2417hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2418uname -m = `(uname -m) 2>/dev/null || echo unknown`
2419uname -r = `(uname -r) 2>/dev/null || echo unknown`
2420uname -s = `(uname -s) 2>/dev/null || echo unknown`
2421uname -v = `(uname -v) 2>/dev/null || echo unknown`
2422
2423/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2424/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2425
2426/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2427/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2428/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002429/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002430/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2431/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2432/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2433
2434_ASUNAME
2435
2436as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2437for as_dir in $PATH
2438do
2439 IFS=$as_save_IFS
2440 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002441 $as_echo "PATH: $as_dir"
2442 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002443IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002444
2445} >&5
2446
2447cat >&5 <<_ACEOF
2448
2449
2450## ----------- ##
2451## Core tests. ##
2452## ----------- ##
2453
2454_ACEOF
2455
2456
2457# Keep a trace of the command line.
2458# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002459# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002460# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002461# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002462ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002463ac_configure_args0=
2464ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002465ac_must_keep_next=false
2466for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002467do
Skip Montanaro6dead952003-09-25 14:50:04 +00002468 for ac_arg
2469 do
2470 case $ac_arg in
2471 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2472 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2473 | -silent | --silent | --silen | --sile | --sil)
2474 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002475 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002476 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002477 esac
2478 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002479 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002480 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002481 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002482 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002483 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002484 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002485 case $ac_arg in
2486 *=* | --config-cache | -C | -disable-* | --disable-* \
2487 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2488 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2489 | -with-* | --with-* | -without-* | --without-* | --x)
2490 case "$ac_configure_args0 " in
2491 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2492 esac
2493 ;;
2494 -* ) ac_must_keep_next=true ;;
2495 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002496 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002497 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002498 ;;
2499 esac
2500 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002501done
Matthias Kloseb9621712010-04-24 17:59:49 +00002502{ ac_configure_args0=; unset ac_configure_args0;}
2503{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002504
2505# When interrupted or exit'd, cleanup temporary files, and complete
2506# config.log. We remove comments because anyway the quotes in there
2507# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002508# WARNING: Use '\'' to represent an apostrophe within the trap.
2509# 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 +00002510trap 'exit_status=$?
2511 # Save into config.log some information that might help in debugging.
2512 {
2513 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002514
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002515 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002516## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002517## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002518 echo
2519 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002520(
2521 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2522 eval ac_val=\$$ac_var
2523 case $ac_val in #(
2524 *${as_nl}*)
2525 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002526 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2527$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002528 esac
2529 case $ac_var in #(
2530 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002531 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2532 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002533 esac ;;
2534 esac
2535 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002536 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002537 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2538 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002539 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002540 "s/'\''/'\''\\\\'\'''\''/g;
2541 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2542 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002543 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002544 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002545 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002546 esac |
2547 sort
2548)
Martin v. Löwis11437992002-04-12 09:54:03 +00002549 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002550
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002551 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002552## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002553## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002554 echo
2555 for ac_var in $ac_subst_vars
2556 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002557 eval ac_val=\$$ac_var
2558 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002559 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002560 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002561 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002562 done | sort
2563 echo
2564
2565 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002566 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002567## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002568## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002569 echo
2570 for ac_var in $ac_subst_files
2571 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002572 eval ac_val=\$$ac_var
2573 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002574 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002575 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002576 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002577 done | sort
2578 echo
2579 fi
2580
Martin v. Löwis11437992002-04-12 09:54:03 +00002581 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002582 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002583## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002584## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002585 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002586 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002587 echo
2588 fi
2589 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002590 $as_echo "$as_me: caught signal $ac_signal"
2591 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002592 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002593 rm -f core *.core core.conftest.* &&
2594 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002595 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002596' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002597for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002598 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002599done
2600ac_signal=0
2601
2602# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002603rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002604
Matthias Kloseb9621712010-04-24 17:59:49 +00002605$as_echo "/* confdefs.h */" > confdefs.h
2606
Martin v. Löwis11437992002-04-12 09:54:03 +00002607# Predefined preprocessor variables.
2608
2609cat >>confdefs.h <<_ACEOF
2610#define PACKAGE_NAME "$PACKAGE_NAME"
2611_ACEOF
2612
Martin v. Löwis11437992002-04-12 09:54:03 +00002613cat >>confdefs.h <<_ACEOF
2614#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2615_ACEOF
2616
Martin v. Löwis11437992002-04-12 09:54:03 +00002617cat >>confdefs.h <<_ACEOF
2618#define PACKAGE_VERSION "$PACKAGE_VERSION"
2619_ACEOF
2620
Martin v. Löwis11437992002-04-12 09:54:03 +00002621cat >>confdefs.h <<_ACEOF
2622#define PACKAGE_STRING "$PACKAGE_STRING"
2623_ACEOF
2624
Martin v. Löwis11437992002-04-12 09:54:03 +00002625cat >>confdefs.h <<_ACEOF
2626#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2627_ACEOF
2628
Matthias Kloseb9621712010-04-24 17:59:49 +00002629cat >>confdefs.h <<_ACEOF
2630#define PACKAGE_URL "$PACKAGE_URL"
2631_ACEOF
2632
Martin v. Löwis11437992002-04-12 09:54:03 +00002633
2634# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002635# Prefer an explicitly selected file to automatically selected ones.
2636ac_site_file1=NONE
2637ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002638if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002639 # We do not want a PATH search for config.site.
2640 case $CONFIG_SITE in #((
2641 -*) ac_site_file1=./$CONFIG_SITE;;
2642 */*) ac_site_file1=$CONFIG_SITE;;
2643 *) ac_site_file1=./$CONFIG_SITE;;
2644 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002645elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002646 ac_site_file1=$prefix/share/config.site
2647 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002648else
Matthias Kloseb9621712010-04-24 17:59:49 +00002649 ac_site_file1=$ac_default_prefix/share/config.site
2650 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002651fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002652for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002653do
Matthias Kloseb9621712010-04-24 17:59:49 +00002654 test "x$ac_site_file" = xNONE && continue
2655 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2656 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2657$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002658 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002659 . "$ac_site_file" \
2660 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2661$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2662as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002663See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002664 fi
2665done
2666
2667if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002668 # Some versions of bash will fail to source /dev/null (special files
2669 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2670 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2671 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2672$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002673 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002674 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2675 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002676 esac
2677 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002678else
Matthias Kloseb9621712010-04-24 17:59:49 +00002679 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2680$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002681 >$cache_file
2682fi
2683
2684# Check that the precious variables saved in the cache have kept the same
2685# value.
2686ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002687for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002688 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2689 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002690 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2691 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002692 case $ac_old_set,$ac_new_set in
2693 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002694 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2695$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 +00002696 ac_cache_corrupted=: ;;
2697 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002698 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2699$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002700 ac_cache_corrupted=: ;;
2701 ,);;
2702 *)
2703 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002704 # differences in whitespace do not lead to failure.
2705 ac_old_val_w=`echo x $ac_old_val`
2706 ac_new_val_w=`echo x $ac_new_val`
2707 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2708 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2709$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2710 ac_cache_corrupted=:
2711 else
2712 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2713$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2714 eval $ac_var=\$ac_old_val
2715 fi
2716 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2717$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2718 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2719$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002720 fi;;
2721 esac
2722 # Pass precious variables to config.status.
2723 if test "$ac_new_set" = set; then
2724 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002725 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002726 *) ac_arg=$ac_var=$ac_new_val ;;
2727 esac
2728 case " $ac_configure_args " in
2729 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002730 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002731 esac
2732 fi
2733done
2734if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002735 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2736$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2737 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2738$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002739 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002740fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002741## -------------------- ##
2742## Main body of script. ##
2743## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002744
Guido van Rossum7f43da71994-08-01 12:15:30 +00002745ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002746ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002747ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2748ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2749ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002750
Guido van Rossum627b2d71993-12-24 10:39:16 +00002751
Michael W. Hudson54241132001-12-07 15:38:26 +00002752
Trent Nelson4d4ec652012-10-16 08:51:24 -04002753
Trent Nelson5595ab52012-10-17 04:47:31 -04002754if test "$abs_srcdir" != "$abs_builddir"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002755 # If we're building out-of-tree, we need to make sure the following
2756 # resources get picked up before their $srcdir counterparts.
2757 # Objects/ -> typeslots.inc
2758 # Include/ -> Python-ast.h, graminit.h
2759 # Python/ -> importlib.h
2760 # (A side effect of this is that these resources will automatically be
2761 # regenerated when building out-of-tree, regardless of whether or not
2762 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2763 # off.)
2764 BASECPPFLAGS="-IObjects -IInclude -IPython"
2765else
2766 BASECPPFLAGS=""
2767fi
2768
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002769
2770
2771
2772
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002773if test -e $srcdir/.hg/dirstate
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002774then
2775# Extract the first word of "hg", so it can be a program name with args.
2776set dummy hg; ac_word=$2
2777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2778$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002779if ${ac_cv_prog_HAS_HG+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002780 $as_echo_n "(cached) " >&6
2781else
2782 if test -n "$HAS_HG"; then
2783 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
2784else
2785as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2786for as_dir in $PATH
2787do
2788 IFS=$as_save_IFS
2789 test -z "$as_dir" && as_dir=.
2790 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002791 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002792 ac_cv_prog_HAS_HG="found"
2793 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2794 break 2
2795 fi
2796done
2797 done
2798IFS=$as_save_IFS
2799
2800 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
2801fi
2802fi
2803HAS_HG=$ac_cv_prog_HAS_HG
2804if test -n "$HAS_HG"; then
2805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
2806$as_echo "$HAS_HG" >&6; }
2807else
2808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2809$as_echo "no" >&6; }
2810fi
2811
2812
2813else
2814HAS_HG=no-repository
2815fi
2816if test $HAS_HG = found
2817then
2818 HGVERSION="hg id -i \$(srcdir)"
2819 HGTAG="hg id -t \$(srcdir)"
2820 HGBRANCH="hg id -b \$(srcdir)"
2821else
2822 HGVERSION=""
2823 HGTAG=""
2824 HGBRANCH=""
2825fi
2826
2827
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002828ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002829
2830
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002831ac_aux_dir=
2832for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2833 if test -f "$ac_dir/install-sh"; then
2834 ac_aux_dir=$ac_dir
2835 ac_install_sh="$ac_aux_dir/install-sh -c"
2836 break
2837 elif test -f "$ac_dir/install.sh"; then
2838 ac_aux_dir=$ac_dir
2839 ac_install_sh="$ac_aux_dir/install.sh -c"
2840 break
2841 elif test -f "$ac_dir/shtool"; then
2842 ac_aux_dir=$ac_dir
2843 ac_install_sh="$ac_aux_dir/shtool install -c"
2844 break
2845 fi
2846done
2847if test -z "$ac_aux_dir"; then
2848 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2849fi
2850
2851# These three variables are undocumented and unsupported,
2852# and are intended to be withdrawn in a future Autoconf release.
2853# They can cause serious problems if a builder's source tree is in a directory
2854# whose full name contains unusual characters.
2855ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2856ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2857ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2858
2859
2860# Make sure we can run config.sub.
2861$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2862 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2863
2864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2865$as_echo_n "checking build system type... " >&6; }
2866if ${ac_cv_build+:} false; then :
2867 $as_echo_n "(cached) " >&6
2868else
2869 ac_build_alias=$build_alias
2870test "x$ac_build_alias" = x &&
2871 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2872test "x$ac_build_alias" = x &&
2873 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2874ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2875 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2876
2877fi
2878{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2879$as_echo "$ac_cv_build" >&6; }
2880case $ac_cv_build in
2881*-*-*) ;;
2882*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2883esac
2884build=$ac_cv_build
2885ac_save_IFS=$IFS; IFS='-'
2886set x $ac_cv_build
2887shift
2888build_cpu=$1
2889build_vendor=$2
2890shift; shift
2891# Remember, the first character of IFS is used to create $*,
2892# except with old shells:
2893build_os=$*
2894IFS=$ac_save_IFS
2895case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2896
2897
2898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2899$as_echo_n "checking host system type... " >&6; }
2900if ${ac_cv_host+:} false; then :
2901 $as_echo_n "(cached) " >&6
2902else
2903 if test "x$host_alias" = x; then
2904 ac_cv_host=$ac_cv_build
2905else
2906 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2907 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2908fi
2909
2910fi
2911{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2912$as_echo "$ac_cv_host" >&6; }
2913case $ac_cv_host in
2914*-*-*) ;;
2915*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2916esac
2917host=$ac_cv_host
2918ac_save_IFS=$IFS; IFS='-'
2919set x $ac_cv_host
2920shift
2921host_cpu=$1
2922host_vendor=$2
2923shift; shift
2924# Remember, the first character of IFS is used to create $*,
2925# except with old shells:
2926host_os=$*
2927IFS=$ac_save_IFS
2928case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2929
2930
2931
doko@python.orga10e4a92013-01-25 18:45:12 +01002932
2933
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002934if test "$cross_compiling" = yes; then
2935 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2936$as_echo_n "checking for python interpreter for cross build... " >&6; }
2937 if test -z "$PYTHON_FOR_BUILD"; then
2938 for interp in python$PACKAGE_VERSION python3 python; do
2939 which $interp >/dev/null 2>&1 || continue
2940 if $interp -c 'import sys;sys.exit(not sys.version_info[:2] >= (3,3))'; then
2941 break
2942 fi
2943 interp=
2944 done
2945 if test x$interp = x; then
2946 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2947 fi
2948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2949$as_echo "$interp" >&6; }
doko@python.org244b6872013-01-26 12:08:25 +01002950 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 +02002951 fi
Christian Heimes954ac032012-12-12 13:10:21 +01002952elif test "$cross_compiling" = maybe; then
2953 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002954else
2955 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2956fi
2957
2958
Martin v. Löwis11437992002-04-12 09:54:03 +00002959
Benjamin Petersond23f8222009-04-05 19:13:16 +00002960if test "$prefix" != "/"; then
2961 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2962fi
2963
2964
Martin v. Löwis11437992002-04-12 09:54:03 +00002965
2966
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002967# We don't use PACKAGE_ variables, and they cause conflicts
2968# with other autoconf-based packages that include Python.h
2969grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2970rm confdefs.h
2971mv confdefs.h.new confdefs.h
2972
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002973
Georg Brandl3ebb6b32011-02-20 10:37:07 +00002974VERSION=3.3
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002975
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002976# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002977
2978SOVERSION=1.0
2979
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002980# The later defininition of _XOPEN_SOURCE disables certain features
2981# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2982
Matthias Kloseb9621712010-04-24 17:59:49 +00002983$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002984
2985
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002986# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2987# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2988# them.
2989
Matthias Kloseb9621712010-04-24 17:59:49 +00002990$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002991
2992
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002993# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2994# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2995# them.
2996
Matthias Kloseb9621712010-04-24 17:59:49 +00002997$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002998
2999
Martin v. Löwisd6320502004-08-12 13:45:08 +00003000# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3001# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
3002
Matthias Kloseb9621712010-04-24 17:59:49 +00003003$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00003004
3005
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003006# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3007# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
3008# them.
3009
Matthias Kloseb9621712010-04-24 17:59:49 +00003010$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003011
3012
3013
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003014define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003015
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003016# Arguments passed to configure.
3017
3018CONFIG_ARGS="$ac_configure_args"
3019
Matthias Kloseb9621712010-04-24 17:59:49 +00003020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3021$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003022# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003023if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003024 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003025 case $enableval in
3026 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07003027 # Locate the best usable SDK, see Mac/README.txt for more
3028 # information
3029 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
3030 if test -z "${enableval}"
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003031 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003032 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3033 if test ! -d "${enableval}"
3034 then
3035 enableval=/
3036 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003037 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003038 ;;
3039 esac
3040 case $enableval in
3041 no)
3042 UNIVERSALSDK=
3043 enable_universalsdk=
3044 ;;
3045 *)
3046 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003047 if test ! -d "${UNIVERSALSDK}"
3048 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003049 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003050 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003051 ;;
3052 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003053
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003054
Thomas Wouters477c8d52006-05-27 19:21:47 +00003055else
3056
3057 UNIVERSALSDK=
3058 enable_universalsdk=
3059
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003060fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003061
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003062if test -n "${UNIVERSALSDK}"
3063then
Matthias Kloseb9621712010-04-24 17:59:49 +00003064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3065$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003066else
Matthias Kloseb9621712010-04-24 17:59:49 +00003067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3068$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003069fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003070
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003071
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003072
3073
Ned Deilycbfb9a52012-06-23 16:02:19 -07003074# For backward compatibility reasons we prefer to select '32-bit' if available,
3075# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003076UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003077if test "`uname -s`" = "Darwin"
3078then
3079 if test -n "${UNIVERSALSDK}"
3080 then
3081 if test -z "`/usr/bin/file "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
3082 then
3083 UNIVERSAL_ARCHS="intel"
3084 fi
3085 fi
3086fi
3087
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003088
Matthias Kloseb9621712010-04-24 17:59:49 +00003089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3090$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003091
3092# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003093if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003094 withval=$with_universal_archs;
Matthias Kloseb9621712010-04-24 17:59:49 +00003095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
3096$as_echo "$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003097 UNIVERSAL_ARCHS="$withval"
3098
3099else
3100
Ned Deilycbfb9a52012-06-23 16:02:19 -07003101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3102$as_echo "${UNIVERSAL_ARCHS}" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003103
3104fi
3105
3106
3107
3108
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003109
3110# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003111if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003112 withval=$with_framework_name;
3113 PYTHONFRAMEWORK=${withval}
3114 PYTHONFRAMEWORKDIR=${withval}.framework
3115 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3116
3117else
3118
3119 PYTHONFRAMEWORK=Python
3120 PYTHONFRAMEWORKDIR=Python.framework
3121 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3122
3123fi
3124
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003125# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003126if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003127 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003128 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003129 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003130 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003131 esac
3132 case $enableval in
3133 no)
3134 PYTHONFRAMEWORK=
3135 PYTHONFRAMEWORKDIR=no-framework
3136 PYTHONFRAMEWORKPREFIX=
3137 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003138 FRAMEWORKINSTALLFIRST=
3139 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003140 FRAMEWORKALTINSTALLFIRST=
3141 FRAMEWORKALTINSTALLLAST=
3142 if test "x${prefix}" = "xNONE"; then
3143 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3144 else
3145 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3146 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003147 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003148 ;;
3149 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003150 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003151 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003152 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003153 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003154 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3155 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003156 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003157
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003158 if test "x${prefix}" = "xNONE" ; then
3159 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003160
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003161 else
3162 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3163 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003164
3165 case "${enableval}" in
3166 /System*)
3167 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3168 if test "${prefix}" = "NONE" ; then
3169 # See below
3170 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3171 fi
3172 ;;
3173
3174 /Library*)
3175 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3176 ;;
3177
3178 */Library/Frameworks)
3179 MDIR="`dirname "${enableval}"`"
3180 MDIR="`dirname "${MDIR}"`"
3181 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3182
3183 if test "${prefix}" = "NONE"; then
3184 # User hasn't specified the
3185 # --prefix option, but wants to install
3186 # the framework in a non-default location,
3187 # ensure that the compatibility links get
3188 # installed relative to that prefix as well
3189 # instead of in /usr/local.
3190 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3191 fi
3192 ;;
3193
3194 *)
3195 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3196 ;;
3197 esac
3198
Jack Jansen127e56e2001-09-11 14:41:54 +00003199 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003200
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003201 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003202 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003203 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003204
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003205 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003206
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003207 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3208
3209 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3210
Jack Jansene578a632001-08-15 01:27:14 +00003211 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003212
Guido van Rossum563e7081996-09-10 18:20:48 +00003213else
Martin v. Löwis11437992002-04-12 09:54:03 +00003214
Jack Jansene578a632001-08-15 01:27:14 +00003215 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003216 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003217 PYTHONFRAMEWORKPREFIX=
3218 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003219 FRAMEWORKINSTALLFIRST=
3220 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003221 FRAMEWORKALTINSTALLFIRST=
3222 FRAMEWORKALTINSTALLLAST=
3223 if test "x${prefix}" = "xNONE" ; then
3224 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3225 else
3226 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3227 fi
Jack Jansene578a632001-08-15 01:27:14 +00003228 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003229
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003230
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003231fi
3232
Thomas Wouters477c8d52006-05-27 19:21:47 +00003233
3234
Michael W. Hudson54241132001-12-07 15:38:26 +00003235
3236
3237
3238
Jack Jansene578a632001-08-15 01:27:14 +00003239
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003240
3241
3242
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003243
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003244
Jack Jansene578a632001-08-15 01:27:14 +00003245##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003246## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003247## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003248##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003249# Set name for machine-dependent library files
3250
Matthias Kloseb9621712010-04-24 17:59:49 +00003251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3252$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003253if test -z "$MACHDEP"
3254then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003255 # avoid using uname for cross builds
3256 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003257 # ac_sys_system and ac_sys_release are used for setting
3258 # a lot of different things including 'define_xopen_source'
3259 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003260 case "$host" in
3261 *-*-linux*)
3262 ac_sys_system=Linux
3263 ;;
3264 *-*-cygwin*)
3265 ac_sys_system=Cygwin
3266 ;;
3267 *)
3268 # for now, limit cross builds to known configurations
3269 MACHDEP="unknown"
3270 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3271 esac
3272 ac_sys_release=
3273 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003274 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003275 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003276 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003277 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003278 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003279 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003280 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003281 fi
3282 ac_md_system=`echo $ac_sys_system |
3283 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3284 ac_md_release=`echo $ac_sys_release |
3285 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3286 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003287
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003288 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003289 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003290 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003291 darwin*) MACHDEP="darwin";;
doko@ubuntu.comba015832012-06-30 16:52:05 +02003292 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003293 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003294 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003295fi
Guido van Rossum91922671997-10-09 20:24:13 +00003296
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003297
3298if test "$cross_compiling" = yes; then
3299 case "$host" in
3300 *-*-linux*)
3301 case "$host_cpu" in
3302 arm*)
3303 _host_cpu=arm
3304 ;;
3305 *)
3306 _host_cpu=$host_cpu
3307 esac
3308 ;;
3309 *-*-cygwin*)
3310 _host_cpu=
3311 ;;
3312 *)
3313 # for now, limit cross builds to known configurations
3314 MACHDEP="unknown"
3315 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3316 esac
3317 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3318fi
3319
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003320# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3321# disable features if it is defined, without any means to access these
3322# features as extensions. For these systems, we skip the definition of
3323# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3324# some feature, make sure there is no alternative way to access this
3325# feature. Also, when using wildcards, make sure you have verified the
3326# need for not defining _XOPEN_SOURCE on all systems matching the
3327# wildcard, and that the wildcard does not include future systems
3328# (which may remove their limitations).
3329case $ac_sys_system/$ac_sys_release in
3330 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3331 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003332 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003333 # In addition, Stefan Krah confirms that issue #1244610 exists through
3334 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003335 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003336 define_xopen_source=no
3337 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3338 # also defined. This can be overridden by defining _BSD_SOURCE
3339 # As this has a different meaning on Linux, only define it on OpenBSD
3340
Matthias Kloseb9621712010-04-24 17:59:49 +00003341$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003342
3343 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003344 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003345 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3346 # also defined. This can be overridden by defining _BSD_SOURCE
3347 # As this has a different meaning on Linux, only define it on OpenBSD
3348
Matthias Kloseb9621712010-04-24 17:59:49 +00003349$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003350
3351 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003352 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3353 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3354 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003355 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 +00003356 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003357 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3358 # request to enable features supported by the standard as a request
3359 # to disable features not supported by the standard. The best way
3360 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3361 # entirely and define __EXTENSIONS__ instead.
3362 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003363 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003364 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3365 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003366 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003367 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003368 define_xopen_source=no;;
3369 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003370 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003371 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003372 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003373 # On FreeBSD 4, the math functions C89 does not cover are never defined
3374 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3375 FreeBSD/4.*)
3376 define_xopen_source=no;;
3377 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3378 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3379 # identifies itself as Darwin/7.*
3380 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3381 # disables platform specific features beyond repair.
3382 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3383 # has no effect, don't bother defining them
3384 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003385 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003386 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003387 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003388 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3389 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3390 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003391 AIX/4)
3392 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003393 AIX/5)
3394 if test `uname -r` -eq 1; then
3395 define_xopen_source=no
3396 fi
3397 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003398 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3399 # defining NI_NUMERICHOST.
3400 QNX/6.3.2)
3401 define_xopen_source=no
3402 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003403
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003404esac
3405
3406if test $define_xopen_source = yes
3407then
Victor Stinner14d098d2011-09-07 22:29:43 +02003408 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003409
Victor Stinner14d098d2011-09-07 22:29:43 +02003410$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003411
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003412
3413 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3414 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3415 # several APIs are not declared. Since this is also needed in some
3416 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003417
Matthias Kloseb9621712010-04-24 17:59:49 +00003418$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003419
3420
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003421
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003422$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003423
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003424fi
3425
Guido van Rossum91922671997-10-09 20:24:13 +00003426#
3427# SGI compilers allow the specification of the both the ABI and the
3428# ISA on the command line. Depending on the values of these switches,
3429# different and often incompatable code will be generated.
3430#
3431# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3432# thus supply support for various ABI/ISA combinations. The MACHDEP
3433# variable is also adjusted.
3434#
3435
3436if test ! -z "$SGI_ABI"
3437then
3438 CC="cc $SGI_ABI"
3439 LDFLAGS="$SGI_ABI $LDFLAGS"
3440 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3441fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003442{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3443$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003444
Jack Jansen6b08a402004-06-03 12:41:45 +00003445# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3446# it may influence the way we can build extensions, so distutils
3447# needs to check it
3448
Thomas Wouters477c8d52006-05-27 19:21:47 +00003449
Jack Jansen6b08a402004-06-03 12:41:45 +00003450CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003451EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003452
Guido van Rossum627b2d71993-12-24 10:39:16 +00003453# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003454
3455# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3456# for debug/optimization stuff. BASECFLAGS is for flags that are required
3457# just to get things to compile and link. Users are free to override OPT
3458# when running configure or make. The build should not break if they do.
3459# BASECFLAGS should generally not be messed with, however.
3460
3461# XXX shouldn't some/most/all of this code be merged with the stuff later
3462# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3464$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003465
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003466# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003467if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003468 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003469 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003470 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003471 without_gcc=yes;;
3472 yes) CC=gcc
3473 without_gcc=no;;
3474 *) CC=$withval
3475 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003476 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003477else
Martin v. Löwis11437992002-04-12 09:54:03 +00003478
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003479 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003480 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003481 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003482 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003483 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003484fi
3485
Matthias Kloseb9621712010-04-24 17:59:49 +00003486{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3487$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003488
Guido van Rossum8b131c51995-03-09 14:10:13 +00003489# If the user switches compilers, we can't believe the cache
3490if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3491then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003492 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003493(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003494fi
3495
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003496# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3497# when the compiler supports them, but we don't always want -O2, and
3498# we set -g later.
3499if test -z "$CFLAGS"; then
3500 CFLAGS=
3501fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003502
3503if test "$ac_sys_system" = "Darwin"
3504then
3505 # Compiler selection on MacOSX is more complicated than
3506 # AC_PROG_CC can handle, see Mac/README.txt for more
3507 # information
3508 if test -z "${CC}"
3509 then
3510 found_gcc=
3511 found_clang=
3512 as_save_IFS=$IFS; IFS=:
3513 for as_dir in $PATH
3514 do
3515 IFS=$as_save_IFS
3516 if test -x $as_dir/gcc; then
3517 if test -z "${found_gcc}"; then
3518 found_gcc=$as_dir/gcc
3519 fi
3520 fi
3521 if test -x $as_dir/clang; then
3522 if test -z "${found_clang}"; then
3523 found_clang=$as_dir/clang
3524 fi
3525 fi
3526 done
3527 IFS=$as_save_IFS
3528
3529 if test -n "$found_gcc" -a -n "$found_clang"
3530 then
3531 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3532 then
3533 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3534$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3535 CC="$found_clang"
3536 CXX="$found_clang++"
3537 fi
3538
3539
3540 elif test -z "$found_gcc" -a -n "$found_clang"
3541 then
3542 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3543$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3544 CC="$found_clang"
3545 CXX="$found_clang++"
3546
3547 elif test -z "$found_gcc" -a -z "$found_clang"
3548 then
3549 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3550 if test -n "${found_clang}"
3551 then
3552 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3553$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3554 CC="${found_clang}"
3555 CXX="`/usr/bin/xcrun -find clang++`"
3556
3557 # else: use default behaviour
3558 fi
3559 fi
3560 fi
3561fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003562ac_ext=c
3563ac_cpp='$CPP $CPPFLAGS'
3564ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3565ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3566ac_compiler_gnu=$ac_cv_c_compiler_gnu
3567if test -n "$ac_tool_prefix"; then
3568 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3569set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3571$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003572if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003573 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003574else
3575 if test -n "$CC"; then
3576 ac_cv_prog_CC="$CC" # Let the user override the test.
3577else
Martin v. Löwis11437992002-04-12 09:54:03 +00003578as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3579for as_dir in $PATH
3580do
3581 IFS=$as_save_IFS
3582 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003583 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003584 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003585 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003586 $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 +00003587 break 2
3588 fi
3589done
Matthias Kloseb9621712010-04-24 17:59:49 +00003590 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003591IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003592
Jack Jansendd19cf82001-12-06 22:36:17 +00003593fi
3594fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003595CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003596if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3598$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003599else
Matthias Kloseb9621712010-04-24 17:59:49 +00003600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3601$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003602fi
3603
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003604
Martin v. Löwis11437992002-04-12 09:54:03 +00003605fi
3606if test -z "$ac_cv_prog_CC"; then
3607 ac_ct_CC=$CC
3608 # Extract the first word of "gcc", so it can be a program name with args.
3609set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3611$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003612if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003613 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003614else
3615 if test -n "$ac_ct_CC"; then
3616 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3617else
3618as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3619for as_dir in $PATH
3620do
3621 IFS=$as_save_IFS
3622 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003623 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003624 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003625 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003626 $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 +00003627 break 2
3628 fi
3629done
Matthias Kloseb9621712010-04-24 17:59:49 +00003630 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003631IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003632
3633fi
3634fi
3635ac_ct_CC=$ac_cv_prog_ac_ct_CC
3636if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3638$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003639else
Matthias Kloseb9621712010-04-24 17:59:49 +00003640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3641$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003642fi
3643
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003644 if test "x$ac_ct_CC" = x; then
3645 CC=""
3646 else
3647 case $cross_compiling:$ac_tool_warned in
3648yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003649{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3650$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003651ac_tool_warned=yes ;;
3652esac
3653 CC=$ac_ct_CC
3654 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003655else
3656 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003657fi
3658
Jack Jansendd19cf82001-12-06 22:36:17 +00003659if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003660 if test -n "$ac_tool_prefix"; then
3661 # 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 +00003662set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3664$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003665if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003666 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003667else
3668 if test -n "$CC"; then
3669 ac_cv_prog_CC="$CC" # Let the user override the test.
3670else
Martin v. Löwis11437992002-04-12 09:54:03 +00003671as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3672for as_dir in $PATH
3673do
3674 IFS=$as_save_IFS
3675 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003676 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003677 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003678 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003679 $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 +00003680 break 2
3681 fi
3682done
Matthias Kloseb9621712010-04-24 17:59:49 +00003683 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003684IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003685
3686fi
3687fi
3688CC=$ac_cv_prog_CC
3689if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3691$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003692else
Matthias Kloseb9621712010-04-24 17:59:49 +00003693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3694$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003695fi
3696
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003697
Martin v. Löwis11437992002-04-12 09:54:03 +00003698 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003699fi
3700if test -z "$CC"; then
3701 # Extract the first word of "cc", so it can be a program name with args.
3702set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3704$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003705if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003706 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003707else
3708 if test -n "$CC"; then
3709 ac_cv_prog_CC="$CC" # Let the user override the test.
3710else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003711 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003712as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3713for as_dir in $PATH
3714do
3715 IFS=$as_save_IFS
3716 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003717 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003718 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003719 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3720 ac_prog_rejected=yes
3721 continue
3722 fi
3723 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003724 $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 +00003725 break 2
3726 fi
3727done
Matthias Kloseb9621712010-04-24 17:59:49 +00003728 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003729IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003730
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003731if test $ac_prog_rejected = yes; then
3732 # We found a bogon in the path, so make sure we never use it.
3733 set dummy $ac_cv_prog_CC
3734 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003735 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003736 # We chose a different compiler from the bogus one.
3737 # However, it has the same basename, so the bogon will be chosen
3738 # first if we set CC to just the basename; use the full file name.
3739 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003740 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003741 fi
3742fi
3743fi
3744fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003745CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003746if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3748$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003749else
Matthias Kloseb9621712010-04-24 17:59:49 +00003750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3751$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003752fi
3753
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003754
Martin v. Löwis11437992002-04-12 09:54:03 +00003755fi
3756if test -z "$CC"; then
3757 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003758 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003759 do
3760 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3761set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3763$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003764if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003765 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003766else
3767 if test -n "$CC"; then
3768 ac_cv_prog_CC="$CC" # Let the user override the test.
3769else
Martin v. Löwis11437992002-04-12 09:54:03 +00003770as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3771for as_dir in $PATH
3772do
3773 IFS=$as_save_IFS
3774 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003775 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003776 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003777 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003778 $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 +00003779 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003780 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003781done
Matthias Kloseb9621712010-04-24 17:59:49 +00003782 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003783IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003784
3785fi
3786fi
3787CC=$ac_cv_prog_CC
3788if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3790$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003791else
Matthias Kloseb9621712010-04-24 17:59:49 +00003792 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3793$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003794fi
3795
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003796
Martin v. Löwis11437992002-04-12 09:54:03 +00003797 test -n "$CC" && break
3798 done
3799fi
3800if test -z "$CC"; then
3801 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003802 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003803do
3804 # Extract the first word of "$ac_prog", so it can be a program name with args.
3805set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3807$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003808if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003809 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003810else
3811 if test -n "$ac_ct_CC"; then
3812 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3813else
3814as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3815for as_dir in $PATH
3816do
3817 IFS=$as_save_IFS
3818 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003819 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003820 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003821 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003822 $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 +00003823 break 2
3824 fi
3825done
Matthias Kloseb9621712010-04-24 17:59:49 +00003826 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003827IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003828
Martin v. Löwis11437992002-04-12 09:54:03 +00003829fi
3830fi
3831ac_ct_CC=$ac_cv_prog_ac_ct_CC
3832if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3834$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003835else
Matthias Kloseb9621712010-04-24 17:59:49 +00003836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3837$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003838fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003839
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003840
Martin v. Löwis11437992002-04-12 09:54:03 +00003841 test -n "$ac_ct_CC" && break
3842done
Michael W. Hudson54241132001-12-07 15:38:26 +00003843
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003844 if test "x$ac_ct_CC" = x; then
3845 CC=""
3846 else
3847 case $cross_compiling:$ac_tool_warned in
3848yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003849{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3850$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003851ac_tool_warned=yes ;;
3852esac
3853 CC=$ac_ct_CC
3854 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003855fi
3856
3857fi
3858
3859
Matthias Kloseb9621712010-04-24 17:59:49 +00003860test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3861$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003862as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003863See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003864
3865# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003866$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3867set X $ac_compile
3868ac_compiler=$2
3869for ac_option in --version -v -V -qversion; do
3870 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003871case "(($ac_try" in
3872 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3873 *) ac_try_echo=$ac_try;;
3874esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003875eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3876$as_echo "$ac_try_echo"; } >&5
3877 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003878 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003879 if test -s conftest.err; then
3880 sed '10a\
3881... rest of stderr output deleted ...
3882 10q' conftest.err >conftest.er1
3883 cat conftest.er1 >&5
3884 fi
3885 rm -f conftest.er1 conftest.err
3886 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3887 test $ac_status = 0; }
3888done
Martin v. Löwis11437992002-04-12 09:54:03 +00003889
Matthias Kloseb9621712010-04-24 17:59:49 +00003890cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003891/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003892
Martin v. Löwis11437992002-04-12 09:54:03 +00003893int
3894main ()
3895{
3896
3897 ;
3898 return 0;
3899}
3900_ACEOF
3901ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003902ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003903# Try to create an executable without -o first, disregard a.out.
3904# It will help us diagnose broken compilers, and finding out an intuition
3905# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3907$as_echo_n "checking whether the C compiler works... " >&6; }
3908ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3909
3910# The possible output files:
3911ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3912
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003913ac_rmfiles=
3914for ac_file in $ac_files
3915do
3916 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003917 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003918 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3919 esac
3920done
3921rm -f $ac_rmfiles
3922
Matthias Kloseb9621712010-04-24 17:59:49 +00003923if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003924case "(($ac_try" in
3925 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3926 *) ac_try_echo=$ac_try;;
3927esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003928eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3929$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003930 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003931 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003932 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3933 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003934 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3935# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3936# in a Makefile. We should not override ac_cv_exeext if it was cached,
3937# so that the user can short-circuit this test for compilers unknown to
3938# Autoconf.
3939for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003940do
3941 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003942 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003943 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003944 ;;
3945 [ab].out )
3946 # We found the default executable, but exeext='' is most
3947 # certainly right.
3948 break;;
3949 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003950 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003951 then :; else
3952 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3953 fi
3954 # We set ac_cv_exeext here because the later test for it is not
3955 # safe: cross compilers may not add the suffix if given an `-o'
3956 # argument, so we may need to know it at that point already.
3957 # Even if this section looks crufty: it has the advantage of
3958 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003959 break;;
3960 * )
3961 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003962 esac
3963done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003964test "$ac_cv_exeext" = no && ac_cv_exeext=
3965
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003966else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003967 ac_file=''
3968fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003969if test -z "$ac_file"; then :
3970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3971$as_echo "no" >&6; }
3972$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003973sed 's/^/| /' conftest.$ac_ext >&5
3974
Matthias Kloseb9621712010-04-24 17:59:49 +00003975{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3976$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003977as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02003978See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003979else
3980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3981$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003982fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3984$as_echo_n "checking for C compiler default output file name... " >&6; }
3985{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3986$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003987ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003988
Matthias Kloseb9621712010-04-24 17:59:49 +00003989rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003990ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3992$as_echo_n "checking for suffix of executables... " >&6; }
3993if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003994case "(($ac_try" in
3995 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3996 *) ac_try_echo=$ac_try;;
3997esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003998eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3999$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004000 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004001 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004002 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4003 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004004 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4005# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4006# work properly (i.e., refer to `conftest.exe'), while it won't with
4007# `rm'.
4008for ac_file in conftest.exe conftest conftest.*; do
4009 test -f "$ac_file" || continue
4010 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004011 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004012 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4013 break;;
4014 * ) break;;
4015 esac
4016done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004017else
Matthias Kloseb9621712010-04-24 17:59:49 +00004018 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4019$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004020as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004021See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004022fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004023rm -f conftest conftest$ac_cv_exeext
4024{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4025$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004026
4027rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004028EXEEXT=$ac_cv_exeext
4029ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004030cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4031/* end confdefs.h. */
4032#include <stdio.h>
4033int
4034main ()
4035{
4036FILE *f = fopen ("conftest.out", "w");
4037 return ferror (f) || fclose (f) != 0;
4038
4039 ;
4040 return 0;
4041}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004042_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004043ac_clean_files="$ac_clean_files conftest.out"
4044# Check that the compiler produces executables we can run. If not, either
4045# the compiler is broken, or we cross compile.
4046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4047$as_echo_n "checking whether we are cross compiling... " >&6; }
4048if test "$cross_compiling" != yes; then
4049 { { ac_try="$ac_link"
4050case "(($ac_try" in
4051 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4052 *) ac_try_echo=$ac_try;;
4053esac
4054eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4055$as_echo "$ac_try_echo"; } >&5
4056 (eval "$ac_link") 2>&5
4057 ac_status=$?
4058 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4059 test $ac_status = 0; }
4060 if { ac_try='./conftest$ac_cv_exeext'
4061 { { case "(($ac_try" in
4062 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4063 *) ac_try_echo=$ac_try;;
4064esac
4065eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4066$as_echo "$ac_try_echo"; } >&5
4067 (eval "$ac_try") 2>&5
4068 ac_status=$?
4069 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4070 test $ac_status = 0; }; }; then
4071 cross_compiling=no
4072 else
4073 if test "$cross_compiling" = maybe; then
4074 cross_compiling=yes
4075 else
4076 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4077$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004078as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004079If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004080See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004081 fi
4082 fi
4083fi
4084{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4085$as_echo "$cross_compiling" >&6; }
4086
4087rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4088ac_clean_files=$ac_clean_files_save
4089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4090$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004091if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004092 $as_echo_n "(cached) " >&6
4093else
4094 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004095/* end confdefs.h. */
4096
4097int
4098main ()
4099{
4100
4101 ;
4102 return 0;
4103}
4104_ACEOF
4105rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004106if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004107case "(($ac_try" in
4108 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4109 *) ac_try_echo=$ac_try;;
4110esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004111eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4112$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004113 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004114 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004115 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4116 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004117 for ac_file in conftest.o conftest.obj conftest.*; do
4118 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004119 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004120 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004121 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4122 break;;
4123 esac
4124done
4125else
Matthias Kloseb9621712010-04-24 17:59:49 +00004126 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004127sed 's/^/| /' conftest.$ac_ext >&5
4128
Matthias Kloseb9621712010-04-24 17:59:49 +00004129{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4130$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004131as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004132See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004133fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004134rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004135fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004136{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4137$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004138OBJEXT=$ac_cv_objext
4139ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4141$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004142if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004143 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004144else
Matthias Kloseb9621712010-04-24 17:59:49 +00004145 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004146/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004147
Martin v. Löwis11437992002-04-12 09:54:03 +00004148int
4149main ()
4150{
4151#ifndef __GNUC__
4152 choke me
4153#endif
4154
4155 ;
4156 return 0;
4157}
4158_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004159if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004160 ac_compiler_gnu=yes
4161else
Matthias Kloseb9621712010-04-24 17:59:49 +00004162 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004163fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004164rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004165ac_cv_c_compiler_gnu=$ac_compiler_gnu
4166
4167fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004168{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4169$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4170if test $ac_compiler_gnu = yes; then
4171 GCC=yes
4172else
4173 GCC=
4174fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004175ac_test_CFLAGS=${CFLAGS+set}
4176ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4178$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004179if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004180 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004181else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004182 ac_save_c_werror_flag=$ac_c_werror_flag
4183 ac_c_werror_flag=yes
4184 ac_cv_prog_cc_g=no
4185 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004186 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004187/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004188
Martin v. Löwis11437992002-04-12 09:54:03 +00004189int
4190main ()
4191{
4192
4193 ;
4194 return 0;
4195}
4196_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004197if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004198 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004199else
Matthias Kloseb9621712010-04-24 17:59:49 +00004200 CFLAGS=""
4201 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004202/* end confdefs.h. */
4203
4204int
4205main ()
4206{
4207
4208 ;
4209 return 0;
4210}
4211_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004212if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004213
Matthias Kloseb9621712010-04-24 17:59:49 +00004214else
4215 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004216 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004217 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004218/* end confdefs.h. */
4219
4220int
4221main ()
4222{
4223
4224 ;
4225 return 0;
4226}
4227_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004228if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004229 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004230fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004231rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004232fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004233rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4234fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004235rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4236 ac_c_werror_flag=$ac_save_c_werror_flag
4237fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004238{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4239$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004240if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004241 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004242elif test $ac_cv_prog_cc_g = yes; then
4243 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004244 CFLAGS="-g -O2"
4245 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004246 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004247 fi
4248else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004249 if test "$GCC" = yes; then
4250 CFLAGS="-O2"
4251 else
4252 CFLAGS=
4253 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004254fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4256$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004257if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004258 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004259else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004260 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004261ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004262cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004263/* end confdefs.h. */
4264#include <stdarg.h>
4265#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004266struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004267/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4268struct buf { int x; };
4269FILE * (*rcsopen) (struct buf *, struct stat *, int);
4270static char *e (p, i)
4271 char **p;
4272 int i;
4273{
4274 return p[i];
4275}
4276static char *f (char * (*g) (char **, int), char **p, ...)
4277{
4278 char *s;
4279 va_list v;
4280 va_start (v,p);
4281 s = g (p, va_arg (v,int));
4282 va_end (v);
4283 return s;
4284}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004285
4286/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4287 function prototypes and stuff, but not '\xHH' hex character constants.
4288 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004289 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004290 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4291 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004292 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004293int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4294
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004295/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4296 inside strings and character constants. */
4297#define FOO(x) 'x'
4298int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4299
Skip Montanaro6dead952003-09-25 14:50:04 +00004300int test (int i, double x);
4301struct s1 {int (*f) (int a);};
4302struct s2 {int (*f) (double a);};
4303int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4304int argc;
4305char **argv;
4306int
4307main ()
4308{
4309return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4310 ;
4311 return 0;
4312}
4313_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004314for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4315 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004316do
4317 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004318 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004319 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004320fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004321rm -f core conftest.err conftest.$ac_objext
4322 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004323done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004324rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004325CC=$ac_save_CC
4326
4327fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004328# AC_CACHE_VAL
4329case "x$ac_cv_prog_cc_c89" in
4330 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4332$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004333 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4335$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004336 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004337 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4339$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004340esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004341if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004342
Matthias Kloseb9621712010-04-24 17:59:49 +00004343fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004344
Martin v. Löwis11437992002-04-12 09:54:03 +00004345ac_ext=c
4346ac_cpp='$CPP $CPPFLAGS'
4347ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4348ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4349ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004350
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004351
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004352
4353
Matthias Kloseb9621712010-04-24 17:59:49 +00004354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4355$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004356
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004357# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004358if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004359 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004360
4361 case $withval in
4362 no) with_cxx_main=no
4363 MAINCC='$(CC)';;
4364 yes) with_cxx_main=yes
4365 MAINCC='$(CXX)';;
4366 *) with_cxx_main=yes
4367 MAINCC=$withval
4368 if test -z "$CXX"
4369 then
4370 CXX=$withval
4371 fi;;
4372 esac
4373else
4374
4375 with_cxx_main=no
4376 MAINCC='$(CC)'
4377
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004378fi
4379
Matthias Kloseb9621712010-04-24 17:59:49 +00004380{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4381$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004382
4383preset_cxx="$CXX"
4384if test -z "$CXX"
4385then
4386 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004387 gcc) if test -n "$ac_tool_prefix"; then
4388 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4389set dummy ${ac_tool_prefix}g++; ac_word=$2
4390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4391$as_echo_n "checking for $ac_word... " >&6; }
4392if ${ac_cv_path_CXX+:} false; then :
4393 $as_echo_n "(cached) " >&6
4394else
4395 case $CXX in
4396 [\\/]* | ?:[\\/]*)
4397 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4398 ;;
4399 *)
4400 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4401for as_dir in notfound
4402do
4403 IFS=$as_save_IFS
4404 test -z "$as_dir" && as_dir=.
4405 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004406 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004407 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4408 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4409 break 2
4410 fi
4411done
4412 done
4413IFS=$as_save_IFS
4414
4415 ;;
4416esac
4417fi
4418CXX=$ac_cv_path_CXX
4419if test -n "$CXX"; then
4420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4421$as_echo "$CXX" >&6; }
4422else
4423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4424$as_echo "no" >&6; }
4425fi
4426
4427
4428fi
4429if test -z "$ac_cv_path_CXX"; then
4430 ac_pt_CXX=$CXX
4431 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004432set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4434$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004435if ${ac_cv_path_ac_pt_CXX+:} false; then :
4436 $as_echo_n "(cached) " >&6
4437else
4438 case $ac_pt_CXX in
4439 [\\/]* | ?:[\\/]*)
4440 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4441 ;;
4442 *)
4443 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4444for as_dir in notfound
4445do
4446 IFS=$as_save_IFS
4447 test -z "$as_dir" && as_dir=.
4448 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004449 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004450 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4451 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4452 break 2
4453 fi
4454done
4455 done
4456IFS=$as_save_IFS
4457
4458 ;;
4459esac
4460fi
4461ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4462if test -n "$ac_pt_CXX"; then
4463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4464$as_echo "$ac_pt_CXX" >&6; }
4465else
4466 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4467$as_echo "no" >&6; }
4468fi
4469
4470 if test "x$ac_pt_CXX" = x; then
4471 CXX="g++"
4472 else
4473 case $cross_compiling:$ac_tool_warned in
4474yes:)
4475{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4476$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4477ac_tool_warned=yes ;;
4478esac
4479 CXX=$ac_pt_CXX
4480 fi
4481else
4482 CXX="$ac_cv_path_CXX"
4483fi
4484 ;;
4485 cc) if test -n "$ac_tool_prefix"; then
4486 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4487set dummy ${ac_tool_prefix}c++; ac_word=$2
4488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4489$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004490if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004491 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004492else
4493 case $CXX in
4494 [\\/]* | ?:[\\/]*)
4495 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4496 ;;
4497 *)
4498 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4499for as_dir in notfound
4500do
4501 IFS=$as_save_IFS
4502 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004503 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004504 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004505 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004506 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004507 break 2
4508 fi
4509done
Matthias Kloseb9621712010-04-24 17:59:49 +00004510 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004511IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004512
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004513 ;;
4514esac
4515fi
4516CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004517if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4519$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004520else
Matthias Kloseb9621712010-04-24 17:59:49 +00004521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4522$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004523fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004524
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004525
4526fi
4527if test -z "$ac_cv_path_CXX"; then
4528 ac_pt_CXX=$CXX
4529 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004530set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4532$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004533if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004534 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004535else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004536 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004537 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004538 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 +00004539 ;;
4540 *)
4541 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4542for as_dir in notfound
4543do
4544 IFS=$as_save_IFS
4545 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004546 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004547 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004548 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004549 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004550 break 2
4551 fi
4552done
Matthias Kloseb9621712010-04-24 17:59:49 +00004553 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004554IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004555
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004556 ;;
4557esac
4558fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004559ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4560if test -n "$ac_pt_CXX"; then
4561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4562$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004563else
Matthias Kloseb9621712010-04-24 17:59:49 +00004564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4565$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004566fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004567
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004568 if test "x$ac_pt_CXX" = x; then
4569 CXX="c++"
4570 else
4571 case $cross_compiling:$ac_tool_warned in
4572yes:)
4573{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4574$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4575ac_tool_warned=yes ;;
4576esac
4577 CXX=$ac_pt_CXX
4578 fi
4579else
4580 CXX="$ac_cv_path_CXX"
4581fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004582 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004583 clang|*/clang) if test -n "$ac_tool_prefix"; then
4584 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4585set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4587$as_echo_n "checking for $ac_word... " >&6; }
4588if ${ac_cv_path_CXX+:} false; then :
4589 $as_echo_n "(cached) " >&6
4590else
4591 case $CXX in
4592 [\\/]* | ?:[\\/]*)
4593 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4594 ;;
4595 *)
4596 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4597for as_dir in notfound
4598do
4599 IFS=$as_save_IFS
4600 test -z "$as_dir" && as_dir=.
4601 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004602 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004603 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4604 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4605 break 2
4606 fi
4607done
4608 done
4609IFS=$as_save_IFS
4610
Ned Deilycbfb9a52012-06-23 16:02:19 -07004611 ;;
4612esac
4613fi
4614CXX=$ac_cv_path_CXX
4615if test -n "$CXX"; then
4616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4617$as_echo "$CXX" >&6; }
4618else
4619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4620$as_echo "no" >&6; }
4621fi
4622
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004623
4624fi
4625if test -z "$ac_cv_path_CXX"; then
4626 ac_pt_CXX=$CXX
4627 # Extract the first word of "clang++", so it can be a program name with args.
4628set dummy clang++; ac_word=$2
4629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4630$as_echo_n "checking for $ac_word... " >&6; }
4631if ${ac_cv_path_ac_pt_CXX+:} false; then :
4632 $as_echo_n "(cached) " >&6
4633else
4634 case $ac_pt_CXX in
4635 [\\/]* | ?:[\\/]*)
4636 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4637 ;;
4638 *)
4639 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4640for as_dir in notfound
4641do
4642 IFS=$as_save_IFS
4643 test -z "$as_dir" && as_dir=.
4644 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004645 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004646 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4647 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4648 break 2
4649 fi
4650done
4651 done
4652IFS=$as_save_IFS
4653
4654 ;;
4655esac
4656fi
4657ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4658if test -n "$ac_pt_CXX"; then
4659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4660$as_echo "$ac_pt_CXX" >&6; }
4661else
4662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4663$as_echo "no" >&6; }
4664fi
4665
4666 if test "x$ac_pt_CXX" = x; then
4667 CXX="clang++"
4668 else
4669 case $cross_compiling:$ac_tool_warned in
4670yes:)
4671{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4672$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4673ac_tool_warned=yes ;;
4674esac
4675 CXX=$ac_pt_CXX
4676 fi
4677else
4678 CXX="$ac_cv_path_CXX"
4679fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004680 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004681 esac
4682 if test "$CXX" = "notfound"
4683 then
4684 CXX=""
4685 fi
4686fi
4687if test -z "$CXX"
4688then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004689 if test -n "$ac_tool_prefix"; then
4690 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4691 do
4692 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4693set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4695$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004696if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004697 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004698else
4699 if test -n "$CXX"; then
4700 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4701else
4702as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4703for as_dir in $PATH
4704do
4705 IFS=$as_save_IFS
4706 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004707 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004708 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004709 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004710 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004711 break 2
4712 fi
4713done
Matthias Kloseb9621712010-04-24 17:59:49 +00004714 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004715IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004716
4717fi
4718fi
4719CXX=$ac_cv_prog_CXX
4720if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4722$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004723else
Matthias Kloseb9621712010-04-24 17:59:49 +00004724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4725$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004726fi
4727
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004728
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004729 test -n "$CXX" && break
4730 done
4731fi
4732if test -z "$CXX"; then
4733 ac_ct_CXX=$CXX
4734 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4735do
4736 # Extract the first word of "$ac_prog", so it can be a program name with args.
4737set dummy $ac_prog; ac_word=$2
4738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4739$as_echo_n "checking for $ac_word... " >&6; }
4740if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4741 $as_echo_n "(cached) " >&6
4742else
4743 if test -n "$ac_ct_CXX"; then
4744 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4745else
4746as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4747for as_dir in $PATH
4748do
4749 IFS=$as_save_IFS
4750 test -z "$as_dir" && as_dir=.
4751 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004752 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004753 ac_cv_prog_ac_ct_CXX="$ac_prog"
4754 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4755 break 2
4756 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004757done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004758 done
4759IFS=$as_save_IFS
4760
4761fi
4762fi
4763ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4764if test -n "$ac_ct_CXX"; then
4765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4766$as_echo "$ac_ct_CXX" >&6; }
4767else
4768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4769$as_echo "no" >&6; }
4770fi
4771
4772
4773 test -n "$ac_ct_CXX" && break
4774done
4775
4776 if test "x$ac_ct_CXX" = x; then
4777 CXX="notfound"
4778 else
4779 case $cross_compiling:$ac_tool_warned in
4780yes:)
4781{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4782$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4783ac_tool_warned=yes ;;
4784esac
4785 CXX=$ac_ct_CXX
4786 fi
4787fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004788
4789 if test "$CXX" = "notfound"
4790 then
4791 CXX=""
4792 fi
4793fi
4794if test "$preset_cxx" != "$CXX"
4795then
Matthias Kloseb9621712010-04-24 17:59:49 +00004796 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004797
4798 By default, distutils will build C++ extension modules with \"$CXX\".
4799 If this is not intended, then set CXX on the configure command line.
4800 " >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004801$as_echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004802
4803 By default, distutils will build C++ extension modules with \"$CXX\".
4804 If this is not intended, then set CXX on the configure command line.
4805 " >&2;}
4806fi
4807
4808
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
4810$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
4811save_LDFLAGS="$LDFLAGS"
4812LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00004813
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004814cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4815/* end confdefs.h. */
4816
4817int
4818main ()
4819{
4820
4821 ;
4822 return 0;
4823}
4824_ACEOF
4825if ac_fn_c_try_link "$LINENO"; then :
4826 NO_AS_NEEDED="-Wl,--no-as-needed"
4827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4828$as_echo "yes" >&6; }
4829else
4830 NO_AS_NEEDED=""
4831 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4832$as_echo "no" >&6; }
4833fi
4834rm -f core conftest.err conftest.$ac_objext \
4835 conftest$ac_exeext conftest.$ac_ext
4836LDFLAGS="$save_LDFLAGS"
4837
4838
4839
4840# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004841ac_ext=c
4842ac_cpp='$CPP $CPPFLAGS'
4843ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4844ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4845ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Kloseb9621712010-04-24 17:59:49 +00004846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4847$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004848# On Suns, sometimes $CPP names a directory.
4849if test -n "$CPP" && test -d "$CPP"; then
4850 CPP=
4851fi
4852if test -z "$CPP"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02004853 if ${ac_cv_prog_CPP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004854 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004855else
Martin v. Löwis11437992002-04-12 09:54:03 +00004856 # Double quotes because CPP needs to be expanded
4857 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4858 do
4859 ac_preproc_ok=false
4860for ac_c_preproc_warn_flag in '' yes
4861do
4862 # Use a header file that comes with gcc, so configuring glibc
4863 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004864 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4865 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004866 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004867 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004868 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004869/* end confdefs.h. */
4870#ifdef __STDC__
4871# include <limits.h>
4872#else
4873# include <assert.h>
4874#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004875 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004876_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004877if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004878
Matthias Kloseb9621712010-04-24 17:59:49 +00004879else
Martin v. Löwis11437992002-04-12 09:54:03 +00004880 # Broken: fails on valid input.
4881continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004882fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004883rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004884
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004885 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004886 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004887 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004888/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004889#include <ac_nonexistent.h>
4890_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004891if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004892 # Broken: success on invalid input.
4893continue
4894else
Martin v. Löwis11437992002-04-12 09:54:03 +00004895 # Passes both tests.
4896ac_preproc_ok=:
4897break
4898fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004899rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004900
4901done
4902# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004903rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004904if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004905 break
4906fi
4907
4908 done
4909 ac_cv_prog_CPP=$CPP
4910
4911fi
4912 CPP=$ac_cv_prog_CPP
4913else
4914 ac_cv_prog_CPP=$CPP
4915fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004916{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4917$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004918ac_preproc_ok=false
4919for ac_c_preproc_warn_flag in '' yes
4920do
4921 # Use a header file that comes with gcc, so configuring glibc
4922 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004923 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4924 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004925 # On the NeXT, cc -E runs the code through the compiler's parser,
4926 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004927 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004928/* end confdefs.h. */
4929#ifdef __STDC__
4930# include <limits.h>
4931#else
4932# include <assert.h>
4933#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004934 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004935_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004936if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004937
Matthias Kloseb9621712010-04-24 17:59:49 +00004938else
Martin v. Löwis11437992002-04-12 09:54:03 +00004939 # Broken: fails on valid input.
4940continue
4941fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004942rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004943
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004944 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004945 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004946 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004947/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004948#include <ac_nonexistent.h>
4949_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004950if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004951 # Broken: success on invalid input.
4952continue
4953else
Martin v. Löwis11437992002-04-12 09:54:03 +00004954 # Passes both tests.
4955ac_preproc_ok=:
4956break
4957fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004958rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004959
4960done
4961# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004962rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004963if $ac_preproc_ok; then :
4964
Martin v. Löwis11437992002-04-12 09:54:03 +00004965else
Matthias Kloseb9621712010-04-24 17:59:49 +00004966 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4967$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004968as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
Victor Stinnere0be4232011-10-25 13:06:09 +02004969See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004970fi
4971
4972ac_ext=c
4973ac_cpp='$CPP $CPPFLAGS'
4974ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4975ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4976ac_compiler_gnu=$ac_cv_c_compiler_gnu
4977
4978
Matthias Kloseb9621712010-04-24 17:59:49 +00004979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4980$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004981if ${ac_cv_path_GREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004982 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004983else
Matthias Kloseb9621712010-04-24 17:59:49 +00004984 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004985 ac_path_GREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004986 # Loop through the user's path and test for each of PROGNAME-LIST
4987 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004988for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4989do
4990 IFS=$as_save_IFS
4991 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004992 for ac_prog in grep ggrep; do
4993 for ac_exec_ext in '' $ac_executable_extensions; do
4994 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004995 as_fn_executable_p "$ac_path_GREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00004996# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004997 # Check for GNU $ac_path_GREP
4998case `"$ac_path_GREP" --version 2>&1` in
4999*GNU*)
5000 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5001*)
5002 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005003 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005004 while :
5005 do
5006 cat "conftest.in" "conftest.in" >"conftest.tmp"
5007 mv "conftest.tmp" "conftest.in"
5008 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005009 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005010 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5011 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005012 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005013 if test $ac_count -gt ${ac_path_GREP_max-0}; then
5014 # Best one so far, save it but keep looking for a better one
5015 ac_cv_path_GREP="$ac_path_GREP"
5016 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00005017 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005018 # 10*(2^10) chars as input seems more than enough
5019 test $ac_count -gt 10 && break
5020 done
5021 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5022esac
5023
Matthias Kloseb9621712010-04-24 17:59:49 +00005024 $ac_path_GREP_found && break 3
5025 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005026 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005027 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005028IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005029 if test -z "$ac_cv_path_GREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005030 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 +00005031 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005032else
5033 ac_cv_path_GREP=$GREP
5034fi
5035
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005036fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005037{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5038$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005039 GREP="$ac_cv_path_GREP"
5040
5041
Matthias Kloseb9621712010-04-24 17:59:49 +00005042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5043$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005044if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005045 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005046else
5047 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5048 then ac_cv_path_EGREP="$GREP -E"
5049 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005050 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005051 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005052 # Loop through the user's path and test for each of PROGNAME-LIST
5053 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005054for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5055do
5056 IFS=$as_save_IFS
5057 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005058 for ac_prog in egrep; do
5059 for ac_exec_ext in '' $ac_executable_extensions; do
5060 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005061 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005062# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005063 # Check for GNU $ac_path_EGREP
5064case `"$ac_path_EGREP" --version 2>&1` in
5065*GNU*)
5066 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5067*)
5068 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005069 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005070 while :
5071 do
5072 cat "conftest.in" "conftest.in" >"conftest.tmp"
5073 mv "conftest.tmp" "conftest.in"
5074 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005075 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005076 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5077 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005078 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005079 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5080 # Best one so far, save it but keep looking for a better one
5081 ac_cv_path_EGREP="$ac_path_EGREP"
5082 ac_path_EGREP_max=$ac_count
5083 fi
5084 # 10*(2^10) chars as input seems more than enough
5085 test $ac_count -gt 10 && break
5086 done
5087 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5088esac
5089
Matthias Kloseb9621712010-04-24 17:59:49 +00005090 $ac_path_EGREP_found && break 3
5091 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005092 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005093 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005094IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005095 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005096 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 +00005097 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005098else
5099 ac_cv_path_EGREP=$EGREP
5100fi
5101
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005102 fi
5103fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005104{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5105$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005106 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005107
5108
Matthias Kloseb9621712010-04-24 17:59:49 +00005109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5110$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005111if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005112 $as_echo_n "(cached) " >&6
5113else
5114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005115/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005116#include <stdlib.h>
5117#include <stdarg.h>
5118#include <string.h>
5119#include <float.h>
5120
5121int
5122main ()
5123{
5124
5125 ;
5126 return 0;
5127}
5128_ACEOF
5129if ac_fn_c_try_compile "$LINENO"; then :
5130 ac_cv_header_stdc=yes
5131else
5132 ac_cv_header_stdc=no
5133fi
5134rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5135
5136if test $ac_cv_header_stdc = yes; then
5137 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5138 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5139/* end confdefs.h. */
5140#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005141
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005142_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005143if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005144 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005145
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005146else
Matthias Kloseb9621712010-04-24 17:59:49 +00005147 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005148fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005149rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005150
Matthias Kloseb9621712010-04-24 17:59:49 +00005151fi
5152
5153if test $ac_cv_header_stdc = yes; then
5154 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5155 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5156/* end confdefs.h. */
5157#include <stdlib.h>
5158
5159_ACEOF
5160if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5161 $EGREP "free" >/dev/null 2>&1; then :
5162
5163else
5164 ac_cv_header_stdc=no
5165fi
5166rm -f conftest*
5167
5168fi
5169
5170if test $ac_cv_header_stdc = yes; then
5171 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5172 if test "$cross_compiling" = yes; then :
5173 :
5174else
5175 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5176/* end confdefs.h. */
5177#include <ctype.h>
5178#include <stdlib.h>
5179#if ((' ' & 0x0FF) == 0x020)
5180# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5181# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5182#else
5183# define ISLOWER(c) \
5184 (('a' <= (c) && (c) <= 'i') \
5185 || ('j' <= (c) && (c) <= 'r') \
5186 || ('s' <= (c) && (c) <= 'z'))
5187# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5188#endif
5189
5190#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5191int
5192main ()
5193{
5194 int i;
5195 for (i = 0; i < 256; i++)
5196 if (XOR (islower (i), ISLOWER (i))
5197 || toupper (i) != TOUPPER (i))
5198 return 2;
5199 return 0;
5200}
5201_ACEOF
5202if ac_fn_c_try_run "$LINENO"; then :
5203
5204else
5205 ac_cv_header_stdc=no
5206fi
5207rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5208 conftest.$ac_objext conftest.beam conftest.$ac_ext
5209fi
5210
5211fi
5212fi
5213{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5214$as_echo "$ac_cv_header_stdc" >&6; }
5215if test $ac_cv_header_stdc = yes; then
5216
5217$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5218
5219fi
5220
5221# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5222for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5223 inttypes.h stdint.h unistd.h
5224do :
5225 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5226ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5227"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005228if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005229 cat >>confdefs.h <<_ACEOF
5230#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5231_ACEOF
5232
5233fi
5234
5235done
5236
5237
5238
5239 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 +02005240if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005241 MINIX=yes
5242else
5243 MINIX=
5244fi
5245
5246
5247 if test "$MINIX" = yes; then
5248
5249$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5250
5251
5252$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5253
5254
5255$as_echo "#define _MINIX 1" >>confdefs.h
5256
5257 fi
5258
5259
5260 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5261$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005262if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005263 $as_echo_n "(cached) " >&6
5264else
5265 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5266/* end confdefs.h. */
5267
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005268# define __EXTENSIONS__ 1
5269 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005270int
5271main ()
5272{
5273
5274 ;
5275 return 0;
5276}
5277_ACEOF
5278if ac_fn_c_try_compile "$LINENO"; then :
5279 ac_cv_safe_to_define___extensions__=yes
5280else
5281 ac_cv_safe_to_define___extensions__=no
5282fi
5283rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5284fi
5285{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5286$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5287 test $ac_cv_safe_to_define___extensions__ = yes &&
5288 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5289
5290 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5291
5292 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5293
5294 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5295
5296 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5297
5298
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005299
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005300# Check for unsupported systems
5301case $ac_sys_system/$ac_sys_release in
5302atheos*|Linux*/1*)
5303 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5304 echo See README for details.
5305 exit 1;;
5306esac
5307
5308
Matthias Kloseb9621712010-04-24 17:59:49 +00005309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5310$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005311
5312# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005313if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005314 withval=$with_suffix;
5315 case $withval in
5316 no) EXEEXT=;;
5317 yes) EXEEXT=.exe;;
5318 *) EXEEXT=$withval;;
5319 esac
5320fi
5321
Matthias Kloseb9621712010-04-24 17:59:49 +00005322{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5323$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005324
5325# Test whether we're running on a non-case-sensitive system, in which
5326# case we give a warning if no ext is given
5327
Matthias Kloseb9621712010-04-24 17:59:49 +00005328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5329$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005330if test ! -d CaseSensitiveTestDir; then
5331mkdir CaseSensitiveTestDir
5332fi
5333
5334if test -d casesensitivetestdir
5335then
Matthias Kloseb9621712010-04-24 17:59:49 +00005336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5337$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005338 BUILDEXEEXT=.exe
5339else
Matthias Kloseb9621712010-04-24 17:59:49 +00005340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5341$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005342 BUILDEXEEXT=$EXEEXT
5343fi
5344rmdir CaseSensitiveTestDir
5345
5346case $MACHDEP in
5347bsdos*)
5348 case $CC in
5349 gcc) CC="$CC -D_HAVE_BSDI";;
5350 esac;;
5351esac
5352
5353case $ac_sys_system in
5354hp*|HP*)
5355 case $CC in
5356 cc|*/cc) CC="$CC -Ae";;
5357 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005358esac
5359
doko@python.org3e6e2ac2013-01-25 13:12:29 +01005360MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5361
5362
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005363
5364
Matthias Kloseb9621712010-04-24 17:59:49 +00005365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5366$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005367if test -z "$LIBRARY"
5368then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005369 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005370fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005371{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5372$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005373
5374# LDLIBRARY is the name of the library to link against (as opposed to the
5375# name of the library into which to insert object files). BLDLIBRARY is also
5376# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5377# is blank as the main program is not linked directly against LDLIBRARY.
5378# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5379# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5380# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5381# DLLLIBRARY is the shared (i.e., DLL) library.
5382#
5383# RUNSHARED is used to run shared python without installed libraries
5384#
5385# INSTSONAME is the name of the shared library that will be use to install
5386# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005387#
5388# LDVERSION is the shared library version number, normally the Python version
5389# with the ABI build flags appended.
5390
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005391
5392
5393
5394
5395
5396
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005397
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005398LDLIBRARY="$LIBRARY"
5399BLDLIBRARY='$(LDLIBRARY)'
5400INSTSONAME='$(LDLIBRARY)'
5401DLLLIBRARY=''
5402LDLIBRARYDIR=''
5403RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005404LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005405
5406# LINKCC is the command that links the python executable -- default is $(CC).
5407# If CXX is set, and if it is needed to link a main function that was
5408# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5409# python might then depend on the C++ runtime
5410# This is altered for AIX in order to build the export list before
5411# linking.
5412
Matthias Kloseb9621712010-04-24 17:59:49 +00005413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5414$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005415if test -z "$LINKCC"
5416then
5417 LINKCC='$(PURIFY) $(MAINCC)'
5418 case $ac_sys_system in
5419 AIX*)
5420 exp_extra="\"\""
5421 if test $ac_sys_release -ge 5 -o \
5422 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5423 exp_extra="."
5424 fi
5425 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005426 QNX*)
5427 # qcc must be used because the other compilers do not
5428 # support -N.
5429 LINKCC=qcc;;
5430 esac
5431fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005432{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5433$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005434
5435# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5436# make sure we default having it set to "no": this is used by
5437# distutils.unixccompiler to know if it should add --enable-new-dtags
5438# to linker command lines, and failing to detect GNU ld simply results
5439# in the same bahaviour as before.
5440
Matthias Kloseb9621712010-04-24 17:59:49 +00005441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5442$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005443ac_prog=ld
5444if test "$GCC" = yes; then
5445 ac_prog=`$CC -print-prog-name=ld`
5446fi
5447case `"$ac_prog" -V 2>&1 < /dev/null` in
5448 *GNU*)
5449 GNULD=yes;;
5450 *)
5451 GNULD=no;;
5452esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005453{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5454$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005455
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
5457$as_echo_n "checking for inline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005458if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005459 $as_echo_n "(cached) " >&6
5460else
5461 ac_cv_c_inline=no
5462for ac_kw in inline __inline__ __inline; do
5463 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5464/* end confdefs.h. */
5465#ifndef __cplusplus
5466typedef int foo_t;
5467static $ac_kw foo_t static_foo () {return 0; }
5468$ac_kw foo_t foo () {return 0; }
5469#endif
5470
5471_ACEOF
5472if ac_fn_c_try_compile "$LINENO"; then :
5473 ac_cv_c_inline=$ac_kw
5474fi
5475rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5476 test "$ac_cv_c_inline" != no && break
5477done
5478
5479fi
5480{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
5481$as_echo "$ac_cv_c_inline" >&6; }
5482
5483case $ac_cv_c_inline in
5484 inline | yes) ;;
5485 *)
5486 case $ac_cv_c_inline in
5487 no) ac_val=;;
5488 *) ac_val=$ac_cv_c_inline;;
5489 esac
5490 cat >>confdefs.h <<_ACEOF
5491#ifndef __cplusplus
5492#define inline $ac_val
5493#endif
5494_ACEOF
5495 ;;
5496esac
5497
5498if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00005499
5500$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005501
5502
5503fi
5504
5505
Matthias Kloseb9621712010-04-24 17:59:49 +00005506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5507$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005508# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005509if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005510 enableval=$enable_shared;
5511fi
5512
5513
5514if test -z "$enable_shared"
5515then
5516 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005517 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005518 enable_shared="yes";;
5519 *)
5520 enable_shared="no";;
5521 esac
5522fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005523{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5524$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005525
Matthias Kloseb9621712010-04-24 17:59:49 +00005526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5527$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005528# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005529if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005530 enableval=$enable_profiling;
5531fi
5532
5533if test "x$enable_profiling" = xyes; then
5534 ac_save_cc="$CC"
Benjamin Peterson615ea1a2013-03-26 08:55:37 -04005535 CC="$CC -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005536 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005537/* end confdefs.h. */
5538int main() { return 0; }
5539_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005540if ac_fn_c_try_link "$LINENO"; then :
5541
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005542else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005543 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005544fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005545rm -f core conftest.err conftest.$ac_objext \
5546 conftest$ac_exeext conftest.$ac_ext
5547 CC="$ac_save_cc"
5548else
5549 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005550fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005551{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5552$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005553
doko@ubuntu.comba015832012-06-30 16:52:05 +02005554if test "x$enable_profiling" = xyes; then
5555 BASECFLAGS="-pg $BASECFLAGS"
5556 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005557fi
5558
Matthias Kloseb9621712010-04-24 17:59:49 +00005559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5560$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005561
5562# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5563# library that we build, but we do not want to link against it (we
5564# will find it with a -framework option). For this reason there is an
5565# extra variable BLDLIBRARY against which Python and the extension
5566# modules are linked, BLDLIBRARY. This is normally the same as
5567# LDLIBRARY, but empty for MacOSX framework builds.
5568if test "$enable_framework"
5569then
5570 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
5571 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
5572 BLDLIBRARY=''
5573else
5574 BLDLIBRARY='$(LDLIBRARY)'
5575fi
5576
5577# Other platforms follow
5578if test $enable_shared = "yes"; then
5579
Matthias Kloseb9621712010-04-24 17:59:49 +00005580$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005581
5582 case $ac_sys_system in
5583 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005584 LDLIBRARY='libpython$(LDVERSION).dll.a'
5585 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005586 ;;
5587 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005588 LDLIBRARY='libpython$(LDVERSION).so'
5589 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005590 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
5591 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005592 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005593 then
5594 PY3LIBRARY=libpython3.so
5595 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005596 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005597 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005598 LDLIBRARY='libpython$(LDVERSION).so'
5599 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005600 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
5601 case $ac_sys_system in
5602 FreeBSD*)
5603 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
5604 ;;
5605 esac
5606 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005607 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005608 then
5609 PY3LIBRARY=libpython3.so
5610 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005611 ;;
5612 hp*|HP*)
5613 case `uname -m` in
5614 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005615 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005616 ;;
5617 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005618 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005619 ;;
5620 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005621 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005622 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
5623 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005624 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005625 LDLIBRARY='libpython$(LDVERSION).dylib'
5626 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005627 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
5628 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005629 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005630 LDLIBRARY='libpython$(LDVERSION).so'
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005631 RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
5632 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005633
5634 esac
5635else # shared is disabled
5636 case $ac_sys_system in
5637 CYGWIN*)
5638 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005639 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005640 ;;
5641 esac
5642fi
5643
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005644if test "$cross_compiling" = yes; then
5645 RUNSHARED=
5646fi
5647
Matthias Kloseb9621712010-04-24 17:59:49 +00005648{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5649$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005650
5651if test -n "$ac_tool_prefix"; then
5652 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5653set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5655$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005656if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005657 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005658else
5659 if test -n "$RANLIB"; then
5660 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5661else
5662as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5663for as_dir in $PATH
5664do
5665 IFS=$as_save_IFS
5666 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005667 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005668 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005669 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005670 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005671 break 2
5672 fi
5673done
Matthias Kloseb9621712010-04-24 17:59:49 +00005674 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005675IFS=$as_save_IFS
5676
5677fi
5678fi
5679RANLIB=$ac_cv_prog_RANLIB
5680if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5682$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005683else
Matthias Kloseb9621712010-04-24 17:59:49 +00005684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5685$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005686fi
5687
5688
5689fi
5690if test -z "$ac_cv_prog_RANLIB"; then
5691 ac_ct_RANLIB=$RANLIB
5692 # Extract the first word of "ranlib", so it can be a program name with args.
5693set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5695$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005696if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005697 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005698else
5699 if test -n "$ac_ct_RANLIB"; then
5700 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5701else
5702as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5703for as_dir in $PATH
5704do
5705 IFS=$as_save_IFS
5706 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005707 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005708 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005709 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005710 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005711 break 2
5712 fi
5713done
Matthias Kloseb9621712010-04-24 17:59:49 +00005714 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005715IFS=$as_save_IFS
5716
5717fi
5718fi
5719ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5720if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5722$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005723else
Matthias Kloseb9621712010-04-24 17:59:49 +00005724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5725$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005726fi
5727
5728 if test "x$ac_ct_RANLIB" = x; then
5729 RANLIB=":"
5730 else
5731 case $cross_compiling:$ac_tool_warned in
5732yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00005733{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5734$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005735ac_tool_warned=yes ;;
5736esac
5737 RANLIB=$ac_ct_RANLIB
5738 fi
5739else
5740 RANLIB="$ac_cv_prog_RANLIB"
5741fi
5742
5743
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005744if test -n "$ac_tool_prefix"; then
5745 for ac_prog in ar aal
5746 do
5747 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5748set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5750$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005751if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005752 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005753else
5754 if test -n "$AR"; then
5755 ac_cv_prog_AR="$AR" # Let the user override the test.
5756else
5757as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5758for as_dir in $PATH
5759do
5760 IFS=$as_save_IFS
5761 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005762 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005763 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005764 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005765 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005766 break 2
5767 fi
5768done
Matthias Kloseb9621712010-04-24 17:59:49 +00005769 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005770IFS=$as_save_IFS
5771
5772fi
5773fi
5774AR=$ac_cv_prog_AR
5775if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5777$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005778else
Matthias Kloseb9621712010-04-24 17:59:49 +00005779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5780$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005781fi
5782
5783
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005784 test -n "$AR" && break
5785 done
5786fi
5787if test -z "$AR"; then
5788 ac_ct_AR=$AR
5789 for ac_prog in ar aal
5790do
5791 # Extract the first word of "$ac_prog", so it can be a program name with args.
5792set dummy $ac_prog; ac_word=$2
5793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5794$as_echo_n "checking for $ac_word... " >&6; }
5795if ${ac_cv_prog_ac_ct_AR+:} false; then :
5796 $as_echo_n "(cached) " >&6
5797else
5798 if test -n "$ac_ct_AR"; then
5799 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5800else
5801as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5802for as_dir in $PATH
5803do
5804 IFS=$as_save_IFS
5805 test -z "$as_dir" && as_dir=.
5806 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005807 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005808 ac_cv_prog_ac_ct_AR="$ac_prog"
5809 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5810 break 2
5811 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005812done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005813 done
5814IFS=$as_save_IFS
5815
5816fi
5817fi
5818ac_ct_AR=$ac_cv_prog_ac_ct_AR
5819if test -n "$ac_ct_AR"; then
5820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5821$as_echo "$ac_ct_AR" >&6; }
5822else
5823 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5824$as_echo "no" >&6; }
5825fi
5826
5827
5828 test -n "$ac_ct_AR" && break
5829done
5830
5831 if test "x$ac_ct_AR" = x; then
5832 AR="ar"
5833 else
5834 case $cross_compiling:$ac_tool_warned in
5835yes:)
5836{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5837$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5838ac_tool_warned=yes ;;
5839esac
5840 AR=$ac_ct_AR
5841 fi
5842fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005843
5844
5845# tweak ARFLAGS only if the user didn't set it on the command line
5846
5847if test -z "$ARFLAGS"
5848then
5849 ARFLAGS="rc"
5850fi
5851
doko@ubuntu.com58844492012-06-30 18:25:32 +02005852if test -n "$ac_tool_prefix"; then
5853 for ac_prog in readelf
5854 do
5855 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5856set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5858$as_echo_n "checking for $ac_word... " >&6; }
5859if ${ac_cv_prog_READELF+:} false; then :
5860 $as_echo_n "(cached) " >&6
5861else
5862 if test -n "$READELF"; then
5863 ac_cv_prog_READELF="$READELF" # Let the user override the test.
5864else
5865as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5866for as_dir in $PATH
5867do
5868 IFS=$as_save_IFS
5869 test -z "$as_dir" && as_dir=.
5870 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005871 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02005872 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
5873 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5874 break 2
5875 fi
5876done
5877 done
5878IFS=$as_save_IFS
5879
5880fi
5881fi
5882READELF=$ac_cv_prog_READELF
5883if test -n "$READELF"; then
5884 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
5885$as_echo "$READELF" >&6; }
5886else
5887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5888$as_echo "no" >&6; }
5889fi
5890
5891
5892 test -n "$READELF" && break
5893 done
5894fi
5895if test -z "$READELF"; then
5896 ac_ct_READELF=$READELF
5897 for ac_prog in readelf
5898do
5899 # Extract the first word of "$ac_prog", so it can be a program name with args.
5900set dummy $ac_prog; ac_word=$2
5901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5902$as_echo_n "checking for $ac_word... " >&6; }
5903if ${ac_cv_prog_ac_ct_READELF+:} false; then :
5904 $as_echo_n "(cached) " >&6
5905else
5906 if test -n "$ac_ct_READELF"; then
5907 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
5908else
5909as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5910for as_dir in $PATH
5911do
5912 IFS=$as_save_IFS
5913 test -z "$as_dir" && as_dir=.
5914 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005915 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02005916 ac_cv_prog_ac_ct_READELF="$ac_prog"
5917 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5918 break 2
5919 fi
5920done
5921 done
5922IFS=$as_save_IFS
5923
5924fi
5925fi
5926ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
5927if test -n "$ac_ct_READELF"; then
5928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
5929$as_echo "$ac_ct_READELF" >&6; }
5930else
5931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5932$as_echo "no" >&6; }
5933fi
5934
5935
5936 test -n "$ac_ct_READELF" && break
5937done
5938
5939 if test "x$ac_ct_READELF" = x; then
5940 READELF=":"
5941 else
5942 case $cross_compiling:$ac_tool_warned in
5943yes:)
5944{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5945$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5946ac_tool_warned=yes ;;
5947esac
5948 READELF=$ac_ct_READELF
5949 fi
5950fi
5951
5952if test "$cross_compiling" = yes; then
5953 case "$READELF" in
5954 readelf|:)
5955 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
5956 ;;
5957 esac
5958fi
5959
5960
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005961
Matthias Klosec4c48422012-10-21 23:05:35 +02005962for ac_prog in python$PACKAGE_VERSION python3 python
5963do
5964 # Extract the first word of "$ac_prog", so it can be a program name with args.
5965set dummy $ac_prog; ac_word=$2
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5967$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klosec4c48422012-10-21 23:05:35 +02005968if ${ac_cv_prog_PYTHON+:} false; then :
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005969 $as_echo_n "(cached) " >&6
5970else
Matthias Klosec4c48422012-10-21 23:05:35 +02005971 if test -n "$PYTHON"; then
5972 ac_cv_prog_PYTHON="$PYTHON" # Let the user override the test.
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005973else
5974as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5975for as_dir in $PATH
5976do
5977 IFS=$as_save_IFS
5978 test -z "$as_dir" && as_dir=.
5979 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005980 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Matthias Klosec4c48422012-10-21 23:05:35 +02005981 ac_cv_prog_PYTHON="$ac_prog"
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005982 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5983 break 2
5984 fi
5985done
5986 done
5987IFS=$as_save_IFS
5988
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005989fi
5990fi
Matthias Klosec4c48422012-10-21 23:05:35 +02005991PYTHON=$ac_cv_prog_PYTHON
5992if test -n "$PYTHON"; then
5993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
5994$as_echo "$PYTHON" >&6; }
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005995else
5996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5997$as_echo "no" >&6; }
5998fi
5999
6000
Matthias Klosec4c48422012-10-21 23:05:35 +02006001 test -n "$PYTHON" && break
6002done
6003test -n "$PYTHON" || PYTHON="not-found"
6004
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006005if test "$PYTHON" = not-found; then
Matthias Klosec4c48422012-10-21 23:05:35 +02006006 ASDLGEN="@echo python: $PYTHON! cannot run \$(srcdir)/Parser/asdl_c.py #"
6007else
6008 ASDLGEN="$PYTHON"
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006009fi
6010
6011
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006012case $MACHDEP in
6013bsdos*|hp*|HP*)
6014 # install -d does not work on BSDI or HP-UX
6015 if test -z "$INSTALL"
6016 then
6017 INSTALL="${srcdir}/install-sh -c"
6018 fi
6019esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006020# Find a good install program. We prefer a C program (faster),
6021# so one script is as good as another. But avoid the broken or
6022# incompatible versions:
6023# SysV /etc/install, /usr/sbin/install
6024# SunOS /usr/etc/install
6025# IRIX /sbin/install
6026# AIX /bin/install
6027# AmigaOS /C/install, which installs bootblocks on floppy discs
6028# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6029# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6030# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6031# OS/2's system install, which has a completely different semantic
6032# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006033# Reject install programs that cannot install multiple files.
6034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6035$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006036if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006037if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006038 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006039else
6040 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6041for as_dir in $PATH
6042do
6043 IFS=$as_save_IFS
6044 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006045 # Account for people who put trailing slashes in PATH elements.
6046case $as_dir/ in #((
6047 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006048 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006049 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006050 /usr/ucb/* ) ;;
6051 *)
6052 # OSF1 and SCO ODT 3.0 have their own names for install.
6053 # Don't use installbsd from OSF since it installs stuff as root
6054 # by default.
6055 for ac_prog in ginstall scoinst install; do
6056 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006057 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006058 if test $ac_prog = install &&
6059 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6060 # AIX install. It has an incompatible calling convention.
6061 :
6062 elif test $ac_prog = install &&
6063 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6064 # program-specific install script used by HP pwplus--don't use.
6065 :
6066 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006067 rm -rf conftest.one conftest.two conftest.dir
6068 echo one > conftest.one
6069 echo two > conftest.two
6070 mkdir conftest.dir
6071 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6072 test -s conftest.one && test -s conftest.two &&
6073 test -s conftest.dir/conftest.one &&
6074 test -s conftest.dir/conftest.two
6075 then
6076 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6077 break 3
6078 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006079 fi
6080 fi
6081 done
6082 done
6083 ;;
6084esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006085
6086 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006087IFS=$as_save_IFS
6088
Matthias Kloseb9621712010-04-24 17:59:49 +00006089rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006090
6091fi
6092 if test "${ac_cv_path_install+set}" = set; then
6093 INSTALL=$ac_cv_path_install
6094 else
6095 # As a last resort, use the slow shell script. Don't cache a
6096 # value for INSTALL within a source directory, because that will
6097 # break other packages using the cache if that directory is
6098 # removed, or if the value is a relative name.
6099 INSTALL=$ac_install_sh
6100 fi
6101fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006102{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6103$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006104
6105# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6106# It thinks the first close brace ends the variable substitution.
6107test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6108
6109test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6110
6111test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6112
Matthias Klose93a0ef12012-03-15 18:08:34 +01006113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6114$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6115if test -z "$MKDIR_P"; then
6116 if ${ac_cv_path_mkdir+:} false; then :
6117 $as_echo_n "(cached) " >&6
6118else
6119 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6120for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6121do
6122 IFS=$as_save_IFS
6123 test -z "$as_dir" && as_dir=.
6124 for ac_prog in mkdir gmkdir; do
6125 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006126 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006127 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6128 'mkdir (GNU coreutils) '* | \
6129 'mkdir (coreutils) '* | \
6130 'mkdir (fileutils) '4.1*)
6131 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6132 break 3;;
6133 esac
6134 done
6135 done
6136 done
6137IFS=$as_save_IFS
6138
6139fi
6140
6141 test -d ./--version && rmdir ./--version
6142 if test "${ac_cv_path_mkdir+set}" = set; then
6143 MKDIR_P="$ac_cv_path_mkdir -p"
6144 else
6145 # As a last resort, use the slow shell script. Don't cache a
6146 # value for MKDIR_P within a source directory, because that will
6147 # break other packages using the cache if that directory is
6148 # removed, or if the value is a relative name.
6149 MKDIR_P="$ac_install_sh -d"
6150 fi
6151fi
6152{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6153$as_echo "$MKDIR_P" >&6; }
6154
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006155
6156# Not every filesystem supports hard links
6157
6158if test -z "$LN" ; then
6159 case $ac_sys_system in
6160 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006161 *) LN=ln;;
6162 esac
6163fi
6164
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006165# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006166
6167ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006168
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006169# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6171$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006172
6173# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006174if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006175 withval=$with_pydebug;
6176if test "$withval" != no
6177then
6178
Matthias Kloseb9621712010-04-24 17:59:49 +00006179$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006180
Matthias Kloseb9621712010-04-24 17:59:49 +00006181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6182$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006183 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006184 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006185else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6186$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006187fi
6188else
Matthias Kloseb9621712010-04-24 17:59:49 +00006189 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6190$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006191fi
6192
6193
6194# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6195# merged with this chunk of code?
6196
6197# Optimizer/debugger flags
6198# ------------------------
6199# (The following bit of code is complicated enough - please keep things
6200# indented properly. Just pretend you're editing Python code. ;-)
6201
6202# There are two parallel sets of case statements below, one that checks to
6203# see if OPT was set and one that does BASECFLAGS setting based upon
6204# compiler and platform. BASECFLAGS tweaks need to be made even if the
6205# user set OPT.
6206
6207# tweak OPT based on compiler and platform, only if the user didn't set
6208# it on the command line
6209
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006210if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006211then
6212 case $GCC in
6213 yes)
6214 if test "$CC" != 'g++' ; then
6215 STRICT_PROTO="-Wstrict-prototypes"
6216 fi
6217 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6218 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6219 WRAP="-fwrapv"
6220 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006221
6222 # Clang also needs -fwrapv
Stefan Krahaf04ff22011-12-08 22:20:31 +01006223 case $CC in
6224 *clang*) WRAP="-fwrapv"
6225 ;;
6226 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006227
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006228 case $ac_cv_prog_cc_g in
6229 yes)
6230 if test "$Py_DEBUG" = 'true' ; then
6231 # Optimization messes up debuggers, so turn it off for
6232 # debug builds.
Mark Dickinsonb2153e92010-05-05 22:31:36 +00006233 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006234 else
6235 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
6236 fi
6237 ;;
6238 *)
6239 OPT="-O3 -Wall $STRICT_PROTO"
6240 ;;
6241 esac
6242 case $ac_sys_system in
6243 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6244 ;;
6245 esac
6246 ;;
6247
6248 *)
6249 OPT="-O"
6250 ;;
6251 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006252fi
6253
6254
6255
6256# The -arch flags for universal builds on OSX
6257UNIVERSAL_ARCH_FLAGS=
6258
6259
6260# tweak BASECFLAGS based on compiler and platform
6261case $GCC in
6262yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006263 # Python doesn't violate C99 aliasing rules, but older versions of
6264 # GCC produce warnings for legal Python code. Enable
6265 # -fno-strict-aliasing on versions of GCC that support but produce
6266 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006267 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6268$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006269 ac_save_cc="$CC"
6270 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006271 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006272 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006273 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006274else
Matthias Kloseb9621712010-04-24 17:59:49 +00006275 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006276/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006277
Matthias Kloseb159a552010-04-25 21:00:44 +00006278
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006279int
6280main ()
6281{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006282
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006283 ;
6284 return 0;
6285}
Matthias Kloseb159a552010-04-25 21:00:44 +00006286
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006287_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006288if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006289
6290 CC="$ac_save_cc -fstrict-aliasing"
6291 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6292 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006293/* end confdefs.h. */
6294
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006295 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006296int
6297main ()
6298{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006299double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006300 ;
6301 return 0;
6302}
Matthias Kloseb159a552010-04-25 21:00:44 +00006303
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006304_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006305if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006306
6307 ac_cv_no_strict_aliasing=no
6308
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006309else
Matthias Kloseb159a552010-04-25 21:00:44 +00006310
6311 ac_cv_no_strict_aliasing=yes
6312
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006313fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006314rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006315
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006316else
Matthias Kloseb159a552010-04-25 21:00:44 +00006317
6318 ac_cv_no_strict_aliasing=no
6319
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006320fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006321rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006322fi
6323
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006324 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006325 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6327$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006328 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006329 then
6330 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6331 fi
6332
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006333 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
6334$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
6335 ac_save_cc="$CC"
6336 CC="$CC -Wunused-result -Werror"
6337 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006338 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006339 $as_echo_n "(cached) " >&6
6340else
6341 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6342/* end confdefs.h. */
6343
6344
6345int
6346main ()
6347{
6348
6349 ;
6350 return 0;
6351}
6352
6353_ACEOF
6354if ac_fn_c_try_compile "$LINENO"; then :
6355
6356 ac_cv_disable_unused_result_warning=yes
6357
6358else
6359
6360 ac_cv_disable_unused_result_warning=no
6361
6362fi
6363rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6364fi
6365
6366 CFLAGS="$save_CFLAGS"
6367 CC="$ac_save_cc"
6368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
6369$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
6370
6371 if test $ac_cv_disable_unused_result_warning = yes
6372 then
6373 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
6374 fi
6375
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006376 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
6377 # support. Without this, treatment of subnormals doesn't follow
6378 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01006379 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006380 alpha*)
6381 BASECFLAGS="$BASECFLAGS -mieee"
6382 ;;
6383 esac
6384
6385 case $ac_sys_system in
6386 SCO_SV*)
6387 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
6388 ;;
6389 # is there any other compiler on Darwin besides gcc?
6390 Darwin*)
6391 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
6392 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussoren666028b2010-04-18 19:07:43 +00006393 if test "${CC}" = gcc
6394 then
Matthias Kloseb9621712010-04-24 17:59:49 +00006395 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
6396$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00006397 case "${UNIVERSALSDK}" in
6398 */MacOSX10.4u.sdk)
6399 # Build using 10.4 SDK, force usage of gcc when the
6400 # compiler is gcc, otherwise the user will get very
6401 # confusing error messages when building on OSX 10.6
6402 CC=gcc-4.0
6403 CPP=cpp-4.0
6404 ;;
6405 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
6407$as_echo "$CC" >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00006408 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006409
6410
6411 if test "${enable_universalsdk}"; then
6412 UNIVERSAL_ARCH_FLAGS=""
6413 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
6414 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
6415 ARCH_RUN_32BIT=""
Benjamin Peterson99f03762010-04-11 22:15:28 +00006416 LIPO_32BIT_FLAGS=""
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006417 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
6418 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00006419 LIPO_32BIT_FLAGS=""
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00006420 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006421
6422 elif test "$UNIVERSAL_ARCHS" = "all" ; then
6423 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00006424 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00006425 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006426
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006427 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
6428 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00006429 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00006430 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006431
6432 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
6433 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00006434 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00006435 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006436
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006437 else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006438 as_fn_error $? "proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" "$LINENO" 5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006439
6440 fi
6441
6442
Ronald Oussoren666028b2010-04-18 19:07:43 +00006443 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
6444 if test "${UNIVERSALSDK}" != "/"
6445 then
6446 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
6447 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren712979d2010-04-20 19:51:33 +00006448 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006449 fi
6450 fi
6451
6452 # Calculate the right deployment target for this build.
6453 #
6454 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
Ned Deily3784ff92012-06-25 05:04:28 -07006455 if test ${cur_target} '>' 10.2 && \
6456 test ${cur_target} '<' 10.6
6457 then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006458 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00006459 if test ${enable_universalsdk}; then
6460 if test "${UNIVERSAL_ARCHS}" = "all"; then
6461 # Ensure that the default platform for a
6462 # 4-way universal build is OSX 10.5,
6463 # that's the first OS release where
6464 # 4-way builds make sense.
6465 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006466
6467 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
6468 cur_target='10.5'
6469
6470 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
6471 cur_target='10.5'
6472
6473 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
6474 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00006475 fi
6476 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00006477 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00006478 # On Intel macs default to a deployment
6479 # target of 10.4, that's the first OSX
6480 # release with Intel support.
6481 cur_target="10.4"
6482 fi
6483 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006484 fi
6485 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
6486
6487 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
6488 # environment with a value that is the same as what we'll use
6489 # in the Makefile to ensure that we'll get the same compiler
6490 # environment during configure and build time.
6491 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
6492 export MACOSX_DEPLOYMENT_TARGET
6493 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
6494
6495 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006496 esac
6497 ;;
6498
6499*)
6500 case $ac_sys_system in
6501 OpenUNIX*|UnixWare*)
6502 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
6503 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006504 SCO_SV*)
6505 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
6506 ;;
6507 esac
6508 ;;
6509esac
6510
6511if test "$Py_DEBUG" = 'true'; then
6512 :
6513else
6514 OPT="-DNDEBUG $OPT"
6515fi
6516
6517if test "$ac_arch_flags"
6518then
6519 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
6520fi
6521
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006522# Check whether GCC supports PyArg_ParseTuple format
6523if test "$GCC" = "yes"
6524then
Matthias Kloseb9621712010-04-24 17:59:49 +00006525 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
6526$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006527 save_CFLAGS=$CFLAGS
Benjamin Petersonfeb51492013-05-11 13:00:05 -05006528 CFLAGS="$CFLAGS -Werror -Wformat"
Matthias Kloseb9621712010-04-24 17:59:49 +00006529 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006530/* end confdefs.h. */
6531
6532 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006533int
6534main ()
6535{
6536
6537 ;
6538 return 0;
6539}
Matthias Kloseb159a552010-04-25 21:00:44 +00006540
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006541_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006542if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006543
Matthias Kloseb159a552010-04-25 21:00:44 +00006544
Matthias Kloseb9621712010-04-24 17:59:49 +00006545$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006546
Matthias Kloseb159a552010-04-25 21:00:44 +00006547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006548$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00006549
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006550else
Matthias Kloseb159a552010-04-25 21:00:44 +00006551
6552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006553$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006554
6555fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006556rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6557 CFLAGS=$save_CFLAGS
6558fi
6559
6560# On some compilers, pthreads are available without further options
6561# (e.g. MacOS X). On some of these systems, the compiler will not
6562# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
6563# So we have to see first whether pthreads are available without
6564# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00006565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
6566$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006567if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006568 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006569else
Matthias Kloseb9621712010-04-24 17:59:49 +00006570 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006571 ac_cv_pthread_is_default=no
6572else
Matthias Kloseb9621712010-04-24 17:59:49 +00006573 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006574/* end confdefs.h. */
6575
Stefan Krah7dba5942012-11-22 22:49:11 +01006576#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006577#include <pthread.h>
6578
6579void* routine(void* p){return NULL;}
6580
6581int main(){
6582 pthread_t p;
6583 if(pthread_create(&p,NULL,routine,NULL)!=0)
6584 return 1;
6585 (void)pthread_detach(p);
6586 return 0;
6587}
6588
6589_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006590if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006591
6592 ac_cv_pthread_is_default=yes
6593 ac_cv_kthread=no
6594 ac_cv_pthread=no
6595
6596else
Matthias Kloseb9621712010-04-24 17:59:49 +00006597 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006598fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006599rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6600 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006601fi
6602
6603
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006604fi
6605
Matthias Kloseb9621712010-04-24 17:59:49 +00006606{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
6607$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006608
6609
6610if test $ac_cv_pthread_is_default = yes
6611then
6612 ac_cv_kpthread=no
6613else
6614# -Kpthread, if available, provides the right #defines
6615# and linker options to make pthread_create available
6616# Some compilers won't report that they do not support -Kpthread,
6617# so we need to run a program to see whether it really made the
6618# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
6620$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006621if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006622 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006623else
6624 ac_save_cc="$CC"
6625CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006626if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006627 ac_cv_kpthread=no
6628else
Matthias Kloseb9621712010-04-24 17:59:49 +00006629 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006630/* end confdefs.h. */
6631
Stefan Krah7dba5942012-11-22 22:49:11 +01006632#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006633#include <pthread.h>
6634
6635void* routine(void* p){return NULL;}
6636
6637int main(){
6638 pthread_t p;
6639 if(pthread_create(&p,NULL,routine,NULL)!=0)
6640 return 1;
6641 (void)pthread_detach(p);
6642 return 0;
6643}
6644
6645_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006646if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006647 ac_cv_kpthread=yes
6648else
Matthias Kloseb9621712010-04-24 17:59:49 +00006649 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006650fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006651rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6652 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006653fi
6654
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006655CC="$ac_save_cc"
6656fi
6657
Matthias Kloseb9621712010-04-24 17:59:49 +00006658{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
6659$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006660fi
6661
6662if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
6663then
6664# -Kthread, if available, provides the right #defines
6665# and linker options to make pthread_create available
6666# Some compilers won't report that they do not support -Kthread,
6667# so we need to run a program to see whether it really made the
6668# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
6670$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006671if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006672 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006673else
6674 ac_save_cc="$CC"
6675CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006676if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006677 ac_cv_kthread=no
6678else
Matthias Kloseb9621712010-04-24 17:59:49 +00006679 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006680/* end confdefs.h. */
6681
Stefan Krah7dba5942012-11-22 22:49:11 +01006682#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006683#include <pthread.h>
6684
6685void* routine(void* p){return NULL;}
6686
6687int main(){
6688 pthread_t p;
6689 if(pthread_create(&p,NULL,routine,NULL)!=0)
6690 return 1;
6691 (void)pthread_detach(p);
6692 return 0;
6693}
6694
6695_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006696if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006697 ac_cv_kthread=yes
6698else
Matthias Kloseb9621712010-04-24 17:59:49 +00006699 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006700fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006701rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6702 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006703fi
6704
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006705CC="$ac_save_cc"
6706fi
6707
Matthias Kloseb9621712010-04-24 17:59:49 +00006708{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
6709$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006710fi
6711
6712if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
6713then
6714# -pthread, if available, provides the right #defines
6715# and linker options to make pthread_create available
6716# Some compilers won't report that they do not support -pthread,
6717# so we need to run a program to see whether it really made the
6718# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
6720$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01006721if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006722 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006723else
6724 ac_save_cc="$CC"
6725CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006726if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006727 ac_cv_pthread=no
6728else
Matthias Kloseb9621712010-04-24 17:59:49 +00006729 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006730/* end confdefs.h. */
6731
Stefan Krah7dba5942012-11-22 22:49:11 +01006732#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006733#include <pthread.h>
6734
6735void* routine(void* p){return NULL;}
6736
6737int main(){
6738 pthread_t p;
6739 if(pthread_create(&p,NULL,routine,NULL)!=0)
6740 return 1;
6741 (void)pthread_detach(p);
6742 return 0;
6743}
6744
6745_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006746if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006747 ac_cv_pthread=yes
6748else
Matthias Kloseb9621712010-04-24 17:59:49 +00006749 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006750fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006751rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6752 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006753fi
6754
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006755CC="$ac_save_cc"
6756fi
6757
Matthias Kloseb9621712010-04-24 17:59:49 +00006758{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
6759$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006760fi
6761
6762# If we have set a CC compiler flag for thread support then
6763# check if it works for CXX, too.
6764ac_cv_cxx_thread=no
6765if test ! -z "$CXX"
6766then
Matthias Kloseb9621712010-04-24 17:59:49 +00006767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
6768$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006769ac_save_cxx="$CXX"
6770
6771if test "$ac_cv_kpthread" = "yes"
6772then
6773 CXX="$CXX -Kpthread"
6774 ac_cv_cxx_thread=yes
6775elif test "$ac_cv_kthread" = "yes"
6776then
6777 CXX="$CXX -Kthread"
6778 ac_cv_cxx_thread=yes
6779elif test "$ac_cv_pthread" = "yes"
6780then
6781 CXX="$CXX -pthread"
6782 ac_cv_cxx_thread=yes
6783fi
6784
6785if test $ac_cv_cxx_thread = yes
6786then
6787 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
6788 $CXX -c conftest.$ac_ext 2>&5
6789 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
6790 && test -s conftest$ac_exeext && ./conftest$ac_exeext
6791 then
6792 ac_cv_cxx_thread=yes
6793 else
6794 ac_cv_cxx_thread=no
6795 fi
6796 rm -fr conftest*
6797fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006798{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
6799$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006800fi
6801CXX="$ac_save_cxx"
6802
6803
6804# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00006805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6806$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006807if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006808 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006809else
Matthias Kloseb9621712010-04-24 17:59:49 +00006810 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006811/* end confdefs.h. */
6812#include <stdlib.h>
6813#include <stdarg.h>
6814#include <string.h>
6815#include <float.h>
6816
6817int
6818main ()
6819{
6820
6821 ;
6822 return 0;
6823}
6824_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006825if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006826 ac_cv_header_stdc=yes
6827else
Matthias Kloseb9621712010-04-24 17:59:49 +00006828 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006829fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006830rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6831
6832if test $ac_cv_header_stdc = yes; then
6833 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006835/* end confdefs.h. */
6836#include <string.h>
6837
6838_ACEOF
6839if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006840 $EGREP "memchr" >/dev/null 2>&1; then :
6841
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006842else
6843 ac_cv_header_stdc=no
6844fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006845rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006846
6847fi
6848
6849if test $ac_cv_header_stdc = yes; then
6850 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006851 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006852/* end confdefs.h. */
6853#include <stdlib.h>
6854
6855_ACEOF
6856if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006857 $EGREP "free" >/dev/null 2>&1; then :
6858
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006859else
6860 ac_cv_header_stdc=no
6861fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006862rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006863
6864fi
6865
6866if test $ac_cv_header_stdc = yes; then
6867 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00006868 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006869 :
6870else
Matthias Kloseb9621712010-04-24 17:59:49 +00006871 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006872/* end confdefs.h. */
6873#include <ctype.h>
6874#include <stdlib.h>
6875#if ((' ' & 0x0FF) == 0x020)
6876# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6877# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6878#else
6879# define ISLOWER(c) \
6880 (('a' <= (c) && (c) <= 'i') \
6881 || ('j' <= (c) && (c) <= 'r') \
6882 || ('s' <= (c) && (c) <= 'z'))
6883# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6884#endif
6885
6886#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6887int
6888main ()
6889{
6890 int i;
6891 for (i = 0; i < 256; i++)
6892 if (XOR (islower (i), ISLOWER (i))
6893 || toupper (i) != TOUPPER (i))
6894 return 2;
6895 return 0;
6896}
6897_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006898if ac_fn_c_try_run "$LINENO"; then :
6899
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006900else
Matthias Kloseb9621712010-04-24 17:59:49 +00006901 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006902fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006903rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6904 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006905fi
6906
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006907fi
6908fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006909{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6910$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006911if test $ac_cv_header_stdc = yes; then
6912
Matthias Kloseb9621712010-04-24 17:59:49 +00006913$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006914
6915fi
6916
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +02006917ac_save_cppflags="$CPPFLAGS"
6918CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
Benjamin Petersonb77fe172011-09-13 17:20:47 -04006919for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006920fcntl.h grp.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006921ieeefp.h io.h langinfo.h libintl.h ncurses.h process.h pthread.h \
Benjamin Peterson94b580d2011-08-02 17:30:04 -05006922sched.h shadow.h signal.h stdint.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006923unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006924poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01006925sys/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 +01006926sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006927sys/param.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01006928sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00006929sys/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 -07006930libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimesf0400ba2013-06-18 13:22:17 +02006931bluetooth/bluetooth.h linux/tipc.h spawn.h util.h alloca.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006932do :
6933 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6934ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006935if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006936 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006937#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006938_ACEOF
6939
6940fi
6941
Guido van Rossum627b2d71993-12-24 10:39:16 +00006942done
6943
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +02006944CPPFLAGS=$ac_save_cppflags
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006945ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006946for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00006947 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6949$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006950if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006951 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006952else
Matthias Kloseb9621712010-04-24 17:59:49 +00006953 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006954/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006955#include <sys/types.h>
6956#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006957
Martin v. Löwis11437992002-04-12 09:54:03 +00006958int
6959main ()
6960{
6961if ((DIR *) 0)
6962return 0;
6963 ;
6964 return 0;
6965}
6966_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006967if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006968 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006969else
Matthias Kloseb9621712010-04-24 17:59:49 +00006970 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006971fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006972rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006973fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006974eval ac_res=\$$as_ac_Header
6975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6976$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006977if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006978 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006979#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006980_ACEOF
6981
6982ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006983fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006984
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006985done
6986# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6987if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006988 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6989$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006990if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006991 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006992else
Martin v. Löwis11437992002-04-12 09:54:03 +00006993 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006994cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006995/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006996
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006997/* Override any GCC internal prototype to avoid an error.
6998 Use char because int might match the return type of a GCC
6999 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007000#ifdef __cplusplus
7001extern "C"
7002#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007003char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007004int
7005main ()
7006{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007007return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007008 ;
7009 return 0;
7010}
7011_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007012for ac_lib in '' dir; do
7013 if test -z "$ac_lib"; then
7014 ac_res="none required"
7015 else
7016 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007017 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007018 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007019 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007020 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007021fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007022rm -f core conftest.err conftest.$ac_objext \
7023 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007024 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007025 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007026fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007027done
Victor Stinnere0be4232011-10-25 13:06:09 +02007028if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007029
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007030else
7031 ac_cv_search_opendir=no
7032fi
7033rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007034LIBS=$ac_func_search_save_LIBS
7035fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007036{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7037$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007038ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007039if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007040 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007041
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007042fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007043
Michael W. Hudson54241132001-12-07 15:38:26 +00007044else
Matthias Kloseb9621712010-04-24 17:59:49 +00007045 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7046$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007047if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007048 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007049else
7050 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007051cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007052/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007053
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007054/* Override any GCC internal prototype to avoid an error.
7055 Use char because int might match the return type of a GCC
7056 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007057#ifdef __cplusplus
7058extern "C"
7059#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007060char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007061int
7062main ()
7063{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007064return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007065 ;
7066 return 0;
7067}
7068_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007069for ac_lib in '' x; do
7070 if test -z "$ac_lib"; then
7071 ac_res="none required"
7072 else
7073 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007074 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007075 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007076 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007077 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007078fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007079rm -f core conftest.err conftest.$ac_objext \
7080 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007081 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007082 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007083fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007084done
Victor Stinnere0be4232011-10-25 13:06:09 +02007085if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007086
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007087else
7088 ac_cv_search_opendir=no
7089fi
7090rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007091LIBS=$ac_func_search_save_LIBS
7092fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007093{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7094$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007095ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007096if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007097 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007098
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007099fi
7100
7101fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007102
Matthias Kloseb9621712010-04-24 17:59:49 +00007103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7104$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007105if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007106 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007107else
Matthias Kloseb9621712010-04-24 17:59:49 +00007108 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007109/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007110#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007111int
7112main ()
7113{
7114return makedev(0, 0);
7115 ;
7116 return 0;
7117}
7118_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007119if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007120 ac_cv_header_sys_types_h_makedev=yes
7121else
Matthias Kloseb9621712010-04-24 17:59:49 +00007122 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007123fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007124rm -f core conftest.err conftest.$ac_objext \
7125 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007126
7127fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007128{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7129$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007130
7131if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007132ac_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 +02007133if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007134
Matthias Kloseb9621712010-04-24 17:59:49 +00007135$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007136
7137fi
7138
7139
7140
7141 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007142 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 +02007143if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007144
Matthias Kloseb9621712010-04-24 17:59:49 +00007145$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007146
7147fi
7148
7149
7150 fi
7151fi
7152
Michael W. Hudson54241132001-12-07 15:38:26 +00007153
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007154# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
7155for ac_header in net/if.h
7156do :
7157 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
7158#ifdef STDC_HEADERS
7159# include <stdlib.h>
7160# include <stddef.h>
7161#else
7162# ifdef HAVE_STDLIB_H
7163# include <stdlib.h>
7164# endif
7165#endif
7166#ifdef HAVE_SYS_SOCKET_H
7167# include <sys/socket.h>
7168#endif
7169
7170"
Victor Stinnere0be4232011-10-25 13:06:09 +02007171if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007172 cat >>confdefs.h <<_ACEOF
7173#define HAVE_NET_IF_H 1
7174_ACEOF
7175
7176fi
7177
7178done
7179
7180
7181
Martin v. Löwisae2830c2004-09-18 09:54:52 +00007182# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00007183for ac_header in term.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007184do :
7185 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00007186#ifdef HAVE_CURSES_H
7187#include <curses.h>
7188#endif
7189
Matthias Kloseb9621712010-04-24 17:59:49 +00007190"
Victor Stinnere0be4232011-10-25 13:06:09 +02007191if test "x$ac_cv_header_term_h" = xyes; then :
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00007192 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007193#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00007194_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00007195
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00007196fi
7197
7198done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00007199
7200
Martin v. Löwis11017b12006-01-14 18:12:57 +00007201# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007202for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007203do :
7204 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 +00007205#ifdef HAVE_ASM_TYPES_H
7206#include <asm/types.h>
7207#endif
7208#ifdef HAVE_SYS_SOCKET_H
7209#include <sys/socket.h>
7210#endif
7211
Matthias Kloseb9621712010-04-24 17:59:49 +00007212"
Victor Stinnere0be4232011-10-25 13:06:09 +02007213if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007214 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007215#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007216_ACEOF
7217
7218fi
7219
7220done
7221
7222
Charles-François Natali47413c12011-10-06 19:47:44 +02007223# On Linux, can.h and can/raw.h require sys/socket.h
7224for ac_header in linux/can.h linux/can/raw.h
7225do :
7226 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7227ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
7228#ifdef HAVE_SYS_SOCKET_H
7229#include <sys/socket.h>
7230#endif
7231
7232"
7233if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7234 cat >>confdefs.h <<_ACEOF
7235#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7236_ACEOF
7237
7238fi
7239
7240done
7241
7242
Guido van Rossum627b2d71993-12-24 10:39:16 +00007243# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00007244was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
7246$as_echo_n "checking for clock_t in time.h... " >&6; }
7247cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007248/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007249#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007250
7251_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007252if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007253 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00007254 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007255else
Martin v. Löwis11437992002-04-12 09:54:03 +00007256
7257
Matthias Kloseb9621712010-04-24 17:59:49 +00007258$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00007259
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007260
Guido van Rossum627b2d71993-12-24 10:39:16 +00007261fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007262rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007263
Matthias Kloseb9621712010-04-24 17:59:49 +00007264{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
7265$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00007266
Matthias Kloseb9621712010-04-24 17:59:49 +00007267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
7268$as_echo_n "checking for makedev... " >&6; }
7269cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007270/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007271
Jesus Cea740f53a2010-04-28 11:35:30 +00007272#if defined(MAJOR_IN_MKDEV)
7273#include <sys/mkdev.h>
7274#elif defined(MAJOR_IN_SYSMACROS)
7275#include <sys/sysmacros.h>
7276#else
7277#include <sys/types.h>
7278#endif
7279
Neal Norwitz11690112002-07-30 01:08:28 +00007280int
7281main ()
7282{
Jesus Cea740f53a2010-04-28 11:35:30 +00007283
7284 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00007285 ;
7286 return 0;
7287}
Matthias Kloseb159a552010-04-25 21:00:44 +00007288
Neal Norwitz11690112002-07-30 01:08:28 +00007289_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007290if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007291 ac_cv_has_makedev=yes
7292else
Matthias Kloseb9621712010-04-24 17:59:49 +00007293 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007294fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007295rm -f core conftest.err conftest.$ac_objext \
7296 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007297{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
7298$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007299if test "$ac_cv_has_makedev" = "yes"; then
7300
Matthias Kloseb9621712010-04-24 17:59:49 +00007301$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007302
7303fi
7304
Martin v. Löwis399a6892002-10-04 10:22:02 +00007305# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7306# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7307# defined, but the compiler does not support pragma redefine_extname,
7308# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7309# structures (such as rlimit64) without declaring them. As a
7310# work-around, disable LFS on such configurations
7311
7312use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00007313{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
7314$as_echo_n "checking Solaris LFS bug... " >&6; }
7315cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007316/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007317
7318#define _LARGEFILE_SOURCE 1
7319#define _FILE_OFFSET_BITS 64
7320#include <sys/resource.h>
7321
Martin v. Löwis399a6892002-10-04 10:22:02 +00007322int
7323main ()
7324{
7325struct rlimit foo;
7326 ;
7327 return 0;
7328}
7329_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007330if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00007331 sol_lfs_bug=no
7332else
Matthias Kloseb9621712010-04-24 17:59:49 +00007333 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00007334fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007335rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007336{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
7337$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007338if test "$sol_lfs_bug" = "yes"; then
7339 use_lfs=no
7340fi
7341
7342if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00007343# Two defines needed to enable largefile support on various platforms
7344# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00007345case $ac_sys_system/$ac_sys_release in
7346AIX*)
7347
7348$as_echo "#define _LARGE_FILES 1" >>confdefs.h
7349
7350 ;;
7351esac
Guido van Rossum810cc512001-09-09 23:51:39 +00007352
Matthias Kloseb9621712010-04-24 17:59:49 +00007353$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007354
7355
Matthias Kloseb9621712010-04-24 17:59:49 +00007356$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00007357
Martin v. Löwis399a6892002-10-04 10:22:02 +00007358fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007359
Guido van Rossum84e7b241996-08-19 21:59:00 +00007360# Add some code to confdefs.h so that the test for off_t works on SCO
7361cat >> confdefs.h <<\EOF
7362#if defined(SCO_DS)
7363#undef _OFF_T
7364#endif
7365EOF
7366
Guido van Rossumef2255b2000-03-10 22:30:29 +00007367# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00007368ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007369if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007370
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007371else
Martin v. Löwis11437992002-04-12 09:54:03 +00007372
7373cat >>confdefs.h <<_ACEOF
7374#define mode_t int
7375_ACEOF
7376
7377fi
7378
Matthias Kloseb9621712010-04-24 17:59:49 +00007379ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007380if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007381
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007382else
Martin v. Löwis11437992002-04-12 09:54:03 +00007383
7384cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007385#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00007386_ACEOF
7387
7388fi
7389
Matthias Kloseb9621712010-04-24 17:59:49 +00007390ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007391if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007392
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007393else
Martin v. Löwis11437992002-04-12 09:54:03 +00007394
7395cat >>confdefs.h <<_ACEOF
7396#define pid_t int
7397_ACEOF
7398
7399fi
7400
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007401
Martin v. Löwis11437992002-04-12 09:54:03 +00007402cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00007403#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00007404_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007405
Matthias Kloseb9621712010-04-24 17:59:49 +00007406ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007407if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007408
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007409else
Martin v. Löwis11437992002-04-12 09:54:03 +00007410
7411cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007412#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007413_ACEOF
7414
7415fi
7416
Matthias Kloseb9621712010-04-24 17:59:49 +00007417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
7418$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007419if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007420 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007421else
Matthias Kloseb9621712010-04-24 17:59:49 +00007422 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007423/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007424#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007425
7426_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007427if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007428 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007429 ac_cv_type_uid_t=yes
7430else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007431 ac_cv_type_uid_t=no
7432fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007433rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007434
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007435fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007436{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
7437$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007438if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007439
Matthias Kloseb9621712010-04-24 17:59:49 +00007440$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007441
7442
Matthias Kloseb9621712010-04-24 17:59:49 +00007443$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007444
7445fi
7446
Mark Dickinsonce31f662012-12-02 13:20:22 +00007447
7448# There are two separate checks for each of the exact-width integer types we
7449# need. First we check whether the type is available using the usual
7450# AC_CHECK_TYPE macro with the default includes (which includes <inttypes.h>
7451# and <stdint.h> where available). We then also use the special type checks of
7452# the form AC_TYPE_UINT32_T, which in the case that uint32_t is not available
7453# directly, #define's uint32_t to be a suitable type.
7454
7455ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
7456if test "x$ac_cv_type_uint32_t" = xyes; then :
7457
7458$as_echo "#define HAVE_UINT32_T 1" >>confdefs.h
7459
7460fi
7461
Matthias Kloseb9621712010-04-24 17:59:49 +00007462ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
7463case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007464 no|yes) ;; #(
7465 *)
7466
Matthias Kloseb9621712010-04-24 17:59:49 +00007467$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00007468
7469
7470cat >>confdefs.h <<_ACEOF
7471#define uint32_t $ac_cv_c_uint32_t
7472_ACEOF
7473;;
7474 esac
7475
Mark Dickinsonce31f662012-12-02 13:20:22 +00007476
7477ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
7478if test "x$ac_cv_type_uint64_t" = xyes; then :
7479
7480$as_echo "#define HAVE_UINT64_T 1" >>confdefs.h
7481
7482fi
7483
Matthias Kloseb9621712010-04-24 17:59:49 +00007484ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
7485case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007486 no|yes) ;; #(
7487 *)
7488
Matthias Kloseb9621712010-04-24 17:59:49 +00007489$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00007490
7491
7492cat >>confdefs.h <<_ACEOF
7493#define uint64_t $ac_cv_c_uint64_t
7494_ACEOF
7495;;
7496 esac
7497
Mark Dickinsonce31f662012-12-02 13:20:22 +00007498
7499ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
7500if test "x$ac_cv_type_int32_t" = xyes; then :
7501
7502$as_echo "#define HAVE_INT32_T 1" >>confdefs.h
7503
7504fi
7505
Matthias Kloseb9621712010-04-24 17:59:49 +00007506ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
7507case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007508 no|yes) ;; #(
7509 *)
7510
7511cat >>confdefs.h <<_ACEOF
7512#define int32_t $ac_cv_c_int32_t
7513_ACEOF
7514;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00007515esac
7516
Mark Dickinsonce31f662012-12-02 13:20:22 +00007517
7518ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
7519if test "x$ac_cv_type_int64_t" = xyes; then :
7520
7521$as_echo "#define HAVE_INT64_T 1" >>confdefs.h
7522
7523fi
7524
Matthias Kloseb9621712010-04-24 17:59:49 +00007525ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
7526case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007527 no|yes) ;; #(
7528 *)
7529
7530cat >>confdefs.h <<_ACEOF
7531#define int64_t $ac_cv_c_int64_t
7532_ACEOF
7533;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007534esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00007535
Mark Dickinsonce31f662012-12-02 13:20:22 +00007536
Matthias Kloseb9621712010-04-24 17:59:49 +00007537ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007538if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007539
Matthias Kloseb9621712010-04-24 17:59:49 +00007540$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00007541
7542fi
7543
Stefan Krah1919b7e2012-03-21 18:25:23 +01007544ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
7545if test "x$ac_cv_type___uint128_t" = xyes; then :
7546
7547$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
7548
7549fi
7550
Jack Jansendd19cf82001-12-06 22:36:17 +00007551
Michael W. Hudson54241132001-12-07 15:38:26 +00007552# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007553# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007554# The cast to long int works around a bug in the HP C Compiler
7555# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7556# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7557# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
7559$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007560if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007561 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007562else
Matthias Kloseb9621712010-04-24 17:59:49 +00007563 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 +00007564
Martin v. Löwis11437992002-04-12 09:54:03 +00007565else
Matthias Kloseb9621712010-04-24 17:59:49 +00007566 if test "$ac_cv_type_int" = yes; then
7567 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7568$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007569as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02007570See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007571 else
7572 ac_cv_sizeof_int=0
7573 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007574fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007575
Martin v. Löwis11437992002-04-12 09:54:03 +00007576fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007577{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
7578$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007579
7580
7581
Martin v. Löwis11437992002-04-12 09:54:03 +00007582cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007583#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007584_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007585
7586
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007587# The cast to long int works around a bug in the HP C Compiler
7588# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7589# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7590# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
7592$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007593if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007594 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007595else
Matthias Kloseb9621712010-04-24 17:59:49 +00007596 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 +00007597
Martin v. Löwis11437992002-04-12 09:54:03 +00007598else
Matthias Kloseb9621712010-04-24 17:59:49 +00007599 if test "$ac_cv_type_long" = yes; then
7600 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7601$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007602as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02007603See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007604 else
7605 ac_cv_sizeof_long=0
7606 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007607fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007608
Martin v. Löwis11437992002-04-12 09:54:03 +00007609fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007610{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
7611$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007612
7613
7614
Martin v. Löwis11437992002-04-12 09:54:03 +00007615cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007616#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007617_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007618
7619
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007620# The cast to long int works around a bug in the HP C Compiler
7621# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7622# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7623# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
7625$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007626if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007627 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007628else
Matthias Kloseb9621712010-04-24 17:59:49 +00007629 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 +00007630
Martin v. Löwis11437992002-04-12 09:54:03 +00007631else
Matthias Kloseb9621712010-04-24 17:59:49 +00007632 if test "$ac_cv_type_void_p" = yes; then
7633 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7634$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007635as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02007636See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007637 else
7638 ac_cv_sizeof_void_p=0
7639 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007640fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007641
Martin v. Löwis11437992002-04-12 09:54:03 +00007642fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007643{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
7644$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007645
7646
7647
Martin v. Löwis11437992002-04-12 09:54:03 +00007648cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007649#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00007650_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007651
7652
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007653# The cast to long int works around a bug in the HP C Compiler
7654# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7655# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7656# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
7658$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007659if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007660 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007661else
Matthias Kloseb9621712010-04-24 17:59:49 +00007662 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 +00007663
Martin v. Löwis11437992002-04-12 09:54:03 +00007664else
Matthias Kloseb9621712010-04-24 17:59:49 +00007665 if test "$ac_cv_type_short" = yes; then
7666 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7667$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007668as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02007669See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007670 else
7671 ac_cv_sizeof_short=0
7672 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007673fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007674
Martin v. Löwis11437992002-04-12 09:54:03 +00007675fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007676{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
7677$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007678
7679
7680
Martin v. Löwis11437992002-04-12 09:54:03 +00007681cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007682#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007683_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007684
7685
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007686# The cast to long int works around a bug in the HP C Compiler
7687# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7688# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7689# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
7691$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007692if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007693 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007694else
Matthias Kloseb9621712010-04-24 17:59:49 +00007695 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 +00007696
Martin v. Löwis11437992002-04-12 09:54:03 +00007697else
Matthias Kloseb9621712010-04-24 17:59:49 +00007698 if test "$ac_cv_type_float" = yes; then
7699 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7700$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007701as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02007702See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007703 else
7704 ac_cv_sizeof_float=0
7705 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007706fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007707
Martin v. Löwis11437992002-04-12 09:54:03 +00007708fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007709{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
7710$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007711
7712
7713
Martin v. Löwis11437992002-04-12 09:54:03 +00007714cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007715#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007716_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007717
7718
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007719# The cast to long int works around a bug in the HP C Compiler
7720# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7721# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7722# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
7724$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007725if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007726 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007727else
Matthias Kloseb9621712010-04-24 17:59:49 +00007728 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 +00007729
Martin v. Löwis11437992002-04-12 09:54:03 +00007730else
Matthias Kloseb9621712010-04-24 17:59:49 +00007731 if test "$ac_cv_type_double" = yes; then
7732 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7733$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007734as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02007735See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007736 else
7737 ac_cv_sizeof_double=0
7738 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007739fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007740
Martin v. Löwis11437992002-04-12 09:54:03 +00007741fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007742{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
7743$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007744
7745
7746
Martin v. Löwis11437992002-04-12 09:54:03 +00007747cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007748#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007749_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007750
7751
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007752# The cast to long int works around a bug in the HP C Compiler
7753# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7754# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7755# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
7757$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007758if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007759 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007760else
Matthias Kloseb9621712010-04-24 17:59:49 +00007761 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 +00007762
Martin v. Löwis11437992002-04-12 09:54:03 +00007763else
Matthias Kloseb9621712010-04-24 17:59:49 +00007764 if test "$ac_cv_type_fpos_t" = yes; then
7765 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7766$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007767as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007768See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007769 else
7770 ac_cv_sizeof_fpos_t=0
7771 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007772fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007773
Martin v. Löwis11437992002-04-12 09:54:03 +00007774fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007775{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
7776$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007777
7778
7779
Martin v. Löwis11437992002-04-12 09:54:03 +00007780cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007781#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007782_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007783
Michael W. Hudson54241132001-12-07 15:38:26 +00007784
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007785# The cast to long int works around a bug in the HP C Compiler
7786# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7787# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7788# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
7790$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007791if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007792 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007793else
Matthias Kloseb9621712010-04-24 17:59:49 +00007794 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 +00007795
Martin v. Löwis18e16552006-02-15 17:27:45 +00007796else
Matthias Kloseb9621712010-04-24 17:59:49 +00007797 if test "$ac_cv_type_size_t" = yes; then
7798 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7799$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007800as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007801See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007802 else
7803 ac_cv_sizeof_size_t=0
7804 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00007805fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007806
Martin v. Löwis18e16552006-02-15 17:27:45 +00007807fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007808{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
7809$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007810
7811
7812
Martin v. Löwis18e16552006-02-15 17:27:45 +00007813cat >>confdefs.h <<_ACEOF
7814#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
7815_ACEOF
7816
7817
Christian Heimes400adb02008-02-01 08:12:03 +00007818# The cast to long int works around a bug in the HP C Compiler
7819# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7820# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7821# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
7823$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007824if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007825 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00007826else
Matthias Kloseb9621712010-04-24 17:59:49 +00007827 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 +00007828
Christian Heimes400adb02008-02-01 08:12:03 +00007829else
Matthias Kloseb9621712010-04-24 17:59:49 +00007830 if test "$ac_cv_type_pid_t" = yes; then
7831 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7832$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007833as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007834See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00007835 else
7836 ac_cv_sizeof_pid_t=0
7837 fi
7838fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007839
Christian Heimes400adb02008-02-01 08:12:03 +00007840fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007841{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
7842$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00007843
7844
7845
7846cat >>confdefs.h <<_ACEOF
7847#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
7848_ACEOF
7849
7850
Michael W. Hudson54241132001-12-07 15:38:26 +00007851
Matthias Kloseb9621712010-04-24 17:59:49 +00007852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
7853$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007854have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007855cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007856/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007857
Martin v. Löwis11437992002-04-12 09:54:03 +00007858int
7859main ()
7860{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007861long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007862 ;
7863 return 0;
7864}
7865_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007866if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007867
7868
Matthias Kloseb9621712010-04-24 17:59:49 +00007869$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007870
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007871 have_long_long=yes
7872
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007873fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007874rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007875{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
7876$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007877if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007878# The cast to long int works around a bug in the HP C Compiler
7879# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7880# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7881# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
7883$as_echo_n "checking size of long long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007884if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007885 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007886else
Matthias Kloseb9621712010-04-24 17:59:49 +00007887 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 +00007888
Martin v. Löwis11437992002-04-12 09:54:03 +00007889else
Matthias Kloseb9621712010-04-24 17:59:49 +00007890 if test "$ac_cv_type_long_long" = yes; then
7891 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7892$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007893as_fn_error 77 "cannot compute sizeof (long long)
Victor Stinnere0be4232011-10-25 13:06:09 +02007894See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007895 else
7896 ac_cv_sizeof_long_long=0
7897 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007898fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007899
Martin v. Löwis11437992002-04-12 09:54:03 +00007900fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007901{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
7902$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007903
7904
7905
Martin v. Löwis11437992002-04-12 09:54:03 +00007906cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007907#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007908_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007909
Michael W. Hudson54241132001-12-07 15:38:26 +00007910
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007911fi
7912
Matthias Kloseb9621712010-04-24 17:59:49 +00007913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
7914$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007915have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007916cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007917/* end confdefs.h. */
7918
7919int
7920main ()
7921{
7922long double x; x = (long double)0;
7923 ;
7924 return 0;
7925}
7926_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007927if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007928
7929
Matthias Kloseb9621712010-04-24 17:59:49 +00007930$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007931
7932 have_long_double=yes
7933
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007934fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007935rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007936{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
7937$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007938if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007939# The cast to long int works around a bug in the HP C Compiler
7940# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7941# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7942# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
7944$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007945if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007946 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007947else
Matthias Kloseb9621712010-04-24 17:59:49 +00007948 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 +00007949
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007950else
Matthias Kloseb9621712010-04-24 17:59:49 +00007951 if test "$ac_cv_type_long_double" = yes; then
7952 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7953$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007954as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02007955See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007956 else
7957 ac_cv_sizeof_long_double=0
7958 fi
7959fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007960
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007961fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007962{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
7963$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007964
7965
7966
7967cat >>confdefs.h <<_ACEOF
7968#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7969_ACEOF
7970
7971
7972fi
7973
7974
Matthias Kloseb9621712010-04-24 17:59:49 +00007975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7976$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007977have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007978cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00007979/* end confdefs.h. */
7980
7981int
7982main ()
7983{
7984_Bool x; x = (_Bool)0;
7985 ;
7986 return 0;
7987}
7988_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007989if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00007990
7991
Matthias Kloseb9621712010-04-24 17:59:49 +00007992$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00007993
7994 have_c99_bool=yes
7995
Thomas Woutersb2137042007-02-01 18:02:27 +00007996fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007997rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007998{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7999$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00008000if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008001# The cast to long int works around a bug in the HP C Compiler
8002# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8003# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8004# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8006$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008007if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008008 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008009else
Matthias Kloseb9621712010-04-24 17:59:49 +00008010 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 +00008011
Thomas Woutersb2137042007-02-01 18:02:27 +00008012else
Matthias Kloseb9621712010-04-24 17:59:49 +00008013 if test "$ac_cv_type__Bool" = yes; then
8014 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8015$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008016as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008017See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008018 else
8019 ac_cv_sizeof__Bool=0
8020 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008021fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008022
Thomas Woutersb2137042007-02-01 18:02:27 +00008023fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008024{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8025$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008026
8027
8028
Thomas Woutersb2137042007-02-01 18:02:27 +00008029cat >>confdefs.h <<_ACEOF
8030#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8031_ACEOF
8032
8033
8034fi
8035
Matthias Kloseb9621712010-04-24 17:59:49 +00008036ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00008037 #include <stdint.h>
8038 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00008039 #ifdef HAVE_INTTYPES_H
8040 #include <inttypes.h>
8041 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00008042"
Victor Stinnere0be4232011-10-25 13:06:09 +02008043if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00008044
8045cat >>confdefs.h <<_ACEOF
8046#define HAVE_UINTPTR_T 1
8047_ACEOF
8048
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008049# The cast to long int works around a bug in the HP C Compiler
8050# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8051# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8052# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8054$as_echo_n "checking size of uintptr_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008055if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008056 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008057else
Matthias Kloseb9621712010-04-24 17:59:49 +00008058 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 +00008059
Martin v. Löwis11437992002-04-12 09:54:03 +00008060else
Matthias Kloseb9621712010-04-24 17:59:49 +00008061 if test "$ac_cv_type_uintptr_t" = yes; then
8062 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8063$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008064as_fn_error 77 "cannot compute sizeof (uintptr_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008065See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008066 else
8067 ac_cv_sizeof_uintptr_t=0
8068 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008069fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008070
Martin v. Löwis11437992002-04-12 09:54:03 +00008071fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008072{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8073$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008074
8075
8076
Martin v. Löwis11437992002-04-12 09:54:03 +00008077cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008078#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008079_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008080
Michael W. Hudson54241132001-12-07 15:38:26 +00008081
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008082fi
8083
Thomas Wouters89f507f2006-12-13 04:49:30 +00008084
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008085# The cast to long int works around a bug in the HP C Compiler
8086# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8087# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8088# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8090$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008091if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008092 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008093else
Matthias Kloseb9621712010-04-24 17:59:49 +00008094 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008095#ifdef HAVE_SYS_TYPES_H
8096#include <sys/types.h>
8097#endif
8098
Matthias Kloseb9621712010-04-24 17:59:49 +00008099"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008100
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008101else
Matthias Kloseb9621712010-04-24 17:59:49 +00008102 if test "$ac_cv_type_off_t" = yes; then
8103 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8104$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008105as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008106See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008107 else
8108 ac_cv_sizeof_off_t=0
8109 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008110fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008111
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008112fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008113{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8114$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008115
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008116
8117
Martin v. Löwis11437992002-04-12 09:54:03 +00008118cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008119#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008120_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008121
Michael W. Hudson54241132001-12-07 15:38:26 +00008122
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008123
Matthias Kloseb9621712010-04-24 17:59:49 +00008124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8125$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008126if test "$have_long_long" = yes
8127then
8128if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008129 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008130
Matthias Kloseb9621712010-04-24 17:59:49 +00008131$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008132
Matthias Kloseb9621712010-04-24 17:59:49 +00008133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8134$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008135else
Matthias Kloseb9621712010-04-24 17:59:49 +00008136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8137$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008138fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00008139else
Matthias Kloseb9621712010-04-24 17:59:49 +00008140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8141$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008142fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008143
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008144# The cast to long int works around a bug in the HP C Compiler
8145# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8146# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8147# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8149$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008150if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008151 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008152else
Matthias Kloseb9621712010-04-24 17:59:49 +00008153 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008154#ifdef HAVE_SYS_TYPES_H
8155#include <sys/types.h>
8156#endif
8157#ifdef HAVE_TIME_H
8158#include <time.h>
8159#endif
8160
Matthias Kloseb9621712010-04-24 17:59:49 +00008161"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008162
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008163else
Matthias Kloseb9621712010-04-24 17:59:49 +00008164 if test "$ac_cv_type_time_t" = yes; then
8165 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8166$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008167as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008168See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008169 else
8170 ac_cv_sizeof_time_t=0
8171 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008172fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008173
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008174fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008175{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8176$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008177
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008178
8179
Martin v. Löwis11437992002-04-12 09:54:03 +00008180cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008181#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008182_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008183
Michael W. Hudson54241132001-12-07 15:38:26 +00008184
8185
Trent Mick635f6fb2000-08-23 21:33:05 +00008186# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008187ac_save_cc="$CC"
8188if test "$ac_cv_kpthread" = "yes"
8189then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008190elif test "$ac_cv_kthread" = "yes"
8191then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008192elif test "$ac_cv_pthread" = "yes"
8193then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008194fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008195
Matthias Kloseb9621712010-04-24 17:59:49 +00008196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8197$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008198have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008199cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008200/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008201
8202 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008203int
8204main ()
8205{
Guido van Rossum12580492000-09-24 16:47:19 +00008206pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008207 ;
8208 return 0;
8209}
Matthias Kloseb159a552010-04-25 21:00:44 +00008210
Martin v. Löwis11437992002-04-12 09:54:03 +00008211_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008212if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008213 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008214fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008215rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008216{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8217$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008218if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008219 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008220# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8221# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8222# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8224$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008225if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008226 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008227else
Matthias Kloseb9621712010-04-24 17:59:49 +00008228 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008229#ifdef HAVE_PTHREAD_H
8230#include <pthread.h>
8231#endif
8232
Matthias Kloseb9621712010-04-24 17:59:49 +00008233"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008234
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008235else
Matthias Kloseb9621712010-04-24 17:59:49 +00008236 if test "$ac_cv_type_pthread_t" = yes; then
8237 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8238$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008239as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008240See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008241 else
8242 ac_cv_sizeof_pthread_t=0
8243 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008244fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008245
Trent Mick635f6fb2000-08-23 21:33:05 +00008246fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008247{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8248$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008249
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008250
8251
Martin v. Löwis11437992002-04-12 09:54:03 +00008252cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008253#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008254_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008255
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008256
Trent Mick635f6fb2000-08-23 21:33:05 +00008257fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008258CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008259
Michael W. Hudson54241132001-12-07 15:38:26 +00008260
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008261case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008262 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008263 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8264 ;;
8265 Darwin/*)
8266 OTHER_LIBTOOL_OPT=""
8267 ;;
8268esac
8269
8270
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008271ARCH_RUN_32BIT=""
8272
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008273case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008274 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00008275 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8276 if test "${enable_universalsdk}"; then
8277 :
8278 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008279 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008280 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008281 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008282 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008283 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00008284 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008285 if test ${gcc_version} '<' 4.0
8286 then
8287 LIBTOOL_CRUFT="-lcc_dynamic"
8288 else
8289 LIBTOOL_CRUFT=""
8290 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008291 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008292 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008293else
Matthias Kloseb9621712010-04-24 17:59:49 +00008294 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008295/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008296
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008297 #include <unistd.h>
8298 int main(int argc, char*argv[])
8299 {
8300 if (sizeof(long) == 4) {
8301 return 0;
8302 } else {
8303 return 1;
8304 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008305 }
8306
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008307_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008308if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008309 ac_osx_32bit=yes
8310else
Matthias Kloseb9621712010-04-24 17:59:49 +00008311 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008312fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008313rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8314 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008315fi
8316
8317
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008318 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008319 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008320 i386)
8321 MACOSX_DEFAULT_ARCH="i386"
8322 ;;
8323 ppc)
8324 MACOSX_DEFAULT_ARCH="ppc"
8325 ;;
8326 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008327 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008328 ;;
8329 esac
8330 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008331 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008332 i386)
8333 MACOSX_DEFAULT_ARCH="x86_64"
8334 ;;
8335 ppc)
8336 MACOSX_DEFAULT_ARCH="ppc64"
8337 ;;
8338 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008339 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008340 ;;
8341 esac
8342
8343 #ARCH_RUN_32BIT="true"
8344 fi
8345
8346 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00008347 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008348 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008349esac
8350
Matthias Kloseb9621712010-04-24 17:59:49 +00008351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
8352$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008353if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008354then
Skip Montanarodecc6a42003-01-01 20:07:49 +00008355 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00008356 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008357 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008358
Matthias Kloseb9621712010-04-24 17:59:49 +00008359$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008360
Matthias Kloseb9621712010-04-24 17:59:49 +00008361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8362$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00008363 if test $enable_shared = "yes"
8364 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008365 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 +00008366 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008367else
Matthias Kloseb9621712010-04-24 17:59:49 +00008368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8369$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008370fi
8371
Matthias Kloseb9621712010-04-24 17:59:49 +00008372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
8373$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008374case $ac_sys_system/$ac_sys_release in
8375 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008376
Matthias Kloseb9621712010-04-24 17:59:49 +00008377$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008378
Matthias Kloseb9621712010-04-24 17:59:49 +00008379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
8380$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008381 ;;
8382 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00008383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8384$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008385 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008386esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008387
Guido van Rossum0a516c91994-09-12 10:58:40 +00008388# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008389
Michael W. Hudson54241132001-12-07 15:38:26 +00008390
8391
8392
8393
Benjamin Peterson99f03762010-04-11 22:15:28 +00008394
Thomas Wouters477c8d52006-05-27 19:21:47 +00008395
doko@ubuntu.comd5537d02013-03-21 13:21:49 -07008396# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
8397# -- usually .so, .sl on HP-UX, .dll on Cygwin
8398{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the extension of shared libraries" >&5
8399$as_echo_n "checking the extension of shared libraries... " >&6; }
8400if test -z "$SHLIB_SUFFIX"; then
8401 case $ac_sys_system in
8402 hp*|HP*)
8403 case `uname -m` in
8404 ia64) SHLIB_SUFFIX=.so;;
8405 *) SHLIB_SUFFIX=.sl;;
8406 esac
8407 ;;
8408 CYGWIN*) SHLIB_SUFFIX=.dll;;
8409 *) SHLIB_SUFFIX=.so;;
8410 esac
8411fi
8412{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIB_SUFFIX" >&5
8413$as_echo "$SHLIB_SUFFIX" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00008414
Guido van Rossum0a516c91994-09-12 10:58:40 +00008415# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00008416# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008417# (Shared libraries in this instance are shared modules to be loaded into
8418# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00008419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
8420$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008421if test -z "$LDSHARED"
8422then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008423 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008424 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00008425 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00008426 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008427 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008428 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008429 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008430 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008431 if test "$GCC" = "yes" ; then
8432 LDSHARED='$(CC) -shared'
8433 LDCXXSHARED='$(CXX) -shared'
8434 else
8435 LDSHARED='$(CC) -G'
8436 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00008437 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008438 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008439 if test "$GCC" = "yes" ; then
8440 LDSHARED='$(CC) -shared'
8441 LDCXXSHARED='$(CXX) -shared'
8442 else
8443 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008444 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00008445 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008446 LDSHARED='$(CC) -bundle'
8447 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00008448 if test "$enable_framework" ; then
8449 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008450 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8451 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008452 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008453 else
8454 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008455 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00008456 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008457 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008458 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008459 LDSHARED='$(CC) -bundle'
8460 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00008461 if test "$enable_framework" ; then
8462 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008463 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8464 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008465 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008466 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008467 # No framework, use the Python app as bundle-loader
8468 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00008469 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008470 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008471 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008472 Darwin/*)
8473 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
8474 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00008475
Benjamin Peterson14ae9592008-07-16 02:20:15 +00008476 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00008477 then
Thomas Wouters477c8d52006-05-27 19:21:47 +00008478 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +00008479 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008480 fi
Antoine Pitroud4958c22010-10-13 17:01:10 +00008481 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
8482 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00008483 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00008484 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00008485 LDSHARED='$(CC) -bundle'
8486 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00008487 if test "$enable_framework" ; then
8488 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008489 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8490 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008491 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008492 else
8493 # No framework, use the Python app as bundle-loader
8494 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8495 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008496 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008497 fi
8498 fi
8499 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008500 Linux*|GNU*|QNX*)
8501 LDSHARED='$(CC) -shared'
8502 LDCXXSHARED='$(CXX) -shared';;
8503 BSD/OS*/4*)
8504 LDSHARED="gcc -shared"
8505 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008506 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008507 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008508 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008509 LDSHARED='$(CC) -shared'
8510 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00008511 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00008512 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00008513 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008514 OpenBSD*)
8515 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8516 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008517 LDSHARED='$(CC) -shared $(CCSHARED)'
8518 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008519 else
8520 case `uname -r` in
8521 [01].* | 2.[0-7] | 2.[0-7].*)
8522 LDSHARED="ld -Bshareable ${LDFLAGS}"
8523 ;;
8524 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008525 LDSHARED='$(CC) -shared $(CCSHARED)'
8526 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008527 ;;
8528 esac
8529 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008530 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00008531 LDSHARED='$(CC) -shared'
8532 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008533 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008534 if test "$GCC" = "yes" ; then
8535 LDSHARED='$(CC) -shared'
8536 LDCXXSHARED='$(CXX) -shared'
8537 else
8538 LDSHARED='$(CC) -G'
8539 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00008540 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008541 SCO_SV*)
8542 LDSHARED='$(CC) -Wl,-G,-Bexport'
8543 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
8544 CYGWIN*)
8545 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
8546 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008547 *) LDSHARED="ld";;
8548 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008549fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008550{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
8551$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00008552LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008553BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008554# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008555# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
8557$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008558if test -z "$CCSHARED"
8559then
Guido van Rossum07397971997-04-29 21:49:50 +00008560 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008561 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008562 then CCSHARED="-fPIC";
8563 elif test `uname -p` = sparc;
8564 then CCSHARED="-xcode=pic32";
8565 else CCSHARED="-Kpic";
8566 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00008567 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00008568 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00008569 else CCSHARED="+z";
8570 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008571 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008572 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008573 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008574 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008575 if test "$GCC" = "yes"
8576 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008577 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008578 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008579 SCO_SV*)
8580 if test "$GCC" = "yes"
8581 then CCSHARED="-fPIC"
8582 else CCSHARED="-Kpic -belf"
8583 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008584 IRIX*/6*) case $CC in
8585 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00008586 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008587 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008588 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008589fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008590{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
8591$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008592# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008593# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
8595$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008596if test -z "$LINKFORSHARED"
8597then
Guido van Rossum07397971997-04-29 21:49:50 +00008598 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008599 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008600 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00008601 LINKFORSHARED="-Wl,-E -Wl,+s";;
8602# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008603 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008604 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008605 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00008606 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00008607 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +00008608 if test "$enable_framework"
8609 then
Jack Jansenda49e192005-01-07 13:08:22 +00008610 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008611 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008612 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008613 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008614 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00008615 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008616 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00008617 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8618 then
8619 LINKFORSHARED="-Wl,--export-dynamic"
8620 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008621 SunOS/5*) case $CC in
8622 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00008623 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00008624 then
8625 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008626 fi;;
8627 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00008628 CYGWIN*)
8629 if test $enable_shared = "no"
8630 then
8631 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
8632 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00008633 QNX*)
8634 # -Wl,-E causes the symbols to be added to the dynamic
8635 # symbol table so that they can be found when a module
8636 # is loaded. -N 2048K causes the stack size to be set
8637 # to 2048 kilobytes so that the stack doesn't overflow
8638 # when running test_compile.py.
8639 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008640 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008641fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008642{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
8643$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008644
Michael W. Hudson54241132001-12-07 15:38:26 +00008645
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00008646
Matthias Kloseb9621712010-04-24 17:59:49 +00008647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
8648$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008649if test ! "$LIBRARY" = "$LDLIBRARY"
8650then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00008651 case $ac_sys_system in
8652 CYGWIN*)
8653 # Cygwin needs CCSHARED when building extension DLLs
8654 # but not when building the interpreter DLL.
8655 CFLAGSFORSHARED='';;
8656 *)
8657 CFLAGSFORSHARED='$(CCSHARED)'
8658 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008659fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008660{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
8661$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008662
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008663# SHLIBS are libraries (except -lc and -lm) to link to the python shared
8664# library (with --enable-shared).
8665# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008666# symbols, this must be set to $(LIBS) (expanded by make). We do this even
8667# if it is not required, since it creates a dependency of the shared library
8668# to LIBS. This, in turn, means that applications linking the shared libpython
8669# don't need to link LIBS explicitly. The default should be only changed
8670# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008671
Matthias Kloseb9621712010-04-24 17:59:49 +00008672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
8673$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008674case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008675 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008676 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008677esac
Matthias Kloseb9621712010-04-24 17:59:49 +00008678{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
8679$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008680
8681
Guido van Rossum627b2d71993-12-24 10:39:16 +00008682# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00008683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
8684$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008685if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00008686 $as_echo_n "(cached) " >&6
8687else
8688 ac_check_lib_save_LIBS=$LIBS
8689LIBS="-lsendfile $LIBS"
8690cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8691/* end confdefs.h. */
8692
8693/* Override any GCC internal prototype to avoid an error.
8694 Use char because int might match the return type of a GCC
8695 builtin and then its argument prototype would still apply. */
8696#ifdef __cplusplus
8697extern "C"
8698#endif
8699char sendfile ();
8700int
8701main ()
8702{
8703return sendfile ();
8704 ;
8705 return 0;
8706}
8707_ACEOF
8708if ac_fn_c_try_link "$LINENO"; then :
8709 ac_cv_lib_sendfile_sendfile=yes
8710else
8711 ac_cv_lib_sendfile_sendfile=no
8712fi
8713rm -f core conftest.err conftest.$ac_objext \
8714 conftest$ac_exeext conftest.$ac_ext
8715LIBS=$ac_check_lib_save_LIBS
8716fi
8717{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
8718$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008719if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00008720 cat >>confdefs.h <<_ACEOF
8721#define HAVE_LIBSENDFILE 1
8722_ACEOF
8723
8724 LIBS="-lsendfile $LIBS"
8725
8726fi
8727
Matthias Kloseb9621712010-04-24 17:59:49 +00008728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
8729$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008730if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008731 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008732else
Martin v. Löwis11437992002-04-12 09:54:03 +00008733 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008734LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008735cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008736/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008737
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008738/* Override any GCC internal prototype to avoid an error.
8739 Use char because int might match the return type of a GCC
8740 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008741#ifdef __cplusplus
8742extern "C"
8743#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008744char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008745int
8746main ()
8747{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008748return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008749 ;
8750 return 0;
8751}
8752_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008753if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008754 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008755else
Matthias Kloseb9621712010-04-24 17:59:49 +00008756 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008757fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008758rm -f core conftest.err conftest.$ac_objext \
8759 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008760LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008761fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008762{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
8763$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008764if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008765 cat >>confdefs.h <<_ACEOF
8766#define HAVE_LIBDL 1
8767_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008768
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008769 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00008770
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008771fi
8772 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00008773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
8774$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008775if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008776 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008777else
Martin v. Löwis11437992002-04-12 09:54:03 +00008778 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008779LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008780cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008781/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008782
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008783/* Override any GCC internal prototype to avoid an error.
8784 Use char because int might match the return type of a GCC
8785 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008786#ifdef __cplusplus
8787extern "C"
8788#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008789char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008790int
8791main ()
8792{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008793return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008794 ;
8795 return 0;
8796}
8797_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008798if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008799 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008800else
Matthias Kloseb9621712010-04-24 17:59:49 +00008801 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008802fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008803rm -f core conftest.err conftest.$ac_objext \
8804 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008805LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008806fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008807{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
8808$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008809if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008810 cat >>confdefs.h <<_ACEOF
8811#define HAVE_LIBDLD 1
8812_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008813
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008814 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008815
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008816fi
8817 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00008818
Georg Brandlb1441c72009-01-03 22:33:39 +00008819# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00008820if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008821 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
8822$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008823if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008824 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008825else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008826 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008827cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008828/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008829
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008830/* Override any GCC internal prototype to avoid an error.
8831 Use char because int might match the return type of a GCC
8832 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008833#ifdef __cplusplus
8834extern "C"
8835#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008836char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008837int
8838main ()
8839{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008840return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008841 ;
8842 return 0;
8843}
8844_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008845for ac_lib in '' pthread rt posix4; do
8846 if test -z "$ac_lib"; then
8847 ac_res="none required"
8848 else
8849 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008850 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008851 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008852 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008853 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008854fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008855rm -f core conftest.err conftest.$ac_objext \
8856 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008857 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008858 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008859fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008860done
Victor Stinnere0be4232011-10-25 13:06:09 +02008861if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008862
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008863else
8864 ac_cv_search_sem_init=no
8865fi
8866rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008867LIBS=$ac_func_search_save_LIBS
8868fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008869{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
8870$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008871ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00008872if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008873 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008874
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008875fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00008876 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00008877 # posix4 on Solaris 2.6
8878 # pthread (first!) on Linux
8879fi
8880
Martin v. Löwis19d17342003-06-14 21:03:05 +00008881# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00008882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
8883$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008884if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008885 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00008886else
8887 ac_check_lib_save_LIBS=$LIBS
8888LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008889cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008890/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008891
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008892/* Override any GCC internal prototype to avoid an error.
8893 Use char because int might match the return type of a GCC
8894 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008895#ifdef __cplusplus
8896extern "C"
8897#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00008898char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008899int
8900main ()
8901{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008902return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008903 ;
8904 return 0;
8905}
8906_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008907if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008908 ac_cv_lib_intl_textdomain=yes
8909else
Matthias Kloseb9621712010-04-24 17:59:49 +00008910 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00008911fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008912rm -f core conftest.err conftest.$ac_objext \
8913 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00008914LIBS=$ac_check_lib_save_LIBS
8915fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008916{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
8917$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008918if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008919
Matthias Kloseb9621712010-04-24 17:59:49 +00008920$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00008921
Brett Cannonc6d936e2009-06-07 20:09:53 +00008922 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00008923fi
8924
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008925
8926# checks for system dependent C++ extensions support
8927case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00008928 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
8929$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
8930 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008931/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008932
Georg Brandl59e87bd2011-02-15 19:48:59 +00008933 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008934int
8935main ()
8936{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008937loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00008938 ;
8939 return 0;
8940}
Matthias Kloseb159a552010-04-25 21:00:44 +00008941
Martin v. Löwis11437992002-04-12 09:54:03 +00008942_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008943if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008944
Matthias Kloseb159a552010-04-25 21:00:44 +00008945
Matthias Kloseb9621712010-04-24 17:59:49 +00008946$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008947
Matthias Kloseb159a552010-04-25 21:00:44 +00008948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008949$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008950
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008951else
Matthias Kloseb159a552010-04-25 21:00:44 +00008952
8953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008954$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008955
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008956fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008957rm -f core conftest.err conftest.$ac_objext \
8958 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008959 *) ;;
8960esac
8961
Guido van Rossum70c7f481998-03-26 18:44:10 +00008962# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00008963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
8964$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008965if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008966 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008967else
Martin v. Löwis11437992002-04-12 09:54:03 +00008968 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008969LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008970cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008971/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008972
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008973/* Override any GCC internal prototype to avoid an error.
8974 Use char because int might match the return type of a GCC
8975 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008976#ifdef __cplusplus
8977extern "C"
8978#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008979char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008980int
8981main ()
8982{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008983return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008984 ;
8985 return 0;
8986}
8987_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008988if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008989 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008990else
Matthias Kloseb9621712010-04-24 17:59:49 +00008991 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008992fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008993rm -f core conftest.err conftest.$ac_objext \
8994 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008995LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008996fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008997{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
8998$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008999if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009000 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00009001fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00009002 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00009003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
9004$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009005if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009006 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009007else
Martin v. Löwis11437992002-04-12 09:54:03 +00009008 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009009LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009010cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009011/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009012
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009013/* Override any GCC internal prototype to avoid an error.
9014 Use char because int might match the return type of a GCC
9015 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009016#ifdef __cplusplus
9017extern "C"
9018#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009019char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009020int
9021main ()
9022{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009023return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009024 ;
9025 return 0;
9026}
9027_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009028if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009029 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009030else
Matthias Kloseb9621712010-04-24 17:59:49 +00009031 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009032fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009033rm -f core conftest.err conftest.$ac_objext \
9034 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009035LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009036fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009037{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9038$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009039if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009040 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009041fi
9042 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009043
Matthias Kloseb9621712010-04-24 17:59:49 +00009044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9045$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009046
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009047# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009048if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009049 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009050{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9051$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009052LIBS="$withval $LIBS"
9053
9054else
Matthias Kloseb9621712010-04-24 17:59:49 +00009055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9056$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009057fi
9058
Guido van Rossum7f43da71994-08-01 12:15:30 +00009059
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009060if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009061 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9062set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9064$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009065if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009066 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00009067else
9068 case $PKG_CONFIG in
9069 [\\/]* | ?:[\\/]*)
9070 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9071 ;;
9072 *)
9073 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9074for as_dir in $PATH
9075do
9076 IFS=$as_save_IFS
9077 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009078 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00009079 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009080 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00009081 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00009082 break 2
9083 fi
9084done
Matthias Kloseb9621712010-04-24 17:59:49 +00009085 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00009086IFS=$as_save_IFS
9087
9088 ;;
9089esac
9090fi
9091PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9092if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9094$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009095else
Matthias Kloseb9621712010-04-24 17:59:49 +00009096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9097$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009098fi
9099
9100
9101fi
9102if test -z "$ac_cv_path_PKG_CONFIG"; then
9103 ac_pt_PKG_CONFIG=$PKG_CONFIG
9104 # Extract the first word of "pkg-config", so it can be a program name with args.
9105set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9107$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009108if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009109 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00009110else
9111 case $ac_pt_PKG_CONFIG in
9112 [\\/]* | ?:[\\/]*)
9113 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9114 ;;
9115 *)
9116 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9117for as_dir in $PATH
9118do
9119 IFS=$as_save_IFS
9120 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009121 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00009122 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009123 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00009124 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00009125 break 2
9126 fi
9127done
Matthias Kloseb9621712010-04-24 17:59:49 +00009128 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00009129IFS=$as_save_IFS
9130
9131 ;;
9132esac
9133fi
9134ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9135if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9137$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009138else
Matthias Kloseb9621712010-04-24 17:59:49 +00009139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9140$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009141fi
9142
9143 if test "x$ac_pt_PKG_CONFIG" = x; then
9144 PKG_CONFIG=""
9145 else
9146 case $cross_compiling:$ac_tool_warned in
9147yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00009148{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9149$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00009150ac_tool_warned=yes ;;
9151esac
9152 PKG_CONFIG=$ac_pt_PKG_CONFIG
9153 fi
9154else
9155 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9156fi
9157
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009158
9159# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00009160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
9161$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009162
9163# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009164if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009165 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00009166else
9167 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009168fi
9169
9170
Matthias Kloseb9621712010-04-24 17:59:49 +00009171{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
9172$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009173
9174# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00009175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
9176$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009177
9178# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009179if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009180 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00009181else
9182 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009183fi
9184
9185
9186if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009187 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
9188else
9189 LIBFFI_INCLUDEDIR=""
9190fi
9191
9192
Matthias Kloseb9621712010-04-24 17:59:49 +00009193{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
9194$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009195
Stefan Krah60187b52012-03-23 19:06:27 +01009196# Check for use of the system libmpdec library
9197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
9198$as_echo_n "checking for --with-system-libmpdec... " >&6; }
9199
9200# Check whether --with-system_libmpdec was given.
9201if test "${with_system_libmpdec+set}" = set; then :
9202 withval=$with_system_libmpdec;
9203else
9204 with_system_libmpdec="no"
9205fi
9206
9207
9208{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
9209$as_echo "$with_system_libmpdec" >&6; }
9210
Benjamin Peterson076ed002010-10-31 17:11:02 +00009211# Check for support for loadable sqlite extensions
9212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
9213$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
9214# Check whether --enable-loadable-sqlite-extensions was given.
9215if test "${enable_loadable_sqlite_extensions+set}" = set; then :
9216 enableval=$enable_loadable_sqlite_extensions;
9217else
9218 enable_loadable_sqlite_extensions="no"
9219fi
9220
9221
9222{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
9223$as_echo "$enable_loadable_sqlite_extensions" >&6; }
9224
Matthias Klose55708cc2009-04-30 08:06:49 +00009225# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00009226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
9227$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009228
9229# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009230if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00009231 withval=$with_dbmliborder;
9232if test x$with_dbmliborder = xyes
9233then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009234as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009235else
9236 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
9237 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
9238 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009239 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009240 fi
9241 done
9242fi
9243fi
9244
Matthias Kloseb9621712010-04-24 17:59:49 +00009245{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
9246$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009247
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009248# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009249
9250
Matthias Kloseb9621712010-04-24 17:59:49 +00009251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
9252$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009253
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009254# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009255if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009256 withval=$with_signal_module;
9257fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009258
9259
9260if test -z "$with_signal_module"
9261then with_signal_module="yes"
9262fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009263{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
9264$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009265
9266if test "${with_signal_module}" = "yes"; then
9267 USE_SIGNAL_MODULE=""
9268 SIGNAL_OBJS=""
9269else
9270 USE_SIGNAL_MODULE="#"
9271 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9272fi
9273
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009274# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009275
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009276USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009277
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009278
Martin v. Löwis11437992002-04-12 09:54:03 +00009279
9280# Templates for things AC_DEFINEd more than once.
9281# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009282
9283
Martin v. Löwis11437992002-04-12 09:54:03 +00009284
Matthias Kloseb9621712010-04-24 17:59:49 +00009285{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
9286$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009287
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009288# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009289if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009290 withval=$with_threads;
9291fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009292
9293
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009294# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009295
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009296# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009297if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009298 withval=$with_thread; with_threads=$with_thread
9299fi
9300
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009301
9302if test -z "$with_threads"
9303then with_threads="yes"
9304fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009305{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
9306$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009307
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009308
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009309if test "$with_threads" = "no"
9310then
9311 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009312elif test "$ac_cv_pthread_is_default" = yes
9313then
Matthias Kloseb9621712010-04-24 17:59:49 +00009314 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009315
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009316 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00009317 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009318
9319 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009320 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009321elif test "$ac_cv_kpthread" = "yes"
9322then
9323 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009324 if test "$ac_cv_cxx_thread" = "yes"; then
9325 CXX="$CXX -Kpthread"
9326 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009327 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009328
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009329 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009330 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009331elif test "$ac_cv_kthread" = "yes"
9332then
9333 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009334 if test "$ac_cv_cxx_thread" = "yes"; then
9335 CXX="$CXX -Kthread"
9336 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009337 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009338
9339 posix_threads=yes
9340 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009341elif test "$ac_cv_pthread" = "yes"
9342then
9343 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009344 if test "$ac_cv_cxx_thread" = "yes"; then
9345 CXX="$CXX -pthread"
9346 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009347 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009348
9349 posix_threads=yes
9350 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009351else
9352 if test ! -z "$with_threads" -a -d "$with_threads"
9353 then LDFLAGS="$LDFLAGS -L$with_threads"
9354 fi
9355 if test ! -z "$withval" -a -d "$withval"
9356 then LDFLAGS="$LDFLAGS -L$withval"
9357 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009358
9359 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00009360 # define _POSIX_THREADS in unistd.h. Some apparently don't
9361 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00009362 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
9363$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
9364 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009365/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009366
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009367#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009368#ifdef _POSIX_THREADS
9369yes
9370#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009371
9372_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009373if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009374 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009375 unistd_defines_pthreads=yes
9376else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009377 unistd_defines_pthreads=no
9378fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009379rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009380
Matthias Kloseb9621712010-04-24 17:59:49 +00009381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
9382$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009383
Matthias Kloseb9621712010-04-24 17:59:49 +00009384 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009385
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009386 # Just looking for pthread_create in libpthread is not enough:
9387 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
9388 # So we really have to include pthread.h, and then link.
9389 _libs=$LIBS
9390 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00009391 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
9392$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
9393 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009394/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +01009395
9396#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009397#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00009398
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009399void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00009400int
9401main ()
9402{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009403
9404pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00009405 ;
9406 return 0;
9407}
9408_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009409if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009410
Matthias Kloseb9621712010-04-24 17:59:49 +00009411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9412$as_echo "yes" >&6; }
9413 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00009414
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009415 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009416 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009417else
Martin v. Löwis11437992002-04-12 09:54:03 +00009418
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009419 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00009420 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +02009421if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009422 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00009423
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009424 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009425 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00009426else
Guido van Rossumad678af1998-10-02 14:42:15 +00009427
Matthias Kloseb9621712010-04-24 17:59:49 +00009428 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
9429$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009430if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009431 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009432else
Martin v. Löwis11437992002-04-12 09:54:03 +00009433 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009434LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009435cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009436/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009437
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009438/* Override any GCC internal prototype to avoid an error.
9439 Use char because int might match the return type of a GCC
9440 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009441#ifdef __cplusplus
9442extern "C"
9443#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009444char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009445int
9446main ()
9447{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009448return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009449 ;
9450 return 0;
9451}
9452_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009453if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009454 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00009455else
Matthias Kloseb9621712010-04-24 17:59:49 +00009456 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00009457fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009458rm -f core conftest.err conftest.$ac_objext \
9459 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009460LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009461fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009462{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
9463$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009464if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009465 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00009466
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009467 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009468 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009469 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00009470else
Greg Steinadf63d62000-07-05 10:38:09 +00009471
Matthias Kloseb9621712010-04-24 17:59:49 +00009472 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
9473$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009474if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009475 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00009476else
Martin v. Löwis11437992002-04-12 09:54:03 +00009477 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009478LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009479cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009480/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009481
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009482/* Override any GCC internal prototype to avoid an error.
9483 Use char because int might match the return type of a GCC
9484 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009485#ifdef __cplusplus
9486extern "C"
9487#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009488char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009489int
9490main ()
9491{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009492return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009493 ;
9494 return 0;
9495}
9496_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009497if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009498 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00009499else
Matthias Kloseb9621712010-04-24 17:59:49 +00009500 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00009501fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009502rm -f core conftest.err conftest.$ac_objext \
9503 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009504LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00009505fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009506{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
9507$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009508if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009509 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00009510
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009511 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009512 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009513 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009514else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009515
Matthias Kloseb9621712010-04-24 17:59:49 +00009516 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
9517$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009518if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009519 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009520else
Martin v. Löwis11437992002-04-12 09:54:03 +00009521 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009522LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009523cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009524/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009525
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009526/* Override any GCC internal prototype to avoid an error.
9527 Use char because int might match the return type of a GCC
9528 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009529#ifdef __cplusplus
9530extern "C"
9531#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009532char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009533int
9534main ()
9535{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009536return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009537 ;
9538 return 0;
9539}
9540_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009541if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009542 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009543else
Matthias Kloseb9621712010-04-24 17:59:49 +00009544 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009545fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009546rm -f core conftest.err conftest.$ac_objext \
9547 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009548LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009549fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009550{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
9551$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009552if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009553 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009554
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009555 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009556 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009557 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009558else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009559
Matthias Kloseb9621712010-04-24 17:59:49 +00009560 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
9561$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009562if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009563 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00009564else
Martin v. Löwis11437992002-04-12 09:54:03 +00009565 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009566LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009567cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009568/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009569
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009570/* Override any GCC internal prototype to avoid an error.
9571 Use char because int might match the return type of a GCC
9572 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009573#ifdef __cplusplus
9574extern "C"
9575#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009576char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009577int
9578main ()
9579{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009580return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009581 ;
9582 return 0;
9583}
9584_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009585if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009586 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00009587else
Matthias Kloseb9621712010-04-24 17:59:49 +00009588 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00009589fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009590rm -f core conftest.err conftest.$ac_objext \
9591 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009592LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009593fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009594{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
9595$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009596if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009597 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00009598
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009599 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009600 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009601 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00009602else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00009603
Martin v. Löwis130fb172001-07-19 11:00:41 +00009604 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00009605fi
9606
Guido van Rossum627b2d71993-12-24 10:39:16 +00009607
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009608fi
9609
Guido van Rossum0be3e491997-05-22 20:33:33 +00009610fi
9611
Guido van Rossum49545951997-12-02 19:28:29 +00009612fi
9613
Guido van Rossumb93a8621998-05-07 13:27:32 +00009614fi
9615
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009616fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009617rm -f core conftest.err conftest.$ac_objext \
9618 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00009619
Matthias Kloseb9621712010-04-24 17:59:49 +00009620 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
9621$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009622if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009623 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009624else
Martin v. Löwis11437992002-04-12 09:54:03 +00009625 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009626LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009627cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009628/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009629
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009630/* Override any GCC internal prototype to avoid an error.
9631 Use char because int might match the return type of a GCC
9632 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009633#ifdef __cplusplus
9634extern "C"
9635#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009636char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009637int
9638main ()
9639{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009640return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009641 ;
9642 return 0;
9643}
9644_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009645if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009646 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009647else
Matthias Kloseb9621712010-04-24 17:59:49 +00009648 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009649fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009650rm -f core conftest.err conftest.$ac_objext \
9651 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009652LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009653fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009654{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
9655$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009656if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009657 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009658
Martin v. Löwis130fb172001-07-19 11:00:41 +00009659 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009660 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009661 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009662fi
9663
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009664
Neal Norwitza978ab02002-11-02 16:58:05 +00009665 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009666 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
9667$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009668if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009669 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009670else
Martin v. Löwis11437992002-04-12 09:54:03 +00009671 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009672LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009673cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009674/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009675
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009676/* Override any GCC internal prototype to avoid an error.
9677 Use char because int might match the return type of a GCC
9678 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009679#ifdef __cplusplus
9680extern "C"
9681#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009682char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009683int
9684main ()
9685{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009686return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009687 ;
9688 return 0;
9689}
9690_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009691if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009692 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009693else
Matthias Kloseb9621712010-04-24 17:59:49 +00009694 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009695fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009696rm -f core conftest.err conftest.$ac_objext \
9697 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009698LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009699fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009700{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
9701$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009702if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009703 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009704
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009705 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009706 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009707 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009708fi
9709
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009710 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009711fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009712
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009713if test "$posix_threads" = "yes"; then
9714 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009715
Matthias Kloseb9621712010-04-24 17:59:49 +00009716$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009717
9718 fi
9719
9720 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
9721 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +02009722 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00009723$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009724
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009725 ;;
9726 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00009727$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009728
9729 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +02009730 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +00009731$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00009732
9733 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009734 esac
9735
Matthias Kloseb9621712010-04-24 17:59:49 +00009736 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
9737$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009738 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009739 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009740else
Matthias Kloseb9621712010-04-24 17:59:49 +00009741 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009742 ac_cv_pthread_system_supported=no
9743else
Matthias Kloseb9621712010-04-24 17:59:49 +00009744 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009745/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +01009746
9747 #include <stdio.h>
9748 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009749 void *foo(void *parm) {
9750 return NULL;
9751 }
9752 main() {
9753 pthread_attr_t attr;
9754 pthread_t id;
9755 if (pthread_attr_init(&attr)) exit(-1);
9756 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
9757 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
9758 exit(0);
9759 }
9760_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009761if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009762 ac_cv_pthread_system_supported=yes
9763else
Matthias Kloseb9621712010-04-24 17:59:49 +00009764 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009765fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009766rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9767 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009768fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009769
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009770
Guido van Rossum627b2d71993-12-24 10:39:16 +00009771fi
9772
Matthias Kloseb9621712010-04-24 17:59:49 +00009773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
9774$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009775 if test "$ac_cv_pthread_system_supported" = "yes"; then
9776
Matthias Kloseb9621712010-04-24 17:59:49 +00009777$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009778
9779 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009780 for ac_func in pthread_sigmask
9781do :
9782 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +02009783if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009784 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009785#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009786_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00009787 case $ac_sys_system in
9788 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009789
Matthias Kloseb9621712010-04-24 17:59:49 +00009790$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00009791
9792 ;;
9793 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009794fi
9795done
9796
9797fi
9798
9799
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009800# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00009801
Matthias Kloseb9621712010-04-24 17:59:49 +00009802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
9803$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009804# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009805if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009806 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009807 no)
Matthias Kloseb9621712010-04-24 17:59:49 +00009808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9809$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009810 ipv6=no
9811 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00009812 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9813$as_echo "yes" >&6; }
9814 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009815
9816 ipv6=yes
9817 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009818 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009819else
Martin v. Löwis11437992002-04-12 09:54:03 +00009820
Matthias Kloseb9621712010-04-24 17:59:49 +00009821 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009822/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009823 /* AF_INET6 available check */
9824#include <sys/types.h>
9825#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +01009826int
9827main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009828{
Charles-François Natalif6fd7942013-01-08 19:49:42 +01009829int domain = AF_INET6;
9830 ;
9831 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009832}
Martin v. Löwis11437992002-04-12 09:54:03 +00009833_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +01009834if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009835
Matthias Kloseb9621712010-04-24 17:59:49 +00009836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9837$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009838 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +00009839
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009840else
Matthias Kloseb159a552010-04-25 21:00:44 +00009841
Matthias Kloseb9621712010-04-24 17:59:49 +00009842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9843$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009844 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +00009845
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009846fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +01009847rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009848
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009849if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009850 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
9851$as_echo_n "checking if RFC2553 API is available... " >&6; }
9852 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009853/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009854
9855 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009856#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009857int
9858main ()
9859{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009860struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +00009861 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00009862 ;
9863 return 0;
9864}
Matthias Kloseb159a552010-04-25 21:00:44 +00009865
Martin v. Löwis11437992002-04-12 09:54:03 +00009866_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009867if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009868
9869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009870$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009871 ipv6=yes
9872
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009873else
Matthias Kloseb159a552010-04-25 21:00:44 +00009874
9875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009876$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009877 ipv6=no
9878
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009879fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009880rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009881fi
9882
9883if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009884 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009885
9886fi
9887
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009888fi
9889
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009890
9891ipv6type=unknown
9892ipv6lib=none
9893ipv6trylibc=no
9894
9895if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009896 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
9897$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00009898 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
9899 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009900 case $i in
9901 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +00009902 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009903/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009904
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009905#include <netinet/in.h>
9906#ifdef IPV6_INRIA_VERSION
9907yes
9908#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009909_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009910if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009911 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009912 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009913fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009914rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009915
9916 ;;
9917 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +00009918 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009919/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009920
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009921#include <netinet/in.h>
9922#ifdef __KAME__
9923yes
9924#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009925_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009926if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009927 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009928 ipv6type=$i;
9929 ipv6lib=inet6
9930 ipv6libdir=/usr/local/v6/lib
9931 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009932fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009933rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009934
9935 ;;
9936 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +00009937 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009938/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009939
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009940#include <features.h>
9941#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
9942yes
9943#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009944_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009945if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009946 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009947 ipv6type=$i;
9948 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009949fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009950rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009951
9952 ;;
9953 linux-inet6)
9954 if test -d /usr/inet6; then
9955 ipv6type=$i
9956 ipv6lib=inet6
9957 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00009958 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009959 fi
9960 ;;
9961 solaris)
9962 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +00009963 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009964 ipv6type=$i
9965 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009966 fi
9967 fi
9968 ;;
9969 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +00009970 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009971/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009972
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009973#include <sys/param.h>
9974#ifdef _TOSHIBA_INET6
9975yes
9976#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009977_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009978if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009979 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009980 ipv6type=$i;
9981 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009982 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009983fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009984rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009985
9986 ;;
9987 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +00009988 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009989/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009990
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009991#include </usr/local/v6/include/sys/v6config.h>
9992#ifdef __V6D__
9993yes
9994#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009995_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009996if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009997 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009998 ipv6type=$i;
9999 ipv6lib=v6;
10000 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000010001 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010002fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010003rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010004
10005 ;;
10006 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +000010007 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010008/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010009
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010010#include <sys/param.h>
10011#ifdef _ZETA_MINAMI_INET6
10012yes
10013#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010014_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010015if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000010016 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010017 ipv6type=$i;
10018 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000010019 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010020fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000010021rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010022
10023 ;;
10024 esac
10025 if test "$ipv6type" != "unknown"; then
10026 break
10027 fi
10028 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010029 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10030$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010031fi
10032
10033if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10034 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10035 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10036 echo "using lib$ipv6lib"
10037 else
10038 if test $ipv6trylibc = "yes"; then
10039 echo "using libc"
10040 else
10041 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10042 echo "You need to fetch lib$ipv6lib.a from appropriate"
10043 echo 'ipv6 kit and compile beforehand.'
10044 exit 1
10045 fi
10046 fi
10047fi
10048
Matthias Kloseb9621712010-04-24 17:59:49 +000010049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
10050$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
10051cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010052/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010053
10054 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010055int
10056main ()
10057{
10058FSIORefNum fRef = 0
10059 ;
10060 return 0;
10061}
Matthias Kloseb159a552010-04-25 21:00:44 +000010062
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010063_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010064if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010065
Matthias Kloseb159a552010-04-25 21:00:44 +000010066
Matthias Kloseb9621712010-04-24 17:59:49 +000010067$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010068
Matthias Kloseb9621712010-04-24 17:59:49 +000010069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10070$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010071
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010072else
Matthias Kloseb159a552010-04-25 21:00:44 +000010073
Matthias Kloseb9621712010-04-24 17:59:49 +000010074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10075$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010076
10077fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010078rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10079
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010080# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000010081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10082$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010083
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010084# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010085if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010086 withval=$with_doc_strings;
10087fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010088
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010089
10090if test -z "$with_doc_strings"
10091then with_doc_strings="yes"
10092fi
10093if test "$with_doc_strings" != "no"
10094then
10095
Matthias Kloseb9621712010-04-24 17:59:49 +000010096$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010097
10098fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010099{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10100$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010101
Antoine Pitrou042b1282010-08-13 21:15:58 +000010102# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +000010103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
10104$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010105
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010106# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010107if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010108 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010109if test "$withval" != no
10110then
10111
Matthias Kloseb9621712010-04-24 17:59:49 +000010112$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010113
Matthias Kloseb9621712010-04-24 17:59:49 +000010114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10115$as_echo "yes" >&6; }
10116else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10117$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010118fi
10119else
Matthias Kloseb9621712010-04-24 17:59:49 +000010120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10121$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010122fi
10123
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010124
10125# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000010126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10127$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010128
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010129# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010130if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010131 withval=$with_pymalloc;
10132fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010133
Neil Schemenauera35c6882001-02-27 04:45:05 +000010134
Neil Schemenauer16c22972002-03-22 15:34:49 +000010135if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000010136then
10137 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010138fi
10139if test "$with_pymalloc" != "no"
10140then
Martin v. Löwis11437992002-04-12 09:54:03 +000010141
Matthias Kloseb9621712010-04-24 17:59:49 +000010142$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010143
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010144 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010145fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010146{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10147$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010148
Benjamin Peterson05159c42009-12-03 03:01:27 +000010149# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000010150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
10151$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010152
10153# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010154if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010155 withval=$with_valgrind;
10156else
10157 with_valgrind=no
10158fi
10159
Matthias Kloseb9621712010-04-24 17:59:49 +000010160{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
10161$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010162if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010163 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 +020010164if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010165
Matthias Kloseb9621712010-04-24 17:59:49 +000010166$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000010167
10168else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010169 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000010170
10171fi
10172
10173
Jeffrey Yasskin39370832010-05-03 19:29:34 +000010174 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000010175fi
10176
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010177# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000010178
Guido van Rossum98935bf2001-09-05 19:13:16 +000010179DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000010180
Guido van Rossume97ee181999-12-20 21:27:22 +000010181# the dlopen() function means we might want to use dynload_shlib.o. some
10182# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000010183for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000010184do :
10185 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020010186if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010187 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010188#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010189_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000010190
Guido van Rossume97ee181999-12-20 21:27:22 +000010191fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010192done
Guido van Rossume97ee181999-12-20 21:27:22 +000010193
Michael W. Hudson54241132001-12-07 15:38:26 +000010194
Guido van Rossume97ee181999-12-20 21:27:22 +000010195# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
10196# loading of modules.
10197
Matthias Kloseb9621712010-04-24 17:59:49 +000010198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
10199$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010200if test -z "$DYNLOADFILE"
10201then
10202 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000010203 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
10204 if test "$ac_cv_func_dlopen" = yes
10205 then DYNLOADFILE="dynload_shlib.o"
10206 else DYNLOADFILE="dynload_aix.o"
10207 fi
10208 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000010209 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000010210 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
10211 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000010212 *)
10213 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
10214 # out any dynamic loading
10215 if test "$ac_cv_func_dlopen" = yes
10216 then DYNLOADFILE="dynload_shlib.o"
10217 else DYNLOADFILE="dynload_stub.o"
10218 fi
10219 ;;
10220 esac
10221fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010222{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
10223$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010224if test "$DYNLOADFILE" != "dynload_stub.o"
10225then
Martin v. Löwis11437992002-04-12 09:54:03 +000010226
Matthias Kloseb9621712010-04-24 17:59:49 +000010227$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000010228
10229fi
10230
Neil Schemenauer4e425612001-06-19 15:44:15 +000010231# MACHDEP_OBJS can be set to platform-specific object files needed by Python
10232
Michael W. Hudson54241132001-12-07 15:38:26 +000010233
Matthias Kloseb9621712010-04-24 17:59:49 +000010234{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
10235$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010236if test -z "$MACHDEP_OBJS"
10237then
Jack Jansene578a632001-08-15 01:27:14 +000010238 MACHDEP_OBJS=$extra_machdep_objs
10239else
10240 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000010241fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010242if test -z "$MACHDEP_OBJS"; then
10243 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
10244$as_echo "none" >&6; }
10245else
10246 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
10247$as_echo "$MACHDEP_OBJS" >&6; }
10248fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000010249
Guido van Rossum627b2d71993-12-24 10:39:16 +000010250# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000010251for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Gregory P. Smith1577cf72012-01-21 18:21:56 -080010252 clock confstr ctermid execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010253 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010254 futimens futimes gai_strerror \
10255 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000010256 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070010257 if_nameindex \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010010258 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
10259 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020010260 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010261 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020010262 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +000010263 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000010264 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000010265 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010266 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
10267 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020010268 sigaction sigaltstack siginterrupt sigpending sigrelse \
10269 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000010270 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010271 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
10272 wcscoll wcsftime wcsxfrm writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010273do :
10274 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10275ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010276if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010277 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010278#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010279_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010280
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010281fi
10282done
10283
Michael W. Hudson54241132001-12-07 15:38:26 +000010284
Gregory P. Smithdf300d52012-01-21 18:20:15 -080010285ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
10286 #include <dirent.h>
10287"
10288if test "x$ac_cv_have_decl_dirfd" = xyes; then :
10289
10290$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
10291
10292fi
10293
10294
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010295# For some functions, having a definition is not sufficient, since
10296# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000010297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
10298$as_echo_n "checking for chroot... " >&6; }
10299cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010300/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010301#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010302int
10303main ()
10304{
10305void *x=chroot
10306 ;
10307 return 0;
10308}
10309_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010310if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010311
Matthias Kloseb9621712010-04-24 17:59:49 +000010312$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010313
Matthias Kloseb159a552010-04-25 21:00:44 +000010314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010315$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010316else
Matthias Kloseb9621712010-04-24 17:59:49 +000010317 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10318$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010319
10320fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010321rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
10323$as_echo_n "checking for link... " >&6; }
10324cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010325/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010326#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010327int
10328main ()
10329{
10330void *x=link
10331 ;
10332 return 0;
10333}
10334_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010335if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010336
Matthias Kloseb9621712010-04-24 17:59:49 +000010337$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010338
Matthias Kloseb159a552010-04-25 21:00:44 +000010339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010340$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010341else
Matthias Kloseb9621712010-04-24 17:59:49 +000010342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10343$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010344
10345fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010346rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
10348$as_echo_n "checking for symlink... " >&6; }
10349cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010350/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010351#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010352int
10353main ()
10354{
10355void *x=symlink
10356 ;
10357 return 0;
10358}
10359_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010360if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010361
Matthias Kloseb9621712010-04-24 17:59:49 +000010362$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010363
Matthias Kloseb159a552010-04-25 21:00:44 +000010364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010365$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010366else
Matthias Kloseb9621712010-04-24 17:59:49 +000010367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10368$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010369
10370fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010371rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
10373$as_echo_n "checking for fchdir... " >&6; }
10374cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010375/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010376#include <unistd.h>
10377int
10378main ()
10379{
10380void *x=fchdir
10381 ;
10382 return 0;
10383}
10384_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010385if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010386
Matthias Kloseb9621712010-04-24 17:59:49 +000010387$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010388
Matthias Kloseb159a552010-04-25 21:00:44 +000010389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010390$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010391else
Matthias Kloseb9621712010-04-24 17:59:49 +000010392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10393$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010394
10395fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010396rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
10398$as_echo_n "checking for fsync... " >&6; }
10399cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010400/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010401#include <unistd.h>
10402int
10403main ()
10404{
10405void *x=fsync
10406 ;
10407 return 0;
10408}
10409_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010410if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010411
Matthias Kloseb9621712010-04-24 17:59:49 +000010412$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010413
Matthias Kloseb159a552010-04-25 21:00:44 +000010414 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010415$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010416else
Matthias Kloseb9621712010-04-24 17:59:49 +000010417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10418$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010419
10420fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010421rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
10423$as_echo_n "checking for fdatasync... " >&6; }
10424cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010425/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010426#include <unistd.h>
10427int
10428main ()
10429{
10430void *x=fdatasync
10431 ;
10432 return 0;
10433}
10434_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010435if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010436
Matthias Kloseb9621712010-04-24 17:59:49 +000010437$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010438
Matthias Kloseb159a552010-04-25 21:00:44 +000010439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010440$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010441else
Matthias Kloseb9621712010-04-24 17:59:49 +000010442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10443$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010444
10445fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010446rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
10448$as_echo_n "checking for epoll... " >&6; }
10449cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010450/* end confdefs.h. */
10451#include <sys/epoll.h>
10452int
10453main ()
10454{
10455void *x=epoll_create
10456 ;
10457 return 0;
10458}
10459_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010460if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010461
Matthias Kloseb9621712010-04-24 17:59:49 +000010462$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010463
Matthias Kloseb159a552010-04-25 21:00:44 +000010464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010465$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010466else
Matthias Kloseb9621712010-04-24 17:59:49 +000010467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10468$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010469
10470fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010471rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060010472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
10473$as_echo_n "checking for epoll_create1... " >&6; }
10474cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10475/* end confdefs.h. */
10476#include <sys/epoll.h>
10477int
10478main ()
10479{
10480void *x=epoll_create1
10481 ;
10482 return 0;
10483}
10484_ACEOF
10485if ac_fn_c_try_compile "$LINENO"; then :
10486
10487$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
10488
10489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10490$as_echo "yes" >&6; }
10491else
10492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10493$as_echo "no" >&6; }
10494
10495fi
10496rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
10498$as_echo_n "checking for kqueue... " >&6; }
10499cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010500/* end confdefs.h. */
10501
10502#include <sys/types.h>
10503#include <sys/event.h>
10504
10505int
10506main ()
10507{
10508int x=kqueue()
10509 ;
10510 return 0;
10511}
10512_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010513if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010514
Matthias Kloseb9621712010-04-24 17:59:49 +000010515$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010516
Matthias Kloseb159a552010-04-25 21:00:44 +000010517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010518$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010519else
Matthias Kloseb9621712010-04-24 17:59:49 +000010520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10521$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010522
10523fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010524rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010525# On some systems (eg. FreeBSD 5), we would find a definition of the
10526# functions ctermid_r, setgroups in the library, but no prototype
10527# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
10528# address to avoid compiler warnings and potential miscompilations
10529# because of the missing prototypes.
10530
Matthias Kloseb9621712010-04-24 17:59:49 +000010531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
10532$as_echo_n "checking for ctermid_r... " >&6; }
10533cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010534/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010535
Martin v. Löwisd5843682002-11-21 20:41:28 +000010536#include <stdio.h>
10537
Martin v. Löwisd5843682002-11-21 20:41:28 +000010538int
10539main ()
10540{
10541void* p = ctermid_r
10542 ;
10543 return 0;
10544}
10545_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010546if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010547
Matthias Kloseb9621712010-04-24 17:59:49 +000010548$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010549
Matthias Kloseb159a552010-04-25 21:00:44 +000010550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010551$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010552else
Matthias Kloseb9621712010-04-24 17:59:49 +000010553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10554$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010555
10556fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010557rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10558
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
10560$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010561if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010562 $as_echo_n "(cached) " >&6
10563else
10564 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010565/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010566#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010567int
10568main ()
10569{
10570void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010571
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010572 ;
10573 return 0;
10574}
10575_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010576if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010577 ac_cv_flock_decl=yes
10578else
10579 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010580
10581fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010582rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000010583
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010584fi
10585{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
10586$as_echo "$ac_cv_flock_decl" >&6; }
10587if test "x${ac_cv_flock_decl}" = xyes; then
10588 for ac_func in flock
10589do :
10590 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020010591if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010592 cat >>confdefs.h <<_ACEOF
10593#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000010594_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010595
Antoine Pitroua3000072010-09-07 14:52:42 +000010596else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010597 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000010598$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010599if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000010600 $as_echo_n "(cached) " >&6
10601else
10602 ac_check_lib_save_LIBS=$LIBS
10603LIBS="-lbsd $LIBS"
10604cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10605/* end confdefs.h. */
10606
10607/* Override any GCC internal prototype to avoid an error.
10608 Use char because int might match the return type of a GCC
10609 builtin and then its argument prototype would still apply. */
10610#ifdef __cplusplus
10611extern "C"
10612#endif
10613char flock ();
10614int
10615main ()
10616{
10617return flock ();
10618 ;
10619 return 0;
10620}
10621_ACEOF
10622if ac_fn_c_try_link "$LINENO"; then :
10623 ac_cv_lib_bsd_flock=yes
10624else
10625 ac_cv_lib_bsd_flock=no
10626fi
10627rm -f core conftest.err conftest.$ac_objext \
10628 conftest$ac_exeext conftest.$ac_ext
10629LIBS=$ac_check_lib_save_LIBS
10630fi
10631{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
10632$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010633if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010634 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000010635
10636
10637$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
10638
10639
10640fi
10641
10642
10643fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010644done
10645
Antoine Pitroua3000072010-09-07 14:52:42 +000010646fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010647
Matthias Kloseb9621712010-04-24 17:59:49 +000010648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
10649$as_echo_n "checking for getpagesize... " >&6; }
10650cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010651/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010652
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010653#include <unistd.h>
10654
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010655int
10656main ()
10657{
10658void* p = getpagesize
10659 ;
10660 return 0;
10661}
10662_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010663if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010664
Matthias Kloseb9621712010-04-24 17:59:49 +000010665$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010666
Matthias Kloseb159a552010-04-25 21:00:44 +000010667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010668$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010669else
Matthias Kloseb9621712010-04-24 17:59:49 +000010670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10671$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010672
10673fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010674rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010675
Victor Stinner984890f2011-11-24 13:53:38 +010010676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
10677$as_echo_n "checking for broken unsetenv... " >&6; }
10678cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10679/* end confdefs.h. */
10680
10681#include <stdlib.h>
10682
10683int
10684main ()
10685{
10686int res = unsetenv("DUMMY")
10687 ;
10688 return 0;
10689}
10690_ACEOF
10691if ac_fn_c_try_compile "$LINENO"; then :
10692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10693$as_echo "no" >&6; }
10694else
10695
10696$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
10697
10698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10699$as_echo "yes" >&6; }
10700
10701fi
10702rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10703
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010704for ac_prog in true
10705do
10706 # Extract the first word of "$ac_prog", so it can be a program name with args.
10707set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000010708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10709$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010710if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010711 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010712else
10713 if test -n "$TRUE"; then
10714 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
10715else
10716as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10717for as_dir in $PATH
10718do
10719 IFS=$as_save_IFS
10720 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000010721 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000010722 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010723 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000010724 $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 +000010725 break 2
10726 fi
10727done
Matthias Kloseb9621712010-04-24 17:59:49 +000010728 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010729IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010730
10731fi
10732fi
10733TRUE=$ac_cv_prog_TRUE
10734if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
10736$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010737else
Matthias Kloseb9621712010-04-24 17:59:49 +000010738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10739$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010740fi
10741
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010742
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010743 test -n "$TRUE" && break
10744done
10745test -n "$TRUE" || TRUE="/bin/true"
10746
10747
Matthias Kloseb9621712010-04-24 17:59:49 +000010748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
10749$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010750if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010751 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010752else
10753 ac_check_lib_save_LIBS=$LIBS
10754LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010755cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010756/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010757
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010758/* Override any GCC internal prototype to avoid an error.
10759 Use char because int might match the return type of a GCC
10760 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010761#ifdef __cplusplus
10762extern "C"
10763#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010764char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010765int
10766main ()
10767{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010768return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010769 ;
10770 return 0;
10771}
10772_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010773if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010774 ac_cv_lib_c_inet_aton=yes
10775else
Matthias Kloseb9621712010-04-24 17:59:49 +000010776 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010777fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010778rm -f core conftest.err conftest.$ac_objext \
10779 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010780LIBS=$ac_check_lib_save_LIBS
10781fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010782{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
10783$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010784if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010785 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010786else
Matthias Kloseb9621712010-04-24 17:59:49 +000010787 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
10788$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010789if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010790 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010791else
10792 ac_check_lib_save_LIBS=$LIBS
10793LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010794cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010795/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010796
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010797/* Override any GCC internal prototype to avoid an error.
10798 Use char because int might match the return type of a GCC
10799 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010800#ifdef __cplusplus
10801extern "C"
10802#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010803char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010804int
10805main ()
10806{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010807return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010808 ;
10809 return 0;
10810}
10811_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010812if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010813 ac_cv_lib_resolv_inet_aton=yes
10814else
Matthias Kloseb9621712010-04-24 17:59:49 +000010815 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010816fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010817rm -f core conftest.err conftest.$ac_objext \
10818 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010819LIBS=$ac_check_lib_save_LIBS
10820fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010821{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
10822$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010823if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010824 cat >>confdefs.h <<_ACEOF
10825#define HAVE_LIBRESOLV 1
10826_ACEOF
10827
10828 LIBS="-lresolv $LIBS"
10829
10830fi
10831
10832
10833fi
10834
10835
Christian Heimesd0764e22007-12-04 15:00:33 +000010836# On Tru64, chflags seems to be present, but calling it will
10837# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000010838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
10839$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010840if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010841 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010842else
Matthias Kloseb9621712010-04-24 17:59:49 +000010843 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010844 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000010845else
Matthias Kloseb9621712010-04-24 17:59:49 +000010846 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000010847/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070010848
Christian Heimesd0764e22007-12-04 15:00:33 +000010849#include <sys/stat.h>
10850#include <unistd.h>
10851int main(int argc, char*argv[])
10852{
10853 if(chflags(argv[0], 0) != 0)
10854 return 1;
10855 return 0;
10856}
Ned Deily3eb67d52011-06-28 00:00:28 -070010857
Christian Heimesd0764e22007-12-04 15:00:33 +000010858_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010859if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010860 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010861else
Matthias Kloseb9621712010-04-24 17:59:49 +000010862 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010863fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010864rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10865 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010866fi
10867
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010868
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010869fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010870{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
10871$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010872if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010873 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020010874if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010875 ac_cv_have_chflags="yes"
10876else
10877 ac_cv_have_chflags="no"
10878fi
10879
10880fi
10881if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010882
Matthias Kloseb9621712010-04-24 17:59:49 +000010883$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010884
10885fi
10886
Matthias Kloseb9621712010-04-24 17:59:49 +000010887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
10888$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010889if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010890 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010891else
Matthias Kloseb9621712010-04-24 17:59:49 +000010892 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010893 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000010894else
Matthias Kloseb9621712010-04-24 17:59:49 +000010895 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000010896/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070010897
Christian Heimesd0764e22007-12-04 15:00:33 +000010898#include <sys/stat.h>
10899#include <unistd.h>
10900int main(int argc, char*argv[])
10901{
10902 if(lchflags(argv[0], 0) != 0)
10903 return 1;
10904 return 0;
10905}
Ned Deily3eb67d52011-06-28 00:00:28 -070010906
Christian Heimesd0764e22007-12-04 15:00:33 +000010907_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010908if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010909 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010910else
Matthias Kloseb9621712010-04-24 17:59:49 +000010911 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000010912fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010913rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10914 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010915fi
10916
10917
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010918fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010919{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
10920$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010921if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010922 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020010923if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010924 ac_cv_have_lchflags="yes"
10925else
10926 ac_cv_have_lchflags="no"
10927fi
10928
10929fi
10930if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010931
Matthias Kloseb9621712010-04-24 17:59:49 +000010932$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010933
10934fi
10935
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010936case $ac_sys_system/$ac_sys_release in
10937Darwin/*)
10938 _CUR_CFLAGS="${CFLAGS}"
10939 _CUR_LDFLAGS="${LDFLAGS}"
10940 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
10941 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
10942 ;;
10943esac
10944
Matthias Kloseb9621712010-04-24 17:59:49 +000010945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
10946$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010947if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010948 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010949else
10950 ac_check_lib_save_LIBS=$LIBS
10951LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010952cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010953/* end confdefs.h. */
10954
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010955/* Override any GCC internal prototype to avoid an error.
10956 Use char because int might match the return type of a GCC
10957 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010958#ifdef __cplusplus
10959extern "C"
10960#endif
10961char inflateCopy ();
10962int
10963main ()
10964{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010965return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010966 ;
10967 return 0;
10968}
10969_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010970if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010971 ac_cv_lib_z_inflateCopy=yes
10972else
Matthias Kloseb9621712010-04-24 17:59:49 +000010973 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010974fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010975rm -f core conftest.err conftest.$ac_objext \
10976 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010977LIBS=$ac_check_lib_save_LIBS
10978fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010979{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
10980$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010981if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010982
Matthias Kloseb9621712010-04-24 17:59:49 +000010983$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010984
10985fi
10986
10987
10988case $ac_sys_system/$ac_sys_release in
10989Darwin/*)
10990 CFLAGS="${_CUR_CFLAGS}"
10991 LDFLAGS="${_CUR_LDFLAGS}"
10992 ;;
10993esac
10994
Matthias Kloseb9621712010-04-24 17:59:49 +000010995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
10996$as_echo_n "checking for hstrerror... " >&6; }
10997cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010998/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010999
Martin v. Löwise9416172003-05-03 10:12:45 +000011000#include <netdb.h>
11001
Martin v. Löwise9416172003-05-03 10:12:45 +000011002int
11003main ()
11004{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011005void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011006 ;
11007 return 0;
11008}
11009_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011010if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011011
Matthias Kloseb9621712010-04-24 17:59:49 +000011012$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011013
Matthias Kloseb159a552010-04-25 21:00:44 +000011014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011015$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011016else
Matthias Kloseb9621712010-04-24 17:59:49 +000011017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11018$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011019
11020fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011021rm -f core conftest.err conftest.$ac_objext \
11022 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011023
Matthias Kloseb9621712010-04-24 17:59:49 +000011024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
11025$as_echo_n "checking for inet_aton... " >&6; }
11026cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011027/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011028
Martin v. Löwis86d66262006-02-17 08:40:11 +000011029#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011030#include <sys/socket.h>
11031#include <netinet/in.h>
11032#include <arpa/inet.h>
11033
Martin v. Löwise9416172003-05-03 10:12:45 +000011034int
11035main ()
11036{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011037void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011038 ;
11039 return 0;
11040}
11041_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011042if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011043
Matthias Kloseb9621712010-04-24 17:59:49 +000011044$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011045
Matthias Kloseb159a552010-04-25 21:00:44 +000011046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011047$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011048else
Matthias Kloseb9621712010-04-24 17:59:49 +000011049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11050$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011051
11052fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011053rm -f core conftest.err conftest.$ac_objext \
11054 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011055
Matthias Kloseb9621712010-04-24 17:59:49 +000011056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
11057$as_echo_n "checking for inet_pton... " >&6; }
11058cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011059/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011060
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011061#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011062#include <sys/socket.h>
11063#include <netinet/in.h>
11064#include <arpa/inet.h>
11065
Martin v. Löwise9416172003-05-03 10:12:45 +000011066int
11067main ()
11068{
11069void* p = inet_pton
11070 ;
11071 return 0;
11072}
11073_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011074if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011075
Matthias Kloseb9621712010-04-24 17:59:49 +000011076$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011077
Matthias Kloseb159a552010-04-25 21:00:44 +000011078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011079$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011080else
Matthias Kloseb9621712010-04-24 17:59:49 +000011081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11082$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011083
11084fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011085rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000011086
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011087# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000011088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
11089$as_echo_n "checking for setgroups... " >&6; }
11090cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011091/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011092
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011093#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011094#ifdef HAVE_GRP_H
11095#include <grp.h>
11096#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000011097
Martin v. Löwisd5843682002-11-21 20:41:28 +000011098int
11099main ()
11100{
11101void* p = setgroups
11102 ;
11103 return 0;
11104}
11105_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011106if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011107
Matthias Kloseb9621712010-04-24 17:59:49 +000011108$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011109
Matthias Kloseb159a552010-04-25 21:00:44 +000011110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011111$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011112else
Matthias Kloseb9621712010-04-24 17:59:49 +000011113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11114$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011115
11116fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011117rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000011118
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011119# check for openpty and forkpty
11120
11121for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011122do :
11123 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011124if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011125 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011126#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011127_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011128
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011129else
Matthias Kloseb9621712010-04-24 17:59:49 +000011130 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
11131$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011132if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011133 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011134else
Martin v. Löwis11437992002-04-12 09:54:03 +000011135 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011136LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011137cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011138/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011139
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011140/* Override any GCC internal prototype to avoid an error.
11141 Use char because int might match the return type of a GCC
11142 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011143#ifdef __cplusplus
11144extern "C"
11145#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011146char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011147int
11148main ()
11149{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011150return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011151 ;
11152 return 0;
11153}
11154_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011155if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011156 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011157else
Matthias Kloseb9621712010-04-24 17:59:49 +000011158 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011159fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011160rm -f core conftest.err conftest.$ac_objext \
11161 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011162LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011163fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011164{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
11165$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011166if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011167 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011168 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011169else
Matthias Kloseb9621712010-04-24 17:59:49 +000011170 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
11171$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011172if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011173 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011174else
11175 ac_check_lib_save_LIBS=$LIBS
11176LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011177cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011178/* end confdefs.h. */
11179
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011180/* Override any GCC internal prototype to avoid an error.
11181 Use char because int might match the return type of a GCC
11182 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011183#ifdef __cplusplus
11184extern "C"
11185#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011186char openpty ();
11187int
11188main ()
11189{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011190return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011191 ;
11192 return 0;
11193}
11194_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011195if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011196 ac_cv_lib_bsd_openpty=yes
11197else
Matthias Kloseb9621712010-04-24 17:59:49 +000011198 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011199fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011200rm -f core conftest.err conftest.$ac_objext \
11201 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011202LIBS=$ac_check_lib_save_LIBS
11203fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011204{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
11205$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011206if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011207 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011208 LIBS="$LIBS -lbsd"
11209fi
11210
11211
11212fi
11213
Fred Drake8cef4cf2000-06-28 16:40:38 +000011214
11215fi
11216done
11217
11218for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011219do :
11220 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011221if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011222 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011223#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011224_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011225
Fred Drake8cef4cf2000-06-28 16:40:38 +000011226else
Matthias Kloseb9621712010-04-24 17:59:49 +000011227 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
11228$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011229if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011230 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011231else
Martin v. Löwis11437992002-04-12 09:54:03 +000011232 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011233LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011234cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011235/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011236
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011237/* Override any GCC internal prototype to avoid an error.
11238 Use char because int might match the return type of a GCC
11239 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011240#ifdef __cplusplus
11241extern "C"
11242#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011243char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011244int
11245main ()
11246{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011247return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011248 ;
11249 return 0;
11250}
11251_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011252if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011253 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011254else
Matthias Kloseb9621712010-04-24 17:59:49 +000011255 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011256fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011257rm -f core conftest.err conftest.$ac_objext \
11258 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011259LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011260fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011261{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
11262$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011263if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011264 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011265 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011266else
Matthias Kloseb9621712010-04-24 17:59:49 +000011267 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
11268$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011269if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011270 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011271else
11272 ac_check_lib_save_LIBS=$LIBS
11273LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011274cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011275/* end confdefs.h. */
11276
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011277/* Override any GCC internal prototype to avoid an error.
11278 Use char because int might match the return type of a GCC
11279 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011280#ifdef __cplusplus
11281extern "C"
11282#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011283char forkpty ();
11284int
11285main ()
11286{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011287return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011288 ;
11289 return 0;
11290}
11291_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011292if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011293 ac_cv_lib_bsd_forkpty=yes
11294else
Matthias Kloseb9621712010-04-24 17:59:49 +000011295 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011296fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011297rm -f core conftest.err conftest.$ac_objext \
11298 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011299LIBS=$ac_check_lib_save_LIBS
11300fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011301{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
11302$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011303if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011304 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011305 LIBS="$LIBS -lbsd"
11306fi
11307
11308
11309fi
11310
Fred Drake8cef4cf2000-06-28 16:40:38 +000011311
11312fi
11313done
11314
Jack Jansendd19cf82001-12-06 22:36:17 +000011315
Christian Heimesb186d002008-03-18 15:15:01 +000011316# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000011317for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000011318do :
11319 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020011320if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000011321 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011322#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000011323_ACEOF
11324
11325fi
11326done
11327
11328
Michael W. Hudson54241132001-12-07 15:38:26 +000011329# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000011330for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000011331do :
11332 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11333ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011334if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011335 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011336#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011337_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000011338
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011339fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000011340done
11341
Michael W. Hudson54241132001-12-07 15:38:26 +000011342
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011343ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020011344if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011345 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000011346
Martin v. Löwis1142de32002-03-29 16:28:31 +000011347else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011348 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011349 *" dup2.$ac_objext "* ) ;;
11350 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011351 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011352esac
11353
Martin v. Löwis1142de32002-03-29 16:28:31 +000011354fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011355
11356ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
Victor Stinnere0be4232011-10-25 13:06:09 +020011357if test "x$ac_cv_func_getcwd" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011358 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
11359
11360else
11361 case " $LIBOBJS " in
11362 *" getcwd.$ac_objext "* ) ;;
11363 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
11364 ;;
11365esac
11366
11367fi
11368
11369ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020011370if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011371 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
11372
11373else
11374 case " $LIBOBJS " in
11375 *" strdup.$ac_objext "* ) ;;
11376 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
11377 ;;
11378esac
11379
11380fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000011381
11382
11383for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000011384do :
11385 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020011386if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011387 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011388#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011389_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011390 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011391/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011392#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011393int
11394main ()
11395{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011396getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011397 ;
11398 return 0;
11399}
11400_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011401if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011402
Matthias Kloseb9621712010-04-24 17:59:49 +000011403$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011404
Guido van Rossum627b2d71993-12-24 10:39:16 +000011405fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011406rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011407
Guido van Rossum627b2d71993-12-24 10:39:16 +000011408fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011409done
Guido van Rossum627b2d71993-12-24 10:39:16 +000011410
Jack Jansen150753c2003-03-29 22:07:47 +000011411for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000011412do :
11413 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020011414if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000011415 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011416#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000011417_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011418 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011419/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000011420#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000011421int
11422main ()
11423{
11424setpgrp(0,0);
11425 ;
11426 return 0;
11427}
11428_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011429if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011430
Matthias Kloseb9621712010-04-24 17:59:49 +000011431$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011432
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011433fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011434rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000011435
11436fi
11437done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011438
Thomas Wouters3a584202000-08-05 23:28:51 +000011439for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000011440do :
11441 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020011442if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011443 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011444#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011445_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011446 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011447/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011448#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011449int
11450main ()
11451{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011452gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011453 ;
11454 return 0;
11455}
11456_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011457if ac_fn_c_try_compile "$LINENO"; then :
11458
Guido van Rossum627b2d71993-12-24 10:39:16 +000011459else
Skip Montanaro6dead952003-09-25 14:50:04 +000011460
Matthias Kloseb9621712010-04-24 17:59:49 +000011461$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011462
Martin v. Löwis11437992002-04-12 09:54:03 +000011463
Guido van Rossum627b2d71993-12-24 10:39:16 +000011464fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011465rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011466
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011467fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011468done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011469
Michael W. Hudson54241132001-12-07 15:38:26 +000011470
Victor Stinnere0be4232011-10-25 13:06:09 +020011471for ac_func in clock_gettime
11472do :
11473 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
11474if test "x$ac_cv_func_clock_gettime" = xyes; then :
11475 cat >>confdefs.h <<_ACEOF
11476#define HAVE_CLOCK_GETTIME 1
11477_ACEOF
11478
11479else
11480
11481 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
11482$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
11483if ${ac_cv_lib_rt_clock_gettime+:} false; then :
11484 $as_echo_n "(cached) " >&6
11485else
11486 ac_check_lib_save_LIBS=$LIBS
11487LIBS="-lrt $LIBS"
11488cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11489/* end confdefs.h. */
11490
11491/* Override any GCC internal prototype to avoid an error.
11492 Use char because int might match the return type of a GCC
11493 builtin and then its argument prototype would still apply. */
11494#ifdef __cplusplus
11495extern "C"
11496#endif
11497char clock_gettime ();
11498int
11499main ()
11500{
11501return clock_gettime ();
11502 ;
11503 return 0;
11504}
11505_ACEOF
11506if ac_fn_c_try_link "$LINENO"; then :
11507 ac_cv_lib_rt_clock_gettime=yes
11508else
11509 ac_cv_lib_rt_clock_gettime=no
11510fi
11511rm -f core conftest.err conftest.$ac_objext \
11512 conftest$ac_exeext conftest.$ac_ext
11513LIBS=$ac_check_lib_save_LIBS
11514fi
11515{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
11516$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
11517if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
11518
11519 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
11520
11521
11522$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
11523
11524
11525fi
11526
11527
11528fi
11529done
11530
11531
11532for ac_func in clock_getres
11533do :
11534 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
11535if test "x$ac_cv_func_clock_getres" = xyes; then :
11536 cat >>confdefs.h <<_ACEOF
11537#define HAVE_CLOCK_GETRES 1
11538_ACEOF
11539
11540else
11541
11542 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
11543$as_echo_n "checking for clock_getres in -lrt... " >&6; }
11544if ${ac_cv_lib_rt_clock_getres+:} false; then :
11545 $as_echo_n "(cached) " >&6
11546else
11547 ac_check_lib_save_LIBS=$LIBS
11548LIBS="-lrt $LIBS"
11549cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11550/* end confdefs.h. */
11551
11552/* Override any GCC internal prototype to avoid an error.
11553 Use char because int might match the return type of a GCC
11554 builtin and then its argument prototype would still apply. */
11555#ifdef __cplusplus
11556extern "C"
11557#endif
11558char clock_getres ();
11559int
11560main ()
11561{
11562return clock_getres ();
11563 ;
11564 return 0;
11565}
11566_ACEOF
11567if ac_fn_c_try_link "$LINENO"; then :
11568 ac_cv_lib_rt_clock_getres=yes
11569else
11570 ac_cv_lib_rt_clock_getres=no
11571fi
11572rm -f core conftest.err conftest.$ac_objext \
11573 conftest$ac_exeext conftest.$ac_ext
11574LIBS=$ac_check_lib_save_LIBS
11575fi
11576{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
11577$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
11578if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
11579
11580 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
11581
11582
11583fi
11584
11585
11586fi
11587done
11588
11589
Matthias Kloseb9621712010-04-24 17:59:49 +000011590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
11591$as_echo_n "checking for major... " >&6; }
11592cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011593/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011594
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011595#if defined(MAJOR_IN_MKDEV)
11596#include <sys/mkdev.h>
11597#elif defined(MAJOR_IN_SYSMACROS)
11598#include <sys/sysmacros.h>
11599#else
11600#include <sys/types.h>
11601#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011602
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011603int
11604main ()
11605{
11606
11607 makedev(major(0),minor(0));
11608
11609 ;
11610 return 0;
11611}
11612_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011613if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011614
11615
Matthias Kloseb9621712010-04-24 17:59:49 +000011616$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011617
Matthias Kloseb9621712010-04-24 17:59:49 +000011618 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11619$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011620
11621else
Skip Montanaro6dead952003-09-25 14:50:04 +000011622
Matthias Kloseb9621712010-04-24 17:59:49 +000011623 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11624$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011625
11626fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011627rm -f core conftest.err conftest.$ac_objext \
11628 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011629
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011630# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000011631# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000011632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
11633$as_echo_n "checking for getaddrinfo... " >&6; }
11634cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011635/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011636
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011637#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011638#include <sys/socket.h>
11639#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011640#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011641
Martin v. Löwis11437992002-04-12 09:54:03 +000011642int
11643main ()
11644{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011645getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000011646 ;
11647 return 0;
11648}
11649_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011650if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011651 have_getaddrinfo=yes
11652else
Matthias Kloseb9621712010-04-24 17:59:49 +000011653 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011654fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011655rm -f core conftest.err conftest.$ac_objext \
11656 conftest$ac_exeext conftest.$ac_ext
11657{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
11658$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011659if test $have_getaddrinfo = yes
11660then
Matthias Kloseb9621712010-04-24 17:59:49 +000011661 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
11662$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011663 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011664 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011665else
Matthias Kloseb9621712010-04-24 17:59:49 +000011666 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010011667
11668if test "${enable_ipv6+set}" = set; then
11669 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
11670else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011671 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010011672fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011673else
Matthias Kloseb9621712010-04-24 17:59:49 +000011674 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011675/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011676
Stefan Krah19c21392012-11-22 23:47:32 +010011677#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011678#include <sys/types.h>
11679#include <netdb.h>
11680#include <string.h>
11681#include <sys/socket.h>
11682#include <netinet/in.h>
11683
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011684int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011685{
11686 int passive, gaierr, inet4 = 0, inet6 = 0;
11687 struct addrinfo hints, *ai, *aitop;
11688 char straddr[INET6_ADDRSTRLEN], strport[16];
11689
11690 for (passive = 0; passive <= 1; passive++) {
11691 memset(&hints, 0, sizeof(hints));
11692 hints.ai_family = AF_UNSPEC;
11693 hints.ai_flags = passive ? AI_PASSIVE : 0;
11694 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000011695 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011696 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
11697 (void)gai_strerror(gaierr);
11698 goto bad;
11699 }
11700 for (ai = aitop; ai; ai = ai->ai_next) {
11701 if (ai->ai_addr == NULL ||
11702 ai->ai_addrlen == 0 ||
11703 getnameinfo(ai->ai_addr, ai->ai_addrlen,
11704 straddr, sizeof(straddr), strport, sizeof(strport),
11705 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
11706 goto bad;
11707 }
11708 switch (ai->ai_family) {
11709 case AF_INET:
11710 if (strcmp(strport, "54321") != 0) {
11711 goto bad;
11712 }
11713 if (passive) {
11714 if (strcmp(straddr, "0.0.0.0") != 0) {
11715 goto bad;
11716 }
11717 } else {
11718 if (strcmp(straddr, "127.0.0.1") != 0) {
11719 goto bad;
11720 }
11721 }
11722 inet4++;
11723 break;
11724 case AF_INET6:
11725 if (strcmp(strport, "54321") != 0) {
11726 goto bad;
11727 }
11728 if (passive) {
11729 if (strcmp(straddr, "::") != 0) {
11730 goto bad;
11731 }
11732 } else {
11733 if (strcmp(straddr, "::1") != 0) {
11734 goto bad;
11735 }
11736 }
11737 inet6++;
11738 break;
11739 case AF_UNSPEC:
11740 goto bad;
11741 break;
11742 default:
11743 /* another family support? */
11744 break;
11745 }
11746 }
11747 }
11748
11749 if (!(inet4 == 0 || inet4 == 2))
11750 goto bad;
11751 if (!(inet6 == 0 || inet6 == 2))
11752 goto bad;
11753
11754 if (aitop)
11755 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011756 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011757
11758 bad:
11759 if (aitop)
11760 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011761 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011762}
11763
Martin v. Löwis11437992002-04-12 09:54:03 +000011764_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011765if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011766 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011767else
Matthias Kloseb9621712010-04-24 17:59:49 +000011768 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011769fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011770rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11771 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011772fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011773
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011774fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011775
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011776fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011777
Benjamin Petersond4694ed2010-11-01 01:44:30 +000011778{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
11779$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
11780
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011781if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011782then
11783 if test $ipv6 = yes
11784 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011785 echo 'Fatal: You must get working getaddrinfo() function.'
11786 echo ' or you can specify "--disable-ipv6"'.
11787 exit 1
11788 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011789else
Martin v. Löwis11437992002-04-12 09:54:03 +000011790
Matthias Kloseb9621712010-04-24 17:59:49 +000011791$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011792
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011793fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000011794
Jack Jansen9a66b6d2001-08-08 13:56:14 +000011795for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000011796do :
11797 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020011798if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011799 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011800#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011801_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011802
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011803fi
11804done
11805
Michael W. Hudson54241132001-12-07 15:38:26 +000011806
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011807# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000011808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
11809$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011810if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011811 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011812else
Matthias Kloseb9621712010-04-24 17:59:49 +000011813 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011814/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011815#include <sys/types.h>
11816#include <sys/time.h>
11817#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011818
Martin v. Löwis11437992002-04-12 09:54:03 +000011819int
11820main ()
11821{
11822if ((struct tm *) 0)
11823return 0;
11824 ;
11825 return 0;
11826}
11827_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011828if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011829 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011830else
Matthias Kloseb9621712010-04-24 17:59:49 +000011831 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011832fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011833rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011834fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011835{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
11836$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011837if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011838
Matthias Kloseb9621712010-04-24 17:59:49 +000011839$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011840
11841fi
11842
Matthias Kloseb9621712010-04-24 17:59:49 +000011843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
11844$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011845if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011846 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011847else
Matthias Kloseb9621712010-04-24 17:59:49 +000011848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011849/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011850#include <sys/types.h>
11851#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011852
Martin v. Löwis11437992002-04-12 09:54:03 +000011853int
11854main ()
11855{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011856struct tm tm;
11857 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000011858 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000011859 ;
11860 return 0;
11861}
11862_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011863if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011864 ac_cv_struct_tm=time.h
11865else
Matthias Kloseb9621712010-04-24 17:59:49 +000011866 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011867fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011868rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011869fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011870{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
11871$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011872if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011873
Matthias Kloseb9621712010-04-24 17:59:49 +000011874$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011875
11876fi
11877
Matthias Kloseb9621712010-04-24 17:59:49 +000011878ac_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 +000011879#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000011880
Matthias Kloseb9621712010-04-24 17:59:49 +000011881"
Victor Stinnere0be4232011-10-25 13:06:09 +020011882if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011883
11884cat >>confdefs.h <<_ACEOF
11885#define HAVE_STRUCT_TM_TM_ZONE 1
11886_ACEOF
11887
11888
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011889fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011890
Martin v. Löwis11437992002-04-12 09:54:03 +000011891if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
11892
Matthias Kloseb9621712010-04-24 17:59:49 +000011893$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011894
11895else
Matthias Kloseb9621712010-04-24 17:59:49 +000011896 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
11897"
Victor Stinnere0be4232011-10-25 13:06:09 +020011898if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011899 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011900else
Matthias Kloseb9621712010-04-24 17:59:49 +000011901 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011902fi
11903
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011904cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011905#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011906_ACEOF
11907
Matthias Kloseb9621712010-04-24 17:59:49 +000011908 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
11909$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011910if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011911 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011912else
Matthias Kloseb9621712010-04-24 17:59:49 +000011913 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011914/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011915#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011916#if !HAVE_DECL_TZNAME
11917extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000011918#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011919
Martin v. Löwis11437992002-04-12 09:54:03 +000011920int
11921main ()
11922{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011923return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000011924 ;
11925 return 0;
11926}
11927_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011928if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011929 ac_cv_var_tzname=yes
11930else
Matthias Kloseb9621712010-04-24 17:59:49 +000011931 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011932fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011933rm -f core conftest.err conftest.$ac_objext \
11934 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000011935fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011936{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
11937$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011938 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011939
Matthias Kloseb9621712010-04-24 17:59:49 +000011940$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011941
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011942 fi
11943fi
11944
Matthias Kloseb9621712010-04-24 17:59:49 +000011945ac_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 +020011946if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011947
11948cat >>confdefs.h <<_ACEOF
11949#define HAVE_STRUCT_STAT_ST_RDEV 1
11950_ACEOF
11951
11952
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011953fi
11954
Matthias Kloseb9621712010-04-24 17:59:49 +000011955ac_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 +020011956if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011957
Martin v. Löwis11437992002-04-12 09:54:03 +000011958cat >>confdefs.h <<_ACEOF
11959#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
11960_ACEOF
11961
11962
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011963fi
11964
Matthias Kloseb9621712010-04-24 17:59:49 +000011965ac_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 +020011966if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000011967
11968cat >>confdefs.h <<_ACEOF
11969#define HAVE_STRUCT_STAT_ST_FLAGS 1
11970_ACEOF
11971
11972
11973fi
11974
Matthias Kloseb9621712010-04-24 17:59:49 +000011975ac_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 +020011976if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011977
11978cat >>confdefs.h <<_ACEOF
11979#define HAVE_STRUCT_STAT_ST_GEN 1
11980_ACEOF
11981
11982
11983fi
11984
Matthias Kloseb9621712010-04-24 17:59:49 +000011985ac_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 +020011986if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011987
11988cat >>confdefs.h <<_ACEOF
11989#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
11990_ACEOF
11991
11992
11993fi
11994
Matthias Kloseb9621712010-04-24 17:59:49 +000011995ac_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 +020011996if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011997
Martin v. Löwis11437992002-04-12 09:54:03 +000011998cat >>confdefs.h <<_ACEOF
11999#define HAVE_STRUCT_STAT_ST_BLOCKS 1
12000_ACEOF
12001
12002
Matthias Kloseb9621712010-04-24 17:59:49 +000012003$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012004
12005else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012006 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000012007 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012008 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
12009 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012010esac
12011
Guido van Rossum98bf58f2001-10-18 20:34:25 +000012012fi
12013
Michael W. Hudson54241132001-12-07 15:38:26 +000012014
Martin v. Löwis11437992002-04-12 09:54:03 +000012015
Matthias Kloseb9621712010-04-24 17:59:49 +000012016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
12017$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012018if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012019 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012020else
Matthias Kloseb159a552010-04-25 21:00:44 +000012021
Matthias Kloseb9621712010-04-24 17:59:49 +000012022 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012023/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012024#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012025int
12026main ()
12027{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012028return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000012029 ;
12030 return 0;
12031}
12032_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012033if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012034 ac_cv_header_time_altzone=yes
12035else
Matthias Kloseb9621712010-04-24 17:59:49 +000012036 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000012037fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012038rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000012039
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012040fi
12041
Matthias Kloseb9621712010-04-24 17:59:49 +000012042{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
12043$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012044if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012045
Matthias Kloseb9621712010-04-24 17:59:49 +000012046$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012047
12048fi
12049
Guido van Rossumda88dad1995-01-26 00:46:29 +000012050was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
12052$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
12053cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012054/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012055
12056#include <sys/types.h>
12057#include <sys/select.h>
12058#include <sys/time.h>
12059
Martin v. Löwis11437992002-04-12 09:54:03 +000012060int
12061main ()
12062{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012063;
Martin v. Löwis11437992002-04-12 09:54:03 +000012064 ;
12065 return 0;
12066}
12067_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012068if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012069
12070
Matthias Kloseb9621712010-04-24 17:59:49 +000012071$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012072
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012073 was_it_defined=yes
12074
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012075fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012076rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012077{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
12078$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012079
Matthias Kloseb9621712010-04-24 17:59:49 +000012080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
12081$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012082if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012083 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012084else
Matthias Kloseb9621712010-04-24 17:59:49 +000012085 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012086/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000012087#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012088int
12089main ()
12090{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012091struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000012092 ;
12093 return 0;
12094}
12095_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012096if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012097 ac_cv_struct_addrinfo=yes
12098else
Matthias Kloseb9621712010-04-24 17:59:49 +000012099 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012100fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012101rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12102fi
12103
Matthias Kloseb9621712010-04-24 17:59:49 +000012104{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
12105$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012106if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012107
Matthias Kloseb9621712010-04-24 17:59:49 +000012108$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012109
12110fi
12111
Matthias Kloseb9621712010-04-24 17:59:49 +000012112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
12113$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012114if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012115 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012116else
Matthias Kloseb9621712010-04-24 17:59:49 +000012117 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012118/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012119
12120# include <sys/types.h>
12121# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012122int
12123main ()
12124{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012125struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000012126 ;
12127 return 0;
12128}
12129_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012130if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012131 ac_cv_struct_sockaddr_storage=yes
12132else
Matthias Kloseb9621712010-04-24 17:59:49 +000012133 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012134fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012135rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12136fi
12137
Matthias Kloseb9621712010-04-24 17:59:49 +000012138{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
12139$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012140if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012141
Matthias Kloseb9621712010-04-24 17:59:49 +000012142$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012143
12144fi
12145
Guido van Rossum627b2d71993-12-24 10:39:16 +000012146# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000012147
Matthias Kloseb9621712010-04-24 17:59:49 +000012148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
12149$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012150if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012151 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000012152else
Matthias Kloseb9621712010-04-24 17:59:49 +000012153 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012154/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012155$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012156int
12157main ()
12158{
12159static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012160test_array [0] = 0;
12161return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012162
12163 ;
12164 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000012165}
Martin v. Löwis11437992002-04-12 09:54:03 +000012166_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012167if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012168 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012169else
Matthias Kloseb9621712010-04-24 17:59:49 +000012170 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012171fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012172rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012173fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012174{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
12175$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012176if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012177 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012178
12179fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000012180
Matthias Kloseb9621712010-04-24 17:59:49 +000012181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12182$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012183if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012184 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012185else
Matthias Kloseb9621712010-04-24 17:59:49 +000012186 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012187/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012188
Martin v. Löwis11437992002-04-12 09:54:03 +000012189int
12190main ()
12191{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012192
Martin v. Löwis11437992002-04-12 09:54:03 +000012193#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012194 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012195 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012196 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000012197 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012198 char const *const *pcpcc;
12199 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000012200 /* NEC SVR4.0.2 mips cc rejects this. */
12201 struct point {int x, y;};
12202 static struct point const zero = {0,0};
12203 /* AIX XL C 1.02.0.0 rejects this.
12204 It does not let you subtract one const X* pointer from another in
12205 an arm of an if-expression whose if-part is not a constant
12206 expression */
12207 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012208 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012209 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012210 ++pcpcc;
12211 ppc = (char**) pcpcc;
12212 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012213 { /* SCO 3.2v4 cc rejects this sort of thing. */
12214 char tx;
12215 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000012216 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012217
Martin v. Löwis11437992002-04-12 09:54:03 +000012218 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012219 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012220 }
12221 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12222 int x[] = {25, 17};
12223 const int *foo = &x[0];
12224 ++foo;
12225 }
12226 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12227 typedef const int *iptr;
12228 iptr p = 0;
12229 ++p;
12230 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012231 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000012232 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012233 struct s { int j; const int *ap[3]; } bx;
12234 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000012235 }
12236 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12237 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012238 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012239 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012240 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000012241#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000012242
Martin v. Löwis11437992002-04-12 09:54:03 +000012243 ;
12244 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012245}
Martin v. Löwis11437992002-04-12 09:54:03 +000012246_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012247if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012248 ac_cv_c_const=yes
12249else
Matthias Kloseb9621712010-04-24 17:59:49 +000012250 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012251fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012252rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012253fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012254{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12255$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012256if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012257
Matthias Kloseb9621712010-04-24 17:59:49 +000012258$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012259
12260fi
12261
Michael W. Hudson54241132001-12-07 15:38:26 +000012262
Guido van Rossumda88dad1995-01-26 00:46:29 +000012263works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
12265$as_echo_n "checking for working volatile... " >&6; }
12266cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012267/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012268
Martin v. Löwis11437992002-04-12 09:54:03 +000012269int
12270main ()
12271{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012272volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012273 ;
12274 return 0;
12275}
12276_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012277if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012278 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012279else
Skip Montanaro6dead952003-09-25 14:50:04 +000012280
Matthias Kloseb9621712010-04-24 17:59:49 +000012281$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012282
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012283
Guido van Rossum627b2d71993-12-24 10:39:16 +000012284fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012285rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012286{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12287$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012288
Guido van Rossumda88dad1995-01-26 00:46:29 +000012289works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
12291$as_echo_n "checking for working signed char... " >&6; }
12292cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012293/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012294
Martin v. Löwis11437992002-04-12 09:54:03 +000012295int
12296main ()
12297{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012298signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000012299 ;
12300 return 0;
12301}
12302_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012303if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012304 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012305else
Skip Montanaro6dead952003-09-25 14:50:04 +000012306
Matthias Kloseb9621712010-04-24 17:59:49 +000012307$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000012308
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012309
Guido van Rossum7f43da71994-08-01 12:15:30 +000012310fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012311rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012312{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12313$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012314
Guido van Rossumda88dad1995-01-26 00:46:29 +000012315have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
12317$as_echo_n "checking for prototypes... " >&6; }
12318cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012319/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012320int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012321int
12322main ()
12323{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012324return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000012325 ;
12326 return 0;
12327}
12328_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012329if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012330
Matthias Kloseb9621712010-04-24 17:59:49 +000012331$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012332
Matthias Kloseb159a552010-04-25 21:00:44 +000012333 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012334fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012335rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012336{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
12337$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012338
Guido van Rossumda88dad1995-01-26 00:46:29 +000012339works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
12341$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
12342cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012343/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012344
12345#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000012346int foo(int x, ...) {
12347 va_list va;
12348 va_start(va, x);
12349 va_arg(va, int);
12350 va_arg(va, char *);
12351 va_arg(va, double);
12352 return 0;
12353}
Guido van Rossum7f43da71994-08-01 12:15:30 +000012354
Martin v. Löwis11437992002-04-12 09:54:03 +000012355int
12356main ()
12357{
Guido van Rossum90eea071996-08-30 20:58:57 +000012358return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000012359 ;
12360 return 0;
12361}
12362_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012363if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012364
12365
Matthias Kloseb9621712010-04-24 17:59:49 +000012366$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012367
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012368 works=yes
12369
Guido van Rossum627b2d71993-12-24 10:39:16 +000012370fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012371rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012372{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12373$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012374
Martin v. Löwisd6320502004-08-12 13:45:08 +000012375# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000012376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
12377$as_echo_n "checking for socketpair... " >&6; }
12378cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012379/* end confdefs.h. */
12380
12381#include <sys/types.h>
12382#include <sys/socket.h>
12383
12384int
12385main ()
12386{
12387void *x=socketpair
12388 ;
12389 return 0;
12390}
12391_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012392if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000012393
Matthias Kloseb9621712010-04-24 17:59:49 +000012394$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000012395
Matthias Kloseb159a552010-04-25 21:00:44 +000012396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012397$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012398else
Matthias Kloseb9621712010-04-24 17:59:49 +000012399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12400$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012401
12402fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012403rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012404
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012405# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000012406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
12407$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
12408cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012409/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012410#include <sys/types.h>
12411#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012412int
12413main ()
12414{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012415struct sockaddr x;
12416x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012417 ;
12418 return 0;
12419}
12420_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012421if ac_fn_c_try_compile "$LINENO"; then :
12422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12423$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012424
Matthias Kloseb9621712010-04-24 17:59:49 +000012425$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012426
12427else
Matthias Kloseb9621712010-04-24 17:59:49 +000012428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12429$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000012430
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012431fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012432rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012433
Guido van Rossumda88dad1995-01-26 00:46:29 +000012434va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
12436$as_echo_n "checking whether va_list is an array... " >&6; }
12437cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012438/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012439
12440#ifdef HAVE_STDARG_PROTOTYPES
12441#include <stdarg.h>
12442#else
12443#include <varargs.h>
12444#endif
12445
Martin v. Löwis11437992002-04-12 09:54:03 +000012446int
12447main ()
12448{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012449va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000012450 ;
12451 return 0;
12452}
12453_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012454if ac_fn_c_try_compile "$LINENO"; then :
12455
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012456else
Skip Montanaro6dead952003-09-25 14:50:04 +000012457
Martin v. Löwis11437992002-04-12 09:54:03 +000012458
Matthias Kloseb9621712010-04-24 17:59:49 +000012459$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012460
Guido van Rossumda88dad1995-01-26 00:46:29 +000012461 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012462
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012463fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012464rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012465{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
12466$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012467
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012468# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000012469
12470
Matthias Kloseb9621712010-04-24 17:59:49 +000012471ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020012472if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012473
Matthias Kloseb9621712010-04-24 17:59:49 +000012474 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000012475
Matthias Kloseb9621712010-04-24 17:59:49 +000012476 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
12477$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012478 OLD_CFLAGS=$CFLAGS
12479 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012480 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012481/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012482
12483# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012484
Martin v. Löwis11437992002-04-12 09:54:03 +000012485int
12486main ()
12487{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012488
12489 char *name;
12490 struct hostent *he, *res;
12491 char buffer[2048];
12492 int buflen = 2048;
12493 int h_errnop;
12494
12495 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012496
12497 ;
12498 return 0;
12499}
12500_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012501if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012502
Matthias Kloseb9621712010-04-24 17:59:49 +000012503 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012504
Martin v. Löwis11437992002-04-12 09:54:03 +000012505
Matthias Kloseb9621712010-04-24 17:59:49 +000012506$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012507
Matthias Kloseb9621712010-04-24 17:59:49 +000012508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12509$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012510
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012511else
Skip Montanaro6dead952003-09-25 14:50:04 +000012512
Matthias Kloseb9621712010-04-24 17:59:49 +000012513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12514$as_echo "no" >&6; }
12515 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
12516$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
12517 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012518/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012519
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012520# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012521
Martin v. Löwis11437992002-04-12 09:54:03 +000012522int
12523main ()
12524{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012525
12526 char *name;
12527 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000012528 char buffer[2048];
12529 int buflen = 2048;
12530 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012531
Matthias Kloseb159a552010-04-25 21:00:44 +000012532 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012533
12534 ;
12535 return 0;
12536}
12537_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012538if ac_fn_c_try_compile "$LINENO"; 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
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012541
Martin v. Löwis11437992002-04-12 09:54:03 +000012542
Matthias Kloseb159a552010-04-25 21:00:44 +000012543$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012544
Matthias Kloseb9621712010-04-24 17:59:49 +000012545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12546$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012547
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012548else
Skip Montanaro6dead952003-09-25 14:50:04 +000012549
Matthias Kloseb9621712010-04-24 17:59:49 +000012550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12551$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000012552 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
12553$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
12554 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12555/* end confdefs.h. */
12556
12557# include <netdb.h>
12558
12559int
12560main ()
12561{
12562
12563 char *name;
12564 struct hostent *he;
12565 struct hostent_data data;
12566
12567 (void) gethostbyname_r(name, he, &data);
12568
12569 ;
12570 return 0;
12571}
12572_ACEOF
12573if ac_fn_c_try_compile "$LINENO"; then :
12574
12575 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
12576
12577
12578$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
12579
12580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12581$as_echo "yes" >&6; }
12582
12583else
12584
12585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12586$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012587
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012588fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012589rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012590
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012591fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012592rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012593
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012594fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012595rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012596 CFLAGS=$OLD_CFLAGS
12597
12598else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012599
Matthias Kloseb9621712010-04-24 17:59:49 +000012600 for ac_func in gethostbyname
12601do :
12602 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020012603if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012604 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012605#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012606_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012607
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012608fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012609done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012610
Michael W. Hudson54241132001-12-07 15:38:26 +000012611
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012612fi
12613
Michael W. Hudson54241132001-12-07 15:38:26 +000012614
12615
12616
12617
12618
12619
Guido van Rossum627b2d71993-12-24 10:39:16 +000012620# checks for system services
12621# (none yet)
12622
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012623# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000012624ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020012625if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012626
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012627else
Matthias Kloseb9621712010-04-24 17:59:49 +000012628 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
12629$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012630if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012631 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012632else
Martin v. Löwis11437992002-04-12 09:54:03 +000012633 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012634LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012635cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012636/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012637
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012638/* Override any GCC internal prototype to avoid an error.
12639 Use char because int might match the return type of a GCC
12640 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012641#ifdef __cplusplus
12642extern "C"
12643#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012644char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012645int
12646main ()
12647{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012648return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012649 ;
12650 return 0;
12651}
12652_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012653if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012654 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012655else
Matthias Kloseb9621712010-04-24 17:59:49 +000012656 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012657fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012658rm -f core conftest.err conftest.$ac_objext \
12659 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012660LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012661fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012662{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
12663$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012664if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012665 cat >>confdefs.h <<_ACEOF
12666#define HAVE_LIBIEEE 1
12667_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012668
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012669 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012670
Guido van Rossum627b2d71993-12-24 10:39:16 +000012671fi
12672
Michael W. Hudson54241132001-12-07 15:38:26 +000012673
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012674fi
12675
Michael W. Hudson54241132001-12-07 15:38:26 +000012676
Guido van Rossum7f253911997-05-09 02:42:48 +000012677# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000012678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
12679$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012680
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012681# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012682if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012683 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000012684if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000012685then
12686
Matthias Kloseb9621712010-04-24 17:59:49 +000012687$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012688
Matthias Kloseb9621712010-04-24 17:59:49 +000012689 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12690$as_echo "yes" >&6; }
12691else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12692$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012693fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000012694else
Matthias Kloseb9621712010-04-24 17:59:49 +000012695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12696$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012697fi
12698
Guido van Rossum7f253911997-05-09 02:42:48 +000012699
Guido van Rossum7f43da71994-08-01 12:15:30 +000012700# check for --with-libm=...
12701
Guido van Rossum563e7081996-09-10 18:20:48 +000012702case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000012703Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000012704*) LIBM=-lm
12705esac
Matthias Kloseb9621712010-04-24 17:59:49 +000012706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
12707$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012708
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012709# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012710if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012711 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000012712if test "$withval" = no
12713then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000012714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
12715$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012716elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012717then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000012718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
12719$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012720else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012721fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012722else
Matthias Kloseb9621712010-04-24 17:59:49 +000012723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
12724$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012725fi
12726
Guido van Rossum7f43da71994-08-01 12:15:30 +000012727
12728# check for --with-libc=...
12729
Matthias Kloseb9621712010-04-24 17:59:49 +000012730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
12731$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012732
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012733# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012734if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012735 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000012736if test "$withval" = no
12737then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000012738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
12739$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012740elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012741then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000012742 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
12743$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012744else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012745fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012746else
Matthias Kloseb9621712010-04-24 17:59:49 +000012747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
12748$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012749fi
12750
Guido van Rossum7f43da71994-08-01 12:15:30 +000012751
Stefan Krah1919b7e2012-03-21 18:25:23 +010012752# **************************************
12753# * Check for gcc x64 inline assembler *
12754# **************************************
12755
12756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
12757$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
12758cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12759/* end confdefs.h. */
12760
12761int
12762main ()
12763{
12764
12765 __asm__ __volatile__ ("movq %rcx, %rax");
12766
12767 ;
12768 return 0;
12769}
12770_ACEOF
12771if ac_fn_c_try_compile "$LINENO"; then :
12772 have_gcc_asm_for_x64=yes
12773else
12774 have_gcc_asm_for_x64=no
12775fi
12776rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12777{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
12778$as_echo "$have_gcc_asm_for_x64" >&6; }
12779if test "$have_gcc_asm_for_x64" = yes
12780then
12781
12782$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
12783
12784fi
12785
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012786# **************************************************
12787# * Check for various properties of floating point *
12788# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012789
Matthias Kloseb9621712010-04-24 17:59:49 +000012790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
12791$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012792if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012793 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012794else
12795
Matthias Kloseb9621712010-04-24 17:59:49 +000012796if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012797 ac_cv_little_endian_double=no
12798else
Matthias Kloseb9621712010-04-24 17:59:49 +000012799 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012800/* end confdefs.h. */
12801
12802#include <string.h>
12803int main() {
12804 double x = 9006104071832581.0;
12805 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
12806 return 0;
12807 else
12808 return 1;
12809}
12810
12811_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012812if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012813 ac_cv_little_endian_double=yes
12814else
Matthias Kloseb9621712010-04-24 17:59:49 +000012815 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012816fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012817rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12818 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012819fi
12820
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012821fi
12822
Matthias Kloseb9621712010-04-24 17:59:49 +000012823{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
12824$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012825if test "$ac_cv_little_endian_double" = yes
12826then
12827
Matthias Kloseb9621712010-04-24 17:59:49 +000012828$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012829
12830fi
12831
Matthias Kloseb9621712010-04-24 17:59:49 +000012832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
12833$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012834if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012835 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012836else
12837
Matthias Kloseb9621712010-04-24 17:59:49 +000012838if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012839 ac_cv_big_endian_double=no
12840else
Matthias Kloseb9621712010-04-24 17:59:49 +000012841 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012842/* end confdefs.h. */
12843
12844#include <string.h>
12845int main() {
12846 double x = 9006104071832581.0;
12847 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
12848 return 0;
12849 else
12850 return 1;
12851}
12852
12853_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012854if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012855 ac_cv_big_endian_double=yes
12856else
Matthias Kloseb9621712010-04-24 17:59:49 +000012857 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012858fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012859rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12860 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012861fi
12862
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012863fi
12864
Matthias Kloseb9621712010-04-24 17:59:49 +000012865{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
12866$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012867if test "$ac_cv_big_endian_double" = yes
12868then
12869
Matthias Kloseb9621712010-04-24 17:59:49 +000012870$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012871
12872fi
12873
12874# Some ARM platforms use a mixed-endian representation for doubles.
12875# While Python doesn't currently have full support for these platforms
12876# (see e.g., issue 1762561), we can at least make sure that float <-> string
12877# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000012878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
12879$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012880if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012881 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012882else
12883
Matthias Kloseb9621712010-04-24 17:59:49 +000012884if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012885 ac_cv_mixed_endian_double=no
12886else
Matthias Kloseb9621712010-04-24 17:59:49 +000012887 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012888/* end confdefs.h. */
12889
12890#include <string.h>
12891int main() {
12892 double x = 9006104071832581.0;
12893 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
12894 return 0;
12895 else
12896 return 1;
12897}
12898
12899_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012900if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012901 ac_cv_mixed_endian_double=yes
12902else
Matthias Kloseb9621712010-04-24 17:59:49 +000012903 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012904fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012905rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12906 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012907fi
12908
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012909fi
12910
Matthias Kloseb9621712010-04-24 17:59:49 +000012911{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
12912$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012913if test "$ac_cv_mixed_endian_double" = yes
12914then
12915
Matthias Kloseb9621712010-04-24 17:59:49 +000012916$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012917
12918fi
12919
Mark Dickinson7abf8d42009-04-18 20:17:52 +000012920# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000012921# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000012922# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000012923# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012924# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000012925# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012926
12927# This inline assembler syntax may also work for suncc and icc,
12928# so we try it on all platforms.
12929
Matthias Kloseb9621712010-04-24 17:59:49 +000012930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
12931$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
12932cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012933/* end confdefs.h. */
12934
12935int
12936main ()
12937{
12938
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012939 unsigned short cw;
12940 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
12941 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012942
12943 ;
12944 return 0;
12945}
12946_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012947if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012948 have_gcc_asm_for_x87=yes
12949else
Matthias Kloseb9621712010-04-24 17:59:49 +000012950 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012951fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012952rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012953{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
12954$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012955if test "$have_gcc_asm_for_x87" = yes
12956then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012957
Matthias Kloseb9621712010-04-24 17:59:49 +000012958$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012959
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012960fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012961
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012962# Detect whether system arithmetic is subject to x87-style double
12963# rounding issues. The result of this test has little meaning on non
12964# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
12965# mode is round-to-nearest and double rounding issues are present, and
12966# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000012967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
12968$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012969# $BASECFLAGS may affect the result
12970ac_save_cc="$CC"
12971CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012972if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012973 ac_cv_x87_double_rounding=no
12974else
Matthias Kloseb9621712010-04-24 17:59:49 +000012975 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012976/* end confdefs.h. */
12977
12978#include <stdlib.h>
12979#include <math.h>
12980int main() {
12981 volatile double x, y, z;
12982 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
12983 x = 0.99999999999999989; /* 1-2**-53 */
12984 y = 1./x;
12985 if (y != 1.)
12986 exit(0);
12987 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
12988 x = 1e16;
12989 y = 2.99999;
12990 z = x + y;
12991 if (z != 1e16+4.)
12992 exit(0);
12993 /* both tests show evidence of double rounding */
12994 exit(1);
12995}
12996
12997_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012998if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012999 ac_cv_x87_double_rounding=no
13000else
Matthias Kloseb9621712010-04-24 17:59:49 +000013001 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013002fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013003rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13004 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013005fi
13006
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013007CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000013008{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
13009$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013010if test "$ac_cv_x87_double_rounding" = yes
13011then
13012
Matthias Kloseb9621712010-04-24 17:59:49 +000013013$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013014
13015fi
13016
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000013017# ************************************
13018# * Check for mathematical functions *
13019# ************************************
13020
13021LIBS_SAVE=$LIBS
13022LIBS="$LIBS $LIBM"
13023
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013024for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
13025do :
13026 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13027ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013028if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013029 cat >>confdefs.h <<_ACEOF
13030#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13031_ACEOF
13032
13033fi
13034done
13035
Victor Stinner8f9f8d62011-05-09 12:45:41 +020013036for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013037do :
13038 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13039ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013040if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013041 cat >>confdefs.h <<_ACEOF
13042#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13043_ACEOF
13044
13045fi
13046done
13047
13048ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
13049"
Victor Stinnere0be4232011-10-25 13:06:09 +020013050if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013051 ac_have_decl=1
13052else
13053 ac_have_decl=0
13054fi
13055
13056cat >>confdefs.h <<_ACEOF
13057#define HAVE_DECL_ISINF $ac_have_decl
13058_ACEOF
13059ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
13060"
Victor Stinnere0be4232011-10-25 13:06:09 +020013061if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013062 ac_have_decl=1
13063else
13064 ac_have_decl=0
13065fi
13066
13067cat >>confdefs.h <<_ACEOF
13068#define HAVE_DECL_ISNAN $ac_have_decl
13069_ACEOF
13070ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
13071"
Victor Stinnere0be4232011-10-25 13:06:09 +020013072if test "x$ac_cv_have_decl_isfinite" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013073 ac_have_decl=1
13074else
13075 ac_have_decl=0
13076fi
13077
13078cat >>confdefs.h <<_ACEOF
13079#define HAVE_DECL_ISFINITE $ac_have_decl
13080_ACEOF
13081
13082
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013083# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
13084# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000013085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
13086$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013087if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013088 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013089else
13090
Matthias Kloseb9621712010-04-24 17:59:49 +000013091if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013092 ac_cv_tanh_preserves_zero_sign=no
13093else
Matthias Kloseb9621712010-04-24 17:59:49 +000013094 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013095/* end confdefs.h. */
13096
13097#include <math.h>
13098#include <stdlib.h>
13099int main() {
13100 /* return 0 if either negative zeros don't exist
13101 on this platform or if negative zeros exist
13102 and tanh(-0.) == -0. */
13103 if (atan2(0., -1.) == atan2(-0., -1.) ||
13104 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
13105 else exit(1);
13106}
13107
13108_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013109if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013110 ac_cv_tanh_preserves_zero_sign=yes
13111else
Matthias Kloseb9621712010-04-24 17:59:49 +000013112 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013113fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013114rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13115 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013116fi
13117
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013118fi
13119
Matthias Kloseb9621712010-04-24 17:59:49 +000013120{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
13121$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013122if test "$ac_cv_tanh_preserves_zero_sign" = yes
13123then
13124
Matthias Kloseb9621712010-04-24 17:59:49 +000013125$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013126
13127fi
13128
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013129if test "$ac_cv_func_log1p" = yes
13130then
13131 # On some versions of AIX, log1p(-0.) returns 0. instead of
13132 # -0. See issue #9920.
13133 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
13134$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013135 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013136 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013137else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013138
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013139 if test "$cross_compiling" = yes; then :
13140 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013141else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013142 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13143/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013144
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013145 #include <math.h>
13146 #include <stdlib.h>
13147 int main() {
13148 /* Fail if the signs of log1p(-0.) and -0. can be
13149 distinguished. */
13150 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
13151 return 0;
13152 else
13153 return 1;
13154 }
13155
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013156_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013157if ac_fn_c_try_run "$LINENO"; then :
13158 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013159else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013160 ac_cv_log1p_drops_zero_sign=yes
13161fi
13162rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13163 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013164fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013165
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013166fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013167
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013168 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
13169$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
13170fi
13171if test "$ac_cv_log1p_drops_zero_sign" = yes
13172then
13173
13174$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
13175
13176fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013177
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000013178LIBS=$LIBS_SAVE
13179
Mark Dickinsona614f042009-11-28 12:48:43 +000013180# For multiprocessing module, check that sem_open
13181# actually works. For FreeBSD versions <= 7.2,
13182# the kernel module that provides POSIX semaphores
13183# isn't loaded by default, so an attempt to call
13184# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000013185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
13186$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013187if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013188 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000013189else
Matthias Kloseb9621712010-04-24 17:59:49 +000013190 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013191 ac_cv_posix_semaphores_enabled=yes
13192else
Matthias Kloseb9621712010-04-24 17:59:49 +000013193 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013194/* end confdefs.h. */
13195
13196#include <unistd.h>
13197#include <fcntl.h>
13198#include <stdio.h>
13199#include <semaphore.h>
13200#include <sys/stat.h>
13201
13202int main(void) {
13203 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
13204 if (a == SEM_FAILED) {
13205 perror("sem_open");
13206 return 1;
13207 }
13208 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013209 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000013210 return 0;
13211}
13212
13213_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013214if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013215 ac_cv_posix_semaphores_enabled=yes
13216else
Matthias Kloseb9621712010-04-24 17:59:49 +000013217 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000013218fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013219rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13220 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013221fi
13222
13223
Mark Dickinsona614f042009-11-28 12:48:43 +000013224fi
13225
Matthias Kloseb9621712010-04-24 17:59:49 +000013226{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
13227$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000013228if test $ac_cv_posix_semaphores_enabled = no
13229then
13230
Matthias Kloseb9621712010-04-24 17:59:49 +000013231$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000013232
13233fi
13234
Mark Dickinson10683072009-04-18 21:18:19 +000013235# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000013236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
13237$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013238if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013239 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013240else
Matthias Kloseb9621712010-04-24 17:59:49 +000013241 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013242 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000013243else
Matthias Kloseb9621712010-04-24 17:59:49 +000013244 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000013245/* end confdefs.h. */
13246
13247#include <unistd.h>
13248#include <fcntl.h>
13249#include <stdio.h>
13250#include <semaphore.h>
13251#include <sys/stat.h>
13252
13253int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000013254 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000013255 int count;
13256 int res;
13257 if(a==SEM_FAILED){
13258 perror("sem_open");
13259 return 1;
13260
13261 }
13262 res = sem_getvalue(a, &count);
13263 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013264 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000013265 return res==-1 ? 1 : 0;
13266}
13267
Mark Dickinson10683072009-04-18 21:18:19 +000013268_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013269if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013270 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000013271else
Matthias Kloseb9621712010-04-24 17:59:49 +000013272 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013273fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013274rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13275 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013276fi
13277
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013278
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013279fi
13280
Matthias Kloseb9621712010-04-24 17:59:49 +000013281{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
13282$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013283if test $ac_cv_broken_sem_getvalue = yes
13284then
13285
Matthias Kloseb9621712010-04-24 17:59:49 +000013286$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013287
13288fi
13289
Mark Dickinsonbd792642009-03-18 20:06:12 +000013290# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000013291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
13292$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013293# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013294if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000013295 enableval=$enable_big_digits; case $enable_big_digits in
13296yes)
13297 enable_big_digits=30 ;;
13298no)
13299 enable_big_digits=15 ;;
1330015|30)
13301 ;;
13302*)
Victor Stinnere0be4232011-10-25 13:06:09 +020013303 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 +000013304esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013305{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
13306$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013307
13308cat >>confdefs.h <<_ACEOF
13309#define PYLONG_BITS_IN_DIGIT $enable_big_digits
13310_ACEOF
13311
13312
13313else
Matthias Kloseb9621712010-04-24 17:59:49 +000013314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13315$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013316fi
13317
13318
Guido van Rossumef2255b2000-03-10 22:30:29 +000013319# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000013320ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020013321if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013322
13323
Matthias Kloseb9621712010-04-24 17:59:49 +000013324$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013325
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013326 wchar_h="yes"
13327
Guido van Rossumef2255b2000-03-10 22:30:29 +000013328else
Martin v. Löwis11437992002-04-12 09:54:03 +000013329 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000013330
13331fi
13332
Michael W. Hudson54241132001-12-07 15:38:26 +000013333
Martin v. Löwis11437992002-04-12 09:54:03 +000013334
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013335# determine wchar_t size
13336if test "$wchar_h" = yes
13337then
Matthias Kloseb9621712010-04-24 17:59:49 +000013338 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013339# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13340# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13341# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000013342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
13343$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013344if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013345 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013346else
Matthias Kloseb9621712010-04-24 17:59:49 +000013347 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
13348"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013349
Martin v. Löwis11437992002-04-12 09:54:03 +000013350else
Matthias Kloseb9621712010-04-24 17:59:49 +000013351 if test "$ac_cv_type_wchar_t" = yes; then
13352 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13353$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013354as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020013355See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013356 else
13357 ac_cv_sizeof_wchar_t=0
13358 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013359fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013360
Martin v. Löwis11437992002-04-12 09:54:03 +000013361fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013362{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
13363$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013364
13365
13366
Martin v. Löwis11437992002-04-12 09:54:03 +000013367cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013368#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013369_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013370
Michael W. Hudson54241132001-12-07 15:38:26 +000013371
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013372fi
13373
Matthias Kloseb9621712010-04-24 17:59:49 +000013374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
13375$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013376have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013377cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013378/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013379
13380#include <tcl.h>
13381#if TCL_UTF_MAX != 6
13382# error "NOT UCS4_TCL"
13383#endif
13384int
13385main ()
13386{
13387
13388 ;
13389 return 0;
13390}
13391_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013392if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013393
13394
Matthias Kloseb9621712010-04-24 17:59:49 +000013395$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013396
13397 have_ucs4_tcl=yes
13398
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013399fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013400rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013401{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
13402$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013403
Skip Montanaro6dead952003-09-25 14:50:04 +000013404# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013405if test "$wchar_h" = yes
13406then
13407 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000013408 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
13409$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013410 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013411 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013412else
13413
Matthias Kloseb9621712010-04-24 17:59:49 +000013414 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013415 ac_cv_wchar_t_signed=yes
13416else
Matthias Kloseb9621712010-04-24 17:59:49 +000013417 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013418/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013419
13420 #include <wchar.h>
13421 int main()
13422 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000013423 /* Success: exit code 0 */
13424 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013425 }
13426
13427_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013428if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013429 ac_cv_wchar_t_signed=yes
13430else
Matthias Kloseb9621712010-04-24 17:59:49 +000013431 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013432fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013433rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13434 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013435fi
13436
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013437fi
13438
Matthias Kloseb9621712010-04-24 17:59:49 +000013439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
13440$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013441fi
13442
Georg Brandl52d168a2008-01-07 18:10:24 +000013443# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013444if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000013445 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000013446then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013447 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013448
Matthias Kloseb9621712010-04-24 17:59:49 +000013449$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013450
Georg Brandl52d168a2008-01-07 18:10:24 +000013451else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013452 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013453fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013454{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
13455$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000013456
13457# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000013458 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13459$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013460if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013461 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000013462else
Matthias Kloseb9621712010-04-24 17:59:49 +000013463 ac_cv_c_bigendian=unknown
13464 # See if we're dealing with a universal compiler.
13465 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13466/* end confdefs.h. */
13467#ifndef __APPLE_CC__
13468 not a universal capable compiler
13469 #endif
13470 typedef int dummy;
13471
Skip Montanaro6dead952003-09-25 14:50:04 +000013472_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013473if ac_fn_c_try_compile "$LINENO"; then :
13474
13475 # Check for potential -arch flags. It is not universal unless
13476 # there are at least two -arch flags with different values.
13477 ac_arch=
13478 ac_prev=
13479 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13480 if test -n "$ac_prev"; then
13481 case $ac_word in
13482 i?86 | x86_64 | ppc | ppc64)
13483 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13484 ac_arch=$ac_word
13485 else
13486 ac_cv_c_bigendian=universal
13487 break
13488 fi
13489 ;;
13490 esac
13491 ac_prev=
13492 elif test "x$ac_word" = "x-arch"; then
13493 ac_prev=arch
13494 fi
13495 done
13496fi
13497rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13498 if test $ac_cv_c_bigendian = unknown; then
13499 # See if sys/param.h defines the BYTE_ORDER macro.
13500 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013501/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013502#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000013503 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013504
Martin v. Löwis11437992002-04-12 09:54:03 +000013505int
13506main ()
13507{
Matthias Kloseb9621712010-04-24 17:59:49 +000013508#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13509 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13510 && LITTLE_ENDIAN)
13511 bogus endian macros
13512 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013513
13514 ;
13515 return 0;
13516}
13517_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013518if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013519 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000013520 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013521/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013522#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000013523 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013524
Martin v. Löwis11437992002-04-12 09:54:03 +000013525int
13526main ()
13527{
Guido van Rossumef2255b2000-03-10 22:30:29 +000013528#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000013529 not big endian
13530 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013531
13532 ;
13533 return 0;
13534}
13535_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013536if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013537 ac_cv_c_bigendian=yes
13538else
Matthias Kloseb9621712010-04-24 17:59:49 +000013539 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000013540fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013541rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013542fi
13543rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13544 fi
13545 if test $ac_cv_c_bigendian = unknown; then
13546 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13547 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013548/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000013549#include <limits.h>
13550
Martin v. Löwis11437992002-04-12 09:54:03 +000013551int
13552main ()
13553{
Matthias Kloseb9621712010-04-24 17:59:49 +000013554#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13555 bogus endian macros
13556 #endif
13557
Martin v. Löwis11437992002-04-12 09:54:03 +000013558 ;
13559 return 0;
13560}
13561_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013562if ac_fn_c_try_compile "$LINENO"; then :
13563 # It does; now see whether it defined to _BIG_ENDIAN or not.
13564 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13565/* end confdefs.h. */
13566#include <limits.h>
13567
13568int
13569main ()
13570{
13571#ifndef _BIG_ENDIAN
13572 not big endian
13573 #endif
13574
13575 ;
13576 return 0;
13577}
13578_ACEOF
13579if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013580 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013581else
Matthias Kloseb9621712010-04-24 17:59:49 +000013582 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013583fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013584rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13585fi
13586rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13587 fi
13588 if test $ac_cv_c_bigendian = unknown; then
13589 # Compile a test program.
13590 if test "$cross_compiling" = yes; then :
13591 # Try to guess by grepping values from an object file.
13592 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13593/* end confdefs.h. */
13594short int ascii_mm[] =
13595 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13596 short int ascii_ii[] =
13597 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13598 int use_ascii (int i) {
13599 return ascii_mm[i] + ascii_ii[i];
13600 }
13601 short int ebcdic_ii[] =
13602 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13603 short int ebcdic_mm[] =
13604 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13605 int use_ebcdic (int i) {
13606 return ebcdic_mm[i] + ebcdic_ii[i];
13607 }
13608 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013609
Matthias Kloseb9621712010-04-24 17:59:49 +000013610int
13611main ()
13612{
13613return use_ascii (foo) == use_ebcdic (foo);
13614 ;
13615 return 0;
13616}
13617_ACEOF
13618if ac_fn_c_try_compile "$LINENO"; then :
13619 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13620 ac_cv_c_bigendian=yes
13621 fi
13622 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13623 if test "$ac_cv_c_bigendian" = unknown; then
13624 ac_cv_c_bigendian=no
13625 else
13626 # finding both strings is unlikely to happen, but who knows?
13627 ac_cv_c_bigendian=unknown
13628 fi
13629 fi
13630fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013631rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013632else
Matthias Kloseb9621712010-04-24 17:59:49 +000013633 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013634/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013635$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013636int
13637main ()
13638{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013639
Matthias Kloseb9621712010-04-24 17:59:49 +000013640 /* Are we little or big endian? From Harbison&Steele. */
13641 union
13642 {
13643 long int l;
13644 char c[sizeof (long int)];
13645 } u;
13646 u.l = 1;
13647 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013648
13649 ;
13650 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000013651}
Martin v. Löwis11437992002-04-12 09:54:03 +000013652_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013653if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013654 ac_cv_c_bigendian=no
13655else
Matthias Kloseb9621712010-04-24 17:59:49 +000013656 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000013657fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013658rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13659 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000013660fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013661
Matthias Kloseb9621712010-04-24 17:59:49 +000013662 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013663fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013664{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
13665$as_echo "$ac_cv_c_bigendian" >&6; }
13666 case $ac_cv_c_bigendian in #(
13667 yes)
13668 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
13669;; #(
13670 no)
13671 ;; #(
13672 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013673
Matthias Kloseb9621712010-04-24 17:59:49 +000013674$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013675
Matthias Kloseb9621712010-04-24 17:59:49 +000013676 ;; #(
13677 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013678 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020013679 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000013680 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000013681
Michael W. Hudson54241132001-12-07 15:38:26 +000013682
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013683# ABI version string for Python extension modules. This appears between the
13684# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
13685# from the following attributes which affect the ABI of this Python build (in
13686# this order):
13687#
13688# * The Python implementation (always 'cpython-' for us)
13689# * The major and minor version numbers
13690# * --with-pydebug (adds a 'd')
13691# * --with-pymalloc (adds a 'm')
13692# * --with-wide-unicode (adds a 'u')
13693#
13694# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000013695# would get a shared library ABI version tag of 'cpython-32dmu' and shared
13696# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013697
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
13699$as_echo_n "checking ABIFLAGS... " >&6; }
13700{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
13701$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
13703$as_echo_n "checking SOABI... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013704SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013705{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
13706$as_echo "$SOABI" >&6; }
13707
doko@ubuntu.comd5537d02013-03-21 13:21:49 -070013708
13709case $ac_sys_system in
13710 Linux*|GNU*)
13711 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
13712 *)
13713 EXT_SUFFIX=${SHLIB_SUFFIX};;
13714esac
13715
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
13717$as_echo_n "checking LDVERSION... " >&6; }
13718LDVERSION='$(VERSION)$(ABIFLAGS)'
13719{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
13720$as_echo "$LDVERSION" >&6; }
13721
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013722# Check whether right shifting a negative integer extends the sign bit
13723# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000013724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
13725$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013726if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013727 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000013728else
Martin v. Löwis11437992002-04-12 09:54:03 +000013729
Matthias Kloseb9621712010-04-24 17:59:49 +000013730if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013731 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013732else
Matthias Kloseb9621712010-04-24 17:59:49 +000013733 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013734/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013735
13736int main()
13737{
Vladimir Marangozova6180282000-07-12 05:05:06 +000013738 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013739}
13740
Martin v. Löwis11437992002-04-12 09:54:03 +000013741_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013742if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000013743 ac_cv_rshift_extends_sign=yes
13744else
Matthias Kloseb9621712010-04-24 17:59:49 +000013745 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000013746fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013747rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13748 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000013749fi
13750
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013751fi
13752
Matthias Kloseb9621712010-04-24 17:59:49 +000013753{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
13754$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000013755if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013756then
Martin v. Löwis11437992002-04-12 09:54:03 +000013757
Matthias Kloseb9621712010-04-24 17:59:49 +000013758$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013759
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013760fi
13761
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013762# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000013763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
13764$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013765if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013766 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013767else
Martin v. Löwis11437992002-04-12 09:54:03 +000013768
Matthias Kloseb9621712010-04-24 17:59:49 +000013769cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013770/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013771#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013772int
13773main ()
13774{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013775
13776 FILE *f = fopen("/dev/null", "r");
13777 flockfile(f);
13778 getc_unlocked(f);
13779 funlockfile(f);
13780
Martin v. Löwis11437992002-04-12 09:54:03 +000013781 ;
13782 return 0;
13783}
13784_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013785if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013786 ac_cv_have_getc_unlocked=yes
13787else
Matthias Kloseb9621712010-04-24 17:59:49 +000013788 ac_cv_have_getc_unlocked=no
13789fi
13790rm -f core conftest.err conftest.$ac_objext \
13791 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013792fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013793
Matthias Kloseb9621712010-04-24 17:59:49 +000013794{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
13795$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013796if test "$ac_cv_have_getc_unlocked" = yes
13797then
Martin v. Löwis11437992002-04-12 09:54:03 +000013798
Matthias Kloseb9621712010-04-24 17:59:49 +000013799$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013800
13801fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013802
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013803# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000013804# save the value of LIBS so we don't actually link Python with readline
13805LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013806
Gregory P. Smith18820942008-09-07 06:24:49 +000013807# On some systems we need to link readline to a termcap compatible
13808# library. NOTE: Keep the precedence of listed libraries synchronised
13809# with setup.py.
13810py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
13812$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020013813for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000013814 if test -z "$py_libtermcap"; then
13815 READLINE_LIBS="-lreadline"
13816 else
13817 READLINE_LIBS="-lreadline -l$py_libtermcap"
13818 fi
13819 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000013820 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013821/* end confdefs.h. */
13822
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013823/* Override any GCC internal prototype to avoid an error.
13824 Use char because int might match the return type of a GCC
13825 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013826#ifdef __cplusplus
13827extern "C"
13828#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013829char readline ();
13830int
13831main ()
13832{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013833return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013834 ;
13835 return 0;
13836}
13837_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013838if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000013839 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013840fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013841rm -f core conftest.err conftest.$ac_objext \
13842 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000013843 if test $py_cv_lib_readline = yes; then
13844 break
13845 fi
13846done
13847# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
13848#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000013849if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
13851$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000013852else
Matthias Kloseb9621712010-04-24 17:59:49 +000013853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
13854$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000013855
Matthias Kloseb9621712010-04-24 17:59:49 +000013856$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013857
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013858fi
13859
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013860# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000013861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
13862$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013863if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013864 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013865else
13866 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013867LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013868cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013869/* end confdefs.h. */
13870
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013871/* Override any GCC internal prototype to avoid an error.
13872 Use char because int might match the return type of a GCC
13873 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013874#ifdef __cplusplus
13875extern "C"
13876#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013877char rl_callback_handler_install ();
13878int
13879main ()
13880{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013881return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013882 ;
13883 return 0;
13884}
13885_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013886if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013887 ac_cv_lib_readline_rl_callback_handler_install=yes
13888else
Matthias Kloseb9621712010-04-24 17:59:49 +000013889 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013890fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013891rm -f core conftest.err conftest.$ac_objext \
13892 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013893LIBS=$ac_check_lib_save_LIBS
13894fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013895{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
13896$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013897if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013898
Matthias Kloseb9621712010-04-24 17:59:49 +000013899$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013900
13901fi
13902
13903
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013904# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013905cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013906/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013907#include <readline/readline.h>
13908_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013909if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013910 have_readline=yes
13911else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013912 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000013913
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013914fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013915rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013916if test $have_readline = yes
13917then
Matthias Kloseb9621712010-04-24 17:59:49 +000013918 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013919/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013920#include <readline/readline.h>
13921
13922_ACEOF
13923if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013924 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013925
Matthias Kloseb9621712010-04-24 17:59:49 +000013926$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013927
13928fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013929rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013930
Matthias Kloseb9621712010-04-24 17:59:49 +000013931 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000013932/* end confdefs.h. */
13933#include <readline/readline.h>
13934
13935_ACEOF
13936if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013937 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000013938
Matthias Kloseb9621712010-04-24 17:59:49 +000013939$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000013940
13941fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013942rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000013943
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013944fi
13945
Martin v. Löwis0daad592001-09-30 21:09:59 +000013946# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000013947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
13948$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013949if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013950 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000013951else
Martin v. Löwis11437992002-04-12 09:54:03 +000013952 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013953LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013954cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013955/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013956
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013957/* Override any GCC internal prototype to avoid an error.
13958 Use char because int might match the return type of a GCC
13959 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013960#ifdef __cplusplus
13961extern "C"
13962#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013963char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013964int
13965main ()
13966{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013967return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013968 ;
13969 return 0;
13970}
13971_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013972if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013973 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000013974else
Matthias Kloseb9621712010-04-24 17:59:49 +000013975 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000013976fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013977rm -f core conftest.err conftest.$ac_objext \
13978 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013979LIBS=$ac_check_lib_save_LIBS
13980fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013981{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
13982$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013983if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013984
Matthias Kloseb9621712010-04-24 17:59:49 +000013985$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000013986
Martin v. Löwis0daad592001-09-30 21:09:59 +000013987fi
13988
Michael W. Hudson54241132001-12-07 15:38:26 +000013989
Thomas Wouters89d996e2007-09-08 17:39:28 +000013990# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000013991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
13992$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013993if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013994 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000013995else
13996 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013997LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013998cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000013999/* end confdefs.h. */
14000
14001/* Override any GCC internal prototype to avoid an error.
14002 Use char because int might match the return type of a GCC
14003 builtin and then its argument prototype would still apply. */
14004#ifdef __cplusplus
14005extern "C"
14006#endif
14007char rl_completion_display_matches_hook ();
14008int
14009main ()
14010{
14011return rl_completion_display_matches_hook ();
14012 ;
14013 return 0;
14014}
14015_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014016if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014017 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
14018else
Matthias Kloseb9621712010-04-24 17:59:49 +000014019 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000014020fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014021rm -f core conftest.err conftest.$ac_objext \
14022 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014023LIBS=$ac_check_lib_save_LIBS
14024fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014025{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
14026$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014027if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014028
Matthias Kloseb9621712010-04-24 17:59:49 +000014029$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000014030
14031fi
14032
14033
Martin v. Löwis0daad592001-09-30 21:09:59 +000014034# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
14036$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014037if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014038 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000014039else
Martin v. Löwis11437992002-04-12 09:54:03 +000014040 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014041LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014042cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014043/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014044
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014045/* Override any GCC internal prototype to avoid an error.
14046 Use char because int might match the return type of a GCC
14047 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014048#ifdef __cplusplus
14049extern "C"
14050#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014051char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014052int
14053main ()
14054{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014055return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014056 ;
14057 return 0;
14058}
14059_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014060if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014061 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000014062else
Matthias Kloseb9621712010-04-24 17:59:49 +000014063 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000014064fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014065rm -f core conftest.err conftest.$ac_objext \
14066 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014067LIBS=$ac_check_lib_save_LIBS
14068fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014069{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
14070$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014071if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014072
Matthias Kloseb9621712010-04-24 17:59:49 +000014073$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000014074
Guido van Rossum353ae582001-07-10 16:45:32 +000014075fi
14076
Jack Jansendd19cf82001-12-06 22:36:17 +000014077
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014078# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014079cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014080/* end confdefs.h. */
14081#include <readline/readline.h>
14082_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014083if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014084 have_readline=yes
14085else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014086 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014087
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014088fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014089rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014090if test $have_readline = yes
14091then
Matthias Kloseb9621712010-04-24 17:59:49 +000014092 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014093/* end confdefs.h. */
14094#include <readline/readline.h>
14095
14096_ACEOF
14097if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014098 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014099
Matthias Kloseb9621712010-04-24 17:59:49 +000014100$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014101
14102fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014103rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014104
14105fi
14106
Martin v. Löwis82bca632006-02-10 20:49:30 +000014107# End of readline checks: restore LIBS
14108LIBS=$LIBS_no_readline
14109
Matthias Kloseb9621712010-04-24 17:59:49 +000014110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
14111$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014112if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014113 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014114else
Martin v. Löwis11437992002-04-12 09:54:03 +000014115
Matthias Kloseb9621712010-04-24 17:59:49 +000014116if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014117 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014118else
Matthias Kloseb9621712010-04-24 17:59:49 +000014119 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014120/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014121
14122int main()
14123{
14124 int val1 = nice(1);
14125 if (val1 != -1 && val1 == nice(2))
14126 exit(0);
14127 exit(1);
14128}
14129
Martin v. Löwis11437992002-04-12 09:54:03 +000014130_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014131if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014132 ac_cv_broken_nice=yes
14133else
Matthias Kloseb9621712010-04-24 17:59:49 +000014134 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014135fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014136rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14137 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014138fi
14139
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014140fi
14141
Matthias Kloseb9621712010-04-24 17:59:49 +000014142{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
14143$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014144if test "$ac_cv_broken_nice" = yes
14145then
Martin v. Löwis11437992002-04-12 09:54:03 +000014146
Matthias Kloseb9621712010-04-24 17:59:49 +000014147$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014148
14149fi
14150
Matthias Kloseb9621712010-04-24 17:59:49 +000014151{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
14152$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014153if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014154 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014155else
Matthias Kloseb9621712010-04-24 17:59:49 +000014156 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014157 ac_cv_broken_poll=no
14158else
Matthias Kloseb9621712010-04-24 17:59:49 +000014159 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014160/* end confdefs.h. */
14161
14162#include <poll.h>
14163
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014164int main()
14165{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014166 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014167 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014168
14169 close (42);
14170
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014171 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014172 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014173 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014174 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014175 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014176 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014177 return 1;
14178}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014179
14180_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014181if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014182 ac_cv_broken_poll=yes
14183else
Matthias Kloseb9621712010-04-24 17:59:49 +000014184 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014185fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014186rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14187 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014188fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014189
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014190fi
14191
Matthias Kloseb9621712010-04-24 17:59:49 +000014192{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
14193$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014194if test "$ac_cv_broken_poll" = yes
14195then
14196
Matthias Kloseb9621712010-04-24 17:59:49 +000014197$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014198
14199fi
14200
Brett Cannon43802422005-02-10 20:48:03 +000014201# 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 +000014202# (which is not required by ISO C or UNIX spec) and/or if we support
14203# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000014204ac_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 +000014205#include <$ac_cv_struct_tm>
14206
Matthias Kloseb9621712010-04-24 17:59:49 +000014207"
Victor Stinnere0be4232011-10-25 13:06:09 +020014208if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000014209
14210cat >>confdefs.h <<_ACEOF
14211#define HAVE_STRUCT_TM_TM_ZONE 1
14212_ACEOF
14213
14214
14215fi
14216
14217if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14218
Matthias Kloseb9621712010-04-24 17:59:49 +000014219$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014220
14221else
Matthias Kloseb9621712010-04-24 17:59:49 +000014222 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
14223"
Victor Stinnere0be4232011-10-25 13:06:09 +020014224if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014225 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014226else
Matthias Kloseb9621712010-04-24 17:59:49 +000014227 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014228fi
14229
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014230cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014231#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014232_ACEOF
14233
Matthias Kloseb9621712010-04-24 17:59:49 +000014234 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
14235$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014236if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014237 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014238else
Matthias Kloseb9621712010-04-24 17:59:49 +000014239 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014240/* end confdefs.h. */
14241#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014242#if !HAVE_DECL_TZNAME
14243extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000014244#endif
14245
14246int
14247main ()
14248{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014249return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000014250 ;
14251 return 0;
14252}
14253_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014254if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000014255 ac_cv_var_tzname=yes
14256else
Matthias Kloseb9621712010-04-24 17:59:49 +000014257 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000014258fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014259rm -f core conftest.err conftest.$ac_objext \
14260 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014261fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014262{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
14263$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000014264 if test $ac_cv_var_tzname = yes; then
14265
Matthias Kloseb9621712010-04-24 17:59:49 +000014266$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014267
14268 fi
14269fi
14270
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014271
Martin v. Löwis1d459062005-03-14 21:23:33 +000014272# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000014273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
14274$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014275if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014276 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014277else
14278
Matthias Kloseb9621712010-04-24 17:59:49 +000014279if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014280 ac_cv_working_tzset=no
14281else
Matthias Kloseb9621712010-04-24 17:59:49 +000014282 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014283/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014284
14285#include <stdlib.h>
14286#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000014287#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000014288
14289#if HAVE_TZNAME
14290extern char *tzname[];
14291#endif
14292
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014293int main()
14294{
Brett Cannon18367812003-09-19 00:59:16 +000014295 /* Note that we need to ensure that not only does tzset(3)
14296 do 'something' with localtime, but it works as documented
14297 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000014298 This includes making sure that tzname is set properly if
14299 tm->tm_zone does not exist since it is the alternative way
14300 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000014301
14302 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000014303 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000014304 */
14305
Martin v. Löwis1d459062005-03-14 21:23:33 +000014306 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000014307 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
14308
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014309 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014310 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014311 if (localtime(&groundhogday)->tm_hour != 0)
14312 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014313#if HAVE_TZNAME
14314 /* For UTC, tzname[1] is sometimes "", sometimes " " */
14315 if (strcmp(tzname[0], "UTC") ||
14316 (tzname[1][0] != 0 && tzname[1][0] != ' '))
14317 exit(1);
14318#endif
Brett Cannon18367812003-09-19 00:59:16 +000014319
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014320 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014321 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014322 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014323 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014324#if HAVE_TZNAME
14325 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
14326 exit(1);
14327#endif
Brett Cannon18367812003-09-19 00:59:16 +000014328
14329 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
14330 tzset();
14331 if (localtime(&groundhogday)->tm_hour != 11)
14332 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014333#if HAVE_TZNAME
14334 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
14335 exit(1);
14336#endif
14337
14338#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000014339 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
14340 exit(1);
14341 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
14342 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014343#endif
Brett Cannon18367812003-09-19 00:59:16 +000014344
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014345 exit(0);
14346}
14347
14348_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014349if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014350 ac_cv_working_tzset=yes
14351else
Matthias Kloseb9621712010-04-24 17:59:49 +000014352 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014353fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014354rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14355 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014356fi
14357
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014358fi
14359
Matthias Kloseb9621712010-04-24 17:59:49 +000014360{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
14361$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014362if test "$ac_cv_working_tzset" = yes
14363then
14364
Matthias Kloseb9621712010-04-24 17:59:49 +000014365$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014366
14367fi
14368
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014369# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000014370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
14371$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014372if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014373 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014374else
Matthias Kloseb9621712010-04-24 17:59:49 +000014375 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014376/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014377#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014378int
14379main ()
14380{
14381
14382struct stat st;
14383st.st_mtim.tv_nsec = 1;
14384
14385 ;
14386 return 0;
14387}
14388_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014389if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000014390 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014391else
Matthias Kloseb9621712010-04-24 17:59:49 +000014392 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014393fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014394rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14395fi
14396
Matthias Kloseb9621712010-04-24 17:59:49 +000014397{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
14398$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014399if test "$ac_cv_stat_tv_nsec" = yes
14400then
14401
Matthias Kloseb9621712010-04-24 17:59:49 +000014402$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014403
14404fi
14405
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014406# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000014407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
14408$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014409if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014410 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014411else
Matthias Kloseb9621712010-04-24 17:59:49 +000014412 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014413/* end confdefs.h. */
14414#include <sys/stat.h>
14415int
14416main ()
14417{
14418
14419struct stat st;
14420st.st_mtimespec.tv_nsec = 1;
14421
14422 ;
14423 return 0;
14424}
14425_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014426if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014427 ac_cv_stat_tv_nsec2=yes
14428else
Matthias Kloseb9621712010-04-24 17:59:49 +000014429 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014430fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014431rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14432fi
14433
Matthias Kloseb9621712010-04-24 17:59:49 +000014434{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
14435$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014436if test "$ac_cv_stat_tv_nsec2" = yes
14437then
14438
Matthias Kloseb9621712010-04-24 17:59:49 +000014439$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014440
14441fi
14442
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020014443ac_save_cppflags="$CPPFLAGS"
14444CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
Jack Jansen666b1e72001-10-31 12:11:48 +000014445# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000014446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
14447$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014448if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014449 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014450else
Matthias Kloseb9621712010-04-24 17:59:49 +000014451 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014452/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014453#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014454int
14455main ()
14456{
Jack Jansen666b1e72001-10-31 12:11:48 +000014457
14458 int rtn;
14459 rtn = mvwdelch(0,0,0);
14460
Martin v. Löwis11437992002-04-12 09:54:03 +000014461 ;
14462 return 0;
14463}
14464_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014465if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014466 ac_cv_mvwdelch_is_expression=yes
14467else
Matthias Kloseb9621712010-04-24 17:59:49 +000014468 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014469fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014470rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14471fi
14472
Matthias Kloseb9621712010-04-24 17:59:49 +000014473{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
14474$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000014475
14476if test "$ac_cv_mvwdelch_is_expression" = yes
14477then
Martin v. Löwis11437992002-04-12 09:54:03 +000014478
Matthias Kloseb9621712010-04-24 17:59:49 +000014479$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014480
14481fi
14482
Matthias Kloseb9621712010-04-24 17:59:49 +000014483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
14484$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014485if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014486 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014487else
Matthias Kloseb9621712010-04-24 17:59:49 +000014488 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014489/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014490#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014491int
14492main ()
14493{
Jack Jansen666b1e72001-10-31 12:11:48 +000014494
14495 WINDOW *w;
14496 w->_flags = 0;
14497
Martin v. Löwis11437992002-04-12 09:54:03 +000014498 ;
14499 return 0;
14500}
14501_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014502if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014503 ac_cv_window_has_flags=yes
14504else
Matthias Kloseb9621712010-04-24 17:59:49 +000014505 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014506fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014507rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14508fi
14509
Matthias Kloseb9621712010-04-24 17:59:49 +000014510{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
14511$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000014512
Jack Jansen666b1e72001-10-31 12:11:48 +000014513
14514if test "$ac_cv_window_has_flags" = yes
14515then
Martin v. Löwis11437992002-04-12 09:54:03 +000014516
Matthias Kloseb9621712010-04-24 17:59:49 +000014517$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014518
14519fi
14520
Matthias Kloseb9621712010-04-24 17:59:49 +000014521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
14522$as_echo_n "checking for is_term_resized... " >&6; }
14523cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014524/* end confdefs.h. */
14525#include <curses.h>
14526int
14527main ()
14528{
14529void *x=is_term_resized
14530 ;
14531 return 0;
14532}
14533_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014534if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014535
Matthias Kloseb9621712010-04-24 17:59:49 +000014536$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014537
Matthias Kloseb159a552010-04-25 21:00:44 +000014538 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014539$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014540else
Matthias Kloseb9621712010-04-24 17:59:49 +000014541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14542$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014543
14544fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014545rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14546
Matthias Kloseb9621712010-04-24 17:59:49 +000014547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
14548$as_echo_n "checking for resize_term... " >&6; }
14549cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014550/* end confdefs.h. */
14551#include <curses.h>
14552int
14553main ()
14554{
14555void *x=resize_term
14556 ;
14557 return 0;
14558}
14559_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014560if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014561
Matthias Kloseb9621712010-04-24 17:59:49 +000014562$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014563
Matthias Kloseb159a552010-04-25 21:00:44 +000014564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014565$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014566else
Matthias Kloseb9621712010-04-24 17:59:49 +000014567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14568$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014569
14570fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014571rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14572
Matthias Kloseb9621712010-04-24 17:59:49 +000014573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
14574$as_echo_n "checking for resizeterm... " >&6; }
14575cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014576/* end confdefs.h. */
14577#include <curses.h>
14578int
14579main ()
14580{
14581void *x=resizeterm
14582 ;
14583 return 0;
14584}
14585_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014586if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014587
Matthias Kloseb9621712010-04-24 17:59:49 +000014588$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014589
Matthias Kloseb159a552010-04-25 21:00:44 +000014590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014591$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014592else
Matthias Kloseb9621712010-04-24 17:59:49 +000014593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14594$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014595
14596fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014597rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020014598# last curses configure check
14599CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014600
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
14602$as_echo "$as_me: checking for device files" >&6;}
14603
14604if test "x$cross_compiling" = xyes; then
14605 if test "${ac_cv_file__dev_ptmx+set}" != set; then
14606 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14607$as_echo_n "checking for /dev/ptmx... " >&6; }
14608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14609$as_echo "not set" >&6; }
14610 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14611 fi
14612 if test "${ac_cv_file__dev_ptc+set}" != set; then
14613 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14614$as_echo_n "checking for /dev/ptc... " >&6; }
14615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14616$as_echo "not set" >&6; }
14617 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14618 fi
14619fi
14620
Matthias Kloseb9621712010-04-24 17:59:49 +000014621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14622$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014623if ${ac_cv_file__dev_ptmx+:} false; then :
14624 $as_echo_n "(cached) " >&6
14625else
14626 test "$cross_compiling" = yes &&
14627 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14628if test -r "/dev/ptmx"; then
14629 ac_cv_file__dev_ptmx=yes
14630else
14631 ac_cv_file__dev_ptmx=no
14632fi
14633fi
14634{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
14635$as_echo "$ac_cv_file__dev_ptmx" >&6; }
14636if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000014637
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014638fi
14639
14640if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014641
Matthias Kloseb9621712010-04-24 17:59:49 +000014642$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014643
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014644fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14646$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014647if ${ac_cv_file__dev_ptc+:} false; then :
14648 $as_echo_n "(cached) " >&6
14649else
14650 test "$cross_compiling" = yes &&
14651 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14652if test -r "/dev/ptc"; then
14653 ac_cv_file__dev_ptc=yes
14654else
14655 ac_cv_file__dev_ptc=no
14656fi
14657fi
14658{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
14659$as_echo "$ac_cv_file__dev_ptc" >&6; }
14660if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000014661
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014662fi
14663
14664if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000014665
Matthias Kloseb9621712010-04-24 17:59:49 +000014666$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000014667
Neal Norwitz865400f2003-03-21 01:42:58 +000014668fi
14669
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014670if test "$have_long_long" = yes
14671then
Matthias Kloseb9621712010-04-24 17:59:49 +000014672 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
14673$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014674 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014675 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014676else
Matthias Kloseb9621712010-04-24 17:59:49 +000014677 if test "$cross_compiling" = yes; then :
Matthias Klose3b739b12012-03-15 19:31:06 +010014678 ac_cv_have_long_long_format="cross -- assuming no"
14679 if test x$GCC = xyes; then
14680 save_CFLAGS=$CFLAGS
14681 CFLAGS="$CFLAGS -Werror -Wformat"
14682 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14683/* end confdefs.h. */
14684
14685 #include <stdio.h>
14686 #include <stddef.h>
14687
14688int
14689main ()
14690{
14691
14692 char *buffer;
14693 sprintf(buffer, "%lld", (long long)123);
14694 sprintf(buffer, "%lld", (long long)-123);
14695 sprintf(buffer, "%llu", (unsigned long long)123);
14696
14697 ;
14698 return 0;
14699}
14700_ACEOF
14701if ac_fn_c_try_compile "$LINENO"; then :
14702 ac_cv_have_long_long_format=yes
14703
14704fi
14705rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14706 CFLAGS=$save_CFLAGS
14707 fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014708else
Matthias Kloseb9621712010-04-24 17:59:49 +000014709 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014710/* end confdefs.h. */
14711
14712 #include <stdio.h>
14713 #include <stddef.h>
14714 #include <string.h>
14715
14716 #ifdef HAVE_SYS_TYPES_H
14717 #include <sys/types.h>
14718 #endif
14719
14720 int main()
14721 {
14722 char buffer[256];
14723
14724 if (sprintf(buffer, "%lld", (long long)123) < 0)
14725 return 1;
14726 if (strcmp(buffer, "123"))
14727 return 1;
14728
14729 if (sprintf(buffer, "%lld", (long long)-123) < 0)
14730 return 1;
14731 if (strcmp(buffer, "-123"))
14732 return 1;
14733
14734 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
14735 return 1;
14736 if (strcmp(buffer, "123"))
14737 return 1;
14738
14739 return 0;
14740 }
14741
14742_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014743if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014744 ac_cv_have_long_long_format=yes
14745else
Matthias Kloseb9621712010-04-24 17:59:49 +000014746 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014747fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014748rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14749 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014750fi
14751
14752
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014753fi
14754
Matthias Kloseb9621712010-04-24 17:59:49 +000014755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
14756$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014757fi
14758
Mark Dickinson89d7d412009-12-31 20:50:59 +000014759if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014760then
14761
Matthias Kloseb9621712010-04-24 17:59:49 +000014762$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014763
14764fi
14765
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000014766if test $ac_sys_system = Darwin
14767then
14768 LIBS="$LIBS -framework CoreFoundation"
14769fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014770
Matthias Kloseb9621712010-04-24 17:59:49 +000014771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
14772$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014773if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014774 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014775else
Matthias Kloseb9621712010-04-24 17:59:49 +000014776 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000014777 ac_cv_have_size_t_format="cross -- assuming yes"
14778
Thomas Wouters477c8d52006-05-27 19:21:47 +000014779else
Matthias Kloseb9621712010-04-24 17:59:49 +000014780 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000014781/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014782
Thomas Wouters477c8d52006-05-27 19:21:47 +000014783#include <stdio.h>
14784#include <stddef.h>
14785#include <string.h>
14786
Christian Heimes2c181612007-12-17 20:04:13 +000014787#ifdef HAVE_SYS_TYPES_H
14788#include <sys/types.h>
14789#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000014790
14791#ifdef HAVE_SSIZE_T
14792typedef ssize_t Py_ssize_t;
14793#elif SIZEOF_VOID_P == SIZEOF_LONG
14794typedef long Py_ssize_t;
14795#else
14796typedef int Py_ssize_t;
14797#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000014798
Christian Heimes2c181612007-12-17 20:04:13 +000014799int main()
14800{
14801 char buffer[256];
14802
Thomas Wouters477c8d52006-05-27 19:21:47 +000014803 if(sprintf(buffer, "%zd", (size_t)123) < 0)
14804 return 1;
14805
Thomas Wouters89f507f2006-12-13 04:49:30 +000014806 if (strcmp(buffer, "123"))
14807 return 1;
14808
14809 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
14810 return 1;
14811
14812 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000014813 return 1;
14814
14815 return 0;
14816}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014817
Thomas Wouters477c8d52006-05-27 19:21:47 +000014818_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014819if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014820 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014821else
Matthias Kloseb9621712010-04-24 17:59:49 +000014822 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014823fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014824rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14825 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014826fi
14827
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014828fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014829{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
14830$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000014831if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014832
Matthias Kloseb9621712010-04-24 17:59:49 +000014833$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014834
14835fi
14836
Matthias Kloseb9621712010-04-24 17:59:49 +000014837ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000014838#ifdef HAVE_SYS_TYPES_H
14839#include <sys/types.h>
14840#endif
14841#ifdef HAVE_SYS_SOCKET_H
14842#include <sys/socket.h>
14843#endif
14844
Matthias Kloseb9621712010-04-24 17:59:49 +000014845"
Victor Stinnere0be4232011-10-25 13:06:09 +020014846if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000014847
Martin v. Löwis11437992002-04-12 09:54:03 +000014848else
Guido van Rossum95713eb2000-05-18 20:53:31 +000014849
Matthias Kloseb9621712010-04-24 17:59:49 +000014850$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000014851
14852fi
14853
Michael W. Hudson54241132001-12-07 15:38:26 +000014854
Matthias Kloseb9621712010-04-24 17:59:49 +000014855{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
14856$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014857if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014858 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014859else
Matthias Kloseb9621712010-04-24 17:59:49 +000014860 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000014861 ac_cv_broken_mbstowcs=no
14862else
Matthias Kloseb9621712010-04-24 17:59:49 +000014863 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000014864/* end confdefs.h. */
14865
Stefan Krah19c21392012-11-22 23:47:32 +010014866#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000014867#include<stdlib.h>
14868int main() {
14869 size_t len = -1;
14870 const char *str = "text";
14871 len = mbstowcs(NULL, str, 0);
14872 return (len != 4);
14873}
14874
14875_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014876if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000014877 ac_cv_broken_mbstowcs=no
14878else
Matthias Kloseb9621712010-04-24 17:59:49 +000014879 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000014880fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014881rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14882 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000014883fi
14884
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014885fi
14886
Matthias Kloseb9621712010-04-24 17:59:49 +000014887{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
14888$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000014889if test "$ac_cv_broken_mbstowcs" = yes
14890then
14891
Matthias Kloseb9621712010-04-24 17:59:49 +000014892$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000014893
14894fi
14895
Antoine Pitroub52ec782009-01-25 16:34:23 +000014896# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000014897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
14898$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014899
14900# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014901if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000014902 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000014903if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000014904then
14905
Matthias Kloseb9621712010-04-24 17:59:49 +000014906$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000014907
Matthias Kloseb9621712010-04-24 17:59:49 +000014908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14909$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014910fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000014911if test "$withval" = no
14912then
14913
14914$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
14915
Matthias Kloseb9621712010-04-24 17:59:49 +000014916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14917$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014918fi
14919
Antoine Pitrou042b1282010-08-13 21:15:58 +000014920else
14921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14922$as_echo "no value specified" >&6; }
14923fi
14924
Antoine Pitroub52ec782009-01-25 16:34:23 +000014925
Matthias Kloseb17289e2012-03-15 19:51:34 +010014926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
14927$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
14928if ${ac_cv_computed_gotos+:} false; then :
14929 $as_echo_n "(cached) " >&6
14930else
14931 if test "$cross_compiling" = yes; then :
14932 if test "${with_computed_gotos+set}" = set; then
14933 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
14934 else
14935 ac_cv_computed_gotos=no
14936 fi
14937else
14938 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14939/* end confdefs.h. */
14940
14941int main(int argc, char **argv)
14942{
14943 static void *targets[1] = { &&LABEL1 };
14944 goto LABEL2;
14945LABEL1:
14946 return 0;
14947LABEL2:
14948 goto *targets[0];
14949 return 1;
14950}
14951
14952_ACEOF
14953if ac_fn_c_try_run "$LINENO"; then :
14954 ac_cv_computed_gotos=yes
14955else
14956 ac_cv_computed_gotos=no
14957fi
14958rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14959 conftest.$ac_objext conftest.beam conftest.$ac_ext
14960fi
14961
14962fi
14963
14964{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
14965$as_echo "$ac_cv_computed_gotos" >&6; }
14966case "$ac_cv_computed_gotos" in yes*)
14967
14968$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
14969
14970esac
14971
Benjamin Petersond8d835b2010-10-15 23:14:46 +000014972case $ac_sys_system in
14973AIX*)
14974
14975$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
14976 ;;
14977esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000014978
Michael W. Hudson54241132001-12-07 15:38:26 +000014979
Mark Dickinsonb2153e92010-05-05 22:31:36 +000014980
14981
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000014982for h in `(cd $srcdir;echo Python/thread_*.h)`
14983do
14984 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
14985done
14986
Michael W. Hudson54241132001-12-07 15:38:26 +000014987
Neal Norwitzd24499d2005-12-18 21:36:39 +000014988SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000014989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
14990$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014991for dir in $SRCDIRS; do
14992 if test ! -d $dir; then
14993 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000014994 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014995done
Matthias Kloseb9621712010-04-24 17:59:49 +000014996{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
14997$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000014998
Stefan Krah1919b7e2012-03-21 18:25:23 +010014999# Availability of -O2:
15000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
15001$as_echo_n "checking for -O2... " >&6; }
15002saved_cflags="$CFLAGS"
15003CFLAGS="-O2"
15004cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15005/* end confdefs.h. */
15006
15007int
15008main ()
15009{
15010
15011
15012 ;
15013 return 0;
15014}
15015_ACEOF
15016if ac_fn_c_try_compile "$LINENO"; then :
15017 have_O2=yes
15018else
15019 have_O2=no
15020fi
15021rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15022{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
15023$as_echo "$have_O2" >&6; }
15024CFLAGS="$saved_cflags"
15025
15026# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
15027# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
15028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
15029$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
15030saved_cflags="$CFLAGS"
15031CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
15032if test "$have_O2" = no; then
15033 CFLAGS=""
15034fi
15035if test "$cross_compiling" = yes; then :
15036 have_glibc_memmove_bug=undefined
15037else
15038 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15039/* end confdefs.h. */
15040
15041#include <stdio.h>
15042#include <stdlib.h>
15043#include <string.h>
15044void foo(void *p, void *q) { memmove(p, q, 19); }
15045int main() {
15046 char a[32] = "123456789000000000";
15047 foo(&a[9], a);
15048 if (strcmp(a, "123456789123456789000000000") != 0)
15049 return 1;
15050 foo(a, &a[9]);
15051 if (strcmp(a, "123456789000000000") != 0)
15052 return 1;
15053 return 0;
15054}
15055
15056_ACEOF
15057if ac_fn_c_try_run "$LINENO"; then :
15058 have_glibc_memmove_bug=no
15059else
15060 have_glibc_memmove_bug=yes
15061fi
15062rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15063 conftest.$ac_objext conftest.beam conftest.$ac_ext
15064fi
15065
15066CFLAGS="$saved_cflags"
15067{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
15068$as_echo "$have_glibc_memmove_bug" >&6; }
15069if test "$have_glibc_memmove_bug" = yes; then
15070
15071$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
15072
15073fi
15074
15075if test "$have_gcc_asm_for_x87" = yes; then
15076 # Some versions of gcc miscompile inline asm:
15077 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
15078 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
15079 case $CC in
15080 *gcc*)
15081 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
15082$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
15083 saved_cflags="$CFLAGS"
15084 CFLAGS="-O2"
15085 if test "$cross_compiling" = yes; then :
15086 have_ipa_pure_const_bug=undefined
15087else
15088 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15089/* end confdefs.h. */
15090
15091 __attribute__((noinline)) int
15092 foo(int *p) {
15093 int r;
15094 asm ( "movl \$6, (%1)\n\t"
15095 "xorl %0, %0\n\t"
15096 : "=r" (r) : "r" (p) : "memory"
15097 );
15098 return r;
15099 }
15100 int main() {
15101 int p = 8;
15102 if ((foo(&p) ? : p) != 6)
15103 return 1;
15104 return 0;
15105 }
15106
15107_ACEOF
15108if ac_fn_c_try_run "$LINENO"; then :
15109 have_ipa_pure_const_bug=no
15110else
15111 have_ipa_pure_const_bug=yes
15112fi
15113rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15114 conftest.$ac_objext conftest.beam conftest.$ac_ext
15115fi
15116
15117 CFLAGS="$saved_cflags"
15118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
15119$as_echo "$have_ipa_pure_const_bug" >&6; }
15120 if test "$have_ipa_pure_const_bug" = yes; then
15121
15122$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
15123
15124 fi
15125 ;;
15126 esac
15127fi
15128
Guido van Rossum627b2d71993-12-24 10:39:16 +000015129# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000015130ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000015131
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015132ac_config_files="$ac_config_files Modules/ld_so_aix"
15133
Martin v. Löwis11437992002-04-12 09:54:03 +000015134cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015135# This file is a shell script that caches the results of configure
15136# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000015137# scripts and configure runs, see configure's option --config-cache.
15138# It is not useful on other systems. If it contains results you don't
15139# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015140#
Martin v. Löwis11437992002-04-12 09:54:03 +000015141# config.status only pays attention to the cache file if you give it
15142# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015143#
Skip Montanaro6dead952003-09-25 14:50:04 +000015144# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000015145# loading this file, other *unset* `ac_cv_foo' will be assigned the
15146# following values.
15147
15148_ACEOF
15149
Guido van Rossumf78abae1997-01-21 22:02:36 +000015150# The following way of writing the cache mishandles newlines in values,
15151# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015152# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015153# Ultrix sh set writes to stderr and can't be redirected directly,
15154# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015155(
15156 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
15157 eval ac_val=\$$ac_var
15158 case $ac_val in #(
15159 *${as_nl}*)
15160 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000015161 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
15162$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015163 esac
15164 case $ac_var in #(
15165 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000015166 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
15167 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015168 esac ;;
15169 esac
15170 done
15171
Martin v. Löwis11437992002-04-12 09:54:03 +000015172 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015173 case $as_nl`(ac_space=' '; set) 2>&1` in #(
15174 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000015175 # `set' does not quote correctly, so add quotes: double-quote
15176 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000015177 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015178 "s/'/'\\\\''/g;
15179 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015180 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000015181 *)
15182 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015183 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000015184 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015185 esac |
15186 sort
15187) |
Martin v. Löwis11437992002-04-12 09:54:03 +000015188 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015189 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000015190 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015191 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000015192 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15193 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015194 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15195 :end' >>confcache
15196if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
15197 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020015198 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015199 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
15200$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020015201 if test ! -f "$cache_file" || test -h "$cache_file"; then
15202 cat confcache >"$cache_file"
15203 else
15204 case $cache_file in #(
15205 */* | ?:*)
15206 mv -f confcache "$cache_file"$$ &&
15207 mv -f "$cache_file"$$ "$cache_file" ;; #(
15208 *)
15209 mv -f confcache "$cache_file" ;;
15210 esac
15211 fi
15212 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015213 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015214 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
15215$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015216 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015217fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015218rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000015219
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015220test "x$prefix" = xNONE && prefix=$ac_default_prefix
15221# Let make expand exec_prefix.
15222test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000015223
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015224DEFS=-DHAVE_CONFIG_H
15225
Skip Montanaro6dead952003-09-25 14:50:04 +000015226ac_libobjs=
15227ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015228U=
Skip Montanaro6dead952003-09-25 14:50:04 +000015229for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
15230 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015231 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000015232 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015233 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
15234 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000015235 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
15236 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000015237done
15238LIBOBJS=$ac_libobjs
15239
15240LTLIBOBJS=$ac_ltlibobjs
15241
15242
Martin v. Löwis11437992002-04-12 09:54:03 +000015243
Matthias Kloseb9621712010-04-24 17:59:49 +000015244
Victor Stinnere0be4232011-10-25 13:06:09 +020015245: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000015246ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000015247ac_clean_files_save=$ac_clean_files
15248ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015249{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
15250$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
15251as_write_fail=0
15252cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015253#! $SHELL
15254# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015255# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015256# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000015257# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015258
Martin v. Löwis11437992002-04-12 09:54:03 +000015259debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000015260ac_cs_recheck=false
15261ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000015262
Matthias Kloseb9621712010-04-24 17:59:49 +000015263SHELL=\${CONFIG_SHELL-$SHELL}
15264export SHELL
15265_ASEOF
15266cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
15267## -------------------- ##
15268## M4sh Initialization. ##
15269## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000015270
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015271# Be more Bourne compatible
15272DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000015273if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015274 emulate sh
15275 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000015276 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000015277 # is contrary to our usage. Disable this feature.
15278 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015279 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015280else
Matthias Kloseb9621712010-04-24 17:59:49 +000015281 case `(set -o) 2>/dev/null` in #(
15282 *posix*) :
15283 set -o posix ;; #(
15284 *) :
15285 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015286esac
Michael W. Hudson54241132001-12-07 15:38:26 +000015287fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000015288
15289
Matthias Kloseb9621712010-04-24 17:59:49 +000015290as_nl='
15291'
15292export as_nl
15293# Printing a long string crashes Solaris 7 /usr/bin/printf.
15294as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
15295as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
15296as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
15297# Prefer a ksh shell builtin over an external printf program on Solaris,
15298# but without wasting forks for bash or zsh.
15299if test -z "$BASH_VERSION$ZSH_VERSION" \
15300 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
15301 as_echo='print -r --'
15302 as_echo_n='print -rn --'
15303elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
15304 as_echo='printf %s\n'
15305 as_echo_n='printf %s'
15306else
15307 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
15308 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
15309 as_echo_n='/usr/ucb/echo -n'
15310 else
15311 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
15312 as_echo_n_body='eval
15313 arg=$1;
15314 case $arg in #(
15315 *"$as_nl"*)
15316 expr "X$arg" : "X\\(.*\\)$as_nl";
15317 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
15318 esac;
15319 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
15320 '
15321 export as_echo_n_body
15322 as_echo_n='sh -c $as_echo_n_body as_echo'
15323 fi
15324 export as_echo_body
15325 as_echo='sh -c $as_echo_body as_echo'
15326fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015327
15328# The user is always right.
15329if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015330 PATH_SEPARATOR=:
15331 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
15332 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
15333 PATH_SEPARATOR=';'
15334 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015335fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015336
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015337
15338# IFS
15339# We need space, tab and new line, in precisely that order. Quoting is
15340# there to prevent editors from complaining about space-tab.
15341# (If _AS_PATH_WALK were called with IFS unset, it would disable word
15342# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015343IFS=" "" $as_nl"
15344
15345# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020015346as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000015347case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015348 *[\\/]* ) as_myself=$0 ;;
15349 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000015350for as_dir in $PATH
15351do
15352 IFS=$as_save_IFS
15353 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000015354 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15355 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015356IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000015357
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015358 ;;
15359esac
15360# We did not find ourselves, most probably we were run as `sh COMMAND'
15361# in which case we are not to be found in the path.
15362if test "x$as_myself" = x; then
15363 as_myself=$0
15364fi
15365if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015366 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
15367 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015368fi
15369
Matthias Kloseb9621712010-04-24 17:59:49 +000015370# Unset variables that we do not need and which cause bugs (e.g. in
15371# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
15372# suppresses any "Segmentation fault" message there. '((' could
15373# trigger a bug in pdksh 5.2.14.
15374for as_var in BASH_ENV ENV MAIL MAILPATH
15375do eval test x\${$as_var+set} = xset \
15376 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015377done
15378PS1='$ '
15379PS2='> '
15380PS4='+ '
15381
15382# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000015383LC_ALL=C
15384export LC_ALL
15385LANGUAGE=C
15386export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015387
Matthias Kloseb9621712010-04-24 17:59:49 +000015388# CDPATH.
15389(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
15390
15391
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015392# as_fn_error STATUS ERROR [LINENO LOG_FD]
15393# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000015394# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
15395# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015396# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000015397as_fn_error ()
15398{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015399 as_status=$1; test $as_status -eq 0 && as_status=1
15400 if test "$4"; then
15401 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
15402 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000015403 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015404 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000015405 as_fn_exit $as_status
15406} # as_fn_error
15407
15408
15409# as_fn_set_status STATUS
15410# -----------------------
15411# Set $? to STATUS, without forking.
15412as_fn_set_status ()
15413{
15414 return $1
15415} # as_fn_set_status
15416
15417# as_fn_exit STATUS
15418# -----------------
15419# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
15420as_fn_exit ()
15421{
15422 set +e
15423 as_fn_set_status $1
15424 exit $1
15425} # as_fn_exit
15426
15427# as_fn_unset VAR
15428# ---------------
15429# Portably unset VAR.
15430as_fn_unset ()
15431{
15432 { eval $1=; unset $1;}
15433}
15434as_unset=as_fn_unset
15435# as_fn_append VAR VALUE
15436# ----------------------
15437# Append the text in VALUE to the end of the definition contained in VAR. Take
15438# advantage of any shell optimizations that allow amortized linear growth over
15439# repeated appends, instead of the typical quadratic growth present in naive
15440# implementations.
15441if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
15442 eval 'as_fn_append ()
15443 {
15444 eval $1+=\$2
15445 }'
15446else
15447 as_fn_append ()
15448 {
15449 eval $1=\$$1\$2
15450 }
15451fi # as_fn_append
15452
15453# as_fn_arith ARG...
15454# ------------------
15455# Perform arithmetic evaluation on the ARGs, and store the result in the
15456# global $as_val. Take advantage of shells that can avoid forks. The arguments
15457# must be portable across $(()) and expr.
15458if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
15459 eval 'as_fn_arith ()
15460 {
15461 as_val=$(( $* ))
15462 }'
15463else
15464 as_fn_arith ()
15465 {
15466 as_val=`expr "$@" || test $? -eq 1`
15467 }
15468fi # as_fn_arith
15469
15470
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015471if expr a : '\(a\)' >/dev/null 2>&1 &&
15472 test "X`expr 00001 : '.*\(...\)'`" = X001; then
15473 as_expr=expr
15474else
15475 as_expr=false
15476fi
15477
15478if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
15479 as_basename=basename
15480else
15481 as_basename=false
15482fi
15483
Matthias Kloseb9621712010-04-24 17:59:49 +000015484if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
15485 as_dirname=dirname
15486else
15487 as_dirname=false
15488fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015489
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015490as_me=`$as_basename -- "$0" ||
15491$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15492 X"$0" : 'X\(//\)$' \| \
15493 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000015494$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015495 sed '/^.*\/\([^/][^/]*\)\/*$/{
15496 s//\1/
15497 q
15498 }
15499 /^X\/\(\/\/\)$/{
15500 s//\1/
15501 q
15502 }
15503 /^X\/\(\/\).*/{
15504 s//\1/
15505 q
15506 }
15507 s/.*/./; q'`
15508
Matthias Kloseb9621712010-04-24 17:59:49 +000015509# Avoid depending upon Character Ranges.
15510as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15511as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15512as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15513as_cr_digits='0123456789'
15514as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015515
15516ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000015517case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015518-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015519 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015520 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000015521 xy) ECHO_C='\c';;
15522 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
15523 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015524 esac;;
15525*)
15526 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000015527esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015528
Martin v. Löwis11437992002-04-12 09:54:03 +000015529rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015530if test -d conf$$.dir; then
15531 rm -f conf$$.dir/conf$$.file
15532else
15533 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000015534 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015535fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015536if (echo >conf$$.file) 2>/dev/null; then
15537 if ln -s conf$$.file conf$$ 2>/dev/null; then
15538 as_ln_s='ln -s'
15539 # ... but there are two gotchas:
15540 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
15541 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015542 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000015543 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015544 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000015545 elif ln conf$$.file conf$$ 2>/dev/null; then
15546 as_ln_s=ln
15547 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015548 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000015549 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015550else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015551 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000015552fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015553rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
15554rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000015555
Matthias Kloseb9621712010-04-24 17:59:49 +000015556
15557# as_fn_mkdir_p
15558# -------------
15559# Create "$as_dir" as a directory, including parents if necessary.
15560as_fn_mkdir_p ()
15561{
15562
15563 case $as_dir in #(
15564 -*) as_dir=./$as_dir;;
15565 esac
15566 test -d "$as_dir" || eval $as_mkdir_p || {
15567 as_dirs=
15568 while :; do
15569 case $as_dir in #(
15570 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
15571 *) as_qdir=$as_dir;;
15572 esac
15573 as_dirs="'$as_qdir' $as_dirs"
15574 as_dir=`$as_dirname -- "$as_dir" ||
15575$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15576 X"$as_dir" : 'X\(//\)[^/]' \| \
15577 X"$as_dir" : 'X\(//\)$' \| \
15578 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
15579$as_echo X"$as_dir" |
15580 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15581 s//\1/
15582 q
15583 }
15584 /^X\(\/\/\)[^/].*/{
15585 s//\1/
15586 q
15587 }
15588 /^X\(\/\/\)$/{
15589 s//\1/
15590 q
15591 }
15592 /^X\(\/\).*/{
15593 s//\1/
15594 q
15595 }
15596 s/.*/./; q'`
15597 test -d "$as_dir" && break
15598 done
15599 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015600 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000015601
15602
15603} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000015604if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015605 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000015606else
Skip Montanarof0d5f792004-08-15 14:08:23 +000015607 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000015608 as_mkdir_p=false
15609fi
15610
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015611
15612# as_fn_executable_p FILE
15613# -----------------------
15614# Test if FILE is an executable regular file.
15615as_fn_executable_p ()
15616{
15617 test -f "$1" && test -x "$1"
15618} # as_fn_executable_p
15619as_test_x='test -x'
15620as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015621
15622# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015623as_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 +000015624
15625# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015626as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015627
15628
Martin v. Löwis11437992002-04-12 09:54:03 +000015629exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000015630## ----------------------------------- ##
15631## Main body of $CONFIG_STATUS script. ##
15632## ----------------------------------- ##
15633_ASEOF
15634test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015635
Matthias Kloseb9621712010-04-24 17:59:49 +000015636cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15637# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000015638# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015639# values after options handling.
15640ac_log="
Georg Brandl3ebb6b32011-02-20 10:37:07 +000015641This file was extended by python $as_me 3.3, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015642generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000015643
15644 CONFIG_FILES = $CONFIG_FILES
15645 CONFIG_HEADERS = $CONFIG_HEADERS
15646 CONFIG_LINKS = $CONFIG_LINKS
15647 CONFIG_COMMANDS = $CONFIG_COMMANDS
15648 $ $0 $@
15649
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015650on `(hostname || uname -n) 2>/dev/null | sed 1q`
15651"
15652
Martin v. Löwis11437992002-04-12 09:54:03 +000015653_ACEOF
15654
Matthias Kloseb9621712010-04-24 17:59:49 +000015655case $ac_config_files in *"
15656"*) set x $ac_config_files; shift; ac_config_files=$*;;
15657esac
15658
15659case $ac_config_headers in *"
15660"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
15661esac
15662
15663
15664cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015665# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010015666config_files="$ac_config_files"
15667config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000015668
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015669_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015670
Matthias Kloseb9621712010-04-24 17:59:49 +000015671cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015672ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000015673\`$as_me' instantiates files and other configuration actions
15674from templates according to the current configuration. Unless the files
15675and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000015676
Matthias Kloseb9621712010-04-24 17:59:49 +000015677Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000015678
15679 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015680 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000015681 --config print configuration, then exit
15682 -q, --quiet, --silent
15683 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000015684 -d, --debug don't remove temporary files
15685 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000015686 --file=FILE[:TEMPLATE]
15687 instantiate the configuration file FILE
15688 --header=FILE[:TEMPLATE]
15689 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000015690
15691Configuration files:
15692$config_files
15693
15694Configuration headers:
15695$config_headers
15696
Matthias Kloseb9621712010-04-24 17:59:49 +000015697Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015698
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015699_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015700cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15701ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000015702ac_cs_version="\\
Georg Brandl3ebb6b32011-02-20 10:37:07 +000015703python config.status 3.3
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015704configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000015705 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000015706
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015707Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000015708This config.status script is free software; the Free Software Foundation
15709gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015710
15711ac_pwd='$ac_pwd'
15712srcdir='$srcdir'
15713INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010015714MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000015715test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000015716_ACEOF
15717
Matthias Kloseb9621712010-04-24 17:59:49 +000015718cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15719# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000015720ac_need_defaults=:
15721while test $# != 0
15722do
15723 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015724 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015725 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15726 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000015727 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000015728 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015729 --*=)
15730 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15731 ac_optarg=
15732 ac_shift=:
15733 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015734 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000015735 ac_option=$1
15736 ac_optarg=$2
15737 ac_shift=shift
15738 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015739 esac
15740
Skip Montanaro6dead952003-09-25 14:50:04 +000015741 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000015742 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000015743 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15744 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015745 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000015746 $as_echo "$ac_cs_version"; exit ;;
15747 --config | --confi | --conf | --con | --co | --c )
15748 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015749 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000015750 debug=: ;;
15751 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000015752 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000015753 case $ac_optarg in
15754 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015755 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000015756 esac
15757 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015758 ac_need_defaults=false;;
15759 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000015760 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000015761 case $ac_optarg in
15762 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15763 esac
15764 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015765 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015766 --he | --h)
15767 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015768 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000015769Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015770 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000015771 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000015772 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
15773 | -silent | --silent | --silen | --sile | --sil | --si | --s)
15774 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015775
15776 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015777 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000015778Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015779
Matthias Kloseb9621712010-04-24 17:59:49 +000015780 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015781 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015782
15783 esac
15784 shift
15785done
15786
Skip Montanaro6dead952003-09-25 14:50:04 +000015787ac_configure_extra_args=
15788
15789if $ac_cs_silent; then
15790 exec 6>/dev/null
15791 ac_configure_extra_args="$ac_configure_extra_args --silent"
15792fi
15793
15794_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015795cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000015796if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015797 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000015798 shift
15799 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
15800 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015801 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000015802 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000015803fi
15804
Martin v. Löwis11437992002-04-12 09:54:03 +000015805_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015806cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015807exec 5>>config.log
15808{
15809 echo
15810 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
15811## Running $as_me. ##
15812_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000015813 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015814} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015815
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015816_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015817cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015818_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015819
Matthias Kloseb9621712010-04-24 17:59:49 +000015820cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015821
15822# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000015823for ac_config_target in $ac_config_targets
15824do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015825 case $ac_config_target in
15826 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
15827 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
15828 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000015829 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
15830 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015831 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
15832 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000015833 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015834 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015835
Victor Stinnere0be4232011-10-25 13:06:09 +020015836 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015837 esac
15838done
15839
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015840
Martin v. Löwis11437992002-04-12 09:54:03 +000015841# If the user did not use the arguments to specify the items to instantiate,
15842# then the envvar interface is used. Set only those that are not.
15843# We use the long form for the default assignment because of an extremely
15844# bizarre bug on SunOS 4.1.3.
15845if $ac_need_defaults; then
15846 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15847 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15848fi
15849
Skip Montanaro6dead952003-09-25 14:50:04 +000015850# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015851# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000015852# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015853# Hook for its removal unless debugging.
15854# Note that there is a small window in which the directory will not be cleaned:
15855# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000015856$debug ||
15857{
Victor Stinnere0be4232011-10-25 13:06:09 +020015858 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015859 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020015860 : "${ac_tmp:=$tmp}"
15861 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015862' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000015863 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000015864}
Martin v. Löwis11437992002-04-12 09:54:03 +000015865# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000015866
Martin v. Löwis11437992002-04-12 09:54:03 +000015867{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015868 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020015869 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000015870} ||
15871{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015872 tmp=./conf$$-$RANDOM
15873 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015874} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020015875ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000015876
Matthias Kloseb9621712010-04-24 17:59:49 +000015877# Set up the scripts for CONFIG_FILES section.
15878# No need to generate them if there are no CONFIG_FILES.
15879# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015880if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015881
Matthias Kloseb9621712010-04-24 17:59:49 +000015882
15883ac_cr=`echo X | tr X '\015'`
15884# On cygwin, bash can eat \r inside `` if the user requested igncr.
15885# But we know of no other shell where ac_cr would be empty at this
15886# point, so we can use a bashism as a fallback.
15887if test "x$ac_cr" = x; then
15888 eval ac_cr=\$\'\\r\'
15889fi
15890ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
15891if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015892 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000015893else
15894 ac_cs_awk_cr=$ac_cr
15895fi
15896
Victor Stinnere0be4232011-10-25 13:06:09 +020015897echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000015898_ACEOF
15899
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015900
Matthias Kloseb9621712010-04-24 17:59:49 +000015901{
15902 echo "cat >conf$$subs.awk <<_ACEOF" &&
15903 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
15904 echo "_ACEOF"
15905} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015906 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15907ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015908ac_delim='%!_!# '
15909for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000015910 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015911 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015912
Matthias Kloseb9621712010-04-24 17:59:49 +000015913 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
15914 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015915 break
15916 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015917 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015918 else
15919 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000015920 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015921done
Matthias Kloseb9621712010-04-24 17:59:49 +000015922rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015923
Matthias Kloseb9621712010-04-24 17:59:49 +000015924cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020015925cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015926_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015927sed -n '
15928h
15929s/^/S["/; s/!.*/"]=/
15930p
15931g
15932s/^[^!]*!//
15933:repl
15934t repl
15935s/'"$ac_delim"'$//
15936t delim
15937:nl
15938h
15939s/\(.\{148\}\)..*/\1/
15940t more1
15941s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
15942p
15943n
15944b repl
15945:more1
15946s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15947p
15948g
15949s/.\{148\}//
15950t nl
15951:delim
15952h
15953s/\(.\{148\}\)..*/\1/
15954t more2
15955s/["\\]/\\&/g; s/^/"/; s/$/"/
15956p
15957b
15958:more2
15959s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15960p
15961g
15962s/.\{148\}//
15963t delim
15964' <conf$$subs.awk | sed '
15965/^[^""]/{
15966 N
15967 s/\n//
15968}
15969' >>$CONFIG_STATUS || ac_write_fail=1
15970rm -f conf$$subs.awk
15971cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15972_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020015973cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000015974 for (key in S) S_is_set[key] = 1
15975 FS = ""
15976
15977}
15978{
15979 line = $ 0
15980 nfields = split(line, field, "@")
15981 substed = 0
15982 len = length(field[1])
15983 for (i = 2; i < nfields; i++) {
15984 key = field[i]
15985 keylen = length(key)
15986 if (S_is_set[key]) {
15987 value = S[key]
15988 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
15989 len += length(value) + length(field[++i])
15990 substed = 1
15991 } else
15992 len += 1 + keylen
15993 }
15994
15995 print line
15996}
15997
15998_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015999_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016000cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16001if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
16002 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
16003else
16004 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020016005fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016006 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016007_ACEOF
16008
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016009# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
16010# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016011# trailing colons and then remove the whole line if VPATH becomes empty
16012# (actually we leave an empty line to preserve line numbers).
16013if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016014 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
16015h
16016s///
16017s/^/:/
16018s/[ ]*$/:/
16019s/:\$(srcdir):/:/g
16020s/:\${srcdir}:/:/g
16021s/:@srcdir@:/:/g
16022s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016023s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016024x
16025s/\(=[ ]*\).*/\1/
16026G
16027s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016028s/^[^=]*=[ ]*$//
16029}'
16030fi
16031
Matthias Kloseb9621712010-04-24 17:59:49 +000016032cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016033fi # test -n "$CONFIG_FILES"
16034
Matthias Kloseb9621712010-04-24 17:59:49 +000016035# Set up the scripts for CONFIG_HEADERS section.
16036# No need to generate them if there are no CONFIG_HEADERS.
16037# This happens for instance with `./config.status Makefile'.
16038if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016039cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016040BEGIN {
16041_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016042
Matthias Kloseb9621712010-04-24 17:59:49 +000016043# Transform confdefs.h into an awk script `defines.awk', embedded as
16044# here-document in config.status, that substitutes the proper values into
16045# config.h.in to produce config.h.
16046
16047# Create a delimiter string that does not exist in confdefs.h, to ease
16048# handling of long lines.
16049ac_delim='%!_!# '
16050for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020016051 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
16052 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016053 break
16054 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016055 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016056 else
16057 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16058 fi
16059done
16060
16061# For the awk script, D is an array of macro values keyed by name,
16062# likewise P contains macro parameters if any. Preserve backslash
16063# newline sequences.
16064
16065ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
16066sed -n '
16067s/.\{148\}/&'"$ac_delim"'/g
16068t rset
16069:rset
16070s/^[ ]*#[ ]*define[ ][ ]*/ /
16071t def
16072d
16073:def
16074s/\\$//
16075t bsnl
16076s/["\\]/\\&/g
16077s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16078D["\1"]=" \3"/p
16079s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
16080d
16081:bsnl
16082s/["\\]/\\&/g
16083s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16084D["\1"]=" \3\\\\\\n"\\/p
16085t cont
16086s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
16087t cont
16088d
16089:cont
16090n
16091s/.\{148\}/&'"$ac_delim"'/g
16092t clear
16093:clear
16094s/\\$//
16095t bsnlc
16096s/["\\]/\\&/g; s/^/"/; s/$/"/p
16097d
16098:bsnlc
16099s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
16100b cont
16101' <confdefs.h | sed '
16102s/'"$ac_delim"'/"\\\
16103"/g' >>$CONFIG_STATUS || ac_write_fail=1
16104
16105cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16106 for (key in D) D_is_set[key] = 1
16107 FS = ""
16108}
16109/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
16110 line = \$ 0
16111 split(line, arg, " ")
16112 if (arg[1] == "#") {
16113 defundef = arg[2]
16114 mac1 = arg[3]
16115 } else {
16116 defundef = substr(arg[1], 2)
16117 mac1 = arg[2]
16118 }
16119 split(mac1, mac2, "(") #)
16120 macro = mac2[1]
16121 prefix = substr(line, 1, index(line, defundef) - 1)
16122 if (D_is_set[macro]) {
16123 # Preserve the white space surrounding the "#".
16124 print prefix "define", macro P[macro] D[macro]
16125 next
16126 } else {
16127 # Replace #undef with comments. This is necessary, for example,
16128 # in the case of _POSIX_SOURCE, which is predefined and required
16129 # on some systems where configure will not decide to define it.
16130 if (defundef == "undef") {
16131 print "/*", prefix defundef, macro, "*/"
16132 next
16133 }
16134 }
16135}
16136{ print }
16137_ACAWK
16138_ACEOF
16139cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016140 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016141fi # test -n "$CONFIG_HEADERS"
16142
16143
16144eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
16145shift
16146for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016147do
16148 case $ac_tag in
16149 :[FHLC]) ac_mode=$ac_tag; continue;;
16150 esac
16151 case $ac_mode$ac_tag in
16152 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020016153 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016154 :[FH]-) ac_tag=-:-;;
16155 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
16156 esac
16157 ac_save_IFS=$IFS
16158 IFS=:
16159 set x $ac_tag
16160 IFS=$ac_save_IFS
16161 shift
16162 ac_file=$1
16163 shift
16164
16165 case $ac_mode in
16166 :L) ac_source=$1;;
16167 :[FH])
16168 ac_file_inputs=
16169 for ac_f
16170 do
16171 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020016172 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016173 *) # Look for the file first in the build tree, then in the source tree
16174 # (if the path is not absolute). The absolute path cannot be DOS-style,
16175 # because $ac_f cannot contain `:'.
16176 test -f "$ac_f" ||
16177 case $ac_f in
16178 [\\/$]*) false;;
16179 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
16180 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020016181 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016182 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000016183 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
16184 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016185 done
16186
16187 # Let's still pretend it is `configure' which instantiates (i.e., don't
16188 # use $as_me), people would be surprised to read:
16189 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000016190 configure_input='Generated from '`
16191 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
16192 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016193 if test x"$ac_file" != x-; then
16194 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000016195 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
16196$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016197 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016198 # Neutralize special characters interpreted by sed in replacement strings.
16199 case $configure_input in #(
16200 *\&* | *\|* | *\\* )
16201 ac_sed_conf_input=`$as_echo "$configure_input" |
16202 sed 's/[\\\\&|]/\\\\&/g'`;; #(
16203 *) ac_sed_conf_input=$configure_input;;
16204 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016205
16206 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020016207 *:-:* | *:-) cat >"$ac_tmp/stdin" \
16208 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016209 esac
16210 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016211 esac
16212
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016213 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000016214$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016215 X"$ac_file" : 'X\(//\)[^/]' \| \
16216 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016217 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016218$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016219 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16220 s//\1/
16221 q
16222 }
16223 /^X\(\/\/\)[^/].*/{
16224 s//\1/
16225 q
16226 }
16227 /^X\(\/\/\)$/{
16228 s//\1/
16229 q
16230 }
16231 /^X\(\/\).*/{
16232 s//\1/
16233 q
16234 }
16235 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000016236 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000016237 ac_builddir=.
16238
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016239case "$ac_dir" in
16240.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
16241*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016242 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016243 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000016244 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016245 case $ac_top_builddir_sub in
16246 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
16247 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
16248 esac ;;
16249esac
16250ac_abs_top_builddir=$ac_pwd
16251ac_abs_builddir=$ac_pwd$ac_dir_suffix
16252# for backward compatibility:
16253ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000016254
16255case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016256 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000016257 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016258 ac_top_srcdir=$ac_top_builddir_sub
16259 ac_abs_top_srcdir=$ac_pwd ;;
16260 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000016261 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016262 ac_top_srcdir=$srcdir
16263 ac_abs_top_srcdir=$srcdir ;;
16264 *) # Relative name.
16265 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
16266 ac_top_srcdir=$ac_top_build_prefix$srcdir
16267 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016268esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016269ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000016270
Martin v. Löwis11437992002-04-12 09:54:03 +000016271
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016272 case $ac_mode in
16273 :F)
16274 #
16275 # CONFIG_FILE
16276 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016277
16278 case $INSTALL in
16279 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016280 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016281 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010016282 ac_MKDIR_P=$MKDIR_P
16283 case $MKDIR_P in
16284 [\\/$]* | ?:[\\/]* ) ;;
16285 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
16286 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000016287_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016288
Matthias Kloseb9621712010-04-24 17:59:49 +000016289cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016290# If the template does not know about datarootdir, expand it.
16291# FIXME: This hack should be removed a few years after 2.60.
16292ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000016293ac_sed_dataroot='
16294/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016295 p
16296 q
16297}
16298/@datadir@/p
16299/@docdir@/p
16300/@infodir@/p
16301/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000016302/@mandir@/p'
16303case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016304*datarootdir*) ac_datarootdir_seen=yes;;
16305*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016306 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
16307$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016308_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016309cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016310 ac_datarootdir_hack='
16311 s&@datadir@&$datadir&g
16312 s&@docdir@&$docdir&g
16313 s&@infodir@&$infodir&g
16314 s&@localedir@&$localedir&g
16315 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000016316 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016317esac
16318_ACEOF
16319
16320# Neutralize VPATH when `$srcdir' = `.'.
16321# Shell code in configure.ac might set extrasub.
16322# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000016323cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16324ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000016325$extrasub
16326_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016327cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016328:t
16329/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000016330s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016331s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000016332s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016333s&@srcdir@&$ac_srcdir&;t t
16334s&@abs_srcdir@&$ac_abs_srcdir&;t t
16335s&@top_srcdir@&$ac_top_srcdir&;t t
16336s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
16337s&@builddir@&$ac_builddir&;t t
16338s&@abs_builddir@&$ac_abs_builddir&;t t
16339s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
16340s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010016341s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016342$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000016343"
Victor Stinnere0be4232011-10-25 13:06:09 +020016344eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
16345 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016346
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016347test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020016348 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
16349 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
16350 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000016351 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016352which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016353$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016354which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016355
Victor Stinnere0be4232011-10-25 13:06:09 +020016356 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000016357 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020016358 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
16359 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000016360 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016361 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016362 ;;
16363 :H)
16364 #
16365 # CONFIG_HEADER
16366 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016367 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016368 {
16369 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020016370 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
16371 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016372 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020016373 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016374 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
16375$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016376 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016377 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020016378 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016379 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016380 fi
16381 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016382 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020016383 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016384 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016385 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016386 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000016387
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016388
16389 esac
16390
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016391
16392 case $ac_file$ac_mode in
16393 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
16394
16395 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016396done # for ac_tag
16397
Guido van Rossum627b2d71993-12-24 10:39:16 +000016398
Matthias Kloseb9621712010-04-24 17:59:49 +000016399as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000016400_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016401ac_clean_files=$ac_clean_files_save
16402
Matthias Kloseb9621712010-04-24 17:59:49 +000016403test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016404 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016405
Martin v. Löwis11437992002-04-12 09:54:03 +000016406
16407# configure is writing to config.log, and then calls config.status.
16408# config.status does its own redirection, appending to config.log.
16409# Unfortunately, on DOS this fails, as config.log is still kept open
16410# by configure, so config.status won't be able to write to it; its
16411# output is simply discarded. So we exec the FD to /dev/null,
16412# effectively closing config.log, so it can be properly (re)opened and
16413# appended to by config.status. When coming back to configure, we
16414# need to make the FD available again.
16415if test "$no_create" != yes; then
16416 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000016417 ac_config_status_args=
16418 test "$silent" = yes &&
16419 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000016420 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000016421 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000016422 exec 5>>config.log
16423 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16424 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016425 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000016426fi
16427if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
16428 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
16429$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016430fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000016431
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016432
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000016433echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016434if test ! -f Modules/Setup
16435then
16436 cp $srcdir/Modules/Setup.dist Modules/Setup
16437fi
16438
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000016439echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016440if test ! -f Modules/Setup.local
16441then
16442 echo "# Edit this file for local setup changes" >Modules/Setup.local
16443fi
16444
16445echo "creating Makefile"
16446$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
16447 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000016448 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000016449mv config.c Modules