blob: 941771077aa2e5f2d1a8b398155e87964e4e9441 [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
Barry Warsaw35f3a2c2010-09-03 18:30:30 +0000628SOABI
Matthias Kloseb9621712010-04-24 17:59:49 +0000629LIBC
630LIBM
631HAVE_GETHOSTBYNAME
632HAVE_GETHOSTBYNAME_R
633HAVE_GETHOSTBYNAME_R_3_ARG
634HAVE_GETHOSTBYNAME_R_5_ARG
635HAVE_GETHOSTBYNAME_R_6_ARG
636LIBOBJS
637TRUE
638MACHDEP_OBJS
639DYNLOADFILE
640DLINCLDIR
641THREADOBJ
642LDLAST
643USE_THREAD_MODULE
644SIGNAL_OBJS
645USE_SIGNAL_MODULE
646LIBFFI_INCLUDEDIR
647PKG_CONFIG
648SHLIBS
649CFLAGSFORSHARED
650LINKFORSHARED
651CCSHARED
652BLDSHARED
653LDCXXSHARED
654LDSHARED
655SO
656LIBTOOL_CRUFT
657OTHER_LIBTOOL_OPT
658UNIVERSAL_ARCH_FLAGS
659BASECFLAGS
660OPT
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000661ABIFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000662LN
Matthias Klose93a0ef12012-03-15 18:08:34 +0100663MKDIR_P
Matthias Kloseb9621712010-04-24 17:59:49 +0000664INSTALL_DATA
665INSTALL_SCRIPT
666INSTALL_PROGRAM
Matthias Klosec4c48422012-10-21 23:05:35 +0200667PYTHON
668ASDLGEN
doko@ubuntu.com58844492012-06-30 18:25:32 +0200669ac_ct_READELF
670READELF
Matthias Kloseb9621712010-04-24 17:59:49 +0000671ARFLAGS
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200672ac_ct_AR
Matthias Kloseb9621712010-04-24 17:59:49 +0000673AR
674RANLIB
Daniel Stutzbacha606faa2010-08-31 19:51:07 +0000675USE_INLINE
Matthias Kloseb9621712010-04-24 17:59:49 +0000676GNULD
677LINKCC
Barry Warsaw8cf4eae2010-10-16 01:04:07 +0000678LDVERSION
Matthias Kloseb9621712010-04-24 17:59:49 +0000679RUNSHARED
680INSTSONAME
681LDLIBRARYDIR
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +0000682PY3LIBRARY
Matthias Kloseb9621712010-04-24 17:59:49 +0000683BLDLIBRARY
684DLLLIBRARY
685LDLIBRARY
686LIBRARY
doko@python.org3e6e2ac2013-01-25 13:12:29 +0100687MULTIARCH
Matthias Kloseb9621712010-04-24 17:59:49 +0000688BUILDEXEEXT
689EGREP
690GREP
691CPP
Martin v. Löwis48e14d32011-05-09 07:37:45 +0200692NO_AS_NEEDED
doko@ubuntu.com51f65942012-06-30 14:42:46 +0200693ac_ct_CXX
Matthias Kloseb9621712010-04-24 17:59:49 +0000694MAINCC
695CXX
696OBJEXT
697EXEEXT
698ac_ct_CC
699CPPFLAGS
700LDFLAGS
701CFLAGS
702CC
703EXPORT_MACOSX_DEPLOYMENT_TARGET
704CONFIGURE_MACOSX_DEPLOYMENT_TARGET
705SGI_ABI
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200706_PYTHON_HOST_PLATFORM
Matthias Kloseb9621712010-04-24 17:59:49 +0000707MACHDEP
Ronald Oussoren86b33c82010-04-30 11:41:56 +0000708FRAMEWORKINSTALLAPPSPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +0000709FRAMEWORKUNIXTOOLSPREFIX
710FRAMEWORKALTINSTALLLAST
711FRAMEWORKALTINSTALLFIRST
712FRAMEWORKINSTALLLAST
713FRAMEWORKINSTALLFIRST
714PYTHONFRAMEWORKINSTALLDIR
715PYTHONFRAMEWORKPREFIX
716PYTHONFRAMEWORKDIR
717PYTHONFRAMEWORKIDENTIFIER
718PYTHONFRAMEWORK
719LIPO_32BIT_FLAGS
720ARCH_RUN_32BIT
721UNIVERSALSDK
722CONFIG_ARGS
723SOVERSION
724VERSION
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +0200725PYTHON_FOR_BUILD
Matthias Kloseca2f6ec2012-03-15 21:30:11 +0100726host_os
727host_vendor
728host_cpu
729host
730build_os
731build_vendor
732build_cpu
733build
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -0500734HAS_HG
735HGBRANCH
736HGTAG
737HGVERSION
Trent Nelson4d4ec652012-10-16 08:51:24 -0400738BASECPPFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +0000739target_alias
740host_alias
741build_alias
742LIBS
743ECHO_T
744ECHO_N
745ECHO_C
746DEFS
747mandir
748localedir
749libdir
750psdir
751pdfdir
752dvidir
753htmldir
754infodir
755docdir
756oldincludedir
757includedir
758localstatedir
759sharedstatedir
760sysconfdir
761datadir
762datarootdir
763libexecdir
764sbindir
765bindir
766program_transform_name
767prefix
768exec_prefix
769PACKAGE_URL
770PACKAGE_BUGREPORT
771PACKAGE_STRING
772PACKAGE_VERSION
773PACKAGE_TARNAME
774PACKAGE_NAME
775PATH_SEPARATOR
776SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000777ac_subst_files=''
Matthias Kloseb9621712010-04-24 17:59:49 +0000778ac_user_opts='
779enable_option_checking
780enable_universalsdk
781with_universal_archs
782with_framework_name
783enable_framework
784with_gcc
785with_cxx_main
786with_suffix
787enable_shared
788enable_profiling
789with_pydebug
790with_libs
791with_system_expat
792with_system_ffi
Stefan Krah60187b52012-03-23 19:06:27 +0100793with_system_libmpdec
Benjamin Peterson076ed002010-10-31 17:11:02 +0000794enable_loadable_sqlite_extensions
Matthias Kloseb9621712010-04-24 17:59:49 +0000795with_dbmliborder
796with_signal_module
Matthias Kloseb9621712010-04-24 17:59:49 +0000797with_threads
798with_thread
799enable_ipv6
800with_doc_strings
801with_tsc
802with_pymalloc
803with_valgrind
Matthias Kloseb9621712010-04-24 17:59:49 +0000804with_fpectl
805with_libm
806with_libc
807enable_big_digits
Matthias Kloseb9621712010-04-24 17:59:49 +0000808with_computed_gotos
809'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000810 ac_precious_vars='build_alias
811host_alias
812target_alias
813CC
814CFLAGS
815LDFLAGS
816LIBS
817CPPFLAGS
Charles-François Natali47413c12011-10-06 19:47:44 +0200818CPP'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000819
Guido van Rossum627b2d71993-12-24 10:39:16 +0000820
Guido van Rossum7f43da71994-08-01 12:15:30 +0000821# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000822ac_init_help=
823ac_init_version=false
Matthias Kloseb9621712010-04-24 17:59:49 +0000824ac_unrecognized_opts=
825ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000826# The variables have the same names as the options, with
827# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000828cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000829exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000830no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000831no_recursion=
832prefix=NONE
833program_prefix=NONE
834program_suffix=NONE
835program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000836silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000837site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000838srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000839verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000840x_includes=NONE
841x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000842
843# Installation directory options.
844# These are left unexpanded so users can "make install exec_prefix=/foo"
845# and all the variables that are supposed to be based on exec_prefix
846# by default will actually change.
847# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000848# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000849bindir='${exec_prefix}/bin'
850sbindir='${exec_prefix}/sbin'
851libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000852datarootdir='${prefix}/share'
853datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000854sysconfdir='${prefix}/etc'
855sharedstatedir='${prefix}/com'
856localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000857includedir='${prefix}/include'
858oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000859docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
860infodir='${datarootdir}/info'
861htmldir='${docdir}'
862dvidir='${docdir}'
863pdfdir='${docdir}'
864psdir='${docdir}'
865libdir='${exec_prefix}/lib'
866localedir='${datarootdir}/locale'
867mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000868
Guido van Rossum7f43da71994-08-01 12:15:30 +0000869ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000870ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000871for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000872do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000873 # If the previous option needs an argument, assign it.
874 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000875 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000876 ac_prev=
877 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000878 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000879
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000880 case $ac_option in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200881 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
882 *=) ac_optarg= ;;
883 *) ac_optarg=yes ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000884 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000885
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000886 # Accept the important Cygnus configure options, so we can diagnose typos.
887
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000888 case $ac_dashdash$ac_option in
889 --)
890 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000891
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000892 -bindir | --bindir | --bindi | --bind | --bin | --bi)
893 ac_prev=bindir ;;
894 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000895 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000896
897 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000898 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000899 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000900 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000901
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000902 -cache-file | --cache-file | --cache-fil | --cache-fi \
903 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
904 ac_prev=cache_file ;;
905 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
906 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000907 cache_file=$ac_optarg ;;
908
909 --config-cache | -C)
910 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000911
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000912 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000913 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000914 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000915 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000916
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000917 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
918 | --dataroo | --dataro | --datar)
919 ac_prev=datarootdir ;;
920 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
921 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
922 datarootdir=$ac_optarg ;;
923
Guido van Rossum7f43da71994-08-01 12:15:30 +0000924 -disable-* | --disable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000925 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000926 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000927 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200928 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000929 ac_useropt_orig=$ac_useropt
930 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
931 case $ac_user_opts in
932 *"
933"enable_$ac_useropt"
934"*) ;;
935 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
936 ac_unrecognized_sep=', ';;
937 esac
938 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000939
940 -docdir | --docdir | --docdi | --doc | --do)
941 ac_prev=docdir ;;
942 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
943 docdir=$ac_optarg ;;
944
945 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
946 ac_prev=dvidir ;;
947 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
948 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000949
950 -enable-* | --enable-*)
Matthias Kloseb9621712010-04-24 17:59:49 +0000951 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000952 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +0000953 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +0200954 as_fn_error $? "invalid feature name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +0000955 ac_useropt_orig=$ac_useropt
956 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
957 case $ac_user_opts in
958 *"
959"enable_$ac_useropt"
960"*) ;;
961 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
962 ac_unrecognized_sep=', ';;
963 esac
964 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000965
Guido van Rossum7f43da71994-08-01 12:15:30 +0000966 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
967 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
968 | --exec | --exe | --ex)
969 ac_prev=exec_prefix ;;
970 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
971 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
972 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000973 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000974
975 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000976 # Obsolete; use --with-gas.
977 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000978
Martin v. Löwis11437992002-04-12 09:54:03 +0000979 -help | --help | --hel | --he | -h)
980 ac_init_help=long ;;
981 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
982 ac_init_help=recursive ;;
983 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
984 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000985
986 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000987 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000988 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000989 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000990
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000991 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
992 ac_prev=htmldir ;;
993 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
994 | --ht=*)
995 htmldir=$ac_optarg ;;
996
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000997 -includedir | --includedir | --includedi | --included | --include \
998 | --includ | --inclu | --incl | --inc)
999 ac_prev=includedir ;;
1000 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1001 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001002 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001003
1004 -infodir | --infodir | --infodi | --infod | --info | --inf)
1005 ac_prev=infodir ;;
1006 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001007 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001008
1009 -libdir | --libdir | --libdi | --libd)
1010 ac_prev=libdir ;;
1011 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001012 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001013
1014 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1015 | --libexe | --libex | --libe)
1016 ac_prev=libexecdir ;;
1017 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1018 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001019 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001020
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001021 -localedir | --localedir | --localedi | --localed | --locale)
1022 ac_prev=localedir ;;
1023 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1024 localedir=$ac_optarg ;;
1025
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001026 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001027 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001028 ac_prev=localstatedir ;;
1029 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001030 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001031 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001032
1033 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1034 ac_prev=mandir ;;
1035 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001036 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001037
Guido van Rossum7f43da71994-08-01 12:15:30 +00001038 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001039 # Obsolete; use --without-fp.
1040 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001041
1042 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001043 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001044 no_create=yes ;;
1045
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001046 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1047 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1048 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001049
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001050 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1051 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1052 | --oldin | --oldi | --old | --ol | --o)
1053 ac_prev=oldincludedir ;;
1054 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1055 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1056 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001057 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001058
Guido van Rossum7f43da71994-08-01 12:15:30 +00001059 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1060 ac_prev=prefix ;;
1061 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001062 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001063
1064 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1065 | --program-pre | --program-pr | --program-p)
1066 ac_prev=program_prefix ;;
1067 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1068 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001069 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001070
1071 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1072 | --program-suf | --program-su | --program-s)
1073 ac_prev=program_suffix ;;
1074 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1075 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001076 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001077
1078 -program-transform-name | --program-transform-name \
1079 | --program-transform-nam | --program-transform-na \
1080 | --program-transform-n | --program-transform- \
1081 | --program-transform | --program-transfor \
1082 | --program-transfo | --program-transf \
1083 | --program-trans | --program-tran \
1084 | --progr-tra | --program-tr | --program-t)
1085 ac_prev=program_transform_name ;;
1086 -program-transform-name=* | --program-transform-name=* \
1087 | --program-transform-nam=* | --program-transform-na=* \
1088 | --program-transform-n=* | --program-transform-=* \
1089 | --program-transform=* | --program-transfor=* \
1090 | --program-transfo=* | --program-transf=* \
1091 | --program-trans=* | --program-tran=* \
1092 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001093 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001094
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001095 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1096 ac_prev=pdfdir ;;
1097 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1098 pdfdir=$ac_optarg ;;
1099
1100 -psdir | --psdir | --psdi | --psd | --ps)
1101 ac_prev=psdir ;;
1102 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1103 psdir=$ac_optarg ;;
1104
Guido van Rossum7f43da71994-08-01 12:15:30 +00001105 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1106 | -silent | --silent | --silen | --sile | --sil)
1107 silent=yes ;;
1108
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001109 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1110 ac_prev=sbindir ;;
1111 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1112 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001113 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001114
1115 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1116 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1117 | --sharedst | --shareds | --shared | --share | --shar \
1118 | --sha | --sh)
1119 ac_prev=sharedstatedir ;;
1120 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1121 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1122 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1123 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001124 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001125
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001126 -site | --site | --sit)
1127 ac_prev=site ;;
1128 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001129 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001130
Guido van Rossum7f43da71994-08-01 12:15:30 +00001131 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1132 ac_prev=srcdir ;;
1133 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001134 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001135
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001136 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1137 | --syscon | --sysco | --sysc | --sys | --sy)
1138 ac_prev=sysconfdir ;;
1139 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1140 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001141 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001142
Guido van Rossum7f43da71994-08-01 12:15:30 +00001143 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001144 ac_prev=target_alias ;;
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 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001147
1148 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1149 verbose=yes ;;
1150
Martin v. Löwis11437992002-04-12 09:54:03 +00001151 -version | --version | --versio | --versi | --vers | -V)
1152 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001153
1154 -with-* | --with-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001155 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001156 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001157 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001158 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001159 ac_useropt_orig=$ac_useropt
1160 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1161 case $ac_user_opts in
1162 *"
1163"with_$ac_useropt"
1164"*) ;;
1165 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1166 ac_unrecognized_sep=', ';;
1167 esac
1168 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001169
1170 -without-* | --without-*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001171 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001172 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001173 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001174 as_fn_error $? "invalid package name: $ac_useropt"
Matthias Kloseb9621712010-04-24 17:59:49 +00001175 ac_useropt_orig=$ac_useropt
1176 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1177 case $ac_user_opts in
1178 *"
1179"with_$ac_useropt"
1180"*) ;;
1181 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1182 ac_unrecognized_sep=', ';;
1183 esac
1184 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001185
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001186 --x)
1187 # Obsolete; use --with-x.
1188 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001189
1190 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1191 | --x-incl | --x-inc | --x-in | --x-i)
1192 ac_prev=x_includes ;;
1193 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1194 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001195 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001196
1197 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1198 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1199 ac_prev=x_libraries ;;
1200 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1201 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001202 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001203
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001204 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1205Try \`$0 --help' for more information"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001206 ;;
1207
Martin v. Löwis11437992002-04-12 09:54:03 +00001208 *=*)
1209 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1210 # Reject names that are not valid shell variable names.
Matthias Kloseb9621712010-04-24 17:59:49 +00001211 case $ac_envvar in #(
1212 '' | [0-9]* | *[!_$as_cr_alnum]* )
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001213 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001214 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001215 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001216 export $ac_envvar ;;
1217
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001218 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001219 # FIXME: should be removed in autoconf 3.0.
Matthias Kloseb9621712010-04-24 17:59:49 +00001220 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001221 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Matthias Kloseb9621712010-04-24 17:59:49 +00001222 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Victor Stinnere0be4232011-10-25 13:06:09 +02001223 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001224 ;;
1225
1226 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001227done
1228
Guido van Rossum7f43da71994-08-01 12:15:30 +00001229if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001230 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001231 as_fn_error $? "missing argument to $ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +00001232fi
1233
Matthias Kloseb9621712010-04-24 17:59:49 +00001234if test -n "$ac_unrecognized_opts"; then
1235 case $enable_option_checking in
1236 no) ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001237 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00001238 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1239 esac
1240fi
1241
1242# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001243for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1244 datadir sysconfdir sharedstatedir localstatedir includedir \
1245 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1246 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001247do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001248 eval ac_val=\$$ac_var
Matthias Kloseb9621712010-04-24 17:59:49 +00001249 # Remove trailing slashes.
1250 case $ac_val in
1251 */ )
1252 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1253 eval $ac_var=\$ac_val;;
1254 esac
1255 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001256 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001257 [\\/$]* | ?:[\\/]* ) continue;;
1258 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001259 esac
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001260 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Martin v. Löwis11437992002-04-12 09:54:03 +00001261done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001262
Martin v. Löwis11437992002-04-12 09:54:03 +00001263# There might be people who depend on the old broken behavior: `$host'
1264# used to hold the argument of --host etc.
1265# FIXME: To remove some day.
1266build=$build_alias
1267host=$host_alias
1268target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001269
Martin v. Löwis11437992002-04-12 09:54:03 +00001270# FIXME: To remove some day.
1271if test "x$host_alias" != x; then
1272 if test "x$build_alias" = x; then
1273 cross_compiling=maybe
Martin v. Löwis11437992002-04-12 09:54:03 +00001274 elif test "x$build_alias" != "x$host_alias"; then
1275 cross_compiling=yes
1276 fi
1277fi
1278
1279ac_tool_prefix=
1280test -n "$host_alias" && ac_tool_prefix=$host_alias-
1281
1282test "$silent" = yes && exec 6>/dev/null
1283
Guido van Rossum627b2d71993-12-24 10:39:16 +00001284
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001285ac_pwd=`pwd` && test -n "$ac_pwd" &&
1286ac_ls_di=`ls -di .` &&
1287ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001288 as_fn_error $? "working directory cannot be determined"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001289test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001290 as_fn_error $? "pwd does not report name of working directory"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001291
1292
Guido van Rossum627b2d71993-12-24 10:39:16 +00001293# Find the source files, if location was not specified.
1294if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001295 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001296 # Try the directory containing this script, then the parent directory.
Matthias Kloseb9621712010-04-24 17:59:49 +00001297 ac_confdir=`$as_dirname -- "$as_myself" ||
1298$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1299 X"$as_myself" : 'X\(//\)[^/]' \| \
1300 X"$as_myself" : 'X\(//\)$' \| \
1301 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1302$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001303 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1304 s//\1/
1305 q
1306 }
1307 /^X\(\/\/\)[^/].*/{
1308 s//\1/
1309 q
1310 }
1311 /^X\(\/\/\)$/{
1312 s//\1/
1313 q
1314 }
1315 /^X\(\/\).*/{
1316 s//\1/
1317 q
1318 }
1319 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001320 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001321 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001322 srcdir=..
1323 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001324else
1325 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001326fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001327if test ! -r "$srcdir/$ac_unique_file"; then
1328 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001329 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001330fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001331ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1332ac_abs_confdir=`(
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001333 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001334 pwd)`
1335# When building in place, set srcdir=.
1336if test "$ac_abs_confdir" = "$ac_pwd"; then
1337 srcdir=.
1338fi
1339# Remove unnecessary trailing slashes from srcdir.
1340# Double slashes in file names in object file debugging info
1341# mess up M-x gdb in Emacs.
1342case $srcdir in
1343*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1344esac
1345for ac_var in $ac_precious_vars; do
1346 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1347 eval ac_env_${ac_var}_value=\$${ac_var}
1348 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1349 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1350done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001351
Martin v. Löwis11437992002-04-12 09:54:03 +00001352#
1353# Report the --help message.
1354#
1355if test "$ac_init_help" = "long"; then
1356 # Omit some internal or obsolete options to make the list less imposing.
1357 # This message is too long to be a string in the A/UX 3.1 sh.
1358 cat <<_ACEOF
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001359\`configure' configures python 3.3 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001360
1361Usage: $0 [OPTION]... [VAR=VALUE]...
1362
1363To assign environment variables (e.g., CC, CFLAGS...), specify them as
1364VAR=VALUE. See below for descriptions of some of the useful variables.
1365
1366Defaults for the options are specified in brackets.
1367
1368Configuration:
1369 -h, --help display this help and exit
1370 --help=short display options specific to this package
1371 --help=recursive display the short help of all the included packages
1372 -V, --version display version information and exit
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001373 -q, --quiet, --silent do not print \`checking ...' messages
Martin v. Löwis11437992002-04-12 09:54:03 +00001374 --cache-file=FILE cache test results in FILE [disabled]
1375 -C, --config-cache alias for \`--cache-file=config.cache'
1376 -n, --no-create do not create output files
1377 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1378
Martin v. Löwis11437992002-04-12 09:54:03 +00001379Installation directories:
1380 --prefix=PREFIX install architecture-independent files in PREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001381 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001382 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Matthias Kloseb9621712010-04-24 17:59:49 +00001383 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001384
1385By default, \`make install' will install all the files in
1386\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1387an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1388for instance \`--prefix=\$HOME'.
1389
1390For better control, use the options below.
1391
1392Fine tuning of the installation directories:
Matthias Kloseb9621712010-04-24 17:59:49 +00001393 --bindir=DIR user executables [EPREFIX/bin]
1394 --sbindir=DIR system admin executables [EPREFIX/sbin]
1395 --libexecdir=DIR program executables [EPREFIX/libexec]
1396 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1397 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1398 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1399 --libdir=DIR object code libraries [EPREFIX/lib]
1400 --includedir=DIR C header files [PREFIX/include]
1401 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1402 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1403 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1404 --infodir=DIR info documentation [DATAROOTDIR/info]
1405 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1406 --mandir=DIR man documentation [DATAROOTDIR/man]
1407 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1408 --htmldir=DIR html documentation [DOCDIR]
1409 --dvidir=DIR dvi documentation [DOCDIR]
1410 --pdfdir=DIR pdf documentation [DOCDIR]
1411 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001412_ACEOF
1413
1414 cat <<\_ACEOF
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01001415
1416System types:
1417 --build=BUILD configure for building on BUILD [guessed]
1418 --host=HOST cross-compile to build programs to run on HOST [BUILD]
Martin v. Löwis11437992002-04-12 09:54:03 +00001419_ACEOF
1420fi
1421
1422if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001423 case $ac_init_help in
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001424 short | recursive ) echo "Configuration of python 3.3:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001425 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001426 cat <<\_ACEOF
1427
1428Optional Features:
Matthias Kloseb9621712010-04-24 17:59:49 +00001429 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001430 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1431 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001432 --enable-universalsdk[=SDKDIR]
Ned Deilycbfb9a52012-06-23 16:02:19 -07001433 Build fat binary against Mac OS X SDK
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001434 --enable-framework[=INSTALLDIR]
1435 Build (MacOSX|Darwin) framework
1436 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001437 --enable-profiling enable C-level code profiling
Benjamin Peterson076ed002010-10-31 17:11:02 +00001438 --enable-loadable-sqlite-extensions
1439 support loadable extensions in _sqlite module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001440 --enable-ipv6 Enable ipv6 (with ipv4) support
1441 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001442 --enable-big-digits[=BITS]
Matthias Kloseb9621712010-04-24 17:59:49 +00001443 use big digits for Python longs [[BITS=30]]
Martin v. Löwis11437992002-04-12 09:54:03 +00001444
1445Optional Packages:
1446 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1447 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001448 --with-universal-archs=ARCH
1449 select architectures for universal build ("32-bit",
Ronald Oussoren3c064c12009-09-08 07:12:42 +00001450 "64-bit", "3-way", "intel" or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001451 --with-framework-name=FRAMEWORK
1452 specify an alternate name of the framework built
1453 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001454 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001455 --with-cxx-main=<compiler>
1456 compile main() and link python executable with C++
1457 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001458 --with-suffix=.exe set executable suffix
1459 --with-pydebug build with Py_DEBUG defined
1460 --with-libs='lib1 ...' link against additional libs
Benjamin Petersonb2d90462009-12-31 03:23:10 +00001461 --with-system-expat build pyexpat module using an installed expat
1462 library
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001463 --with-system-ffi build _ctypes module using an installed ffi library
Stefan Krah60187b52012-03-23 19:06:27 +01001464 --with-system-libmpdec build _decimal module using an installed libmpdec
1465 library
Matthias Klose55708cc2009-04-30 08:06:49 +00001466 --with-dbmliborder=db1:db2:...
1467 order to check db backends for dbm. Valid value is a
1468 colon separated string with the backend names
1469 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001470 --with-signal-module disable/enable signal module
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001471 --with(out)-threads[=DIRECTORY]
1472 disable/enable thread support
1473 --with(out)-thread[=DIRECTORY]
1474 deprecated; use --with(out)-threads
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001475 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001476 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001477 --with(out)-pymalloc disable/enable specialized mallocs
Benjamin Peterson05159c42009-12-03 03:01:27 +00001478 --with-valgrind Enable Valgrind support
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001479 --with-fpectl enable SIGFPE catching
1480 --with-libm=STRING math library
1481 --with-libc=STRING C library
Antoine Pitrou042b1282010-08-13 21:15:58 +00001482 --with(out)-computed-gotos
1483 Use computed gotos in evaluation loop (enabled by
1484 default on supported compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001485
1486Some influential environment variables:
1487 CC C compiler command
1488 CFLAGS C compiler flags
1489 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1490 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001491 LIBS libraries to pass to the linker, e.g. -l<library>
Matthias Kloseb9621712010-04-24 17:59:49 +00001492 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001493 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001494 CPP C preprocessor
1495
1496Use these variables to override the choices made by `configure' or to help
1497it to find libraries and programs with nonstandard names/locations.
1498
Georg Brandle2e15612009-05-20 18:25:10 +00001499Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001500_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001501ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001502fi
1503
1504if test "$ac_init_help" = "recursive"; then
1505 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001506 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Matthias Kloseb9621712010-04-24 17:59:49 +00001507 test -d "$ac_dir" ||
1508 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1509 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001510 ac_builddir=.
1511
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001512case "$ac_dir" in
1513.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1514*)
Matthias Kloseb9621712010-04-24 17:59:49 +00001515 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001516 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +00001517 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001518 case $ac_top_builddir_sub in
1519 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1520 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1521 esac ;;
1522esac
1523ac_abs_top_builddir=$ac_pwd
1524ac_abs_builddir=$ac_pwd$ac_dir_suffix
1525# for backward compatibility:
1526ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001527
1528case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001529 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001530 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001531 ac_top_srcdir=$ac_top_builddir_sub
1532 ac_abs_top_srcdir=$ac_pwd ;;
1533 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001534 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001535 ac_top_srcdir=$srcdir
1536 ac_abs_top_srcdir=$srcdir ;;
1537 *) # Relative name.
1538 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1539 ac_top_srcdir=$ac_top_build_prefix$srcdir
1540 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001541esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001542ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001543
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001544 cd "$ac_dir" || { ac_status=$?; continue; }
1545 # Check for guested configure.
1546 if test -f "$ac_srcdir/configure.gnu"; then
1547 echo &&
1548 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1549 elif test -f "$ac_srcdir/configure"; then
1550 echo &&
1551 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001552 else
Matthias Kloseb9621712010-04-24 17:59:49 +00001553 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001554 fi || ac_status=$?
1555 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001556 done
1557fi
1558
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001559test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001560if $ac_init_version; then
1561 cat <<\_ACEOF
Georg Brandl3ebb6b32011-02-20 10:37:07 +00001562python configure 3.3
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001563generated by GNU Autoconf 2.69
Martin v. Löwis11437992002-04-12 09:54:03 +00001564
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001565Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001566This configure script is free software; the Free Software Foundation
1567gives unlimited permission to copy, distribute and modify it.
1568_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001569 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001570fi
Matthias Kloseb9621712010-04-24 17:59:49 +00001571
1572## ------------------------ ##
1573## Autoconf initialization. ##
1574## ------------------------ ##
1575
1576# ac_fn_c_try_compile LINENO
1577# --------------------------
1578# Try to compile conftest.$ac_ext, and return whether this succeeded.
1579ac_fn_c_try_compile ()
1580{
1581 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1582 rm -f conftest.$ac_objext
1583 if { { ac_try="$ac_compile"
1584case "(($ac_try" in
1585 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1586 *) ac_try_echo=$ac_try;;
1587esac
1588eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1589$as_echo "$ac_try_echo"; } >&5
1590 (eval "$ac_compile") 2>conftest.err
1591 ac_status=$?
1592 if test -s conftest.err; then
1593 grep -v '^ *+' conftest.err >conftest.er1
1594 cat conftest.er1 >&5
1595 mv -f conftest.er1 conftest.err
1596 fi
1597 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1598 test $ac_status = 0; } && {
1599 test -z "$ac_c_werror_flag" ||
1600 test ! -s conftest.err
1601 } && test -s conftest.$ac_objext; then :
1602 ac_retval=0
1603else
1604 $as_echo "$as_me: failed program was:" >&5
1605sed 's/^/| /' conftest.$ac_ext >&5
1606
1607 ac_retval=1
1608fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001609 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001610 as_fn_set_status $ac_retval
1611
1612} # ac_fn_c_try_compile
1613
Matthias Kloseb9621712010-04-24 17:59:49 +00001614# ac_fn_c_try_link LINENO
1615# -----------------------
1616# Try to link conftest.$ac_ext, and return whether this succeeded.
1617ac_fn_c_try_link ()
1618{
1619 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1620 rm -f conftest.$ac_objext conftest$ac_exeext
1621 if { { ac_try="$ac_link"
1622case "(($ac_try" in
1623 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1624 *) ac_try_echo=$ac_try;;
1625esac
1626eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1627$as_echo "$ac_try_echo"; } >&5
1628 (eval "$ac_link") 2>conftest.err
1629 ac_status=$?
1630 if test -s conftest.err; then
1631 grep -v '^ *+' conftest.err >conftest.er1
1632 cat conftest.er1 >&5
1633 mv -f conftest.er1 conftest.err
1634 fi
1635 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1636 test $ac_status = 0; } && {
1637 test -z "$ac_c_werror_flag" ||
1638 test ! -s conftest.err
1639 } && test -s conftest$ac_exeext && {
1640 test "$cross_compiling" = yes ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001641 test -x conftest$ac_exeext
Matthias Kloseb9621712010-04-24 17:59:49 +00001642 }; then :
1643 ac_retval=0
1644else
1645 $as_echo "$as_me: failed program was:" >&5
1646sed 's/^/| /' conftest.$ac_ext >&5
1647
1648 ac_retval=1
1649fi
1650 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1651 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1652 # interfere with the next link command; also delete a directory that is
1653 # left behind by Apple's compiler. We do this before executing the actions.
1654 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001655 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001656 as_fn_set_status $ac_retval
1657
1658} # ac_fn_c_try_link
1659
Matthias Kloseb9621712010-04-24 17:59:49 +00001660# ac_fn_c_try_cpp LINENO
1661# ----------------------
1662# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1663ac_fn_c_try_cpp ()
1664{
1665 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1666 if { { ac_try="$ac_cpp conftest.$ac_ext"
1667case "(($ac_try" in
1668 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1669 *) ac_try_echo=$ac_try;;
1670esac
1671eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1672$as_echo "$ac_try_echo"; } >&5
1673 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1674 ac_status=$?
1675 if test -s conftest.err; then
1676 grep -v '^ *+' conftest.err >conftest.er1
1677 cat conftest.er1 >&5
1678 mv -f conftest.er1 conftest.err
1679 fi
1680 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001681 test $ac_status = 0; } > conftest.i && {
Matthias Kloseb9621712010-04-24 17:59:49 +00001682 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1683 test ! -s conftest.err
1684 }; then :
1685 ac_retval=0
1686else
1687 $as_echo "$as_me: failed program was:" >&5
1688sed 's/^/| /' conftest.$ac_ext >&5
1689
1690 ac_retval=1
1691fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001692 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001693 as_fn_set_status $ac_retval
1694
1695} # ac_fn_c_try_cpp
1696
1697# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1698# -------------------------------------------------------
1699# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1700# the include files in INCLUDES and setting the cache variable VAR
1701# accordingly.
1702ac_fn_c_check_header_mongrel ()
1703{
1704 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
Victor Stinnere0be4232011-10-25 13:06:09 +02001705 if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001706 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1707$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001708if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001709 $as_echo_n "(cached) " >&6
1710fi
1711eval ac_res=\$$3
1712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1713$as_echo "$ac_res" >&6; }
1714else
1715 # Is the header compilable?
1716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1717$as_echo_n "checking $2 usability... " >&6; }
1718cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1719/* end confdefs.h. */
1720$4
1721#include <$2>
1722_ACEOF
1723if ac_fn_c_try_compile "$LINENO"; then :
1724 ac_header_compiler=yes
1725else
1726 ac_header_compiler=no
1727fi
1728rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1729{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1730$as_echo "$ac_header_compiler" >&6; }
1731
1732# Is the header present?
1733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1734$as_echo_n "checking $2 presence... " >&6; }
1735cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1736/* end confdefs.h. */
1737#include <$2>
1738_ACEOF
1739if ac_fn_c_try_cpp "$LINENO"; then :
1740 ac_header_preproc=yes
1741else
1742 ac_header_preproc=no
1743fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001744rm -f conftest.err conftest.i conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00001745{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1746$as_echo "$ac_header_preproc" >&6; }
1747
1748# So? What about this header?
1749case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1750 yes:no: )
1751 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1752$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1753 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1754$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1755 ;;
1756 no:yes:* )
1757 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1758$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1759 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1760$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1761 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1762$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1763 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1764$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1765 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1766$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001767( $as_echo "## -------------------------------------- ##
Matthias Kloseb9621712010-04-24 17:59:49 +00001768## Report this to http://bugs.python.org/ ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001769## -------------------------------------- ##"
Matthias Kloseb9621712010-04-24 17:59:49 +00001770 ) | sed "s/^/$as_me: WARNING: /" >&2
1771 ;;
1772esac
1773 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1774$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001775if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001776 $as_echo_n "(cached) " >&6
1777else
1778 eval "$3=\$ac_header_compiler"
1779fi
1780eval ac_res=\$$3
1781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1782$as_echo "$ac_res" >&6; }
1783fi
Victor Stinnere0be4232011-10-25 13:06:09 +02001784 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001785
1786} # ac_fn_c_check_header_mongrel
1787
1788# ac_fn_c_try_run LINENO
1789# ----------------------
1790# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1791# that executables *can* be run.
1792ac_fn_c_try_run ()
1793{
1794 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1795 if { { ac_try="$ac_link"
1796case "(($ac_try" in
1797 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1798 *) ac_try_echo=$ac_try;;
1799esac
1800eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1801$as_echo "$ac_try_echo"; } >&5
1802 (eval "$ac_link") 2>&5
1803 ac_status=$?
1804 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1805 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1806 { { case "(($ac_try" in
1807 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1808 *) ac_try_echo=$ac_try;;
1809esac
1810eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1811$as_echo "$ac_try_echo"; } >&5
1812 (eval "$ac_try") 2>&5
1813 ac_status=$?
1814 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1815 test $ac_status = 0; }; }; then :
1816 ac_retval=0
1817else
1818 $as_echo "$as_me: program exited with status $ac_status" >&5
1819 $as_echo "$as_me: failed program was:" >&5
1820sed 's/^/| /' conftest.$ac_ext >&5
1821
1822 ac_retval=$ac_status
1823fi
1824 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
Victor Stinnere0be4232011-10-25 13:06:09 +02001825 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001826 as_fn_set_status $ac_retval
1827
1828} # ac_fn_c_try_run
1829
1830# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1831# -------------------------------------------------------
1832# Tests whether HEADER exists and can be compiled using the include files in
1833# INCLUDES, setting the cache variable VAR accordingly.
1834ac_fn_c_check_header_compile ()
1835{
1836 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1837 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1838$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001839if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001840 $as_echo_n "(cached) " >&6
1841else
1842 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1843/* end confdefs.h. */
1844$4
1845#include <$2>
1846_ACEOF
1847if ac_fn_c_try_compile "$LINENO"; then :
1848 eval "$3=yes"
1849else
1850 eval "$3=no"
1851fi
1852rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1853fi
1854eval ac_res=\$$3
1855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1856$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001857 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001858
1859} # ac_fn_c_check_header_compile
1860
Matthias Kloseb9621712010-04-24 17:59:49 +00001861# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1862# -------------------------------------------
1863# Tests whether TYPE exists after having included INCLUDES, setting cache
1864# variable VAR accordingly.
1865ac_fn_c_check_type ()
1866{
1867 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1868 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1869$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001870if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001871 $as_echo_n "(cached) " >&6
1872else
1873 eval "$3=no"
1874 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1875/* end confdefs.h. */
1876$4
1877int
1878main ()
1879{
1880if (sizeof ($2))
1881 return 0;
1882 ;
1883 return 0;
1884}
1885_ACEOF
1886if ac_fn_c_try_compile "$LINENO"; then :
1887 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1888/* end confdefs.h. */
1889$4
1890int
1891main ()
1892{
1893if (sizeof (($2)))
1894 return 0;
1895 ;
1896 return 0;
1897}
1898_ACEOF
1899if ac_fn_c_try_compile "$LINENO"; then :
1900
1901else
1902 eval "$3=yes"
1903fi
1904rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1905fi
1906rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1907fi
1908eval ac_res=\$$3
1909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1910$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001911 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001912
1913} # ac_fn_c_check_type
1914
1915# ac_fn_c_find_uintX_t LINENO BITS VAR
1916# ------------------------------------
1917# Finds an unsigned integer type with width BITS, setting cache variable VAR
1918# accordingly.
1919ac_fn_c_find_uintX_t ()
1920{
1921 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1922 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5
1923$as_echo_n "checking for uint$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001924if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001925 $as_echo_n "(cached) " >&6
1926else
1927 eval "$3=no"
1928 # Order is important - never check a type that is potentially smaller
1929 # than half of the expected target width.
1930 for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \
1931 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
1932 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1933/* end confdefs.h. */
1934$ac_includes_default
1935int
1936main ()
1937{
1938static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001939test_array [0] = 0;
1940return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00001941
1942 ;
1943 return 0;
1944}
1945_ACEOF
1946if ac_fn_c_try_compile "$LINENO"; then :
1947 case $ac_type in #(
1948 uint$2_t) :
1949 eval "$3=yes" ;; #(
1950 *) :
1951 eval "$3=\$ac_type" ;;
1952esac
1953fi
1954rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02001955 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001956
1957else
1958 break
1959fi
1960 done
1961fi
1962eval ac_res=\$$3
1963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1964$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001965 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00001966
1967} # ac_fn_c_find_uintX_t
1968
1969# ac_fn_c_find_intX_t LINENO BITS VAR
1970# -----------------------------------
1971# Finds a signed integer type with width BITS, setting cache variable VAR
1972# accordingly.
1973ac_fn_c_find_intX_t ()
1974{
1975 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1976 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5
1977$as_echo_n "checking for int$2_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02001978if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00001979 $as_echo_n "(cached) " >&6
1980else
1981 eval "$3=no"
1982 # Order is important - never check a type that is potentially smaller
1983 # than half of the expected target width.
1984 for ac_type in int$2_t 'int' 'long int' \
1985 'long long int' 'short int' 'signed char'; do
1986 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1987/* end confdefs.h. */
1988$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001989 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00001990int
1991main ()
1992{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00001993static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00001994test_array [0] = 0;
1995return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00001996
1997 ;
1998 return 0;
1999}
2000_ACEOF
2001if ac_fn_c_try_compile "$LINENO"; then :
2002 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2003/* end confdefs.h. */
2004$ac_includes_default
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002005 enum { N = $2 / 2 - 1 };
Matthias Kloseb9621712010-04-24 17:59:49 +00002006int
2007main ()
2008{
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00002009static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1)
Matthias Kloseb9621712010-04-24 17:59:49 +00002010 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002011test_array [0] = 0;
2012return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002013
2014 ;
2015 return 0;
2016}
2017_ACEOF
2018if ac_fn_c_try_compile "$LINENO"; then :
2019
2020else
2021 case $ac_type in #(
2022 int$2_t) :
2023 eval "$3=yes" ;; #(
2024 *) :
2025 eval "$3=\$ac_type" ;;
2026esac
2027fi
2028rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2029fi
2030rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002031 if eval test \"x\$"$3"\" = x"no"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002032
2033else
2034 break
2035fi
2036 done
2037fi
2038eval ac_res=\$$3
2039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2040$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002041 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002042
2043} # ac_fn_c_find_intX_t
2044
2045# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2046# --------------------------------------------
2047# Tries to find the compile-time value of EXPR in a program that includes
2048# INCLUDES, setting VAR accordingly. Returns whether the value could be
2049# computed
2050ac_fn_c_compute_int ()
2051{
2052 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2053 if test "$cross_compiling" = yes; then
2054 # Depending upon the size, compute the lo and hi bounds.
2055cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2056/* end confdefs.h. */
2057$4
2058int
2059main ()
2060{
2061static int test_array [1 - 2 * !(($2) >= 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002062test_array [0] = 0;
2063return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002064
2065 ;
2066 return 0;
2067}
2068_ACEOF
2069if ac_fn_c_try_compile "$LINENO"; then :
2070 ac_lo=0 ac_mid=0
2071 while :; do
2072 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2073/* end confdefs.h. */
2074$4
2075int
2076main ()
2077{
2078static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002079test_array [0] = 0;
2080return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002081
2082 ;
2083 return 0;
2084}
2085_ACEOF
2086if ac_fn_c_try_compile "$LINENO"; then :
2087 ac_hi=$ac_mid; break
2088else
2089 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2090 if test $ac_lo -le $ac_mid; then
2091 ac_lo= ac_hi=
2092 break
2093 fi
2094 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2095fi
2096rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2097 done
2098else
2099 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2100/* end confdefs.h. */
2101$4
2102int
2103main ()
2104{
2105static int test_array [1 - 2 * !(($2) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002106test_array [0] = 0;
2107return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002108
2109 ;
2110 return 0;
2111}
2112_ACEOF
2113if ac_fn_c_try_compile "$LINENO"; then :
2114 ac_hi=-1 ac_mid=-1
2115 while :; do
2116 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2117/* end confdefs.h. */
2118$4
2119int
2120main ()
2121{
2122static int test_array [1 - 2 * !(($2) >= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002123test_array [0] = 0;
2124return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002125
2126 ;
2127 return 0;
2128}
2129_ACEOF
2130if ac_fn_c_try_compile "$LINENO"; then :
2131 ac_lo=$ac_mid; break
2132else
2133 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2134 if test $ac_mid -le $ac_hi; then
2135 ac_lo= ac_hi=
2136 break
2137 fi
2138 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2139fi
2140rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2141 done
2142else
2143 ac_lo= ac_hi=
2144fi
2145rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2146fi
2147rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2148# Binary search between lo and hi bounds.
2149while test "x$ac_lo" != "x$ac_hi"; do
2150 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2151 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2152/* end confdefs.h. */
2153$4
2154int
2155main ()
2156{
2157static int test_array [1 - 2 * !(($2) <= $ac_mid)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002158test_array [0] = 0;
2159return test_array [0];
Matthias Kloseb9621712010-04-24 17:59:49 +00002160
2161 ;
2162 return 0;
2163}
2164_ACEOF
2165if ac_fn_c_try_compile "$LINENO"; then :
2166 ac_hi=$ac_mid
2167else
2168 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2169fi
2170rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2171done
2172case $ac_lo in #((
2173?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2174'') ac_retval=1 ;;
2175esac
2176 else
2177 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2178/* end confdefs.h. */
2179$4
2180static long int longval () { return $2; }
2181static unsigned long int ulongval () { return $2; }
2182#include <stdio.h>
2183#include <stdlib.h>
2184int
2185main ()
2186{
2187
2188 FILE *f = fopen ("conftest.val", "w");
2189 if (! f)
2190 return 1;
2191 if (($2) < 0)
2192 {
2193 long int i = longval ();
2194 if (i != ($2))
2195 return 1;
2196 fprintf (f, "%ld", i);
2197 }
2198 else
2199 {
2200 unsigned long int i = ulongval ();
2201 if (i != ($2))
2202 return 1;
2203 fprintf (f, "%lu", i);
2204 }
2205 /* Do not output a trailing newline, as this causes \r\n confusion
2206 on some platforms. */
2207 return ferror (f) || fclose (f) != 0;
2208
2209 ;
2210 return 0;
2211}
2212_ACEOF
2213if ac_fn_c_try_run "$LINENO"; then :
2214 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2215else
2216 ac_retval=1
2217fi
2218rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2219 conftest.$ac_objext conftest.beam conftest.$ac_ext
2220rm -f conftest.val
2221
2222 fi
Victor Stinnere0be4232011-10-25 13:06:09 +02002223 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002224 as_fn_set_status $ac_retval
2225
2226} # ac_fn_c_compute_int
2227
2228# ac_fn_c_check_func LINENO FUNC VAR
2229# ----------------------------------
2230# Tests whether FUNC exists, setting the cache variable VAR accordingly
2231ac_fn_c_check_func ()
2232{
2233 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2234 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2235$as_echo_n "checking for $2... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002236if eval \${$3+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002237 $as_echo_n "(cached) " >&6
2238else
2239 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2240/* end confdefs.h. */
2241/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2242 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2243#define $2 innocuous_$2
2244
2245/* System header to define __stub macros and hopefully few prototypes,
2246 which can conflict with char $2 (); below.
2247 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2248 <limits.h> exists even on freestanding compilers. */
2249
2250#ifdef __STDC__
2251# include <limits.h>
2252#else
2253# include <assert.h>
2254#endif
2255
2256#undef $2
2257
2258/* Override any GCC internal prototype to avoid an error.
2259 Use char because int might match the return type of a GCC
2260 builtin and then its argument prototype would still apply. */
2261#ifdef __cplusplus
2262extern "C"
2263#endif
2264char $2 ();
2265/* The GNU C library defines this for functions which it implements
2266 to always fail with ENOSYS. Some functions are actually named
2267 something starting with __ and the normal name is an alias. */
2268#if defined __stub_$2 || defined __stub___$2
2269choke me
2270#endif
2271
2272int
2273main ()
2274{
2275return $2 ();
2276 ;
2277 return 0;
2278}
2279_ACEOF
2280if ac_fn_c_try_link "$LINENO"; then :
2281 eval "$3=yes"
2282else
2283 eval "$3=no"
2284fi
2285rm -f core conftest.err conftest.$ac_objext \
2286 conftest$ac_exeext conftest.$ac_ext
2287fi
2288eval ac_res=\$$3
2289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2290$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002291 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002292
2293} # ac_fn_c_check_func
2294
Gregory P. Smithdf300d52012-01-21 18:20:15 -08002295# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2296# ---------------------------------------------
2297# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2298# accordingly.
2299ac_fn_c_check_decl ()
2300{
2301 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2302 as_decl_name=`echo $2|sed 's/ *(.*//'`
2303 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2304 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2305$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2306if eval \${$3+:} false; then :
2307 $as_echo_n "(cached) " >&6
2308else
2309 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2310/* end confdefs.h. */
2311$4
2312int
2313main ()
2314{
2315#ifndef $as_decl_name
2316#ifdef __cplusplus
2317 (void) $as_decl_use;
2318#else
2319 (void) $as_decl_name;
2320#endif
2321#endif
2322
2323 ;
2324 return 0;
2325}
2326_ACEOF
2327if ac_fn_c_try_compile "$LINENO"; then :
2328 eval "$3=yes"
2329else
2330 eval "$3=no"
2331fi
2332rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2333fi
2334eval ac_res=\$$3
2335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2336$as_echo "$ac_res" >&6; }
2337 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2338
2339} # ac_fn_c_check_decl
2340
Matthias Kloseb9621712010-04-24 17:59:49 +00002341# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2342# ----------------------------------------------------
2343# Tries to find if the field MEMBER exists in type AGGR, after including
2344# INCLUDES, setting cache variable VAR accordingly.
2345ac_fn_c_check_member ()
2346{
2347 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2348 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2349$as_echo_n "checking for $2.$3... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002350if eval \${$4+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00002351 $as_echo_n "(cached) " >&6
2352else
2353 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2354/* end confdefs.h. */
2355$5
2356int
2357main ()
2358{
2359static $2 ac_aggr;
2360if (ac_aggr.$3)
2361return 0;
2362 ;
2363 return 0;
2364}
2365_ACEOF
2366if ac_fn_c_try_compile "$LINENO"; then :
2367 eval "$4=yes"
2368else
2369 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2370/* end confdefs.h. */
2371$5
2372int
2373main ()
2374{
2375static $2 ac_aggr;
2376if (sizeof ac_aggr.$3)
2377return 0;
2378 ;
2379 return 0;
2380}
2381_ACEOF
2382if ac_fn_c_try_compile "$LINENO"; then :
2383 eval "$4=yes"
2384else
2385 eval "$4=no"
2386fi
2387rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2388fi
2389rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2390fi
2391eval ac_res=\$$4
2392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2393$as_echo "$ac_res" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002394 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
Matthias Kloseb9621712010-04-24 17:59:49 +00002395
2396} # ac_fn_c_check_member
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002397cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00002398This file contains any messages produced by compilers while
2399running configure, to aid debugging if configure makes a mistake.
2400
Georg Brandl3ebb6b32011-02-20 10:37:07 +00002401It was created by python $as_me 3.3, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00002402generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00002403
2404 $ $0 $@
2405
2406_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002407exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00002408{
2409cat <<_ASUNAME
2410## --------- ##
2411## Platform. ##
2412## --------- ##
2413
2414hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2415uname -m = `(uname -m) 2>/dev/null || echo unknown`
2416uname -r = `(uname -r) 2>/dev/null || echo unknown`
2417uname -s = `(uname -s) 2>/dev/null || echo unknown`
2418uname -v = `(uname -v) 2>/dev/null || echo unknown`
2419
2420/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2421/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2422
2423/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2424/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2425/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002426/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00002427/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2428/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2429/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2430
2431_ASUNAME
2432
2433as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2434for as_dir in $PATH
2435do
2436 IFS=$as_save_IFS
2437 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00002438 $as_echo "PATH: $as_dir"
2439 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002440IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002441
2442} >&5
2443
2444cat >&5 <<_ACEOF
2445
2446
2447## ----------- ##
2448## Core tests. ##
2449## ----------- ##
2450
2451_ACEOF
2452
2453
2454# Keep a trace of the command line.
2455# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00002456# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00002457# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00002458# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00002459ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00002460ac_configure_args0=
2461ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00002462ac_must_keep_next=false
2463for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00002464do
Skip Montanaro6dead952003-09-25 14:50:04 +00002465 for ac_arg
2466 do
2467 case $ac_arg in
2468 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2469 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2470 | -silent | --silent | --silen | --sile | --sil)
2471 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002472 *\'*)
Matthias Kloseb9621712010-04-24 17:59:49 +00002473 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002474 esac
2475 case $ac_pass in
Matthias Kloseb9621712010-04-24 17:59:49 +00002476 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002477 2)
Matthias Kloseb9621712010-04-24 17:59:49 +00002478 as_fn_append ac_configure_args1 " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002479 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002480 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00002481 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00002482 case $ac_arg in
2483 *=* | --config-cache | -C | -disable-* | --disable-* \
2484 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2485 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2486 | -with-* | --with-* | -without-* | --without-* | --x)
2487 case "$ac_configure_args0 " in
2488 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2489 esac
2490 ;;
2491 -* ) ac_must_keep_next=true ;;
2492 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00002493 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002494 as_fn_append ac_configure_args " '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00002495 ;;
2496 esac
2497 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002498done
Matthias Kloseb9621712010-04-24 17:59:49 +00002499{ ac_configure_args0=; unset ac_configure_args0;}
2500{ ac_configure_args1=; unset ac_configure_args1;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002501
2502# When interrupted or exit'd, cleanup temporary files, and complete
2503# config.log. We remove comments because anyway the quotes in there
2504# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002505# WARNING: Use '\'' to represent an apostrophe within the trap.
2506# 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 +00002507trap 'exit_status=$?
2508 # Save into config.log some information that might help in debugging.
2509 {
2510 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002511
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002512 $as_echo "## ---------------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002513## Cache variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002514## ---------------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002515 echo
2516 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002517(
2518 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2519 eval ac_val=\$$ac_var
2520 case $ac_val in #(
2521 *${as_nl}*)
2522 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002523 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2524$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002525 esac
2526 case $ac_var in #(
2527 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +00002528 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2529 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002530 esac ;;
2531 esac
2532 done
Martin v. Löwis11437992002-04-12 09:54:03 +00002533 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002534 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2535 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00002536 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002537 "s/'\''/'\''\\\\'\'''\''/g;
2538 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2539 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002540 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002541 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002542 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002543 esac |
2544 sort
2545)
Martin v. Löwis11437992002-04-12 09:54:03 +00002546 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00002547
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002548 $as_echo "## ----------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00002549## Output variables. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002550## ----------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002551 echo
2552 for ac_var in $ac_subst_vars
2553 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002554 eval ac_val=\$$ac_var
2555 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002556 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002557 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002558 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002559 done | sort
2560 echo
2561
2562 if test -n "$ac_subst_files"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002563 $as_echo "## ------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002564## File substitutions. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002565## ------------------- ##"
Skip Montanaro6dead952003-09-25 14:50:04 +00002566 echo
2567 for ac_var in $ac_subst_files
2568 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002569 eval ac_val=\$$ac_var
2570 case $ac_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002571 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002572 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00002573 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00002574 done | sort
2575 echo
2576 fi
2577
Martin v. Löwis11437992002-04-12 09:54:03 +00002578 if test -s confdefs.h; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002579 $as_echo "## ----------- ##
Martin v. Löwis11437992002-04-12 09:54:03 +00002580## confdefs.h. ##
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002581## ----------- ##"
Martin v. Löwis11437992002-04-12 09:54:03 +00002582 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002583 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002584 echo
2585 fi
2586 test "$ac_signal" != 0 &&
Matthias Kloseb9621712010-04-24 17:59:49 +00002587 $as_echo "$as_me: caught signal $ac_signal"
2588 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00002589 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002590 rm -f core *.core core.conftest.* &&
2591 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00002592 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002593' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00002594for ac_signal in 1 2 13 15; do
Matthias Kloseb9621712010-04-24 17:59:49 +00002595 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00002596done
2597ac_signal=0
2598
2599# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002600rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00002601
Matthias Kloseb9621712010-04-24 17:59:49 +00002602$as_echo "/* confdefs.h */" > confdefs.h
2603
Martin v. Löwis11437992002-04-12 09:54:03 +00002604# Predefined preprocessor variables.
2605
2606cat >>confdefs.h <<_ACEOF
2607#define PACKAGE_NAME "$PACKAGE_NAME"
2608_ACEOF
2609
Martin v. Löwis11437992002-04-12 09:54:03 +00002610cat >>confdefs.h <<_ACEOF
2611#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2612_ACEOF
2613
Martin v. Löwis11437992002-04-12 09:54:03 +00002614cat >>confdefs.h <<_ACEOF
2615#define PACKAGE_VERSION "$PACKAGE_VERSION"
2616_ACEOF
2617
Martin v. Löwis11437992002-04-12 09:54:03 +00002618cat >>confdefs.h <<_ACEOF
2619#define PACKAGE_STRING "$PACKAGE_STRING"
2620_ACEOF
2621
Martin v. Löwis11437992002-04-12 09:54:03 +00002622cat >>confdefs.h <<_ACEOF
2623#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2624_ACEOF
2625
Matthias Kloseb9621712010-04-24 17:59:49 +00002626cat >>confdefs.h <<_ACEOF
2627#define PACKAGE_URL "$PACKAGE_URL"
2628_ACEOF
2629
Martin v. Löwis11437992002-04-12 09:54:03 +00002630
2631# Let the site file select an alternate cache file if it wants to.
Matthias Kloseb9621712010-04-24 17:59:49 +00002632# Prefer an explicitly selected file to automatically selected ones.
2633ac_site_file1=NONE
2634ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002635if test -n "$CONFIG_SITE"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002636 # We do not want a PATH search for config.site.
2637 case $CONFIG_SITE in #((
2638 -*) ac_site_file1=./$CONFIG_SITE;;
2639 */*) ac_site_file1=$CONFIG_SITE;;
2640 *) ac_site_file1=./$CONFIG_SITE;;
2641 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002642elif test "x$prefix" != xNONE; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002643 ac_site_file1=$prefix/share/config.site
2644 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002645else
Matthias Kloseb9621712010-04-24 17:59:49 +00002646 ac_site_file1=$ac_default_prefix/share/config.site
2647 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002648fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002649for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002650do
Matthias Kloseb9621712010-04-24 17:59:49 +00002651 test "x$ac_site_file" = xNONE && continue
2652 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2653 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2654$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002655 sed 's/^/| /' "$ac_site_file" >&5
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002656 . "$ac_site_file" \
2657 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2658$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2659as_fn_error $? "failed to load site script $ac_site_file
Victor Stinnere0be4232011-10-25 13:06:09 +02002660See \`config.log' for more details" "$LINENO" 5; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002661 fi
2662done
2663
2664if test -r "$cache_file"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002665 # Some versions of bash will fail to source /dev/null (special files
2666 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2667 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2668 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2669$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002670 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002671 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2672 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00002673 esac
2674 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002675else
Matthias Kloseb9621712010-04-24 17:59:49 +00002676 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2677$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002678 >$cache_file
2679fi
2680
2681# Check that the precious variables saved in the cache have kept the same
2682# value.
2683ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002684for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002685 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2686 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002687 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2688 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00002689 case $ac_old_set,$ac_new_set in
2690 set,)
Matthias Kloseb9621712010-04-24 17:59:49 +00002691 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2692$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 +00002693 ac_cache_corrupted=: ;;
2694 ,set)
Matthias Kloseb9621712010-04-24 17:59:49 +00002695 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2696$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002697 ac_cache_corrupted=: ;;
2698 ,);;
2699 *)
2700 if test "x$ac_old_val" != "x$ac_new_val"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002701 # differences in whitespace do not lead to failure.
2702 ac_old_val_w=`echo x $ac_old_val`
2703 ac_new_val_w=`echo x $ac_new_val`
2704 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2705 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2706$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2707 ac_cache_corrupted=:
2708 else
2709 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2710$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2711 eval $ac_var=\$ac_old_val
2712 fi
2713 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2714$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2715 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2716$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002717 fi;;
2718 esac
2719 # Pass precious variables to config.status.
2720 if test "$ac_new_set" = set; then
2721 case $ac_new_val in
Matthias Kloseb9621712010-04-24 17:59:49 +00002722 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002723 *) ac_arg=$ac_var=$ac_new_val ;;
2724 esac
2725 case " $ac_configure_args " in
2726 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Matthias Kloseb9621712010-04-24 17:59:49 +00002727 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002728 esac
2729 fi
2730done
2731if $ac_cache_corrupted; then
Matthias Kloseb9621712010-04-24 17:59:49 +00002732 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2733$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2734 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2735$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02002736 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002737fi
Matthias Kloseb9621712010-04-24 17:59:49 +00002738## -------------------- ##
2739## Main body of script. ##
2740## -------------------- ##
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002741
Guido van Rossum7f43da71994-08-01 12:15:30 +00002742ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002743ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00002744ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2745ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2746ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002747
Guido van Rossum627b2d71993-12-24 10:39:16 +00002748
Michael W. Hudson54241132001-12-07 15:38:26 +00002749
Trent Nelson4d4ec652012-10-16 08:51:24 -04002750
Trent Nelson5595ab52012-10-17 04:47:31 -04002751if test "$abs_srcdir" != "$abs_builddir"; then
Trent Nelson4d4ec652012-10-16 08:51:24 -04002752 # If we're building out-of-tree, we need to make sure the following
2753 # resources get picked up before their $srcdir counterparts.
2754 # Objects/ -> typeslots.inc
2755 # Include/ -> Python-ast.h, graminit.h
2756 # Python/ -> importlib.h
2757 # (A side effect of this is that these resources will automatically be
2758 # regenerated when building out-of-tree, regardless of whether or not
2759 # the $srcdir counterpart is up-to-date. This is an acceptable trade
2760 # off.)
2761 BASECPPFLAGS="-IObjects -IInclude -IPython"
2762else
2763 BASECPPFLAGS=""
2764fi
2765
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002766
2767
2768
2769
Antoine Pitroud3b2aef2011-07-27 01:22:41 +02002770if test -e $srcdir/.hg/dirstate
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002771then
2772# Extract the first word of "hg", so it can be a program name with args.
2773set dummy hg; ac_word=$2
2774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2775$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02002776if ${ac_cv_prog_HAS_HG+:} false; then :
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002777 $as_echo_n "(cached) " >&6
2778else
2779 if test -n "$HAS_HG"; then
2780 ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test.
2781else
2782as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2783for as_dir in $PATH
2784do
2785 IFS=$as_save_IFS
2786 test -z "$as_dir" && as_dir=.
2787 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00002788 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Peterson8c6f88e2011-05-31 20:52:17 -05002789 ac_cv_prog_HAS_HG="found"
2790 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2791 break 2
2792 fi
2793done
2794 done
2795IFS=$as_save_IFS
2796
2797 test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found"
2798fi
2799fi
2800HAS_HG=$ac_cv_prog_HAS_HG
2801if test -n "$HAS_HG"; then
2802 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5
2803$as_echo "$HAS_HG" >&6; }
2804else
2805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2806$as_echo "no" >&6; }
2807fi
2808
2809
2810else
2811HAS_HG=no-repository
2812fi
2813if test $HAS_HG = found
2814then
2815 HGVERSION="hg id -i \$(srcdir)"
2816 HGTAG="hg id -t \$(srcdir)"
2817 HGBRANCH="hg id -b \$(srcdir)"
2818else
2819 HGVERSION=""
2820 HGTAG=""
2821 HGBRANCH=""
2822fi
2823
2824
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002825ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00002826
2827
Matthias Kloseca2f6ec2012-03-15 21:30:11 +01002828ac_aux_dir=
2829for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2830 if test -f "$ac_dir/install-sh"; then
2831 ac_aux_dir=$ac_dir
2832 ac_install_sh="$ac_aux_dir/install-sh -c"
2833 break
2834 elif test -f "$ac_dir/install.sh"; then
2835 ac_aux_dir=$ac_dir
2836 ac_install_sh="$ac_aux_dir/install.sh -c"
2837 break
2838 elif test -f "$ac_dir/shtool"; then
2839 ac_aux_dir=$ac_dir
2840 ac_install_sh="$ac_aux_dir/shtool install -c"
2841 break
2842 fi
2843done
2844if test -z "$ac_aux_dir"; then
2845 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2846fi
2847
2848# These three variables are undocumented and unsupported,
2849# and are intended to be withdrawn in a future Autoconf release.
2850# They can cause serious problems if a builder's source tree is in a directory
2851# whose full name contains unusual characters.
2852ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2853ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2854ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2855
2856
2857# Make sure we can run config.sub.
2858$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2859 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2860
2861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2862$as_echo_n "checking build system type... " >&6; }
2863if ${ac_cv_build+:} false; then :
2864 $as_echo_n "(cached) " >&6
2865else
2866 ac_build_alias=$build_alias
2867test "x$ac_build_alias" = x &&
2868 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2869test "x$ac_build_alias" = x &&
2870 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2871ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2872 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2873
2874fi
2875{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2876$as_echo "$ac_cv_build" >&6; }
2877case $ac_cv_build in
2878*-*-*) ;;
2879*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2880esac
2881build=$ac_cv_build
2882ac_save_IFS=$IFS; IFS='-'
2883set x $ac_cv_build
2884shift
2885build_cpu=$1
2886build_vendor=$2
2887shift; shift
2888# Remember, the first character of IFS is used to create $*,
2889# except with old shells:
2890build_os=$*
2891IFS=$ac_save_IFS
2892case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2893
2894
2895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2896$as_echo_n "checking host system type... " >&6; }
2897if ${ac_cv_host+:} false; then :
2898 $as_echo_n "(cached) " >&6
2899else
2900 if test "x$host_alias" = x; then
2901 ac_cv_host=$ac_cv_build
2902else
2903 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2904 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2905fi
2906
2907fi
2908{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2909$as_echo "$ac_cv_host" >&6; }
2910case $ac_cv_host in
2911*-*-*) ;;
2912*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2913esac
2914host=$ac_cv_host
2915ac_save_IFS=$IFS; IFS='-'
2916set x $ac_cv_host
2917shift
2918host_cpu=$1
2919host_vendor=$2
2920shift; shift
2921# Remember, the first character of IFS is used to create $*,
2922# except with old shells:
2923host_os=$*
2924IFS=$ac_save_IFS
2925case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2926
2927
2928
doko@python.orga10e4a92013-01-25 18:45:12 +01002929
2930
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002931if test "$cross_compiling" = yes; then
2932 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python interpreter for cross build" >&5
2933$as_echo_n "checking for python interpreter for cross build... " >&6; }
2934 if test -z "$PYTHON_FOR_BUILD"; then
2935 for interp in python$PACKAGE_VERSION python3 python; do
2936 which $interp >/dev/null 2>&1 || continue
2937 if $interp -c 'import sys;sys.exit(not sys.version_info[:2] >= (3,3))'; then
2938 break
2939 fi
2940 interp=
2941 done
2942 if test x$interp = x; then
2943 as_fn_error $? "python$PACKAGE_VERSION interpreter not found" "$LINENO" 5
2944 fi
2945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $interp" >&5
2946$as_echo "$interp" >&6; }
doko@python.org97313302013-01-25 14:33:33 +01002947 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/plat-$(MACHDEP) '$interp
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002948 fi
Christian Heimes954ac032012-12-12 13:10:21 +01002949elif test "$cross_compiling" = maybe; then
2950 as_fn_error $? "Cross compiling required --host=HOST-TUPLE and --build=ARCH" "$LINENO" 5
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02002951else
2952 PYTHON_FOR_BUILD='./$(BUILDPYTHON) -E'
2953fi
2954
2955
Martin v. Löwis11437992002-04-12 09:54:03 +00002956
Benjamin Petersond23f8222009-04-05 19:13:16 +00002957if test "$prefix" != "/"; then
2958 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
2959fi
2960
2961
Martin v. Löwis11437992002-04-12 09:54:03 +00002962
2963
Martin v. Löwis8316feb2003-06-14 07:48:07 +00002964# We don't use PACKAGE_ variables, and they cause conflicts
2965# with other autoconf-based packages that include Python.h
2966grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
2967rm confdefs.h
2968mv confdefs.h.new confdefs.h
2969
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00002970
Georg Brandl3ebb6b32011-02-20 10:37:07 +00002971VERSION=3.3
Guido van Rossum1fd74a71997-07-19 19:36:02 +00002972
Benjamin Petersond7f73e92010-09-05 00:09:07 +00002973# Version number of Python's own shared library file.
Martin v. Löwis1142de32002-03-29 16:28:31 +00002974
2975SOVERSION=1.0
2976
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002977# The later defininition of _XOPEN_SOURCE disables certain features
2978# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
2979
Matthias Kloseb9621712010-04-24 17:59:49 +00002980$as_echo "#define _GNU_SOURCE 1" >>confdefs.h
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002981
2982
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002983# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2984# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
2985# them.
2986
Matthias Kloseb9621712010-04-24 17:59:49 +00002987$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
Martin v. Löwisbcd93962003-05-03 10:32:18 +00002988
2989
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002990# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2991# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
2992# them.
2993
Matthias Kloseb9621712010-04-24 17:59:49 +00002994$as_echo "#define __BSD_VISIBLE 1" >>confdefs.h
Andrew MacIntyreabccf412003-07-02 13:53:25 +00002995
2996
Martin v. Löwisd6320502004-08-12 13:45:08 +00002997# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
2998# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
2999
Matthias Kloseb9621712010-04-24 17:59:49 +00003000$as_echo "#define _BSD_TYPES 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +00003001
3002
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003003# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
3004# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
3005# them.
3006
Matthias Kloseb9621712010-04-24 17:59:49 +00003007$as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003008
3009
3010
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003011define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00003012
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00003013# Arguments passed to configure.
3014
3015CONFIG_ARGS="$ac_configure_args"
3016
Matthias Kloseb9621712010-04-24 17:59:49 +00003017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-universalsdk" >&5
3018$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003019# Check whether --enable-universalsdk was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003020if test "${enable_universalsdk+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003021 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00003022 case $enableval in
3023 yes)
Ned Deilycbfb9a52012-06-23 16:02:19 -07003024 # Locate the best usable SDK, see Mac/README.txt for more
3025 # information
3026 enableval="`/usr/bin/xcodebuild -version -sdk macosx Path 2>/dev/null`"
3027 if test -z "${enableval}"
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003028 then
Ned Deilycbfb9a52012-06-23 16:02:19 -07003029 enableval=/Developer/SDKs/MacOSX10.4u.sdk
3030 if test ! -d "${enableval}"
3031 then
3032 enableval=/
3033 fi
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003034 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003035 ;;
3036 esac
3037 case $enableval in
3038 no)
3039 UNIVERSALSDK=
3040 enable_universalsdk=
3041 ;;
3042 *)
3043 UNIVERSALSDK=$enableval
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003044 if test ! -d "${UNIVERSALSDK}"
3045 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003046 as_fn_error $? "--enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" "$LINENO" 5
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003047 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003048 ;;
3049 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003050
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003051
Thomas Wouters477c8d52006-05-27 19:21:47 +00003052else
3053
3054 UNIVERSALSDK=
3055 enable_universalsdk=
3056
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003057fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003058
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003059if test -n "${UNIVERSALSDK}"
3060then
Matthias Kloseb9621712010-04-24 17:59:49 +00003061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSALSDK}" >&5
3062$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003063else
Matthias Kloseb9621712010-04-24 17:59:49 +00003064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3065$as_echo "no" >&6; }
Ronald Oussoren8af24c12010-02-07 12:03:42 +00003066fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00003067
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003068
Benjamin Peterson6794aa32008-07-16 20:33:37 +00003069
3070
Ned Deilycbfb9a52012-06-23 16:02:19 -07003071# For backward compatibility reasons we prefer to select '32-bit' if available,
3072# otherwise use 'intel'
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003073UNIVERSAL_ARCHS="32-bit"
Ned Deilycbfb9a52012-06-23 16:02:19 -07003074if test "`uname -s`" = "Darwin"
3075then
3076 if test -n "${UNIVERSALSDK}"
3077 then
3078 if test -z "`/usr/bin/file "${UNIVERSALSDK}/usr/lib/libSystem.dylib" | grep ppc`"
3079 then
3080 UNIVERSAL_ARCHS="intel"
3081 fi
3082 fi
3083fi
3084
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003085
Matthias Kloseb9621712010-04-24 17:59:49 +00003086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-universal-archs" >&5
3087$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003088
3089# Check whether --with-universal-archs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003090if test "${with_universal_archs+set}" = set; then :
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003091 withval=$with_universal_archs;
Matthias Kloseb9621712010-04-24 17:59:49 +00003092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
3093$as_echo "$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003094 UNIVERSAL_ARCHS="$withval"
3095
3096else
3097
Ned Deilycbfb9a52012-06-23 16:02:19 -07003098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${UNIVERSAL_ARCHS}" >&5
3099$as_echo "${UNIVERSAL_ARCHS}" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003100
3101fi
3102
3103
3104
3105
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003106
3107# Check whether --with-framework-name was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003108if test "${with_framework_name+set}" = set; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003109 withval=$with_framework_name;
3110 PYTHONFRAMEWORK=${withval}
3111 PYTHONFRAMEWORKDIR=${withval}.framework
3112 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
3113
3114else
3115
3116 PYTHONFRAMEWORK=Python
3117 PYTHONFRAMEWORKDIR=Python.framework
3118 PYTHONFRAMEWORKIDENTIFIER=org.python.python
3119
3120fi
3121
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003122# Check whether --enable-framework was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003123if test "${enable_framework+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003124 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00003125 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00003126 yes)
Jack Jansene578a632001-08-15 01:27:14 +00003127 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00003128 esac
3129 case $enableval in
3130 no)
3131 PYTHONFRAMEWORK=
3132 PYTHONFRAMEWORKDIR=no-framework
3133 PYTHONFRAMEWORKPREFIX=
3134 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003135 FRAMEWORKINSTALLFIRST=
3136 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003137 FRAMEWORKALTINSTALLFIRST=
3138 FRAMEWORKALTINSTALLLAST=
3139 if test "x${prefix}" = "xNONE"; then
3140 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3141 else
3142 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3143 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00003144 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00003145 ;;
3146 *)
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003147 PYTHONFRAMEWORKPREFIX="${enableval}"
Jack Jansen127e56e2001-09-11 14:41:54 +00003148 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00003149 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00003150 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00003151 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
3152 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003153 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003154
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003155 if test "x${prefix}" = "xNONE" ; then
3156 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003157
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003158 else
3159 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3160 fi
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003161
3162 case "${enableval}" in
3163 /System*)
3164 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3165 if test "${prefix}" = "NONE" ; then
3166 # See below
3167 FRAMEWORKUNIXTOOLSPREFIX="/usr"
3168 fi
3169 ;;
3170
3171 /Library*)
3172 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3173 ;;
3174
3175 */Library/Frameworks)
3176 MDIR="`dirname "${enableval}"`"
3177 MDIR="`dirname "${MDIR}"`"
3178 FRAMEWORKINSTALLAPPSPREFIX="${MDIR}/Applications"
3179
3180 if test "${prefix}" = "NONE"; then
3181 # User hasn't specified the
3182 # --prefix option, but wants to install
3183 # the framework in a non-default location,
3184 # ensure that the compatibility links get
3185 # installed relative to that prefix as well
3186 # instead of in /usr/local.
3187 FRAMEWORKUNIXTOOLSPREFIX="${MDIR}"
3188 fi
3189 ;;
3190
3191 *)
3192 FRAMEWORKINSTALLAPPSPREFIX="/Applications"
3193 ;;
3194 esac
3195
Jack Jansen127e56e2001-09-11 14:41:54 +00003196 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00003197
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003198 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00003199 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003200 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003201
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003202 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003203
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003204 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
3205
3206 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
3207
Jack Jansene578a632001-08-15 01:27:14 +00003208 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003209
Guido van Rossum563e7081996-09-10 18:20:48 +00003210else
Martin v. Löwis11437992002-04-12 09:54:03 +00003211
Jack Jansene578a632001-08-15 01:27:14 +00003212 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00003213 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00003214 PYTHONFRAMEWORKPREFIX=
3215 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003216 FRAMEWORKINSTALLFIRST=
3217 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003218 FRAMEWORKALTINSTALLFIRST=
3219 FRAMEWORKALTINSTALLLAST=
3220 if test "x${prefix}" = "xNONE" ; then
3221 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
3222 else
3223 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
3224 fi
Jack Jansene578a632001-08-15 01:27:14 +00003225 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003226
Benjamin Peterson14ae9592008-07-16 02:20:15 +00003227
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003228fi
3229
Thomas Wouters477c8d52006-05-27 19:21:47 +00003230
3231
Michael W. Hudson54241132001-12-07 15:38:26 +00003232
3233
3234
3235
Jack Jansene578a632001-08-15 01:27:14 +00003236
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00003237
3238
3239
Christian Heimes81ee3ef2008-05-04 22:42:01 +00003240
Ronald Oussoren86b33c82010-04-30 11:41:56 +00003241
Jack Jansene578a632001-08-15 01:27:14 +00003242##AC_ARG_WITH(dyld,
Matthias Klose2b8733f2010-04-25 18:34:36 +00003243## AS_HELP_STRING([--with-dyld],
Matthias Klosec80c93f2010-04-24 17:04:35 +00003244## [Use (OpenStep|Rhapsody) dynamic linker]))
Jack Jansene578a632001-08-15 01:27:14 +00003245##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003246# Set name for machine-dependent library files
3247
Matthias Kloseb9621712010-04-24 17:59:49 +00003248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP" >&5
3249$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003250if test -z "$MACHDEP"
3251then
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003252 # avoid using uname for cross builds
3253 if test "$cross_compiling" = yes; then
doko@python.org44bbbda2013-01-25 14:44:00 +01003254 # ac_sys_system and ac_sys_release are used for setting
3255 # a lot of different things including 'define_xopen_source'
3256 # in the case statement below.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003257 case "$host" in
3258 *-*-linux*)
3259 ac_sys_system=Linux
3260 ;;
3261 *-*-cygwin*)
3262 ac_sys_system=Cygwin
3263 ;;
3264 *)
3265 # for now, limit cross builds to known configurations
3266 MACHDEP="unknown"
3267 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3268 esac
3269 ac_sys_release=
3270 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003271 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003272 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003273 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00003274 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003275 else
Guido van Rossum563e7081996-09-10 18:20:48 +00003276 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003277 fi
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003278 fi
3279 ac_md_system=`echo $ac_sys_system |
3280 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
3281 ac_md_release=`echo $ac_sys_release |
3282 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
3283 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00003284
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003285 case $MACHDEP in
Victor Stinner7209ff22011-08-21 00:00:16 +02003286 linux*) MACHDEP="linux";;
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00003287 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00003288 darwin*) MACHDEP="darwin";;
doko@ubuntu.comba015832012-06-30 16:52:05 +02003289 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00003290 '') MACHDEP="unknown";;
Matthias Klosedf2aecb2012-03-15 22:19:28 +01003291 esac
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003292fi
Guido van Rossum91922671997-10-09 20:24:13 +00003293
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02003294
3295if test "$cross_compiling" = yes; then
3296 case "$host" in
3297 *-*-linux*)
3298 case "$host_cpu" in
3299 arm*)
3300 _host_cpu=arm
3301 ;;
3302 *)
3303 _host_cpu=$host_cpu
3304 esac
3305 ;;
3306 *-*-cygwin*)
3307 _host_cpu=
3308 ;;
3309 *)
3310 # for now, limit cross builds to known configurations
3311 MACHDEP="unknown"
3312 as_fn_error $? "cross build not supported for $host" "$LINENO" 5
3313 esac
3314 _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}"
3315fi
3316
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003317# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
3318# disable features if it is defined, without any means to access these
3319# features as extensions. For these systems, we skip the definition of
3320# _XOPEN_SOURCE. Before adding a system to the list to gain access to
3321# some feature, make sure there is no alternative way to access this
3322# feature. Also, when using wildcards, make sure you have verified the
3323# need for not defining _XOPEN_SOURCE on all systems matching the
3324# wildcard, and that the wildcard does not include future systems
3325# (which may remove their limitations).
3326case $ac_sys_system/$ac_sys_release in
3327 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
3328 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00003329 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis19ed3c82010-02-15 21:45:06 +00003330 # In addition, Stefan Krah confirms that issue #1244610 exists through
3331 # OpenBSD 4.6, but is fixed in 4.7.
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003332 OpenBSD/2.* | OpenBSD/3.* | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003333 define_xopen_source=no
3334 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3335 # also defined. This can be overridden by defining _BSD_SOURCE
3336 # As this has a different meaning on Linux, only define it on OpenBSD
3337
Matthias Kloseb9621712010-04-24 17:59:49 +00003338$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Christian Heimes5b5e81c2007-12-31 16:14:33 +00003339
3340 ;;
Charles-François Natali54ef40b2011-07-22 23:52:02 +02003341 OpenBSD/*)
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003342 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
3343 # also defined. This can be overridden by defining _BSD_SOURCE
3344 # As this has a different meaning on Linux, only define it on OpenBSD
3345
Matthias Kloseb9621712010-04-24 17:59:49 +00003346$as_echo "#define _BSD_SOURCE 1" >>confdefs.h
Martin v. Löwis7671efc2010-02-15 08:35:16 +00003347
3348 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00003349 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
3350 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
3351 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00003352 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 +00003353 define_xopen_source=no;;
Martin v. Löwis1a415762010-05-28 15:44:20 +00003354 # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
3355 # request to enable features supported by the standard as a request
3356 # to disable features not supported by the standard. The best way
3357 # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
3358 # entirely and define __EXTENSIONS__ instead.
3359 SunOS/*)
Martin v. Löwisa9d71422003-03-28 18:43:31 +00003360 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003361 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
3362 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00003363 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00003364 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003365 define_xopen_source=no;;
3366 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003367 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00003368 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00003369 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00003370 # On FreeBSD 4, the math functions C89 does not cover are never defined
3371 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
3372 FreeBSD/4.*)
3373 define_xopen_source=no;;
3374 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
3375 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
3376 # identifies itself as Darwin/7.*
3377 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3378 # disables platform specific features beyond repair.
3379 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
3380 # has no effect, don't bother defining them
3381 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00003382 define_xopen_source=no;;
Ronald Oussoren92fb9412010-03-09 06:40:19 +00003383 Darwin/1[0-9].*)
Ronald Oussorenb8f11a62010-03-08 07:02:03 +00003384 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003385 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
3386 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
3387 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00003388 AIX/4)
3389 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00003390 AIX/5)
3391 if test `uname -r` -eq 1; then
3392 define_xopen_source=no
3393 fi
3394 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00003395 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
3396 # defining NI_NUMERICHOST.
3397 QNX/6.3.2)
3398 define_xopen_source=no
3399 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003400
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003401esac
3402
3403if test $define_xopen_source = yes
3404then
Victor Stinner14d098d2011-09-07 22:29:43 +02003405 # X/Open 7, incorporating POSIX.1-2008
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003406
Victor Stinner14d098d2011-09-07 22:29:43 +02003407$as_echo "#define _XOPEN_SOURCE 700" >>confdefs.h
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003408
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003409
3410 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
3411 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
3412 # several APIs are not declared. Since this is also needed in some
3413 # cases for HP-UX, we define it globally.
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003414
Matthias Kloseb9621712010-04-24 17:59:49 +00003415$as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003416
3417
Bob Ippolito7026a0a2005-03-28 23:23:47 +00003418
Victor Stinnerd169fdc2011-09-08 00:56:17 +02003419$as_echo "#define _POSIX_C_SOURCE 200809L" >>confdefs.h
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00003420
Martin v. Löwis35195ad2002-11-11 13:26:51 +00003421fi
3422
Guido van Rossum91922671997-10-09 20:24:13 +00003423#
3424# SGI compilers allow the specification of the both the ABI and the
3425# ISA on the command line. Depending on the values of these switches,
3426# different and often incompatable code will be generated.
3427#
3428# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
3429# thus supply support for various ABI/ISA combinations. The MACHDEP
3430# variable is also adjusted.
3431#
3432
3433if test ! -z "$SGI_ABI"
3434then
3435 CC="cc $SGI_ABI"
3436 LDFLAGS="$SGI_ABI $LDFLAGS"
3437 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
3438fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003439{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP" >&5
3440$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003441
Jack Jansen6b08a402004-06-03 12:41:45 +00003442# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
3443# it may influence the way we can build extensions, so distutils
3444# needs to check it
3445
Thomas Wouters477c8d52006-05-27 19:21:47 +00003446
Jack Jansen6b08a402004-06-03 12:41:45 +00003447CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00003448EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00003449
Guido van Rossum627b2d71993-12-24 10:39:16 +00003450# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00003451
3452# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
3453# for debug/optimization stuff. BASECFLAGS is for flags that are required
3454# just to get things to compile and link. Users are free to override OPT
3455# when running configure or make. The build should not break if they do.
3456# BASECFLAGS should generally not be messed with, however.
3457
3458# XXX shouldn't some/most/all of this code be merged with the stuff later
3459# on that fiddles with OPT and BASECFLAGS?
Matthias Kloseb9621712010-04-24 17:59:49 +00003460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --without-gcc" >&5
3461$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003462
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003463# Check whether --with-gcc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00003464if test "${with_gcc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003465 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003466 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00003467 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00003468 without_gcc=yes;;
3469 yes) CC=gcc
3470 without_gcc=no;;
3471 *) CC=$withval
3472 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00003473 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00003474else
Martin v. Löwis11437992002-04-12 09:54:03 +00003475
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003476 case $ac_sys_system in
Antoine Pitrouf6350d22010-09-21 15:19:14 +00003477 AIX*) CC=${CC:-xlc_r}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00003478 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00003479 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00003480 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003481fi
3482
Matthias Kloseb9621712010-04-24 17:59:49 +00003483{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $without_gcc" >&5
3484$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003485
Guido van Rossum8b131c51995-03-09 14:10:13 +00003486# If the user switches compilers, we can't believe the cache
3487if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
3488then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003489 as_fn_error $? "cached CC is different -- throw away $cache_file
Matthias Kloseb9621712010-04-24 17:59:49 +00003490(it is also a good idea to do 'make clean' before compiling)" "$LINENO" 5
Guido van Rossum8b131c51995-03-09 14:10:13 +00003491fi
3492
Jeffrey Yasskind4fcdb12010-07-09 16:30:58 +00003493# Don't let AC_PROG_CC set the default CFLAGS. It normally sets -g -O2
3494# when the compiler supports them, but we don't always want -O2, and
3495# we set -g later.
3496if test -z "$CFLAGS"; then
3497 CFLAGS=
3498fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07003499
3500if test "$ac_sys_system" = "Darwin"
3501then
3502 # Compiler selection on MacOSX is more complicated than
3503 # AC_PROG_CC can handle, see Mac/README.txt for more
3504 # information
3505 if test -z "${CC}"
3506 then
3507 found_gcc=
3508 found_clang=
3509 as_save_IFS=$IFS; IFS=:
3510 for as_dir in $PATH
3511 do
3512 IFS=$as_save_IFS
3513 if test -x $as_dir/gcc; then
3514 if test -z "${found_gcc}"; then
3515 found_gcc=$as_dir/gcc
3516 fi
3517 fi
3518 if test -x $as_dir/clang; then
3519 if test -z "${found_clang}"; then
3520 found_clang=$as_dir/clang
3521 fi
3522 fi
3523 done
3524 IFS=$as_save_IFS
3525
3526 if test -n "$found_gcc" -a -n "$found_clang"
3527 then
3528 if test -n "`"$found_gcc" --version | grep llvm-gcc`"
3529 then
3530 { $as_echo "$as_me:${as_lineno-$LINENO}: Detected llvm-gcc, falling back to clang" >&5
3531$as_echo "$as_me: Detected llvm-gcc, falling back to clang" >&6;}
3532 CC="$found_clang"
3533 CXX="$found_clang++"
3534 fi
3535
3536
3537 elif test -z "$found_gcc" -a -n "$found_clang"
3538 then
3539 { $as_echo "$as_me:${as_lineno-$LINENO}: No GCC found, use CLANG" >&5
3540$as_echo "$as_me: No GCC found, use CLANG" >&6;}
3541 CC="$found_clang"
3542 CXX="$found_clang++"
3543
3544 elif test -z "$found_gcc" -a -z "$found_clang"
3545 then
3546 found_clang=`/usr/bin/xcrun -find clang 2>/dev/null`
3547 if test -n "${found_clang}"
3548 then
3549 { $as_echo "$as_me:${as_lineno-$LINENO}: Using clang from Xcode.app" >&5
3550$as_echo "$as_me: Using clang from Xcode.app" >&6;}
3551 CC="${found_clang}"
3552 CXX="`/usr/bin/xcrun -find clang++`"
3553
3554 # else: use default behaviour
3555 fi
3556 fi
3557 fi
3558fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003559ac_ext=c
3560ac_cpp='$CPP $CPPFLAGS'
3561ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3562ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3563ac_compiler_gnu=$ac_cv_c_compiler_gnu
3564if test -n "$ac_tool_prefix"; then
3565 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3566set dummy ${ac_tool_prefix}gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3568$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003569if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003570 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003571else
3572 if test -n "$CC"; then
3573 ac_cv_prog_CC="$CC" # Let the user override the test.
3574else
Martin v. Löwis11437992002-04-12 09:54:03 +00003575as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3576for as_dir in $PATH
3577do
3578 IFS=$as_save_IFS
3579 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003580 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003581 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003582 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003583 $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 +00003584 break 2
3585 fi
3586done
Matthias Kloseb9621712010-04-24 17:59:49 +00003587 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003588IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003589
Jack Jansendd19cf82001-12-06 22:36:17 +00003590fi
3591fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003592CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00003593if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3595$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003596else
Matthias Kloseb9621712010-04-24 17:59:49 +00003597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3598$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003599fi
3600
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003601
Martin v. Löwis11437992002-04-12 09:54:03 +00003602fi
3603if test -z "$ac_cv_prog_CC"; then
3604 ac_ct_CC=$CC
3605 # Extract the first word of "gcc", so it can be a program name with args.
3606set dummy gcc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3608$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003609if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003610 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003611else
3612 if test -n "$ac_ct_CC"; then
3613 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3614else
3615as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3616for as_dir in $PATH
3617do
3618 IFS=$as_save_IFS
3619 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003620 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003621 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003622 ac_cv_prog_ac_ct_CC="gcc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003623 $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 +00003624 break 2
3625 fi
3626done
Matthias Kloseb9621712010-04-24 17:59:49 +00003627 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003628IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003629
3630fi
3631fi
3632ac_ct_CC=$ac_cv_prog_ac_ct_CC
3633if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3635$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003636else
Matthias Kloseb9621712010-04-24 17:59:49 +00003637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3638$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003639fi
3640
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003641 if test "x$ac_ct_CC" = x; then
3642 CC=""
3643 else
3644 case $cross_compiling:$ac_tool_warned in
3645yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003646{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3647$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003648ac_tool_warned=yes ;;
3649esac
3650 CC=$ac_ct_CC
3651 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003652else
3653 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00003654fi
3655
Jack Jansendd19cf82001-12-06 22:36:17 +00003656if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003657 if test -n "$ac_tool_prefix"; then
3658 # 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 +00003659set dummy ${ac_tool_prefix}cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3661$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003662if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003663 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003664else
3665 if test -n "$CC"; then
3666 ac_cv_prog_CC="$CC" # Let the user override the test.
3667else
Martin v. Löwis11437992002-04-12 09:54:03 +00003668as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3669for as_dir in $PATH
3670do
3671 IFS=$as_save_IFS
3672 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003673 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003674 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003675 ac_cv_prog_CC="${ac_tool_prefix}cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003676 $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 +00003677 break 2
3678 fi
3679done
Matthias Kloseb9621712010-04-24 17:59:49 +00003680 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003681IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003682
3683fi
3684fi
3685CC=$ac_cv_prog_CC
3686if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3688$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003689else
Matthias Kloseb9621712010-04-24 17:59:49 +00003690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3691$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003692fi
3693
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003694
Martin v. Löwis11437992002-04-12 09:54:03 +00003695 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003696fi
3697if test -z "$CC"; then
3698 # Extract the first word of "cc", so it can be a program name with args.
3699set dummy cc; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3701$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003702if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003703 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003704else
3705 if test -n "$CC"; then
3706 ac_cv_prog_CC="$CC" # Let the user override the test.
3707else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003708 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003709as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3710for as_dir in $PATH
3711do
3712 IFS=$as_save_IFS
3713 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003714 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003715 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003716 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3717 ac_prog_rejected=yes
3718 continue
3719 fi
3720 ac_cv_prog_CC="cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00003721 $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 +00003722 break 2
3723 fi
3724done
Matthias Kloseb9621712010-04-24 17:59:49 +00003725 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003726IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003727
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003728if test $ac_prog_rejected = yes; then
3729 # We found a bogon in the path, so make sure we never use it.
3730 set dummy $ac_cv_prog_CC
3731 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00003732 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003733 # We chose a different compiler from the bogus one.
3734 # However, it has the same basename, so the bogon will be chosen
3735 # first if we set CC to just the basename; use the full file name.
3736 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00003737 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003738 fi
3739fi
3740fi
3741fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003742CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003743if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3745$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003746else
Matthias Kloseb9621712010-04-24 17:59:49 +00003747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3748$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003749fi
3750
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003751
Martin v. Löwis11437992002-04-12 09:54:03 +00003752fi
3753if test -z "$CC"; then
3754 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003755 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003756 do
3757 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3758set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3760$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003761if ${ac_cv_prog_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003762 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003763else
3764 if test -n "$CC"; then
3765 ac_cv_prog_CC="$CC" # Let the user override the test.
3766else
Martin v. Löwis11437992002-04-12 09:54:03 +00003767as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3768for as_dir in $PATH
3769do
3770 IFS=$as_save_IFS
3771 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003772 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003773 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003774 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003775 $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 +00003776 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00003777 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003778done
Matthias Kloseb9621712010-04-24 17:59:49 +00003779 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003780IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00003781
3782fi
3783fi
3784CC=$ac_cv_prog_CC
3785if test -n "$CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3787$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003788else
Matthias Kloseb9621712010-04-24 17:59:49 +00003789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3790$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00003791fi
3792
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003793
Martin v. Löwis11437992002-04-12 09:54:03 +00003794 test -n "$CC" && break
3795 done
3796fi
3797if test -z "$CC"; then
3798 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003799 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00003800do
3801 # Extract the first word of "$ac_prog", so it can be a program name with args.
3802set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00003803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3804$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02003805if ${ac_cv_prog_ac_ct_CC+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00003806 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003807else
3808 if test -n "$ac_ct_CC"; then
3809 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3810else
3811as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3812for as_dir in $PATH
3813do
3814 IFS=$as_save_IFS
3815 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00003816 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00003817 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003818 ac_cv_prog_ac_ct_CC="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00003819 $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 +00003820 break 2
3821 fi
3822done
Matthias Kloseb9621712010-04-24 17:59:49 +00003823 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003824IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00003825
Martin v. Löwis11437992002-04-12 09:54:03 +00003826fi
3827fi
3828ac_ct_CC=$ac_cv_prog_ac_ct_CC
3829if test -n "$ac_ct_CC"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00003830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3831$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003832else
Matthias Kloseb9621712010-04-24 17:59:49 +00003833 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3834$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003835fi
Michael W. Hudson54241132001-12-07 15:38:26 +00003836
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003837
Martin v. Löwis11437992002-04-12 09:54:03 +00003838 test -n "$ac_ct_CC" && break
3839done
Michael W. Hudson54241132001-12-07 15:38:26 +00003840
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003841 if test "x$ac_ct_CC" = x; then
3842 CC=""
3843 else
3844 case $cross_compiling:$ac_tool_warned in
3845yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00003846{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3847$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003848ac_tool_warned=yes ;;
3849esac
3850 CC=$ac_ct_CC
3851 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003852fi
3853
3854fi
3855
3856
Matthias Kloseb9621712010-04-24 17:59:49 +00003857test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3858$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003859as_fn_error $? "no acceptable C compiler found in \$PATH
Victor Stinnere0be4232011-10-25 13:06:09 +02003860See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003861
3862# Provide some information about the compiler.
Matthias Kloseb9621712010-04-24 17:59:49 +00003863$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3864set X $ac_compile
3865ac_compiler=$2
3866for ac_option in --version -v -V -qversion; do
3867 { { ac_try="$ac_compiler $ac_option >&5"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003868case "(($ac_try" in
3869 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3870 *) ac_try_echo=$ac_try;;
3871esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003872eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3873$as_echo "$ac_try_echo"; } >&5
3874 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003875 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003876 if test -s conftest.err; then
3877 sed '10a\
3878... rest of stderr output deleted ...
3879 10q' conftest.err >conftest.er1
3880 cat conftest.er1 >&5
3881 fi
3882 rm -f conftest.er1 conftest.err
3883 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3884 test $ac_status = 0; }
3885done
Martin v. Löwis11437992002-04-12 09:54:03 +00003886
Matthias Kloseb9621712010-04-24 17:59:49 +00003887cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003888/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00003889
Martin v. Löwis11437992002-04-12 09:54:03 +00003890int
3891main ()
3892{
3893
3894 ;
3895 return 0;
3896}
3897_ACEOF
3898ac_clean_files_save=$ac_clean_files
Matthias Kloseb9621712010-04-24 17:59:49 +00003899ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00003900# Try to create an executable without -o first, disregard a.out.
3901# It will help us diagnose broken compilers, and finding out an intuition
3902# of exeext.
Matthias Kloseb9621712010-04-24 17:59:49 +00003903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3904$as_echo_n "checking whether the C compiler works... " >&6; }
3905ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3906
3907# The possible output files:
3908ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3909
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003910ac_rmfiles=
3911for ac_file in $ac_files
3912do
3913 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003914 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003915 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3916 esac
3917done
3918rm -f $ac_rmfiles
3919
Matthias Kloseb9621712010-04-24 17:59:49 +00003920if { { ac_try="$ac_link_default"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003921case "(($ac_try" in
3922 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3923 *) ac_try_echo=$ac_try;;
3924esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003925eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3926$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003927 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003928 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003929 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3930 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003931 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3932# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3933# in a Makefile. We should not override ac_cv_exeext if it was cached,
3934# so that the user can short-circuit this test for compilers unknown to
3935# Autoconf.
3936for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00003937do
3938 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003939 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00003940 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003941 ;;
3942 [ab].out )
3943 # We found the default executable, but exeext='' is most
3944 # certainly right.
3945 break;;
3946 *.* )
Matthias Kloseb9621712010-04-24 17:59:49 +00003947 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003948 then :; else
3949 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3950 fi
3951 # We set ac_cv_exeext here because the later test for it is not
3952 # safe: cross compilers may not add the suffix if given an `-o'
3953 # argument, so we may need to know it at that point already.
3954 # Even if this section looks crufty: it has the advantage of
3955 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003956 break;;
3957 * )
3958 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003959 esac
3960done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003961test "$ac_cv_exeext" = no && ac_cv_exeext=
3962
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003963else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003964 ac_file=''
3965fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003966if test -z "$ac_file"; then :
3967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3968$as_echo "no" >&6; }
3969$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003970sed 's/^/| /' conftest.$ac_ext >&5
3971
Matthias Kloseb9621712010-04-24 17:59:49 +00003972{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3973$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02003974as_fn_error 77 "C compiler cannot create executables
Victor Stinnere0be4232011-10-25 13:06:09 +02003975See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00003976else
3977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3978$as_echo "yes" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003979fi
Matthias Kloseb9621712010-04-24 17:59:49 +00003980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3981$as_echo_n "checking for C compiler default output file name... " >&6; }
3982{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3983$as_echo "$ac_file" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003984ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003985
Matthias Kloseb9621712010-04-24 17:59:49 +00003986rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003987ac_clean_files=$ac_clean_files_save
Matthias Kloseb9621712010-04-24 17:59:49 +00003988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3989$as_echo_n "checking for suffix of executables... " >&6; }
3990if { { ac_try="$ac_link"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003991case "(($ac_try" in
3992 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3993 *) ac_try_echo=$ac_try;;
3994esac
Matthias Kloseb9621712010-04-24 17:59:49 +00003995eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3996$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003997 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003998 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00003999 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4000 test $ac_status = 0; }; then :
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004001 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4002# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4003# work properly (i.e., refer to `conftest.exe'), while it won't with
4004# `rm'.
4005for ac_file in conftest.exe conftest conftest.*; do
4006 test -f "$ac_file" || continue
4007 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004008 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004009 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4010 break;;
4011 * ) break;;
4012 esac
4013done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004014else
Matthias Kloseb9621712010-04-24 17:59:49 +00004015 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4016$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004017as_fn_error $? "cannot compute suffix of executables: cannot compile and link
Victor Stinnere0be4232011-10-25 13:06:09 +02004018See \`config.log' for more details" "$LINENO" 5; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004019fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004020rm -f conftest conftest$ac_cv_exeext
4021{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4022$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004023
4024rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004025EXEEXT=$ac_cv_exeext
4026ac_exeext=$EXEEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004027cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4028/* end confdefs.h. */
4029#include <stdio.h>
4030int
4031main ()
4032{
4033FILE *f = fopen ("conftest.out", "w");
4034 return ferror (f) || fclose (f) != 0;
4035
4036 ;
4037 return 0;
4038}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004039_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004040ac_clean_files="$ac_clean_files conftest.out"
4041# Check that the compiler produces executables we can run. If not, either
4042# the compiler is broken, or we cross compile.
4043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4044$as_echo_n "checking whether we are cross compiling... " >&6; }
4045if test "$cross_compiling" != yes; then
4046 { { ac_try="$ac_link"
4047case "(($ac_try" in
4048 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4049 *) ac_try_echo=$ac_try;;
4050esac
4051eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4052$as_echo "$ac_try_echo"; } >&5
4053 (eval "$ac_link") 2>&5
4054 ac_status=$?
4055 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4056 test $ac_status = 0; }
4057 if { ac_try='./conftest$ac_cv_exeext'
4058 { { case "(($ac_try" in
4059 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4060 *) ac_try_echo=$ac_try;;
4061esac
4062eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4063$as_echo "$ac_try_echo"; } >&5
4064 (eval "$ac_try") 2>&5
4065 ac_status=$?
4066 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4067 test $ac_status = 0; }; }; then
4068 cross_compiling=no
4069 else
4070 if test "$cross_compiling" = maybe; then
4071 cross_compiling=yes
4072 else
4073 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4074$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004075as_fn_error $? "cannot run C compiled programs.
Matthias Kloseb9621712010-04-24 17:59:49 +00004076If you meant to cross compile, use \`--host'.
Victor Stinnere0be4232011-10-25 13:06:09 +02004077See \`config.log' for more details" "$LINENO" 5; }
Matthias Kloseb9621712010-04-24 17:59:49 +00004078 fi
4079 fi
4080fi
4081{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4082$as_echo "$cross_compiling" >&6; }
4083
4084rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4085ac_clean_files=$ac_clean_files_save
4086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4087$as_echo_n "checking for suffix of object files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004088if ${ac_cv_objext+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004089 $as_echo_n "(cached) " >&6
4090else
4091 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004092/* end confdefs.h. */
4093
4094int
4095main ()
4096{
4097
4098 ;
4099 return 0;
4100}
4101_ACEOF
4102rm -f conftest.o conftest.obj
Matthias Kloseb9621712010-04-24 17:59:49 +00004103if { { ac_try="$ac_compile"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004104case "(($ac_try" in
4105 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4106 *) ac_try_echo=$ac_try;;
4107esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004108eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4109$as_echo "$ac_try_echo"; } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004110 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004111 ac_status=$?
Matthias Kloseb9621712010-04-24 17:59:49 +00004112 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4113 test $ac_status = 0; }; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004114 for ac_file in conftest.o conftest.obj conftest.*; do
4115 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00004116 case $ac_file in
Matthias Kloseb9621712010-04-24 17:59:49 +00004117 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004118 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4119 break;;
4120 esac
4121done
4122else
Matthias Kloseb9621712010-04-24 17:59:49 +00004123 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004124sed 's/^/| /' conftest.$ac_ext >&5
4125
Matthias Kloseb9621712010-04-24 17:59:49 +00004126{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4127$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004128as_fn_error $? "cannot compute suffix of object files: cannot compile
Victor Stinnere0be4232011-10-25 13:06:09 +02004129See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004130fi
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00004131rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004132fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004133{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4134$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004135OBJEXT=$ac_cv_objext
4136ac_objext=$OBJEXT
Matthias Kloseb9621712010-04-24 17:59:49 +00004137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4138$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004139if ${ac_cv_c_compiler_gnu+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004140 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004141else
Matthias Kloseb9621712010-04-24 17:59:49 +00004142 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004143/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004144
Martin v. Löwis11437992002-04-12 09:54:03 +00004145int
4146main ()
4147{
4148#ifndef __GNUC__
4149 choke me
4150#endif
4151
4152 ;
4153 return 0;
4154}
4155_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004156if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004157 ac_compiler_gnu=yes
4158else
Matthias Kloseb9621712010-04-24 17:59:49 +00004159 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004160fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004161rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004162ac_cv_c_compiler_gnu=$ac_compiler_gnu
4163
4164fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004165{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4166$as_echo "$ac_cv_c_compiler_gnu" >&6; }
4167if test $ac_compiler_gnu = yes; then
4168 GCC=yes
4169else
4170 GCC=
4171fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004172ac_test_CFLAGS=${CFLAGS+set}
4173ac_save_CFLAGS=$CFLAGS
Matthias Kloseb9621712010-04-24 17:59:49 +00004174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4175$as_echo_n "checking whether $CC accepts -g... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004176if ${ac_cv_prog_cc_g+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004177 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004178else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004179 ac_save_c_werror_flag=$ac_c_werror_flag
4180 ac_c_werror_flag=yes
4181 ac_cv_prog_cc_g=no
4182 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004183 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004184/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004185
Martin v. Löwis11437992002-04-12 09:54:03 +00004186int
4187main ()
4188{
4189
4190 ;
4191 return 0;
4192}
4193_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004194if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumf78abae1997-01-21 22:02:36 +00004195 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004196else
Matthias Kloseb9621712010-04-24 17:59:49 +00004197 CFLAGS=""
4198 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004199/* end confdefs.h. */
4200
4201int
4202main ()
4203{
4204
4205 ;
4206 return 0;
4207}
4208_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004209if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004210
Matthias Kloseb9621712010-04-24 17:59:49 +00004211else
4212 ac_c_werror_flag=$ac_save_c_werror_flag
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004213 CFLAGS="-g"
Matthias Kloseb9621712010-04-24 17:59:49 +00004214 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004215/* end confdefs.h. */
4216
4217int
4218main ()
4219{
4220
4221 ;
4222 return 0;
4223}
4224_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004225if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004226 ac_cv_prog_cc_g=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00004227fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004228rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004229fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004230rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4231fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004232rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4233 ac_c_werror_flag=$ac_save_c_werror_flag
4234fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004235{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4236$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004237if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004238 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004239elif test $ac_cv_prog_cc_g = yes; then
4240 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00004241 CFLAGS="-g -O2"
4242 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004243 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004244 fi
4245else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00004246 if test "$GCC" = yes; then
4247 CFLAGS="-O2"
4248 else
4249 CFLAGS=
4250 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004251fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4253$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004254if ${ac_cv_prog_cc_c89+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004255 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004256else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004257 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00004258ac_save_CC=$CC
Matthias Kloseb9621712010-04-24 17:59:49 +00004259cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004260/* end confdefs.h. */
4261#include <stdarg.h>
4262#include <stdio.h>
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004263struct stat;
Skip Montanaro6dead952003-09-25 14:50:04 +00004264/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4265struct buf { int x; };
4266FILE * (*rcsopen) (struct buf *, struct stat *, int);
4267static char *e (p, i)
4268 char **p;
4269 int i;
4270{
4271 return p[i];
4272}
4273static char *f (char * (*g) (char **, int), char **p, ...)
4274{
4275 char *s;
4276 va_list v;
4277 va_start (v,p);
4278 s = g (p, va_arg (v,int));
4279 va_end (v);
4280 return s;
4281}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004282
4283/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4284 function prototypes and stuff, but not '\xHH' hex character constants.
4285 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004286 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00004287 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4288 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004289 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00004290int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4291
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004292/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4293 inside strings and character constants. */
4294#define FOO(x) 'x'
4295int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4296
Skip Montanaro6dead952003-09-25 14:50:04 +00004297int test (int i, double x);
4298struct s1 {int (*f) (int a);};
4299struct s2 {int (*f) (double a);};
4300int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4301int argc;
4302char **argv;
4303int
4304main ()
4305{
4306return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4307 ;
4308 return 0;
4309}
4310_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004311for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4312 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00004313do
4314 CC="$ac_save_CC $ac_arg"
Matthias Kloseb9621712010-04-24 17:59:49 +00004315 if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004316 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00004317fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004318rm -f core conftest.err conftest.$ac_objext
4319 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00004320done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004321rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004322CC=$ac_save_CC
4323
4324fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004325# AC_CACHE_VAL
4326case "x$ac_cv_prog_cc_c89" in
4327 x)
Matthias Kloseb9621712010-04-24 17:59:49 +00004328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4329$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004330 xno)
Matthias Kloseb9621712010-04-24 17:59:49 +00004331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4332$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004333 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004334 CC="$CC $ac_cv_prog_cc_c89"
Matthias Kloseb9621712010-04-24 17:59:49 +00004335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4336$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00004337esac
Matthias Kloseb9621712010-04-24 17:59:49 +00004338if test "x$ac_cv_prog_cc_c89" != xno; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004339
Matthias Kloseb9621712010-04-24 17:59:49 +00004340fi
Skip Montanaro6dead952003-09-25 14:50:04 +00004341
Martin v. Löwis11437992002-04-12 09:54:03 +00004342ac_ext=c
4343ac_cpp='$CPP $CPPFLAGS'
4344ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4345ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4346ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004347
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004348
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004349
4350
Matthias Kloseb9621712010-04-24 17:59:49 +00004351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-cxx-main=<compiler>" >&5
4352$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004353
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004354# Check whether --with-cxx_main was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00004355if test "${with_cxx_main+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004356 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004357
4358 case $withval in
4359 no) with_cxx_main=no
4360 MAINCC='$(CC)';;
4361 yes) with_cxx_main=yes
4362 MAINCC='$(CXX)';;
4363 *) with_cxx_main=yes
4364 MAINCC=$withval
4365 if test -z "$CXX"
4366 then
4367 CXX=$withval
4368 fi;;
4369 esac
4370else
4371
4372 with_cxx_main=no
4373 MAINCC='$(CC)'
4374
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004375fi
4376
Matthias Kloseb9621712010-04-24 17:59:49 +00004377{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_cxx_main" >&5
4378$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004379
4380preset_cxx="$CXX"
4381if test -z "$CXX"
4382then
4383 case "$CC" in
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004384 gcc) if test -n "$ac_tool_prefix"; then
4385 # Extract the first word of "${ac_tool_prefix}g++", so it can be a program name with args.
4386set dummy ${ac_tool_prefix}g++; ac_word=$2
4387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4388$as_echo_n "checking for $ac_word... " >&6; }
4389if ${ac_cv_path_CXX+:} false; then :
4390 $as_echo_n "(cached) " >&6
4391else
4392 case $CXX in
4393 [\\/]* | ?:[\\/]*)
4394 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4395 ;;
4396 *)
4397 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4398for as_dir in notfound
4399do
4400 IFS=$as_save_IFS
4401 test -z "$as_dir" && as_dir=.
4402 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004403 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004404 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4405 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4406 break 2
4407 fi
4408done
4409 done
4410IFS=$as_save_IFS
4411
4412 ;;
4413esac
4414fi
4415CXX=$ac_cv_path_CXX
4416if test -n "$CXX"; then
4417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4418$as_echo "$CXX" >&6; }
4419else
4420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4421$as_echo "no" >&6; }
4422fi
4423
4424
4425fi
4426if test -z "$ac_cv_path_CXX"; then
4427 ac_pt_CXX=$CXX
4428 # Extract the first word of "g++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004429set dummy g++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4431$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004432if ${ac_cv_path_ac_pt_CXX+:} false; then :
4433 $as_echo_n "(cached) " >&6
4434else
4435 case $ac_pt_CXX in
4436 [\\/]* | ?:[\\/]*)
4437 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4438 ;;
4439 *)
4440 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4441for as_dir in notfound
4442do
4443 IFS=$as_save_IFS
4444 test -z "$as_dir" && as_dir=.
4445 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004446 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004447 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4448 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4449 break 2
4450 fi
4451done
4452 done
4453IFS=$as_save_IFS
4454
4455 ;;
4456esac
4457fi
4458ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4459if test -n "$ac_pt_CXX"; then
4460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4461$as_echo "$ac_pt_CXX" >&6; }
4462else
4463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4464$as_echo "no" >&6; }
4465fi
4466
4467 if test "x$ac_pt_CXX" = x; then
4468 CXX="g++"
4469 else
4470 case $cross_compiling:$ac_tool_warned in
4471yes:)
4472{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4473$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4474ac_tool_warned=yes ;;
4475esac
4476 CXX=$ac_pt_CXX
4477 fi
4478else
4479 CXX="$ac_cv_path_CXX"
4480fi
4481 ;;
4482 cc) if test -n "$ac_tool_prefix"; then
4483 # Extract the first word of "${ac_tool_prefix}c++", so it can be a program name with args.
4484set dummy ${ac_tool_prefix}c++; ac_word=$2
4485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4486$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004487if ${ac_cv_path_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004488 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004489else
4490 case $CXX in
4491 [\\/]* | ?:[\\/]*)
4492 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4493 ;;
4494 *)
4495 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4496for as_dir in notfound
4497do
4498 IFS=$as_save_IFS
4499 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004500 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004501 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004502 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004503 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004504 break 2
4505 fi
4506done
Matthias Kloseb9621712010-04-24 17:59:49 +00004507 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004508IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004509
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004510 ;;
4511esac
4512fi
4513CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004514if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4516$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004517else
Matthias Kloseb9621712010-04-24 17:59:49 +00004518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4519$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004520fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004521
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004522
4523fi
4524if test -z "$ac_cv_path_CXX"; then
4525 ac_pt_CXX=$CXX
4526 # Extract the first word of "c++", so it can be a program name with args.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004527set dummy c++; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4529$as_echo_n "checking for $ac_word... " >&6; }
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004530if ${ac_cv_path_ac_pt_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004531 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004532else
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004533 case $ac_pt_CXX in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004534 [\\/]* | ?:[\\/]*)
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004535 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 +00004536 ;;
4537 *)
4538 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4539for as_dir in notfound
4540do
4541 IFS=$as_save_IFS
4542 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004543 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004544 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004545 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00004546 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004547 break 2
4548 fi
4549done
Matthias Kloseb9621712010-04-24 17:59:49 +00004550 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004551IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004552
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004553 ;;
4554esac
4555fi
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004556ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4557if test -n "$ac_pt_CXX"; then
4558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4559$as_echo "$ac_pt_CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004560else
Matthias Kloseb9621712010-04-24 17:59:49 +00004561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4562$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004563fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004564
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004565 if test "x$ac_pt_CXX" = x; then
4566 CXX="c++"
4567 else
4568 case $cross_compiling:$ac_tool_warned in
4569yes:)
4570{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4571$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4572ac_tool_warned=yes ;;
4573esac
4574 CXX=$ac_pt_CXX
4575 fi
4576else
4577 CXX="$ac_cv_path_CXX"
4578fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004579 ;;
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004580 clang|*/clang) if test -n "$ac_tool_prefix"; then
4581 # Extract the first word of "${ac_tool_prefix}clang++", so it can be a program name with args.
4582set dummy ${ac_tool_prefix}clang++; ac_word=$2
Ned Deilycbfb9a52012-06-23 16:02:19 -07004583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4584$as_echo_n "checking for $ac_word... " >&6; }
4585if ${ac_cv_path_CXX+:} false; then :
4586 $as_echo_n "(cached) " >&6
4587else
4588 case $CXX in
4589 [\\/]* | ?:[\\/]*)
4590 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
4591 ;;
4592 *)
4593 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4594for as_dir in notfound
4595do
4596 IFS=$as_save_IFS
4597 test -z "$as_dir" && as_dir=.
4598 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004599 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Ned Deilycbfb9a52012-06-23 16:02:19 -07004600 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
4601 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4602 break 2
4603 fi
4604done
4605 done
4606IFS=$as_save_IFS
4607
Ned Deilycbfb9a52012-06-23 16:02:19 -07004608 ;;
4609esac
4610fi
4611CXX=$ac_cv_path_CXX
4612if test -n "$CXX"; then
4613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4614$as_echo "$CXX" >&6; }
4615else
4616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4617$as_echo "no" >&6; }
4618fi
4619
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004620
4621fi
4622if test -z "$ac_cv_path_CXX"; then
4623 ac_pt_CXX=$CXX
4624 # Extract the first word of "clang++", so it can be a program name with args.
4625set dummy clang++; ac_word=$2
4626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4627$as_echo_n "checking for $ac_word... " >&6; }
4628if ${ac_cv_path_ac_pt_CXX+:} false; then :
4629 $as_echo_n "(cached) " >&6
4630else
4631 case $ac_pt_CXX in
4632 [\\/]* | ?:[\\/]*)
4633 ac_cv_path_ac_pt_CXX="$ac_pt_CXX" # Let the user override the test with a path.
4634 ;;
4635 *)
4636 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4637for as_dir in notfound
4638do
4639 IFS=$as_save_IFS
4640 test -z "$as_dir" && as_dir=.
4641 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004642 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004643 ac_cv_path_ac_pt_CXX="$as_dir/$ac_word$ac_exec_ext"
4644 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4645 break 2
4646 fi
4647done
4648 done
4649IFS=$as_save_IFS
4650
4651 ;;
4652esac
4653fi
4654ac_pt_CXX=$ac_cv_path_ac_pt_CXX
4655if test -n "$ac_pt_CXX"; then
4656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_CXX" >&5
4657$as_echo "$ac_pt_CXX" >&6; }
4658else
4659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4660$as_echo "no" >&6; }
4661fi
4662
4663 if test "x$ac_pt_CXX" = x; then
4664 CXX="clang++"
4665 else
4666 case $cross_compiling:$ac_tool_warned in
4667yes:)
4668{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4669$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4670ac_tool_warned=yes ;;
4671esac
4672 CXX=$ac_pt_CXX
4673 fi
4674else
4675 CXX="$ac_cv_path_CXX"
4676fi
Ned Deilycbfb9a52012-06-23 16:02:19 -07004677 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004678 esac
4679 if test "$CXX" = "notfound"
4680 then
4681 CXX=""
4682 fi
4683fi
4684if test -z "$CXX"
4685then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004686 if test -n "$ac_tool_prefix"; then
4687 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4688 do
4689 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4690set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00004691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4692$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004693if ${ac_cv_prog_CXX+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004694 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004695else
4696 if test -n "$CXX"; then
4697 ac_cv_prog_CXX="$CXX" # Let the user override the test.
4698else
4699as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4700for as_dir in $PATH
4701do
4702 IFS=$as_save_IFS
4703 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004704 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004705 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004706 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00004707 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004708 break 2
4709 fi
4710done
Matthias Kloseb9621712010-04-24 17:59:49 +00004711 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004712IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004713
4714fi
4715fi
4716CXX=$ac_cv_prog_CXX
4717if test -n "$CXX"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00004718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4719$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004720else
Matthias Kloseb9621712010-04-24 17:59:49 +00004721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4722$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004723fi
4724
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004725
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004726 test -n "$CXX" && break
4727 done
4728fi
4729if test -z "$CXX"; then
4730 ac_ct_CXX=$CXX
4731 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
4732do
4733 # Extract the first word of "$ac_prog", so it can be a program name with args.
4734set dummy $ac_prog; ac_word=$2
4735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4736$as_echo_n "checking for $ac_word... " >&6; }
4737if ${ac_cv_prog_ac_ct_CXX+:} false; then :
4738 $as_echo_n "(cached) " >&6
4739else
4740 if test -n "$ac_ct_CXX"; then
4741 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4742else
4743as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4744for as_dir in $PATH
4745do
4746 IFS=$as_save_IFS
4747 test -z "$as_dir" && as_dir=.
4748 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00004749 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004750 ac_cv_prog_ac_ct_CXX="$ac_prog"
4751 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4752 break 2
4753 fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004754done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02004755 done
4756IFS=$as_save_IFS
4757
4758fi
4759fi
4760ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4761if test -n "$ac_ct_CXX"; then
4762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4763$as_echo "$ac_ct_CXX" >&6; }
4764else
4765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4766$as_echo "no" >&6; }
4767fi
4768
4769
4770 test -n "$ac_ct_CXX" && break
4771done
4772
4773 if test "x$ac_ct_CXX" = x; then
4774 CXX="notfound"
4775 else
4776 case $cross_compiling:$ac_tool_warned in
4777yes:)
4778{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4779$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4780ac_tool_warned=yes ;;
4781esac
4782 CXX=$ac_ct_CXX
4783 fi
4784fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004785
4786 if test "$CXX" = "notfound"
4787 then
4788 CXX=""
4789 fi
4790fi
4791if test "$preset_cxx" != "$CXX"
4792then
Matthias Kloseb9621712010-04-24 17:59:49 +00004793 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004794
4795 By default, distutils will build C++ extension modules with \"$CXX\".
4796 If this is not intended, then set CXX on the configure command line.
4797 " >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00004798$as_echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00004799
4800 By default, distutils will build C++ extension modules with \"$CXX\".
4801 If this is not intended, then set CXX on the configure command line.
4802 " >&2;}
4803fi
4804
4805
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -Wl,--no-as-needed" >&5
4807$as_echo_n "checking for -Wl,--no-as-needed... " >&6; }
4808save_LDFLAGS="$LDFLAGS"
4809LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
Martin v. Löwis11437992002-04-12 09:54:03 +00004810
Martin v. Löwis48e14d32011-05-09 07:37:45 +02004811cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4812/* end confdefs.h. */
4813
4814int
4815main ()
4816{
4817
4818 ;
4819 return 0;
4820}
4821_ACEOF
4822if ac_fn_c_try_link "$LINENO"; then :
4823 NO_AS_NEEDED="-Wl,--no-as-needed"
4824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4825$as_echo "yes" >&6; }
4826else
4827 NO_AS_NEEDED=""
4828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4829$as_echo "no" >&6; }
4830fi
4831rm -f core conftest.err conftest.$ac_objext \
4832 conftest$ac_exeext conftest.$ac_ext
4833LDFLAGS="$save_LDFLAGS"
4834
4835
4836
4837# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00004838ac_ext=c
4839ac_cpp='$CPP $CPPFLAGS'
4840ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4841ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4842ac_compiler_gnu=$ac_cv_c_compiler_gnu
Matthias Kloseb9621712010-04-24 17:59:49 +00004843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4844$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004845# On Suns, sometimes $CPP names a directory.
4846if test -n "$CPP" && test -d "$CPP"; then
4847 CPP=
4848fi
4849if test -z "$CPP"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02004850 if ${ac_cv_prog_CPP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004851 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004852else
Martin v. Löwis11437992002-04-12 09:54:03 +00004853 # Double quotes because CPP needs to be expanded
4854 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4855 do
4856 ac_preproc_ok=false
4857for ac_c_preproc_warn_flag in '' yes
4858do
4859 # Use a header file that comes with gcc, so configuring glibc
4860 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004861 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4862 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004863 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00004864 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004865 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004866/* end confdefs.h. */
4867#ifdef __STDC__
4868# include <limits.h>
4869#else
4870# include <assert.h>
4871#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004872 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004873_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004874if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004875
Matthias Kloseb9621712010-04-24 17:59:49 +00004876else
Martin v. Löwis11437992002-04-12 09:54:03 +00004877 # Broken: fails on valid input.
4878continue
Jack Jansendd19cf82001-12-06 22:36:17 +00004879fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004880rm -f conftest.err conftest.i conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00004881
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004882 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004883 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004884 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004885/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004886#include <ac_nonexistent.h>
4887_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004888if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004889 # Broken: success on invalid input.
4890continue
4891else
Martin v. Löwis11437992002-04-12 09:54:03 +00004892 # Passes both tests.
4893ac_preproc_ok=:
4894break
4895fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004896rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004897
4898done
4899# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004900rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004901if $ac_preproc_ok; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004902 break
4903fi
4904
4905 done
4906 ac_cv_prog_CPP=$CPP
4907
4908fi
4909 CPP=$ac_cv_prog_CPP
4910else
4911 ac_cv_prog_CPP=$CPP
4912fi
Matthias Kloseb9621712010-04-24 17:59:49 +00004913{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4914$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004915ac_preproc_ok=false
4916for ac_c_preproc_warn_flag in '' yes
4917do
4918 # Use a header file that comes with gcc, so configuring glibc
4919 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00004920 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4921 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00004922 # On the NeXT, cc -E runs the code through the compiler's parser,
4923 # not just through cpp. "Syntax error" is here to catch this case.
Matthias Kloseb9621712010-04-24 17:59:49 +00004924 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004925/* end confdefs.h. */
4926#ifdef __STDC__
4927# include <limits.h>
4928#else
4929# include <assert.h>
4930#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00004931 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00004932_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004933if ac_fn_c_try_cpp "$LINENO"; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00004934
Matthias Kloseb9621712010-04-24 17:59:49 +00004935else
Martin v. Löwis11437992002-04-12 09:54:03 +00004936 # Broken: fails on valid input.
4937continue
4938fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004939rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004940
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004941 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00004942 # can be detected and how.
Matthias Kloseb9621712010-04-24 17:59:49 +00004943 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00004944/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004945#include <ac_nonexistent.h>
4946_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00004947if ac_fn_c_try_cpp "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00004948 # Broken: success on invalid input.
4949continue
4950else
Martin v. Löwis11437992002-04-12 09:54:03 +00004951 # Passes both tests.
4952ac_preproc_ok=:
4953break
4954fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004955rm -f conftest.err conftest.i conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004956
4957done
4958# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004959rm -f conftest.i conftest.err conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00004960if $ac_preproc_ok; then :
4961
Martin v. Löwis11437992002-04-12 09:54:03 +00004962else
Matthias Kloseb9621712010-04-24 17:59:49 +00004963 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4964$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02004965as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
Victor Stinnere0be4232011-10-25 13:06:09 +02004966See \`config.log' for more details" "$LINENO" 5; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004967fi
4968
4969ac_ext=c
4970ac_cpp='$CPP $CPPFLAGS'
4971ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4972ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4973ac_compiler_gnu=$ac_cv_c_compiler_gnu
4974
4975
Matthias Kloseb9621712010-04-24 17:59:49 +00004976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4977$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02004978if ${ac_cv_path_GREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00004979 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00004980else
Matthias Kloseb9621712010-04-24 17:59:49 +00004981 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004982 ac_path_GREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00004983 # Loop through the user's path and test for each of PROGNAME-LIST
4984 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004985for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4986do
4987 IFS=$as_save_IFS
4988 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00004989 for ac_prog in grep ggrep; do
4990 for ac_exec_ext in '' $ac_executable_extensions; do
4991 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00004992 as_fn_executable_p "$ac_path_GREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00004993# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004994 # Check for GNU $ac_path_GREP
4995case `"$ac_path_GREP" --version 2>&1` in
4996*GNU*)
4997 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4998*)
4999 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005000 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005001 while :
5002 do
5003 cat "conftest.in" "conftest.in" >"conftest.tmp"
5004 mv "conftest.tmp" "conftest.in"
5005 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005006 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005007 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5008 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005009 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005010 if test $ac_count -gt ${ac_path_GREP_max-0}; then
5011 # Best one so far, save it but keep looking for a better one
5012 ac_cv_path_GREP="$ac_path_GREP"
5013 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00005014 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005015 # 10*(2^10) chars as input seems more than enough
5016 test $ac_count -gt 10 && break
5017 done
5018 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5019esac
5020
Matthias Kloseb9621712010-04-24 17:59:49 +00005021 $ac_path_GREP_found && break 3
5022 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005023 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005024 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005025IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005026 if test -z "$ac_cv_path_GREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005027 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 +00005028 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005029else
5030 ac_cv_path_GREP=$GREP
5031fi
5032
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005033fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005034{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5035$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005036 GREP="$ac_cv_path_GREP"
5037
5038
Matthias Kloseb9621712010-04-24 17:59:49 +00005039{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5040$as_echo_n "checking for egrep... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005041if ${ac_cv_path_EGREP+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005042 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005043else
5044 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5045 then ac_cv_path_EGREP="$GREP -E"
5046 else
Matthias Kloseb9621712010-04-24 17:59:49 +00005047 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005048 ac_path_EGREP_found=false
Matthias Kloseb9621712010-04-24 17:59:49 +00005049 # Loop through the user's path and test for each of PROGNAME-LIST
5050 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005051for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5052do
5053 IFS=$as_save_IFS
5054 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005055 for ac_prog in egrep; do
5056 for ac_exec_ext in '' $ac_executable_extensions; do
5057 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005058 as_fn_executable_p "$ac_path_EGREP" || continue
Matthias Kloseb9621712010-04-24 17:59:49 +00005059# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005060 # Check for GNU $ac_path_EGREP
5061case `"$ac_path_EGREP" --version 2>&1` in
5062*GNU*)
5063 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5064*)
5065 ac_count=0
Matthias Kloseb9621712010-04-24 17:59:49 +00005066 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005067 while :
5068 do
5069 cat "conftest.in" "conftest.in" >"conftest.tmp"
5070 mv "conftest.tmp" "conftest.in"
5071 cp "conftest.in" "conftest.nl"
Matthias Kloseb9621712010-04-24 17:59:49 +00005072 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005073 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5074 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Matthias Kloseb9621712010-04-24 17:59:49 +00005075 as_fn_arith $ac_count + 1 && ac_count=$as_val
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005076 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5077 # Best one so far, save it but keep looking for a better one
5078 ac_cv_path_EGREP="$ac_path_EGREP"
5079 ac_path_EGREP_max=$ac_count
5080 fi
5081 # 10*(2^10) chars as input seems more than enough
5082 test $ac_count -gt 10 && break
5083 done
5084 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5085esac
5086
Matthias Kloseb9621712010-04-24 17:59:49 +00005087 $ac_path_EGREP_found && break 3
5088 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005089 done
Matthias Kloseb9621712010-04-24 17:59:49 +00005090 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005091IFS=$as_save_IFS
Matthias Kloseb9621712010-04-24 17:59:49 +00005092 if test -z "$ac_cv_path_EGREP"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005093 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 +00005094 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005095else
5096 ac_cv_path_EGREP=$EGREP
5097fi
5098
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005099 fi
5100fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005101{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5102$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00005103 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00005104
5105
Matthias Kloseb9621712010-04-24 17:59:49 +00005106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5107$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005108if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005109 $as_echo_n "(cached) " >&6
5110else
5111 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005112/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +00005113#include <stdlib.h>
5114#include <stdarg.h>
5115#include <string.h>
5116#include <float.h>
5117
5118int
5119main ()
5120{
5121
5122 ;
5123 return 0;
5124}
5125_ACEOF
5126if ac_fn_c_try_compile "$LINENO"; then :
5127 ac_cv_header_stdc=yes
5128else
5129 ac_cv_header_stdc=no
5130fi
5131rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5132
5133if test $ac_cv_header_stdc = yes; then
5134 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5135 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5136/* end confdefs.h. */
5137#include <string.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005138
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005139_ACEOF
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005140if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00005141 $EGREP "memchr" >/dev/null 2>&1; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005142
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005143else
Matthias Kloseb9621712010-04-24 17:59:49 +00005144 ac_cv_header_stdc=no
Ronald Oussoren74f29b42009-09-20 20:09:26 +00005145fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00005146rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005147
Matthias Kloseb9621712010-04-24 17:59:49 +00005148fi
5149
5150if test $ac_cv_header_stdc = yes; then
5151 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5152 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5153/* end confdefs.h. */
5154#include <stdlib.h>
5155
5156_ACEOF
5157if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5158 $EGREP "free" >/dev/null 2>&1; then :
5159
5160else
5161 ac_cv_header_stdc=no
5162fi
5163rm -f conftest*
5164
5165fi
5166
5167if test $ac_cv_header_stdc = yes; then
5168 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5169 if test "$cross_compiling" = yes; then :
5170 :
5171else
5172 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5173/* end confdefs.h. */
5174#include <ctype.h>
5175#include <stdlib.h>
5176#if ((' ' & 0x0FF) == 0x020)
5177# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5178# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5179#else
5180# define ISLOWER(c) \
5181 (('a' <= (c) && (c) <= 'i') \
5182 || ('j' <= (c) && (c) <= 'r') \
5183 || ('s' <= (c) && (c) <= 'z'))
5184# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5185#endif
5186
5187#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5188int
5189main ()
5190{
5191 int i;
5192 for (i = 0; i < 256; i++)
5193 if (XOR (islower (i), ISLOWER (i))
5194 || toupper (i) != TOUPPER (i))
5195 return 2;
5196 return 0;
5197}
5198_ACEOF
5199if ac_fn_c_try_run "$LINENO"; then :
5200
5201else
5202 ac_cv_header_stdc=no
5203fi
5204rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5205 conftest.$ac_objext conftest.beam conftest.$ac_ext
5206fi
5207
5208fi
5209fi
5210{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5211$as_echo "$ac_cv_header_stdc" >&6; }
5212if test $ac_cv_header_stdc = yes; then
5213
5214$as_echo "#define STDC_HEADERS 1" >>confdefs.h
5215
5216fi
5217
5218# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5219for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5220 inttypes.h stdint.h unistd.h
5221do :
5222 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5223ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5224"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02005225if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005226 cat >>confdefs.h <<_ACEOF
5227#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5228_ACEOF
5229
5230fi
5231
5232done
5233
5234
5235
5236 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 +02005237if test "x$ac_cv_header_minix_config_h" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005238 MINIX=yes
5239else
5240 MINIX=
5241fi
5242
5243
5244 if test "$MINIX" = yes; then
5245
5246$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5247
5248
5249$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5250
5251
5252$as_echo "#define _MINIX 1" >>confdefs.h
5253
5254 fi
5255
5256
5257 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5258$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005259if ${ac_cv_safe_to_define___extensions__+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005260 $as_echo_n "(cached) " >&6
5261else
5262 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5263/* end confdefs.h. */
5264
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005265# define __EXTENSIONS__ 1
5266 $ac_includes_default
Matthias Kloseb9621712010-04-24 17:59:49 +00005267int
5268main ()
5269{
5270
5271 ;
5272 return 0;
5273}
5274_ACEOF
5275if ac_fn_c_try_compile "$LINENO"; then :
5276 ac_cv_safe_to_define___extensions__=yes
5277else
5278 ac_cv_safe_to_define___extensions__=no
5279fi
5280rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5281fi
5282{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5283$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5284 test $ac_cv_safe_to_define___extensions__ = yes &&
5285 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5286
5287 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5288
5289 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5290
5291 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5292
5293 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5294
5295
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005296
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005297# Check for unsupported systems
5298case $ac_sys_system/$ac_sys_release in
5299atheos*|Linux*/1*)
5300 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
5301 echo See README for details.
5302 exit 1;;
5303esac
5304
5305
Matthias Kloseb9621712010-04-24 17:59:49 +00005306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-suffix" >&5
5307$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005308
5309# Check whether --with-suffix was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005310if test "${with_suffix+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005311 withval=$with_suffix;
5312 case $withval in
5313 no) EXEEXT=;;
5314 yes) EXEEXT=.exe;;
5315 *) EXEEXT=$withval;;
5316 esac
5317fi
5318
Matthias Kloseb9621712010-04-24 17:59:49 +00005319{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXEEXT" >&5
5320$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005321
5322# Test whether we're running on a non-case-sensitive system, in which
5323# case we give a warning if no ext is given
5324
Matthias Kloseb9621712010-04-24 17:59:49 +00005325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for case-insensitive build directory" >&5
5326$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005327if test ! -d CaseSensitiveTestDir; then
5328mkdir CaseSensitiveTestDir
5329fi
5330
5331if test -d casesensitivetestdir
5332then
Matthias Kloseb9621712010-04-24 17:59:49 +00005333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5334$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005335 BUILDEXEEXT=.exe
5336else
Matthias Kloseb9621712010-04-24 17:59:49 +00005337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5338$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005339 BUILDEXEEXT=$EXEEXT
5340fi
5341rmdir CaseSensitiveTestDir
5342
5343case $MACHDEP in
5344bsdos*)
5345 case $CC in
5346 gcc) CC="$CC -D_HAVE_BSDI";;
5347 esac;;
5348esac
5349
5350case $ac_sys_system in
5351hp*|HP*)
5352 case $CC in
5353 cc|*/cc) CC="$CC -Ae";;
5354 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005355esac
5356
doko@python.org3e6e2ac2013-01-25 13:12:29 +01005357MULTIARCH=$($CC --print-multiarch 2>/dev/null)
5358
5359
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005360
5361
Matthias Kloseb9621712010-04-24 17:59:49 +00005362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBRARY" >&5
5363$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005364if test -z "$LIBRARY"
5365then
Barry Warsawf040d7d2010-10-18 17:09:07 +00005366 LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005367fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005368{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBRARY" >&5
5369$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005370
5371# LDLIBRARY is the name of the library to link against (as opposed to the
5372# name of the library into which to insert object files). BLDLIBRARY is also
5373# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
5374# is blank as the main program is not linked directly against LDLIBRARY.
5375# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
5376# systems without shared libraries, LDLIBRARY is the same as LIBRARY
5377# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
5378# DLLLIBRARY is the shared (i.e., DLL) library.
5379#
5380# RUNSHARED is used to run shared python without installed libraries
5381#
5382# INSTSONAME is the name of the shared library that will be use to install
5383# on the system - some systems like version suffix, others don't
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005384#
5385# LDVERSION is the shared library version number, normally the Python version
5386# with the ABI build flags appended.
5387
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005388
5389
5390
5391
5392
5393
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005394
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005395LDLIBRARY="$LIBRARY"
5396BLDLIBRARY='$(LDLIBRARY)'
5397INSTSONAME='$(LDLIBRARY)'
5398DLLLIBRARY=''
5399LDLIBRARYDIR=''
5400RUNSHARED=''
Barry Warsaw14d98ac2010-11-24 19:43:47 +00005401LDVERSION="$VERSION"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005402
5403# LINKCC is the command that links the python executable -- default is $(CC).
5404# If CXX is set, and if it is needed to link a main function that was
5405# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
5406# python might then depend on the C++ runtime
5407# This is altered for AIX in order to build the export list before
5408# linking.
5409
Matthias Kloseb9621712010-04-24 17:59:49 +00005410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKCC" >&5
5411$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005412if test -z "$LINKCC"
5413then
5414 LINKCC='$(PURIFY) $(MAINCC)'
5415 case $ac_sys_system in
5416 AIX*)
5417 exp_extra="\"\""
5418 if test $ac_sys_release -ge 5 -o \
5419 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
5420 exp_extra="."
5421 fi
5422 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005423 QNX*)
5424 # qcc must be used because the other compilers do not
5425 # support -N.
5426 LINKCC=qcc;;
5427 esac
5428fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005429{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKCC" >&5
5430$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005431
5432# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
5433# make sure we default having it set to "no": this is used by
5434# distutils.unixccompiler to know if it should add --enable-new-dtags
5435# to linker command lines, and failing to detect GNU ld simply results
5436# in the same bahaviour as before.
5437
Matthias Kloseb9621712010-04-24 17:59:49 +00005438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
5439$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005440ac_prog=ld
5441if test "$GCC" = yes; then
5442 ac_prog=`$CC -print-prog-name=ld`
5443fi
5444case `"$ac_prog" -V 2>&1 < /dev/null` in
5445 *GNU*)
5446 GNULD=yes;;
5447 *)
5448 GNULD=no;;
5449esac
Matthias Kloseb9621712010-04-24 17:59:49 +00005450{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNULD" >&5
5451$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005452
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
5454$as_echo_n "checking for inline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005455if ${ac_cv_c_inline+:} false; then :
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005456 $as_echo_n "(cached) " >&6
5457else
5458 ac_cv_c_inline=no
5459for ac_kw in inline __inline__ __inline; do
5460 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5461/* end confdefs.h. */
5462#ifndef __cplusplus
5463typedef int foo_t;
5464static $ac_kw foo_t static_foo () {return 0; }
5465$ac_kw foo_t foo () {return 0; }
5466#endif
5467
5468_ACEOF
5469if ac_fn_c_try_compile "$LINENO"; then :
5470 ac_cv_c_inline=$ac_kw
5471fi
5472rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5473 test "$ac_cv_c_inline" != no && break
5474done
5475
5476fi
5477{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
5478$as_echo "$ac_cv_c_inline" >&6; }
5479
5480case $ac_cv_c_inline in
5481 inline | yes) ;;
5482 *)
5483 case $ac_cv_c_inline in
5484 no) ac_val=;;
5485 *) ac_val=$ac_cv_c_inline;;
5486 esac
5487 cat >>confdefs.h <<_ACEOF
5488#ifndef __cplusplus
5489#define inline $ac_val
5490#endif
5491_ACEOF
5492 ;;
5493esac
5494
5495if test "$ac_cv_c_inline" != no ; then
Benjamin Petersond7f73e92010-09-05 00:09:07 +00005496
5497$as_echo "#define USE_INLINE 1" >>confdefs.h
Daniel Stutzbacha606faa2010-08-31 19:51:07 +00005498
5499
5500fi
5501
5502
Matthias Kloseb9621712010-04-24 17:59:49 +00005503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-shared" >&5
5504$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005505# Check whether --enable-shared was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005506if test "${enable_shared+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005507 enableval=$enable_shared;
5508fi
5509
5510
5511if test -z "$enable_shared"
5512then
5513 case $ac_sys_system in
Antoine Pitrou6103ab12009-10-24 20:11:21 +00005514 CYGWIN*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005515 enable_shared="yes";;
5516 *)
5517 enable_shared="no";;
5518 esac
5519fi
Matthias Kloseb9621712010-04-24 17:59:49 +00005520{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
5521$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005522
Matthias Kloseb9621712010-04-24 17:59:49 +00005523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-profiling" >&5
5524$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005525# Check whether --enable-profiling was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00005526if test "${enable_profiling+set}" = set; then :
doko@ubuntu.comba015832012-06-30 16:52:05 +02005527 enableval=$enable_profiling;
5528fi
5529
5530if test "x$enable_profiling" = xyes; then
5531 ac_save_cc="$CC"
5532 CC="$(CC) -pg"
Matthias Kloseb9621712010-04-24 17:59:49 +00005533 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005534/* end confdefs.h. */
5535int main() { return 0; }
5536_ACEOF
doko@ubuntu.comba015832012-06-30 16:52:05 +02005537if ac_fn_c_try_link "$LINENO"; then :
5538
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005539else
doko@ubuntu.comba015832012-06-30 16:52:05 +02005540 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005541fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005542rm -f core conftest.err conftest.$ac_objext \
5543 conftest$ac_exeext conftest.$ac_ext
5544 CC="$ac_save_cc"
5545else
5546 enable_profiling=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005547fi
doko@ubuntu.comba015832012-06-30 16:52:05 +02005548{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_profiling" >&5
5549$as_echo "$enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005550
doko@ubuntu.comba015832012-06-30 16:52:05 +02005551if test "x$enable_profiling" = xyes; then
5552 BASECFLAGS="-pg $BASECFLAGS"
5553 LDFLAGS="-pg $LDFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005554fi
5555
Matthias Kloseb9621712010-04-24 17:59:49 +00005556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDLIBRARY" >&5
5557$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005558
5559# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
5560# library that we build, but we do not want to link against it (we
5561# will find it with a -framework option). For this reason there is an
5562# extra variable BLDLIBRARY against which Python and the extension
5563# modules are linked, BLDLIBRARY. This is normally the same as
5564# LDLIBRARY, but empty for MacOSX framework builds.
5565if test "$enable_framework"
5566then
5567 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
5568 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
5569 BLDLIBRARY=''
5570else
5571 BLDLIBRARY='$(LDLIBRARY)'
5572fi
5573
5574# Other platforms follow
5575if test $enable_shared = "yes"; then
5576
Matthias Kloseb9621712010-04-24 17:59:49 +00005577$as_echo "#define Py_ENABLE_SHARED 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005578
5579 case $ac_sys_system in
5580 CYGWIN*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005581 LDLIBRARY='libpython$(LDVERSION).dll.a'
5582 DLLLIBRARY='libpython$(LDVERSION).dll'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005583 ;;
5584 SunOS*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005585 LDLIBRARY='libpython$(LDVERSION).so'
5586 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005587 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
5588 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005589 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005590 then
5591 PY3LIBRARY=libpython3.so
5592 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005593 ;;
Charles-François Natali749400a2011-07-24 22:41:18 +02005594 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005595 LDLIBRARY='libpython$(LDVERSION).so'
5596 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005597 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
5598 case $ac_sys_system in
5599 FreeBSD*)
5600 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
5601 ;;
5602 esac
5603 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis9b142aa2011-02-05 20:26:52 +00005604 if test "$with_pydebug" != yes
Martin v. Löwisd1fc34d2010-12-30 14:55:47 +00005605 then
5606 PY3LIBRARY=libpython3.so
5607 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005608 ;;
5609 hp*|HP*)
5610 case `uname -m` in
5611 ia64)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005612 LDLIBRARY='libpython$(LDVERSION).so'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005613 ;;
5614 *)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005615 LDLIBRARY='libpython$(LDVERSION).sl'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005616 ;;
5617 esac
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005618 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005619 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
5620 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005621 Darwin*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005622 LDLIBRARY='libpython$(LDVERSION).dylib'
5623 BLDLIBRARY='-L. -lpython$(LDVERSION)'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005624 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
5625 ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005626 AIX*)
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005627 LDLIBRARY='libpython$(LDVERSION).so'
Antoine Pitrou8e6b4072010-09-10 19:44:44 +00005628 RUNSHARED=LIBPATH=`pwd`:${LIBPATH}
5629 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005630
5631 esac
5632else # shared is disabled
5633 case $ac_sys_system in
5634 CYGWIN*)
5635 BLDLIBRARY='$(LIBRARY)'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00005636 LDLIBRARY='libpython$(LDVERSION).dll.a'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005637 ;;
5638 esac
5639fi
5640
doko@ubuntu.com1abe1c52012-06-30 20:42:45 +02005641if test "$cross_compiling" = yes; then
5642 RUNSHARED=
5643fi
5644
Matthias Kloseb9621712010-04-24 17:59:49 +00005645{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDLIBRARY" >&5
5646$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005647
5648if test -n "$ac_tool_prefix"; then
5649 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5650set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5652$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005653if ${ac_cv_prog_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005654 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005655else
5656 if test -n "$RANLIB"; then
5657 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5658else
5659as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5660for as_dir in $PATH
5661do
5662 IFS=$as_save_IFS
5663 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005664 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005665 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005666 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005667 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005668 break 2
5669 fi
5670done
Matthias Kloseb9621712010-04-24 17:59:49 +00005671 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005672IFS=$as_save_IFS
5673
5674fi
5675fi
5676RANLIB=$ac_cv_prog_RANLIB
5677if test -n "$RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5679$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005680else
Matthias Kloseb9621712010-04-24 17:59:49 +00005681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5682$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005683fi
5684
5685
5686fi
5687if test -z "$ac_cv_prog_RANLIB"; then
5688 ac_ct_RANLIB=$RANLIB
5689 # Extract the first word of "ranlib", so it can be a program name with args.
5690set dummy ranlib; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5692$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005693if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005694 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005695else
5696 if test -n "$ac_ct_RANLIB"; then
5697 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5698else
5699as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5700for as_dir in $PATH
5701do
5702 IFS=$as_save_IFS
5703 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005704 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005705 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005706 ac_cv_prog_ac_ct_RANLIB="ranlib"
Matthias Kloseb9621712010-04-24 17:59:49 +00005707 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005708 break 2
5709 fi
5710done
Matthias Kloseb9621712010-04-24 17:59:49 +00005711 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005712IFS=$as_save_IFS
5713
5714fi
5715fi
5716ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5717if test -n "$ac_ct_RANLIB"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5719$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005720else
Matthias Kloseb9621712010-04-24 17:59:49 +00005721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5722$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005723fi
5724
5725 if test "x$ac_ct_RANLIB" = x; then
5726 RANLIB=":"
5727 else
5728 case $cross_compiling:$ac_tool_warned in
5729yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00005730{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5731$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005732ac_tool_warned=yes ;;
5733esac
5734 RANLIB=$ac_ct_RANLIB
5735 fi
5736else
5737 RANLIB="$ac_cv_prog_RANLIB"
5738fi
5739
5740
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005741if test -n "$ac_tool_prefix"; then
5742 for ac_prog in ar aal
5743 do
5744 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5745set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00005746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5747$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02005748if ${ac_cv_prog_AR+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00005749 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005750else
5751 if test -n "$AR"; then
5752 ac_cv_prog_AR="$AR" # Let the user override the test.
5753else
5754as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5755for as_dir in $PATH
5756do
5757 IFS=$as_save_IFS
5758 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00005759 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005760 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005761 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +00005762 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005763 break 2
5764 fi
5765done
Matthias Kloseb9621712010-04-24 17:59:49 +00005766 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005767IFS=$as_save_IFS
5768
5769fi
5770fi
5771AR=$ac_cv_prog_AR
5772if test -n "$AR"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00005773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5774$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005775else
Matthias Kloseb9621712010-04-24 17:59:49 +00005776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5777$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005778fi
5779
5780
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005781 test -n "$AR" && break
5782 done
5783fi
5784if test -z "$AR"; then
5785 ac_ct_AR=$AR
5786 for ac_prog in ar aal
5787do
5788 # Extract the first word of "$ac_prog", so it can be a program name with args.
5789set dummy $ac_prog; ac_word=$2
5790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5791$as_echo_n "checking for $ac_word... " >&6; }
5792if ${ac_cv_prog_ac_ct_AR+:} false; then :
5793 $as_echo_n "(cached) " >&6
5794else
5795 if test -n "$ac_ct_AR"; then
5796 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5797else
5798as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5799for as_dir in $PATH
5800do
5801 IFS=$as_save_IFS
5802 test -z "$as_dir" && as_dir=.
5803 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall646eb1e2012-10-29 17:35:57 +00005804 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005805 ac_cv_prog_ac_ct_AR="$ac_prog"
5806 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5807 break 2
5808 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005809done
doko@ubuntu.com51f65942012-06-30 14:42:46 +02005810 done
5811IFS=$as_save_IFS
5812
5813fi
5814fi
5815ac_ct_AR=$ac_cv_prog_ac_ct_AR
5816if test -n "$ac_ct_AR"; then
5817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5818$as_echo "$ac_ct_AR" >&6; }
5819else
5820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5821$as_echo "no" >&6; }
5822fi
5823
5824
5825 test -n "$ac_ct_AR" && break
5826done
5827
5828 if test "x$ac_ct_AR" = x; then
5829 AR="ar"
5830 else
5831 case $cross_compiling:$ac_tool_warned in
5832yes:)
5833{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5834$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5835ac_tool_warned=yes ;;
5836esac
5837 AR=$ac_ct_AR
5838 fi
5839fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005840
5841
5842# tweak ARFLAGS only if the user didn't set it on the command line
5843
5844if test -z "$ARFLAGS"
5845then
5846 ARFLAGS="rc"
5847fi
5848
doko@ubuntu.com58844492012-06-30 18:25:32 +02005849if test -n "$ac_tool_prefix"; then
5850 for ac_prog in readelf
5851 do
5852 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5853set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5855$as_echo_n "checking for $ac_word... " >&6; }
5856if ${ac_cv_prog_READELF+:} false; then :
5857 $as_echo_n "(cached) " >&6
5858else
5859 if test -n "$READELF"; then
5860 ac_cv_prog_READELF="$READELF" # Let the user override the test.
5861else
5862as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5863for as_dir in $PATH
5864do
5865 IFS=$as_save_IFS
5866 test -z "$as_dir" && as_dir=.
5867 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005868 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02005869 ac_cv_prog_READELF="$ac_tool_prefix$ac_prog"
5870 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5871 break 2
5872 fi
5873done
5874 done
5875IFS=$as_save_IFS
5876
5877fi
5878fi
5879READELF=$ac_cv_prog_READELF
5880if test -n "$READELF"; then
5881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
5882$as_echo "$READELF" >&6; }
5883else
5884 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5885$as_echo "no" >&6; }
5886fi
5887
5888
5889 test -n "$READELF" && break
5890 done
5891fi
5892if test -z "$READELF"; then
5893 ac_ct_READELF=$READELF
5894 for ac_prog in readelf
5895do
5896 # Extract the first word of "$ac_prog", so it can be a program name with args.
5897set dummy $ac_prog; ac_word=$2
5898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5899$as_echo_n "checking for $ac_word... " >&6; }
5900if ${ac_cv_prog_ac_ct_READELF+:} false; then :
5901 $as_echo_n "(cached) " >&6
5902else
5903 if test -n "$ac_ct_READELF"; then
5904 ac_cv_prog_ac_ct_READELF="$ac_ct_READELF" # Let the user override the test.
5905else
5906as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5907for as_dir in $PATH
5908do
5909 IFS=$as_save_IFS
5910 test -z "$as_dir" && as_dir=.
5911 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005912 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
doko@ubuntu.com58844492012-06-30 18:25:32 +02005913 ac_cv_prog_ac_ct_READELF="$ac_prog"
5914 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5915 break 2
5916 fi
5917done
5918 done
5919IFS=$as_save_IFS
5920
5921fi
5922fi
5923ac_ct_READELF=$ac_cv_prog_ac_ct_READELF
5924if test -n "$ac_ct_READELF"; then
5925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_READELF" >&5
5926$as_echo "$ac_ct_READELF" >&6; }
5927else
5928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5929$as_echo "no" >&6; }
5930fi
5931
5932
5933 test -n "$ac_ct_READELF" && break
5934done
5935
5936 if test "x$ac_ct_READELF" = x; then
5937 READELF=":"
5938 else
5939 case $cross_compiling:$ac_tool_warned in
5940yes:)
5941{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5942$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5943ac_tool_warned=yes ;;
5944esac
5945 READELF=$ac_ct_READELF
5946 fi
5947fi
5948
5949if test "$cross_compiling" = yes; then
5950 case "$READELF" in
5951 readelf|:)
5952 as_fn_error $? "readelf for the host is required for cross builds" "$LINENO" 5
5953 ;;
5954 esac
5955fi
5956
5957
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005958
Matthias Klosec4c48422012-10-21 23:05:35 +02005959for ac_prog in python$PACKAGE_VERSION python3 python
5960do
5961 # Extract the first word of "$ac_prog", so it can be a program name with args.
5962set dummy $ac_prog; ac_word=$2
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5964$as_echo_n "checking for $ac_word... " >&6; }
Matthias Klosec4c48422012-10-21 23:05:35 +02005965if ${ac_cv_prog_PYTHON+:} false; then :
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005966 $as_echo_n "(cached) " >&6
5967else
Matthias Klosec4c48422012-10-21 23:05:35 +02005968 if test -n "$PYTHON"; then
5969 ac_cv_prog_PYTHON="$PYTHON" # Let the user override the test.
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005970else
5971as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5972for as_dir in $PATH
5973do
5974 IFS=$as_save_IFS
5975 test -z "$as_dir" && as_dir=.
5976 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00005977 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Matthias Klosec4c48422012-10-21 23:05:35 +02005978 ac_cv_prog_PYTHON="$ac_prog"
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005979 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5980 break 2
5981 fi
5982done
5983 done
5984IFS=$as_save_IFS
5985
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005986fi
5987fi
Matthias Klosec4c48422012-10-21 23:05:35 +02005988PYTHON=$ac_cv_prog_PYTHON
5989if test -n "$PYTHON"; then
5990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5
5991$as_echo "$PYTHON" >&6; }
Benjamin Peterson87cdb812011-05-31 18:26:08 -05005992else
5993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5994$as_echo "no" >&6; }
5995fi
5996
5997
Matthias Klosec4c48422012-10-21 23:05:35 +02005998 test -n "$PYTHON" && break
5999done
6000test -n "$PYTHON" || PYTHON="not-found"
6001
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006002if test "$PYTHON" = not-found; then
Matthias Klosec4c48422012-10-21 23:05:35 +02006003 ASDLGEN="@echo python: $PYTHON! cannot run \$(srcdir)/Parser/asdl_c.py #"
6004else
6005 ASDLGEN="$PYTHON"
Benjamin Peterson87cdb812011-05-31 18:26:08 -05006006fi
6007
6008
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006009case $MACHDEP in
6010bsdos*|hp*|HP*)
6011 # install -d does not work on BSDI or HP-UX
6012 if test -z "$INSTALL"
6013 then
6014 INSTALL="${srcdir}/install-sh -c"
6015 fi
6016esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006017# Find a good install program. We prefer a C program (faster),
6018# so one script is as good as another. But avoid the broken or
6019# incompatible versions:
6020# SysV /etc/install, /usr/sbin/install
6021# SunOS /usr/etc/install
6022# IRIX /sbin/install
6023# AIX /bin/install
6024# AmigaOS /C/install, which installs bootblocks on floppy discs
6025# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
6026# AFS /usr/afsws/bin/install, which mishandles nonexistent args
6027# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
6028# OS/2's system install, which has a completely different semantic
6029# ./install, which can be erroneously created by make from ./install.sh.
Matthias Kloseb9621712010-04-24 17:59:49 +00006030# Reject install programs that cannot install multiple files.
6031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
6032$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006033if test -z "$INSTALL"; then
Victor Stinnere0be4232011-10-25 13:06:09 +02006034if ${ac_cv_path_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006035 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006036else
6037 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6038for as_dir in $PATH
6039do
6040 IFS=$as_save_IFS
6041 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00006042 # Account for people who put trailing slashes in PATH elements.
6043case $as_dir/ in #((
6044 ./ | .// | /[cC]/* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006045 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Matthias Kloseb9621712010-04-24 17:59:49 +00006046 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006047 /usr/ucb/* ) ;;
6048 *)
6049 # OSF1 and SCO ODT 3.0 have their own names for install.
6050 # Don't use installbsd from OSF since it installs stuff as root
6051 # by default.
6052 for ac_prog in ginstall scoinst install; do
6053 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006054 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006055 if test $ac_prog = install &&
6056 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6057 # AIX install. It has an incompatible calling convention.
6058 :
6059 elif test $ac_prog = install &&
6060 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
6061 # program-specific install script used by HP pwplus--don't use.
6062 :
6063 else
Matthias Kloseb9621712010-04-24 17:59:49 +00006064 rm -rf conftest.one conftest.two conftest.dir
6065 echo one > conftest.one
6066 echo two > conftest.two
6067 mkdir conftest.dir
6068 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
6069 test -s conftest.one && test -s conftest.two &&
6070 test -s conftest.dir/conftest.one &&
6071 test -s conftest.dir/conftest.two
6072 then
6073 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
6074 break 3
6075 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006076 fi
6077 fi
6078 done
6079 done
6080 ;;
6081esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006082
6083 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006084IFS=$as_save_IFS
6085
Matthias Kloseb9621712010-04-24 17:59:49 +00006086rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006087
6088fi
6089 if test "${ac_cv_path_install+set}" = set; then
6090 INSTALL=$ac_cv_path_install
6091 else
6092 # As a last resort, use the slow shell script. Don't cache a
6093 # value for INSTALL within a source directory, because that will
6094 # break other packages using the cache if that directory is
6095 # removed, or if the value is a relative name.
6096 INSTALL=$ac_install_sh
6097 fi
6098fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006099{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
6100$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006101
6102# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
6103# It thinks the first close brace ends the variable substitution.
6104test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
6105
6106test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
6107
6108test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
6109
Matthias Klose93a0ef12012-03-15 18:08:34 +01006110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
6111$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
6112if test -z "$MKDIR_P"; then
6113 if ${ac_cv_path_mkdir+:} false; then :
6114 $as_echo_n "(cached) " >&6
6115else
6116 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6117for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
6118do
6119 IFS=$as_save_IFS
6120 test -z "$as_dir" && as_dir=.
6121 for ac_prog in mkdir gmkdir; do
6122 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00006123 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
Matthias Klose93a0ef12012-03-15 18:08:34 +01006124 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
6125 'mkdir (GNU coreutils) '* | \
6126 'mkdir (coreutils) '* | \
6127 'mkdir (fileutils) '4.1*)
6128 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
6129 break 3;;
6130 esac
6131 done
6132 done
6133 done
6134IFS=$as_save_IFS
6135
6136fi
6137
6138 test -d ./--version && rmdir ./--version
6139 if test "${ac_cv_path_mkdir+set}" = set; then
6140 MKDIR_P="$ac_cv_path_mkdir -p"
6141 else
6142 # As a last resort, use the slow shell script. Don't cache a
6143 # value for MKDIR_P within a source directory, because that will
6144 # break other packages using the cache if that directory is
6145 # removed, or if the value is a relative name.
6146 MKDIR_P="$ac_install_sh -d"
6147 fi
6148fi
6149{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
6150$as_echo "$MKDIR_P" >&6; }
6151
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006152
6153# Not every filesystem supports hard links
6154
6155if test -z "$LN" ; then
6156 case $ac_sys_system in
6157 CYGWIN*) LN="ln -s";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006158 *) LN=ln;;
6159 esac
6160fi
6161
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006162# For calculating the .so ABI tag.
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006163
6164ABIFLAGS=""
Barry Warsaw35f3a2c2010-09-03 18:30:30 +00006165
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006166# Check for --with-pydebug
Matthias Kloseb9621712010-04-24 17:59:49 +00006167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pydebug" >&5
6168$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006169
6170# Check whether --with-pydebug was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00006171if test "${with_pydebug+set}" = set; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006172 withval=$with_pydebug;
6173if test "$withval" != no
6174then
6175
Matthias Kloseb9621712010-04-24 17:59:49 +00006176$as_echo "#define Py_DEBUG 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006177
Matthias Kloseb9621712010-04-24 17:59:49 +00006178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6179$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006180 Py_DEBUG='true'
Barry Warsaw8cf4eae2010-10-16 01:04:07 +00006181 ABIFLAGS="${ABIFLAGS}d"
Matthias Kloseb9621712010-04-24 17:59:49 +00006182else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6183$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006184fi
6185else
Matthias Kloseb9621712010-04-24 17:59:49 +00006186 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6187$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006188fi
6189
6190
6191# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
6192# merged with this chunk of code?
6193
6194# Optimizer/debugger flags
6195# ------------------------
6196# (The following bit of code is complicated enough - please keep things
6197# indented properly. Just pretend you're editing Python code. ;-)
6198
6199# There are two parallel sets of case statements below, one that checks to
6200# see if OPT was set and one that does BASECFLAGS setting based upon
6201# compiler and platform. BASECFLAGS tweaks need to be made even if the
6202# user set OPT.
6203
6204# tweak OPT based on compiler and platform, only if the user didn't set
6205# it on the command line
6206
Benjamin Peterson65b4ec52010-03-23 21:02:34 +00006207if test "${OPT-unset}" = "unset"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006208then
6209 case $GCC in
6210 yes)
6211 if test "$CC" != 'g++' ; then
6212 STRICT_PROTO="-Wstrict-prototypes"
6213 fi
6214 # For gcc 4.x we need to use -fwrapv so lets check if its supported
6215 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
6216 WRAP="-fwrapv"
6217 fi
Stefan Krah962055d2011-09-14 15:14:08 +02006218
6219 # Clang also needs -fwrapv
Stefan Krahaf04ff22011-12-08 22:20:31 +01006220 case $CC in
6221 *clang*) WRAP="-fwrapv"
6222 ;;
6223 esac
Stefan Krah962055d2011-09-14 15:14:08 +02006224
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006225 case $ac_cv_prog_cc_g in
6226 yes)
6227 if test "$Py_DEBUG" = 'true' ; then
6228 # Optimization messes up debuggers, so turn it off for
6229 # debug builds.
Mark Dickinsonb2153e92010-05-05 22:31:36 +00006230 OPT="-g -O0 -Wall $STRICT_PROTO"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006231 else
6232 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
6233 fi
6234 ;;
6235 *)
6236 OPT="-O3 -Wall $STRICT_PROTO"
6237 ;;
6238 esac
6239 case $ac_sys_system in
6240 SCO_SV*) OPT="$OPT -m486 -DSCO5"
6241 ;;
6242 esac
6243 ;;
6244
6245 *)
6246 OPT="-O"
6247 ;;
6248 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006249fi
6250
6251
6252
6253# The -arch flags for universal builds on OSX
6254UNIVERSAL_ARCH_FLAGS=
6255
6256
6257# tweak BASECFLAGS based on compiler and platform
6258case $GCC in
6259yes)
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006260 # Python doesn't violate C99 aliasing rules, but older versions of
6261 # GCC produce warnings for legal Python code. Enable
6262 # -fno-strict-aliasing on versions of GCC that support but produce
6263 # warnings. See Issue3326
Matthias Kloseb9621712010-04-24 17:59:49 +00006264 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts and needs -fno-strict-aliasing" >&5
6265$as_echo_n "checking whether $CC accepts and needs -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006266 ac_save_cc="$CC"
6267 CC="$CC -fno-strict-aliasing"
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006268 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006269 if ${ac_cv_no_strict_aliasing+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006270 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006271else
Matthias Kloseb9621712010-04-24 17:59:49 +00006272 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006273/* end confdefs.h. */
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006274
Matthias Kloseb159a552010-04-25 21:00:44 +00006275
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006276int
6277main ()
6278{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006279
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006280 ;
6281 return 0;
6282}
Matthias Kloseb159a552010-04-25 21:00:44 +00006283
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006284_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006285if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006286
6287 CC="$ac_save_cc -fstrict-aliasing"
6288 CFLAGS="$CFLAGS -Werror -Wstrict-aliasing"
6289 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006290/* end confdefs.h. */
6291
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006292 void f(int **x) {}
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006293int
6294main ()
6295{
Mark Dickinson8c2b6f12010-05-11 09:23:07 +00006296double *x; f((int **) &x);
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006297 ;
6298 return 0;
6299}
Matthias Kloseb159a552010-04-25 21:00:44 +00006300
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006301_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006302if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00006303
6304 ac_cv_no_strict_aliasing=no
6305
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006306else
Matthias Kloseb159a552010-04-25 21:00:44 +00006307
6308 ac_cv_no_strict_aliasing=yes
6309
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006310fi
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006311rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +00006312
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006313else
Matthias Kloseb159a552010-04-25 21:00:44 +00006314
6315 ac_cv_no_strict_aliasing=no
6316
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006317fi
Gregory P. Smithe0450c62009-11-01 21:11:36 +00006318rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00006319fi
6320
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006321 CFLAGS="$save_CFLAGS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006322 CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +00006323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_no_strict_aliasing" >&5
6324$as_echo "$ac_cv_no_strict_aliasing" >&6; }
Benjamin Petersone6c9d242010-03-30 17:34:47 +00006325 if test $ac_cv_no_strict_aliasing = yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006326 then
6327 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
6328 fi
6329
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006330 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can turn off $CC unused result warning" >&5
6331$as_echo_n "checking if we can turn off $CC unused result warning... " >&6; }
6332 ac_save_cc="$CC"
6333 CC="$CC -Wunused-result -Werror"
6334 save_CFLAGS="$CFLAGS"
Victor Stinnere0be4232011-10-25 13:06:09 +02006335 if ${ac_cv_disable_unused_result_warning+:} false; then :
Benjamin Peterson7ddbf102011-09-23 13:23:22 -04006336 $as_echo_n "(cached) " >&6
6337else
6338 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6339/* end confdefs.h. */
6340
6341
6342int
6343main ()
6344{
6345
6346 ;
6347 return 0;
6348}
6349
6350_ACEOF
6351if ac_fn_c_try_compile "$LINENO"; then :
6352
6353 ac_cv_disable_unused_result_warning=yes
6354
6355else
6356
6357 ac_cv_disable_unused_result_warning=no
6358
6359fi
6360rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6361fi
6362
6363 CFLAGS="$save_CFLAGS"
6364 CC="$ac_save_cc"
6365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_disable_unused_result_warning" >&5
6366$as_echo "$ac_cv_disable_unused_result_warning" >&6; }
6367
6368 if test $ac_cv_disable_unused_result_warning = yes
6369 then
6370 BASECFLAGS="$BASECFLAGS -Wno-unused-result"
6371 fi
6372
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006373 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
6374 # support. Without this, treatment of subnormals doesn't follow
6375 # the standard.
Matthias Klosedf2aecb2012-03-15 22:19:28 +01006376 case $host in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006377 alpha*)
6378 BASECFLAGS="$BASECFLAGS -mieee"
6379 ;;
6380 esac
6381
6382 case $ac_sys_system in
6383 SCO_SV*)
6384 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
6385 ;;
6386 # is there any other compiler on Darwin besides gcc?
6387 Darwin*)
6388 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
6389 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussoren666028b2010-04-18 19:07:43 +00006390 if test "${CC}" = gcc
6391 then
Matthias Kloseb9621712010-04-24 17:59:49 +00006392 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which compiler should be used" >&5
6393$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00006394 case "${UNIVERSALSDK}" in
6395 */MacOSX10.4u.sdk)
6396 # Build using 10.4 SDK, force usage of gcc when the
6397 # compiler is gcc, otherwise the user will get very
6398 # confusing error messages when building on OSX 10.6
6399 CC=gcc-4.0
6400 CPP=cpp-4.0
6401 ;;
6402 esac
Matthias Kloseb9621712010-04-24 17:59:49 +00006403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
6404$as_echo "$CC" >&6; }
Ronald Oussoren666028b2010-04-18 19:07:43 +00006405 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006406
6407
6408 if test "${enable_universalsdk}"; then
6409 UNIVERSAL_ARCH_FLAGS=""
6410 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
6411 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
6412 ARCH_RUN_32BIT=""
Benjamin Peterson99f03762010-04-11 22:15:28 +00006413 LIPO_32BIT_FLAGS=""
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006414 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
6415 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00006416 LIPO_32BIT_FLAGS=""
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00006417 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006418
6419 elif test "$UNIVERSAL_ARCHS" = "all" ; then
6420 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00006421 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00006422 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006423
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006424 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
6425 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00006426 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00006427 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006428
6429 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
6430 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussoren6f6c5622009-12-24 14:03:19 +00006431 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren564f7f22010-02-11 13:23:08 +00006432 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006433
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006434 else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006435 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 +00006436
6437 fi
6438
6439
Ronald Oussoren666028b2010-04-18 19:07:43 +00006440 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
6441 if test "${UNIVERSALSDK}" != "/"
6442 then
6443 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
6444 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren712979d2010-04-20 19:51:33 +00006445 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006446 fi
6447 fi
6448
6449 # Calculate the right deployment target for this build.
6450 #
6451 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
Ned Deily3784ff92012-06-25 05:04:28 -07006452 if test ${cur_target} '>' 10.2 && \
6453 test ${cur_target} '<' 10.6
6454 then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006455 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00006456 if test ${enable_universalsdk}; then
6457 if test "${UNIVERSAL_ARCHS}" = "all"; then
6458 # Ensure that the default platform for a
6459 # 4-way universal build is OSX 10.5,
6460 # that's the first OS release where
6461 # 4-way builds make sense.
6462 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00006463
6464 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
6465 cur_target='10.5'
6466
6467 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
6468 cur_target='10.5'
6469
6470 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
6471 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00006472 fi
6473 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00006474 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00006475 # On Intel macs default to a deployment
6476 # target of 10.4, that's the first OSX
6477 # release with Intel support.
6478 cur_target="10.4"
6479 fi
6480 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006481 fi
6482 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
6483
6484 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
6485 # environment with a value that is the same as what we'll use
6486 # in the Makefile to ensure that we'll get the same compiler
6487 # environment during configure and build time.
6488 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
6489 export MACOSX_DEPLOYMENT_TARGET
6490 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
6491
6492 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006493 esac
6494 ;;
6495
6496*)
6497 case $ac_sys_system in
6498 OpenUNIX*|UnixWare*)
6499 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
6500 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006501 SCO_SV*)
6502 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
6503 ;;
6504 esac
6505 ;;
6506esac
6507
6508if test "$Py_DEBUG" = 'true'; then
6509 :
6510else
6511 OPT="-DNDEBUG $OPT"
6512fi
6513
6514if test "$ac_arch_flags"
6515then
6516 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
6517fi
6518
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006519# Check whether GCC supports PyArg_ParseTuple format
6520if test "$GCC" = "yes"
6521then
Matthias Kloseb9621712010-04-24 17:59:49 +00006522 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc supports ParseTuple __format__" >&5
6523$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006524 save_CFLAGS=$CFLAGS
6525 CFLAGS="$CFLAGS -Werror"
Matthias Kloseb9621712010-04-24 17:59:49 +00006526 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006527/* end confdefs.h. */
6528
6529 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006530int
6531main ()
6532{
6533
6534 ;
6535 return 0;
6536}
Matthias Kloseb159a552010-04-25 21:00:44 +00006537
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006538_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006539if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006540
Matthias Kloseb159a552010-04-25 21:00:44 +00006541
Matthias Kloseb9621712010-04-24 17:59:49 +00006542$as_echo "#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006543
Matthias Kloseb159a552010-04-25 21:00:44 +00006544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006545$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00006546
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006547else
Matthias Kloseb159a552010-04-25 21:00:44 +00006548
6549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00006550$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006551
6552fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006553rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6554 CFLAGS=$save_CFLAGS
6555fi
6556
6557# On some compilers, pthreads are available without further options
6558# (e.g. MacOS X). On some of these systems, the compiler will not
6559# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
6560# So we have to see first whether pthreads are available without
6561# options before we can check whether -Kpthread improves anything.
Matthias Kloseb9621712010-04-24 17:59:49 +00006562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads are available without options" >&5
6563$as_echo_n "checking whether pthreads are available without options... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006564if ${ac_cv_pthread_is_default+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006565 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006566else
Matthias Kloseb9621712010-04-24 17:59:49 +00006567 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006568 ac_cv_pthread_is_default=no
6569else
Matthias Kloseb9621712010-04-24 17:59:49 +00006570 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006571/* end confdefs.h. */
6572
Stefan Krah7dba5942012-11-22 22:49:11 +01006573#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006574#include <pthread.h>
6575
6576void* routine(void* p){return NULL;}
6577
6578int main(){
6579 pthread_t p;
6580 if(pthread_create(&p,NULL,routine,NULL)!=0)
6581 return 1;
6582 (void)pthread_detach(p);
6583 return 0;
6584}
6585
6586_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006587if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006588
6589 ac_cv_pthread_is_default=yes
6590 ac_cv_kthread=no
6591 ac_cv_pthread=no
6592
6593else
Matthias Kloseb9621712010-04-24 17:59:49 +00006594 ac_cv_pthread_is_default=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006595fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006596rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6597 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006598fi
6599
6600
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006601fi
6602
Matthias Kloseb9621712010-04-24 17:59:49 +00006603{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_is_default" >&5
6604$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006605
6606
6607if test $ac_cv_pthread_is_default = yes
6608then
6609 ac_cv_kpthread=no
6610else
6611# -Kpthread, if available, provides the right #defines
6612# and linker options to make pthread_create available
6613# Some compilers won't report that they do not support -Kpthread,
6614# so we need to run a program to see whether it really made the
6615# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kpthread" >&5
6617$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006618if ${ac_cv_kpthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006619 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006620else
6621 ac_save_cc="$CC"
6622CC="$CC -Kpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006623if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006624 ac_cv_kpthread=no
6625else
Matthias Kloseb9621712010-04-24 17:59:49 +00006626 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006627/* end confdefs.h. */
6628
Stefan Krah7dba5942012-11-22 22:49:11 +01006629#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006630#include <pthread.h>
6631
6632void* routine(void* p){return NULL;}
6633
6634int main(){
6635 pthread_t p;
6636 if(pthread_create(&p,NULL,routine,NULL)!=0)
6637 return 1;
6638 (void)pthread_detach(p);
6639 return 0;
6640}
6641
6642_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006643if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006644 ac_cv_kpthread=yes
6645else
Matthias Kloseb9621712010-04-24 17:59:49 +00006646 ac_cv_kpthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006647fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006648rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6649 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006650fi
6651
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006652CC="$ac_save_cc"
6653fi
6654
Matthias Kloseb9621712010-04-24 17:59:49 +00006655{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kpthread" >&5
6656$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006657fi
6658
6659if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
6660then
6661# -Kthread, if available, provides the right #defines
6662# and linker options to make pthread_create available
6663# Some compilers won't report that they do not support -Kthread,
6664# so we need to run a program to see whether it really made the
6665# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -Kthread" >&5
6667$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006668if ${ac_cv_kthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006669 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006670else
6671 ac_save_cc="$CC"
6672CC="$CC -Kthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006673if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006674 ac_cv_kthread=no
6675else
Matthias Kloseb9621712010-04-24 17:59:49 +00006676 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006677/* end confdefs.h. */
6678
Stefan Krah7dba5942012-11-22 22:49:11 +01006679#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006680#include <pthread.h>
6681
6682void* routine(void* p){return NULL;}
6683
6684int main(){
6685 pthread_t p;
6686 if(pthread_create(&p,NULL,routine,NULL)!=0)
6687 return 1;
6688 (void)pthread_detach(p);
6689 return 0;
6690}
6691
6692_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006693if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006694 ac_cv_kthread=yes
6695else
Matthias Kloseb9621712010-04-24 17:59:49 +00006696 ac_cv_kthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006697fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006698rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6699 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006700fi
6701
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006702CC="$ac_save_cc"
6703fi
6704
Matthias Kloseb9621712010-04-24 17:59:49 +00006705{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_kthread" >&5
6706$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006707fi
6708
6709if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
6710then
6711# -pthread, if available, provides the right #defines
6712# and linker options to make pthread_create available
6713# Some compilers won't report that they do not support -pthread,
6714# so we need to run a program to see whether it really made the
6715# function available.
Matthias Kloseb9621712010-04-24 17:59:49 +00006716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -pthread" >&5
6717$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
doko@python.org7981f202013-01-25 15:33:25 +01006718if ${ac_cv_pthread+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006719 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006720else
6721 ac_save_cc="$CC"
6722CC="$CC -pthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00006723if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006724 ac_cv_pthread=no
6725else
Matthias Kloseb9621712010-04-24 17:59:49 +00006726 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006727/* end confdefs.h. */
6728
Stefan Krah7dba5942012-11-22 22:49:11 +01006729#include <stdio.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006730#include <pthread.h>
6731
6732void* routine(void* p){return NULL;}
6733
6734int main(){
6735 pthread_t p;
6736 if(pthread_create(&p,NULL,routine,NULL)!=0)
6737 return 1;
6738 (void)pthread_detach(p);
6739 return 0;
6740}
6741
6742_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006743if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006744 ac_cv_pthread=yes
6745else
Matthias Kloseb9621712010-04-24 17:59:49 +00006746 ac_cv_pthread=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006747fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006748rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6749 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006750fi
6751
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006752CC="$ac_save_cc"
6753fi
6754
Matthias Kloseb9621712010-04-24 17:59:49 +00006755{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread" >&5
6756$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006757fi
6758
6759# If we have set a CC compiler flag for thread support then
6760# check if it works for CXX, too.
6761ac_cv_cxx_thread=no
6762if test ! -z "$CXX"
6763then
Matthias Kloseb9621712010-04-24 17:59:49 +00006764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX also accepts flags for thread support" >&5
6765$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006766ac_save_cxx="$CXX"
6767
6768if test "$ac_cv_kpthread" = "yes"
6769then
6770 CXX="$CXX -Kpthread"
6771 ac_cv_cxx_thread=yes
6772elif test "$ac_cv_kthread" = "yes"
6773then
6774 CXX="$CXX -Kthread"
6775 ac_cv_cxx_thread=yes
6776elif test "$ac_cv_pthread" = "yes"
6777then
6778 CXX="$CXX -pthread"
6779 ac_cv_cxx_thread=yes
6780fi
6781
6782if test $ac_cv_cxx_thread = yes
6783then
6784 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
6785 $CXX -c conftest.$ac_ext 2>&5
6786 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
6787 && test -s conftest$ac_exeext && ./conftest$ac_exeext
6788 then
6789 ac_cv_cxx_thread=yes
6790 else
6791 ac_cv_cxx_thread=no
6792 fi
6793 rm -fr conftest*
6794fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006795{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_thread" >&5
6796$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006797fi
6798CXX="$ac_save_cxx"
6799
6800
6801# checks for header files
Matthias Kloseb9621712010-04-24 17:59:49 +00006802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6803$as_echo_n "checking for ANSI C header files... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006804if ${ac_cv_header_stdc+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006805 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006806else
Matthias Kloseb9621712010-04-24 17:59:49 +00006807 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006808/* end confdefs.h. */
6809#include <stdlib.h>
6810#include <stdarg.h>
6811#include <string.h>
6812#include <float.h>
6813
6814int
6815main ()
6816{
6817
6818 ;
6819 return 0;
6820}
6821_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006822if ac_fn_c_try_compile "$LINENO"; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006823 ac_cv_header_stdc=yes
6824else
Matthias Kloseb9621712010-04-24 17:59:49 +00006825 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006826fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006827rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6828
6829if test $ac_cv_header_stdc = yes; then
6830 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006832/* end confdefs.h. */
6833#include <string.h>
6834
6835_ACEOF
6836if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006837 $EGREP "memchr" >/dev/null 2>&1; then :
6838
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006839else
6840 ac_cv_header_stdc=no
6841fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006842rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006843
6844fi
6845
6846if test $ac_cv_header_stdc = yes; then
6847 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Matthias Kloseb9621712010-04-24 17:59:49 +00006848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006849/* end confdefs.h. */
6850#include <stdlib.h>
6851
6852_ACEOF
6853if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00006854 $EGREP "free" >/dev/null 2>&1; then :
6855
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006856else
6857 ac_cv_header_stdc=no
6858fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00006859rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006860
6861fi
6862
6863if test $ac_cv_header_stdc = yes; then
6864 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Matthias Kloseb9621712010-04-24 17:59:49 +00006865 if test "$cross_compiling" = yes; then :
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006866 :
6867else
Matthias Kloseb9621712010-04-24 17:59:49 +00006868 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006869/* end confdefs.h. */
6870#include <ctype.h>
6871#include <stdlib.h>
6872#if ((' ' & 0x0FF) == 0x020)
6873# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6874# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6875#else
6876# define ISLOWER(c) \
6877 (('a' <= (c) && (c) <= 'i') \
6878 || ('j' <= (c) && (c) <= 'r') \
6879 || ('s' <= (c) && (c) <= 'z'))
6880# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6881#endif
6882
6883#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6884int
6885main ()
6886{
6887 int i;
6888 for (i = 0; i < 256; i++)
6889 if (XOR (islower (i), ISLOWER (i))
6890 || toupper (i) != TOUPPER (i))
6891 return 2;
6892 return 0;
6893}
6894_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006895if ac_fn_c_try_run "$LINENO"; then :
6896
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006897else
Matthias Kloseb9621712010-04-24 17:59:49 +00006898 ac_cv_header_stdc=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006899fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006900rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6901 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006902fi
6903
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006904fi
6905fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006906{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6907$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006908if test $ac_cv_header_stdc = yes; then
6909
Matthias Kloseb9621712010-04-24 17:59:49 +00006910$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006911
6912fi
6913
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +02006914ac_save_cppflags="$CPPFLAGS"
6915CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
Benjamin Petersonb77fe172011-09-13 17:20:47 -04006916for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006917fcntl.h grp.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006918ieeefp.h io.h langinfo.h libintl.h ncurses.h process.h pthread.h \
Benjamin Peterson94b580d2011-08-02 17:30:04 -05006919sched.h shadow.h signal.h stdint.h stropts.h termios.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006920unistd.h utime.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006921poll.h sys/devpoll.h sys/epoll.h sys/poll.h \
Antoine Pitroubcf2b592012-02-08 23:28:36 +01006922sys/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 +01006923sys/kern_control.h sys/loadavg.h sys/lock.h sys/mkdev.h sys/modem.h \
Jesus Cead8b9ae62011-11-14 19:07:41 +01006924sys/param.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
Martin v. Löwis9d6c6692012-02-03 17:44:58 +01006925sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
Georg Brandl941f9562011-02-25 15:21:47 +00006926sys/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 -07006927libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussoren755740f2010-02-07 19:56:39 +00006928bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Matthias Kloseb9621712010-04-24 17:59:49 +00006929do :
6930 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6931ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006932if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006933 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006934#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006935_ACEOF
6936
6937fi
6938
Guido van Rossum627b2d71993-12-24 10:39:16 +00006939done
6940
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +02006941CPPFLAGS=$ac_save_cppflags
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006942ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006943for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Matthias Kloseb9621712010-04-24 17:59:49 +00006944 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
6946$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006947if eval \${$as_ac_Header+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006948 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006949else
Matthias Kloseb9621712010-04-24 17:59:49 +00006950 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006951/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006952#include <sys/types.h>
6953#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006954
Martin v. Löwis11437992002-04-12 09:54:03 +00006955int
6956main ()
6957{
6958if ((DIR *) 0)
6959return 0;
6960 ;
6961 return 0;
6962}
6963_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006964if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006965 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006966else
Matthias Kloseb9621712010-04-24 17:59:49 +00006967 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006968fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006969rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006970fi
Matthias Kloseb9621712010-04-24 17:59:49 +00006971eval ac_res=\$$as_ac_Header
6972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6973$as_echo "$ac_res" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02006974if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00006975 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00006976#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006977_ACEOF
6978
6979ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006980fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006981
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006982done
6983# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6984if test $ac_header_dirent = dirent.h; then
Matthias Kloseb9621712010-04-24 17:59:49 +00006985 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
6986$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02006987if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00006988 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006989else
Martin v. Löwis11437992002-04-12 09:54:03 +00006990 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00006991cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00006992/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006993
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006994/* Override any GCC internal prototype to avoid an error.
6995 Use char because int might match the return type of a GCC
6996 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006997#ifdef __cplusplus
6998extern "C"
6999#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007000char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007001int
7002main ()
7003{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007004return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007005 ;
7006 return 0;
7007}
7008_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007009for ac_lib in '' dir; do
7010 if test -z "$ac_lib"; then
7011 ac_res="none required"
7012 else
7013 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007014 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007015 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007016 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007017 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007018fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007019rm -f core conftest.err conftest.$ac_objext \
7020 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007021 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007022 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007023fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007024done
Victor Stinnere0be4232011-10-25 13:06:09 +02007025if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007026
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007027else
7028 ac_cv_search_opendir=no
7029fi
7030rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007031LIBS=$ac_func_search_save_LIBS
7032fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007033{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7034$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007035ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007036if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007037 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00007038
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007039fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007040
Michael W. Hudson54241132001-12-07 15:38:26 +00007041else
Matthias Kloseb9621712010-04-24 17:59:49 +00007042 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7043$as_echo_n "checking for library containing opendir... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007044if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007045 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007046else
7047 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00007048cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007049/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007050
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007051/* Override any GCC internal prototype to avoid an error.
7052 Use char because int might match the return type of a GCC
7053 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007054#ifdef __cplusplus
7055extern "C"
7056#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00007057char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007058int
7059main ()
7060{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007061return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00007062 ;
7063 return 0;
7064}
7065_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007066for ac_lib in '' x; do
7067 if test -z "$ac_lib"; then
7068 ac_res="none required"
7069 else
7070 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007071 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007072 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007073 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007074 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00007075fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007076rm -f core conftest.err conftest.$ac_objext \
7077 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02007078 if ${ac_cv_search_opendir+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007079 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007080fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007081done
Victor Stinnere0be4232011-10-25 13:06:09 +02007082if ${ac_cv_search_opendir+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007083
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007084else
7085 ac_cv_search_opendir=no
7086fi
7087rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007088LIBS=$ac_func_search_save_LIBS
7089fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007090{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7091$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007092ac_res=$ac_cv_search_opendir
Matthias Kloseb9621712010-04-24 17:59:49 +00007093if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007094 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00007095
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007096fi
7097
7098fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007099
Matthias Kloseb9621712010-04-24 17:59:49 +00007100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7101$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007102if ${ac_cv_header_sys_types_h_makedev+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007103 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007104else
Matthias Kloseb9621712010-04-24 17:59:49 +00007105 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007106/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007107#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007108int
7109main ()
7110{
7111return makedev(0, 0);
7112 ;
7113 return 0;
7114}
7115_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007116if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007117 ac_cv_header_sys_types_h_makedev=yes
7118else
Matthias Kloseb9621712010-04-24 17:59:49 +00007119 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007120fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007121rm -f core conftest.err conftest.$ac_objext \
7122 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007123
7124fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007125{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7126$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007127
7128if test $ac_cv_header_sys_types_h_makedev = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007129ac_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 +02007130if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007131
Matthias Kloseb9621712010-04-24 17:59:49 +00007132$as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007133
7134fi
7135
7136
7137
7138 if test $ac_cv_header_sys_mkdev_h = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +00007139 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 +02007140if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007141
Matthias Kloseb9621712010-04-24 17:59:49 +00007142$as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00007143
7144fi
7145
7146
7147 fi
7148fi
7149
Michael W. Hudson54241132001-12-07 15:38:26 +00007150
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007151# On Darwin (OS X) net/if.h requires sys/socket.h to be imported first.
7152for ac_header in net/if.h
7153do :
7154 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "#include <stdio.h>
7155#ifdef STDC_HEADERS
7156# include <stdlib.h>
7157# include <stddef.h>
7158#else
7159# ifdef HAVE_STDLIB_H
7160# include <stdlib.h>
7161# endif
7162#endif
7163#ifdef HAVE_SYS_SOCKET_H
7164# include <sys/socket.h>
7165#endif
7166
7167"
Victor Stinnere0be4232011-10-25 13:06:09 +02007168if test "x$ac_cv_header_net_if_h" = xyes; then :
Gregory P. Smith3b1f2c32011-05-15 12:18:23 -07007169 cat >>confdefs.h <<_ACEOF
7170#define HAVE_NET_IF_H 1
7171_ACEOF
7172
7173fi
7174
7175done
7176
7177
7178
Martin v. Löwisae2830c2004-09-18 09:54:52 +00007179# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00007180for ac_header in term.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007181do :
7182 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "
Martin v. Löwis5d52e782004-09-18 10:07:03 +00007183#ifdef HAVE_CURSES_H
7184#include <curses.h>
7185#endif
7186
Matthias Kloseb9621712010-04-24 17:59:49 +00007187"
Victor Stinnere0be4232011-10-25 13:06:09 +02007188if test "x$ac_cv_header_term_h" = xyes; then :
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00007189 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007190#define HAVE_TERM_H 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00007191_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00007192
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00007193fi
7194
7195done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00007196
7197
Martin v. Löwis11017b12006-01-14 18:12:57 +00007198# On Linux, netlink.h requires asm/types.h
Martin v. Löwis11017b12006-01-14 18:12:57 +00007199for ac_header in linux/netlink.h
Matthias Kloseb9621712010-04-24 17:59:49 +00007200do :
7201 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 +00007202#ifdef HAVE_ASM_TYPES_H
7203#include <asm/types.h>
7204#endif
7205#ifdef HAVE_SYS_SOCKET_H
7206#include <sys/socket.h>
7207#endif
7208
Matthias Kloseb9621712010-04-24 17:59:49 +00007209"
Victor Stinnere0be4232011-10-25 13:06:09 +02007210if test "x$ac_cv_header_linux_netlink_h" = xyes; then :
Martin v. Löwis11017b12006-01-14 18:12:57 +00007211 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007212#define HAVE_LINUX_NETLINK_H 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007213_ACEOF
7214
7215fi
7216
7217done
7218
7219
Charles-François Natali47413c12011-10-06 19:47:44 +02007220# On Linux, can.h and can/raw.h require sys/socket.h
7221for ac_header in linux/can.h linux/can/raw.h
7222do :
7223 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7224ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
7225#ifdef HAVE_SYS_SOCKET_H
7226#include <sys/socket.h>
7227#endif
7228
7229"
7230if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7231 cat >>confdefs.h <<_ACEOF
7232#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7233_ACEOF
7234
7235fi
7236
7237done
7238
7239
Guido van Rossum627b2d71993-12-24 10:39:16 +00007240# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00007241was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t in time.h" >&5
7243$as_echo_n "checking for clock_t in time.h... " >&6; }
7244cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007245/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007246#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007247
7248_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007249if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007250 $EGREP "clock_t" >/dev/null 2>&1; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +00007251 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007252else
Martin v. Löwis11437992002-04-12 09:54:03 +00007253
7254
Matthias Kloseb9621712010-04-24 17:59:49 +00007255$as_echo "#define clock_t long" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00007256
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007257
Guido van Rossum627b2d71993-12-24 10:39:16 +00007258fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007259rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007260
Matthias Kloseb9621712010-04-24 17:59:49 +00007261{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
7262$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00007263
Matthias Kloseb9621712010-04-24 17:59:49 +00007264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for makedev" >&5
7265$as_echo_n "checking for makedev... " >&6; }
7266cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007267/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00007268
Jesus Cea740f53a2010-04-28 11:35:30 +00007269#if defined(MAJOR_IN_MKDEV)
7270#include <sys/mkdev.h>
7271#elif defined(MAJOR_IN_SYSMACROS)
7272#include <sys/sysmacros.h>
7273#else
7274#include <sys/types.h>
7275#endif
7276
Neal Norwitz11690112002-07-30 01:08:28 +00007277int
7278main ()
7279{
Jesus Cea740f53a2010-04-28 11:35:30 +00007280
7281 makedev(0, 0)
Neal Norwitz11690112002-07-30 01:08:28 +00007282 ;
7283 return 0;
7284}
Matthias Kloseb159a552010-04-25 21:00:44 +00007285
Neal Norwitz11690112002-07-30 01:08:28 +00007286_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007287if ac_fn_c_try_link "$LINENO"; then :
Neal Norwitz11690112002-07-30 01:08:28 +00007288 ac_cv_has_makedev=yes
7289else
Matthias Kloseb9621712010-04-24 17:59:49 +00007290 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007291fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007292rm -f core conftest.err conftest.$ac_objext \
7293 conftest$ac_exeext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007294{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_has_makedev" >&5
7295$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007296if test "$ac_cv_has_makedev" = "yes"; then
7297
Matthias Kloseb9621712010-04-24 17:59:49 +00007298$as_echo "#define HAVE_MAKEDEV 1" >>confdefs.h
Neal Norwitz11690112002-07-30 01:08:28 +00007299
7300fi
7301
Martin v. Löwis399a6892002-10-04 10:22:02 +00007302# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7303# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7304# defined, but the compiler does not support pragma redefine_extname,
7305# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7306# structures (such as rlimit64) without declaring them. As a
7307# work-around, disable LFS on such configurations
7308
7309use_lfs=yes
Matthias Kloseb9621712010-04-24 17:59:49 +00007310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking Solaris LFS bug" >&5
7311$as_echo_n "checking Solaris LFS bug... " >&6; }
7312cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007313/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007314
7315#define _LARGEFILE_SOURCE 1
7316#define _FILE_OFFSET_BITS 64
7317#include <sys/resource.h>
7318
Martin v. Löwis399a6892002-10-04 10:22:02 +00007319int
7320main ()
7321{
7322struct rlimit foo;
7323 ;
7324 return 0;
7325}
7326_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007327if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis399a6892002-10-04 10:22:02 +00007328 sol_lfs_bug=no
7329else
Matthias Kloseb9621712010-04-24 17:59:49 +00007330 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00007331fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007332rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007333{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sol_lfs_bug" >&5
7334$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007335if test "$sol_lfs_bug" = "yes"; then
7336 use_lfs=no
7337fi
7338
7339if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00007340# Two defines needed to enable largefile support on various platforms
7341# These may affect some typedefs
Georg Brandl216e4042011-02-19 08:58:23 +00007342case $ac_sys_system/$ac_sys_release in
7343AIX*)
7344
7345$as_echo "#define _LARGE_FILES 1" >>confdefs.h
7346
7347 ;;
7348esac
Guido van Rossum810cc512001-09-09 23:51:39 +00007349
Matthias Kloseb9621712010-04-24 17:59:49 +00007350$as_echo "#define _LARGEFILE_SOURCE 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007351
7352
Matthias Kloseb9621712010-04-24 17:59:49 +00007353$as_echo "#define _FILE_OFFSET_BITS 64" >>confdefs.h
Guido van Rossum810cc512001-09-09 23:51:39 +00007354
Martin v. Löwis399a6892002-10-04 10:22:02 +00007355fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007356
Guido van Rossum84e7b241996-08-19 21:59:00 +00007357# Add some code to confdefs.h so that the test for off_t works on SCO
7358cat >> confdefs.h <<\EOF
7359#if defined(SCO_DS)
7360#undef _OFF_T
7361#endif
7362EOF
7363
Guido van Rossumef2255b2000-03-10 22:30:29 +00007364# Type availability checks
Matthias Kloseb9621712010-04-24 17:59:49 +00007365ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007366if test "x$ac_cv_type_mode_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007367
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007368else
Martin v. Löwis11437992002-04-12 09:54:03 +00007369
7370cat >>confdefs.h <<_ACEOF
7371#define mode_t int
7372_ACEOF
7373
7374fi
7375
Matthias Kloseb9621712010-04-24 17:59:49 +00007376ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007377if test "x$ac_cv_type_off_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007378
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007379else
Martin v. Löwis11437992002-04-12 09:54:03 +00007380
7381cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007382#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00007383_ACEOF
7384
7385fi
7386
Matthias Kloseb9621712010-04-24 17:59:49 +00007387ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007388if test "x$ac_cv_type_pid_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007389
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007390else
Martin v. Löwis11437992002-04-12 09:54:03 +00007391
7392cat >>confdefs.h <<_ACEOF
7393#define pid_t int
7394_ACEOF
7395
7396fi
7397
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007398
Martin v. Löwis11437992002-04-12 09:54:03 +00007399cat >>confdefs.h <<_ACEOF
Matthias Klosebada4c32010-04-25 21:18:48 +00007400#define RETSIGTYPE void
Martin v. Löwis11437992002-04-12 09:54:03 +00007401_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007402
Matthias Kloseb9621712010-04-24 17:59:49 +00007403ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007404if test "x$ac_cv_type_size_t" = xyes; then :
Skip Montanaro6dead952003-09-25 14:50:04 +00007405
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007406else
Martin v. Löwis11437992002-04-12 09:54:03 +00007407
7408cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007409#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007410_ACEOF
7411
7412fi
7413
Matthias Kloseb9621712010-04-24 17:59:49 +00007414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
7415$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007416if ${ac_cv_type_uid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007417 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007418else
Matthias Kloseb9621712010-04-24 17:59:49 +00007419 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007420/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007421#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007422
7423_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007424if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00007425 $EGREP "uid_t" >/dev/null 2>&1; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007426 ac_cv_type_uid_t=yes
7427else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007428 ac_cv_type_uid_t=no
7429fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00007430rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007431
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007432fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007433{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
7434$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007435if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007436
Matthias Kloseb9621712010-04-24 17:59:49 +00007437$as_echo "#define uid_t int" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007438
7439
Matthias Kloseb9621712010-04-24 17:59:49 +00007440$as_echo "#define gid_t int" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007441
7442fi
7443
Mark Dickinsonce31f662012-12-02 13:20:22 +00007444
7445# There are two separate checks for each of the exact-width integer types we
7446# need. First we check whether the type is available using the usual
7447# AC_CHECK_TYPE macro with the default includes (which includes <inttypes.h>
7448# and <stdint.h> where available). We then also use the special type checks of
7449# the form AC_TYPE_UINT32_T, which in the case that uint32_t is not available
7450# directly, #define's uint32_t to be a suitable type.
7451
7452ac_fn_c_check_type "$LINENO" "uint32_t" "ac_cv_type_uint32_t" "$ac_includes_default"
7453if test "x$ac_cv_type_uint32_t" = xyes; then :
7454
7455$as_echo "#define HAVE_UINT32_T 1" >>confdefs.h
7456
7457fi
7458
Matthias Kloseb9621712010-04-24 17:59:49 +00007459ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t"
7460case $ac_cv_c_uint32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007461 no|yes) ;; #(
7462 *)
7463
Matthias Kloseb9621712010-04-24 17:59:49 +00007464$as_echo "#define _UINT32_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00007465
7466
7467cat >>confdefs.h <<_ACEOF
7468#define uint32_t $ac_cv_c_uint32_t
7469_ACEOF
7470;;
7471 esac
7472
Mark Dickinsonce31f662012-12-02 13:20:22 +00007473
7474ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
7475if test "x$ac_cv_type_uint64_t" = xyes; then :
7476
7477$as_echo "#define HAVE_UINT64_T 1" >>confdefs.h
7478
7479fi
7480
Matthias Kloseb9621712010-04-24 17:59:49 +00007481ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t"
7482case $ac_cv_c_uint64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007483 no|yes) ;; #(
7484 *)
7485
Matthias Kloseb9621712010-04-24 17:59:49 +00007486$as_echo "#define _UINT64_T 1" >>confdefs.h
Mark Dickinsonbd792642009-03-18 20:06:12 +00007487
7488
7489cat >>confdefs.h <<_ACEOF
7490#define uint64_t $ac_cv_c_uint64_t
7491_ACEOF
7492;;
7493 esac
7494
Mark Dickinsonce31f662012-12-02 13:20:22 +00007495
7496ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default"
7497if test "x$ac_cv_type_int32_t" = xyes; then :
7498
7499$as_echo "#define HAVE_INT32_T 1" >>confdefs.h
7500
7501fi
7502
Matthias Kloseb9621712010-04-24 17:59:49 +00007503ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t"
7504case $ac_cv_c_int32_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007505 no|yes) ;; #(
7506 *)
7507
7508cat >>confdefs.h <<_ACEOF
7509#define int32_t $ac_cv_c_int32_t
7510_ACEOF
7511;;
Mark Dickinsonbd792642009-03-18 20:06:12 +00007512esac
7513
Mark Dickinsonce31f662012-12-02 13:20:22 +00007514
7515ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
7516if test "x$ac_cv_type_int64_t" = xyes; then :
7517
7518$as_echo "#define HAVE_INT64_T 1" >>confdefs.h
7519
7520fi
7521
Matthias Kloseb9621712010-04-24 17:59:49 +00007522ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t"
7523case $ac_cv_c_int64_t in #(
Mark Dickinsonbd792642009-03-18 20:06:12 +00007524 no|yes) ;; #(
7525 *)
7526
7527cat >>confdefs.h <<_ACEOF
7528#define int64_t $ac_cv_c_int64_t
7529_ACEOF
7530;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007531esac
Martin v. Löwis18e16552006-02-15 17:27:45 +00007532
Mark Dickinsonce31f662012-12-02 13:20:22 +00007533
Matthias Kloseb9621712010-04-24 17:59:49 +00007534ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +02007535if test "x$ac_cv_type_ssize_t" = xyes; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007536
Matthias Kloseb9621712010-04-24 17:59:49 +00007537$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Martin v. Löwis18e16552006-02-15 17:27:45 +00007538
7539fi
7540
Stefan Krah1919b7e2012-03-21 18:25:23 +01007541ac_fn_c_check_type "$LINENO" "__uint128_t" "ac_cv_type___uint128_t" "$ac_includes_default"
7542if test "x$ac_cv_type___uint128_t" = xyes; then :
7543
7544$as_echo "#define HAVE_GCC_UINT128_T 1" >>confdefs.h
7545
7546fi
7547
Jack Jansendd19cf82001-12-06 22:36:17 +00007548
Michael W. Hudson54241132001-12-07 15:38:26 +00007549# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007550# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007551# The cast to long int works around a bug in the HP C Compiler
7552# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7553# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7554# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
7556$as_echo_n "checking size of int... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007557if ${ac_cv_sizeof_int+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007558 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007559else
Matthias Kloseb9621712010-04-24 17:59:49 +00007560 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 +00007561
Martin v. Löwis11437992002-04-12 09:54:03 +00007562else
Matthias Kloseb9621712010-04-24 17:59:49 +00007563 if test "$ac_cv_type_int" = yes; then
7564 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7565$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007566as_fn_error 77 "cannot compute sizeof (int)
Victor Stinnere0be4232011-10-25 13:06:09 +02007567See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007568 else
7569 ac_cv_sizeof_int=0
7570 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007571fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007572
Martin v. Löwis11437992002-04-12 09:54:03 +00007573fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007574{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
7575$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007576
7577
7578
Martin v. Löwis11437992002-04-12 09:54:03 +00007579cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007580#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00007581_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007582
7583
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007584# The cast to long int works around a bug in the HP C Compiler
7585# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7586# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7587# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
7589$as_echo_n "checking size of long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007590if ${ac_cv_sizeof_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007591 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007592else
Matthias Kloseb9621712010-04-24 17:59:49 +00007593 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 +00007594
Martin v. Löwis11437992002-04-12 09:54:03 +00007595else
Matthias Kloseb9621712010-04-24 17:59:49 +00007596 if test "$ac_cv_type_long" = yes; then
7597 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7598$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007599as_fn_error 77 "cannot compute sizeof (long)
Victor Stinnere0be4232011-10-25 13:06:09 +02007600See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007601 else
7602 ac_cv_sizeof_long=0
7603 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007604fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007605
Martin v. Löwis11437992002-04-12 09:54:03 +00007606fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007607{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
7608$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007609
7610
7611
Martin v. Löwis11437992002-04-12 09:54:03 +00007612cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007613#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007614_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007615
7616
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007617# The cast to long int works around a bug in the HP C Compiler
7618# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7619# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7620# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
7622$as_echo_n "checking size of void *... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007623if ${ac_cv_sizeof_void_p+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007624 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007625else
Matthias Kloseb9621712010-04-24 17:59:49 +00007626 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 +00007627
Martin v. Löwis11437992002-04-12 09:54:03 +00007628else
Matthias Kloseb9621712010-04-24 17:59:49 +00007629 if test "$ac_cv_type_void_p" = yes; then
7630 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7631$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007632as_fn_error 77 "cannot compute sizeof (void *)
Victor Stinnere0be4232011-10-25 13:06:09 +02007633See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007634 else
7635 ac_cv_sizeof_void_p=0
7636 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007637fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007638
Martin v. Löwis11437992002-04-12 09:54:03 +00007639fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007640{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
7641$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007642
7643
7644
Martin v. Löwis11437992002-04-12 09:54:03 +00007645cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007646#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00007647_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007648
7649
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007650# The cast to long int works around a bug in the HP C Compiler
7651# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7652# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7653# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5
7655$as_echo_n "checking size of short... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007656if ${ac_cv_sizeof_short+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007657 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007658else
Matthias Kloseb9621712010-04-24 17:59:49 +00007659 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 +00007660
Martin v. Löwis11437992002-04-12 09:54:03 +00007661else
Matthias Kloseb9621712010-04-24 17:59:49 +00007662 if test "$ac_cv_type_short" = yes; then
7663 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7664$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007665as_fn_error 77 "cannot compute sizeof (short)
Victor Stinnere0be4232011-10-25 13:06:09 +02007666See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007667 else
7668 ac_cv_sizeof_short=0
7669 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007670fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007671
Martin v. Löwis11437992002-04-12 09:54:03 +00007672fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007673{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5
7674$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007675
7676
7677
Martin v. Löwis11437992002-04-12 09:54:03 +00007678cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007679#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007680_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007681
7682
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007683# The cast to long int works around a bug in the HP C Compiler
7684# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7685# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7686# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of float" >&5
7688$as_echo_n "checking size of float... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007689if ${ac_cv_sizeof_float+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007690 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007691else
Matthias Kloseb9621712010-04-24 17:59:49 +00007692 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 +00007693
Martin v. Löwis11437992002-04-12 09:54:03 +00007694else
Matthias Kloseb9621712010-04-24 17:59:49 +00007695 if test "$ac_cv_type_float" = yes; then
7696 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7697$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007698as_fn_error 77 "cannot compute sizeof (float)
Victor Stinnere0be4232011-10-25 13:06:09 +02007699See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007700 else
7701 ac_cv_sizeof_float=0
7702 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007703fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007704
Martin v. Löwis11437992002-04-12 09:54:03 +00007705fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007706{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_float" >&5
7707$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007708
7709
7710
Martin v. Löwis11437992002-04-12 09:54:03 +00007711cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007712#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007713_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007714
7715
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007716# The cast to long int works around a bug in the HP C Compiler
7717# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7718# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7719# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of double" >&5
7721$as_echo_n "checking size of double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007722if ${ac_cv_sizeof_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007723 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007724else
Matthias Kloseb9621712010-04-24 17:59:49 +00007725 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 +00007726
Martin v. Löwis11437992002-04-12 09:54:03 +00007727else
Matthias Kloseb9621712010-04-24 17:59:49 +00007728 if test "$ac_cv_type_double" = yes; then
7729 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7730$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007731as_fn_error 77 "cannot compute sizeof (double)
Victor Stinnere0be4232011-10-25 13:06:09 +02007732See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007733 else
7734 ac_cv_sizeof_double=0
7735 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007736fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007737
Martin v. Löwis11437992002-04-12 09:54:03 +00007738fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007739{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5
7740$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007741
7742
7743
Martin v. Löwis11437992002-04-12 09:54:03 +00007744cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007745#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007746_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007747
7748
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007749# The cast to long int works around a bug in the HP C Compiler
7750# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7751# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7752# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of fpos_t" >&5
7754$as_echo_n "checking size of fpos_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007755if ${ac_cv_sizeof_fpos_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007756 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007757else
Matthias Kloseb9621712010-04-24 17:59:49 +00007758 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 +00007759
Martin v. Löwis11437992002-04-12 09:54:03 +00007760else
Matthias Kloseb9621712010-04-24 17:59:49 +00007761 if test "$ac_cv_type_fpos_t" = yes; then
7762 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7763$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007764as_fn_error 77 "cannot compute sizeof (fpos_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007765See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007766 else
7767 ac_cv_sizeof_fpos_t=0
7768 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007769fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007770
Martin v. Löwis11437992002-04-12 09:54:03 +00007771fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007772{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_fpos_t" >&5
7773$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007774
7775
7776
Martin v. Löwis11437992002-04-12 09:54:03 +00007777cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007778#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00007779_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00007780
Michael W. Hudson54241132001-12-07 15:38:26 +00007781
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007782# The cast to long int works around a bug in the HP C Compiler
7783# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7784# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7785# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5
7787$as_echo_n "checking size of size_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007788if ${ac_cv_sizeof_size_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007789 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007790else
Matthias Kloseb9621712010-04-24 17:59:49 +00007791 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 +00007792
Martin v. Löwis18e16552006-02-15 17:27:45 +00007793else
Matthias Kloseb9621712010-04-24 17:59:49 +00007794 if test "$ac_cv_type_size_t" = yes; then
7795 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7796$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007797as_fn_error 77 "cannot compute sizeof (size_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007798See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007799 else
7800 ac_cv_sizeof_size_t=0
7801 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00007802fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007803
Martin v. Löwis18e16552006-02-15 17:27:45 +00007804fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007805{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5
7806$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007807
7808
7809
Martin v. Löwis18e16552006-02-15 17:27:45 +00007810cat >>confdefs.h <<_ACEOF
7811#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
7812_ACEOF
7813
7814
Christian Heimes400adb02008-02-01 08:12:03 +00007815# The cast to long int works around a bug in the HP C Compiler
7816# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7817# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7818# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pid_t" >&5
7820$as_echo_n "checking size of pid_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007821if ${ac_cv_sizeof_pid_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007822 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +00007823else
Matthias Kloseb9621712010-04-24 17:59:49 +00007824 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 +00007825
Christian Heimes400adb02008-02-01 08:12:03 +00007826else
Matthias Kloseb9621712010-04-24 17:59:49 +00007827 if test "$ac_cv_type_pid_t" = yes; then
7828 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7829$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007830as_fn_error 77 "cannot compute sizeof (pid_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02007831See \`config.log' for more details" "$LINENO" 5; }
Christian Heimes400adb02008-02-01 08:12:03 +00007832 else
7833 ac_cv_sizeof_pid_t=0
7834 fi
7835fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007836
Christian Heimes400adb02008-02-01 08:12:03 +00007837fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007838{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pid_t" >&5
7839$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +00007840
7841
7842
7843cat >>confdefs.h <<_ACEOF
7844#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
7845_ACEOF
7846
7847
Michael W. Hudson54241132001-12-07 15:38:26 +00007848
Matthias Kloseb9621712010-04-24 17:59:49 +00007849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support" >&5
7850$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007851have_long_long=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007852cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00007853/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007854
Martin v. Löwis11437992002-04-12 09:54:03 +00007855int
7856main ()
7857{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007858long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007859 ;
7860 return 0;
7861}
7862_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007863if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00007864
7865
Matthias Kloseb9621712010-04-24 17:59:49 +00007866$as_echo "#define HAVE_LONG_LONG 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00007867
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007868 have_long_long=yes
7869
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007870fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007871rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007872{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_long" >&5
7873$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +00007874if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007875# The cast to long int works around a bug in the HP C Compiler
7876# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7877# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7878# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
7880$as_echo_n "checking size of long long... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007881if ${ac_cv_sizeof_long_long+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007882 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007883else
Matthias Kloseb9621712010-04-24 17:59:49 +00007884 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 +00007885
Martin v. Löwis11437992002-04-12 09:54:03 +00007886else
Matthias Kloseb9621712010-04-24 17:59:49 +00007887 if test "$ac_cv_type_long_long" = yes; then
7888 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7889$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007890as_fn_error 77 "cannot compute sizeof (long long)
Victor Stinnere0be4232011-10-25 13:06:09 +02007891See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007892 else
7893 ac_cv_sizeof_long_long=0
7894 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007895fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007896
Martin v. Löwis11437992002-04-12 09:54:03 +00007897fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007898{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
7899$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007900
7901
7902
Martin v. Löwis11437992002-04-12 09:54:03 +00007903cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007904#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007905_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007906
Michael W. Hudson54241132001-12-07 15:38:26 +00007907
Guido van Rossumec95c7b1998-08-04 17:59:56 +00007908fi
7909
Matthias Kloseb9621712010-04-24 17:59:49 +00007910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support" >&5
7911$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007912have_long_double=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007913cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007914/* end confdefs.h. */
7915
7916int
7917main ()
7918{
7919long double x; x = (long double)0;
7920 ;
7921 return 0;
7922}
7923_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007924if ac_fn_c_try_compile "$LINENO"; then :
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007925
7926
Matthias Kloseb9621712010-04-24 17:59:49 +00007927$as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007928
7929 have_long_double=yes
7930
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007931fi
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007932rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007933{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_long_double" >&5
7934$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007935if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007936# The cast to long int works around a bug in the HP C Compiler
7937# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7938# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7939# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00007940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long double" >&5
7941$as_echo_n "checking size of long double... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02007942if ${ac_cv_sizeof_long_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00007943 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007944else
Matthias Kloseb9621712010-04-24 17:59:49 +00007945 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 +00007946
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007947else
Matthias Kloseb9621712010-04-24 17:59:49 +00007948 if test "$ac_cv_type_long_double" = yes; then
7949 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
7950$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02007951as_fn_error 77 "cannot compute sizeof (long double)
Victor Stinnere0be4232011-10-25 13:06:09 +02007952See \`config.log' for more details" "$LINENO" 5; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007953 else
7954 ac_cv_sizeof_long_double=0
7955 fi
7956fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007957
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007958fi
Matthias Kloseb9621712010-04-24 17:59:49 +00007959{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_double" >&5
7960$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +00007961
7962
7963
7964cat >>confdefs.h <<_ACEOF
7965#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
7966_ACEOF
7967
7968
7969fi
7970
7971
Matthias Kloseb9621712010-04-24 17:59:49 +00007972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _Bool support" >&5
7973$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007974have_c99_bool=no
Matthias Kloseb9621712010-04-24 17:59:49 +00007975cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +00007976/* end confdefs.h. */
7977
7978int
7979main ()
7980{
7981_Bool x; x = (_Bool)0;
7982 ;
7983 return 0;
7984}
7985_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00007986if ac_fn_c_try_compile "$LINENO"; then :
Thomas Woutersb2137042007-02-01 18:02:27 +00007987
7988
Matthias Kloseb9621712010-04-24 17:59:49 +00007989$as_echo "#define HAVE_C99_BOOL 1" >>confdefs.h
Thomas Woutersb2137042007-02-01 18:02:27 +00007990
7991 have_c99_bool=yes
7992
Thomas Woutersb2137042007-02-01 18:02:27 +00007993fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007994rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00007995{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_c99_bool" >&5
7996$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +00007997if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007998# The cast to long int works around a bug in the HP C Compiler
7999# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8000# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8001# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Bool" >&5
8003$as_echo_n "checking size of _Bool... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008004if ${ac_cv_sizeof__Bool+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008005 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +00008006else
Matthias Kloseb9621712010-04-24 17:59:49 +00008007 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 +00008008
Thomas Woutersb2137042007-02-01 18:02:27 +00008009else
Matthias Kloseb9621712010-04-24 17:59:49 +00008010 if test "$ac_cv_type__Bool" = yes; then
8011 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8012$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008013as_fn_error 77 "cannot compute sizeof (_Bool)
Victor Stinnere0be4232011-10-25 13:06:09 +02008014See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008015 else
8016 ac_cv_sizeof__Bool=0
8017 fi
Thomas Woutersb2137042007-02-01 18:02:27 +00008018fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008019
Thomas Woutersb2137042007-02-01 18:02:27 +00008020fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008021{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Bool" >&5
8022$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008023
8024
8025
Thomas Woutersb2137042007-02-01 18:02:27 +00008026cat >>confdefs.h <<_ACEOF
8027#define SIZEOF__BOOL $ac_cv_sizeof__Bool
8028_ACEOF
8029
8030
8031fi
8032
Matthias Kloseb9621712010-04-24 17:59:49 +00008033ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "#ifdef HAVE_STDINT_H
Thomas Wouters89f507f2006-12-13 04:49:30 +00008034 #include <stdint.h>
8035 #endif
Antoine Pitrou1bf29b72010-10-10 08:10:16 +00008036 #ifdef HAVE_INTTYPES_H
8037 #include <inttypes.h>
8038 #endif
Matthias Kloseb9621712010-04-24 17:59:49 +00008039"
Victor Stinnere0be4232011-10-25 13:06:09 +02008040if test "x$ac_cv_type_uintptr_t" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +00008041
8042cat >>confdefs.h <<_ACEOF
8043#define HAVE_UINTPTR_T 1
8044_ACEOF
8045
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008046# The cast to long int works around a bug in the HP C Compiler
8047# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8048# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8049# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008050{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of uintptr_t" >&5
8051$as_echo_n "checking size of uintptr_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008052if ${ac_cv_sizeof_uintptr_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008053 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008054else
Matthias Kloseb9621712010-04-24 17:59:49 +00008055 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 +00008056
Martin v. Löwis11437992002-04-12 09:54:03 +00008057else
Matthias Kloseb9621712010-04-24 17:59:49 +00008058 if test "$ac_cv_type_uintptr_t" = yes; then
8059 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8060$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008061as_fn_error 77 "cannot compute sizeof (uintptr_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008062See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008063 else
8064 ac_cv_sizeof_uintptr_t=0
8065 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008066fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008067
Martin v. Löwis11437992002-04-12 09:54:03 +00008068fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008069{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_uintptr_t" >&5
8070$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008071
8072
8073
Martin v. Löwis11437992002-04-12 09:54:03 +00008074cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008075#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008076_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008077
Michael W. Hudson54241132001-12-07 15:38:26 +00008078
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008079fi
8080
Thomas Wouters89f507f2006-12-13 04:49:30 +00008081
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008082# The cast to long int works around a bug in the HP C Compiler
8083# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8084# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8085# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5
8087$as_echo_n "checking size of off_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008088if ${ac_cv_sizeof_off_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008089 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008090else
Matthias Kloseb9621712010-04-24 17:59:49 +00008091 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008092#ifdef HAVE_SYS_TYPES_H
8093#include <sys/types.h>
8094#endif
8095
Matthias Kloseb9621712010-04-24 17:59:49 +00008096"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008097
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008098else
Matthias Kloseb9621712010-04-24 17:59:49 +00008099 if test "$ac_cv_type_off_t" = yes; then
8100 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8101$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008102as_fn_error 77 "cannot compute sizeof (off_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008103See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008104 else
8105 ac_cv_sizeof_off_t=0
8106 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008107fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008108
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008109fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008110{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5
8111$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008112
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008113
8114
Martin v. Löwis11437992002-04-12 09:54:03 +00008115cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008116#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008117_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008118
Michael W. Hudson54241132001-12-07 15:38:26 +00008119
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008120
Matthias Kloseb9621712010-04-24 17:59:49 +00008121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable large file support" >&5
8122$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008123if test "$have_long_long" = yes
8124then
8125if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008126 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008127
Matthias Kloseb9621712010-04-24 17:59:49 +00008128$as_echo "#define HAVE_LARGEFILE_SUPPORT 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008129
Matthias Kloseb9621712010-04-24 17:59:49 +00008130 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8131$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008132else
Matthias Kloseb9621712010-04-24 17:59:49 +00008133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8134$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008135fi
Mark Dickinson2df5d282009-12-31 21:22:50 +00008136else
Matthias Kloseb9621712010-04-24 17:59:49 +00008137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8138$as_echo "no" >&6; }
Mark Dickinson2df5d282009-12-31 21:22:50 +00008139fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +00008140
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008141# The cast to long int works around a bug in the HP C Compiler
8142# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8143# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8144# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5
8146$as_echo_n "checking size of time_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008147if ${ac_cv_sizeof_time_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008148 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008149else
Matthias Kloseb9621712010-04-24 17:59:49 +00008150 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008151#ifdef HAVE_SYS_TYPES_H
8152#include <sys/types.h>
8153#endif
8154#ifdef HAVE_TIME_H
8155#include <time.h>
8156#endif
8157
Matthias Kloseb9621712010-04-24 17:59:49 +00008158"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008159
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008160else
Matthias Kloseb9621712010-04-24 17:59:49 +00008161 if test "$ac_cv_type_time_t" = yes; then
8162 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8163$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008164as_fn_error 77 "cannot compute sizeof (time_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008165See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008166 else
8167 ac_cv_sizeof_time_t=0
8168 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008169fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008170
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008171fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008172{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5
8173$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008174
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008175
8176
Martin v. Löwis11437992002-04-12 09:54:03 +00008177cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008178#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008179_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008180
Michael W. Hudson54241132001-12-07 15:38:26 +00008181
8182
Trent Mick635f6fb2000-08-23 21:33:05 +00008183# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008184ac_save_cc="$CC"
8185if test "$ac_cv_kpthread" = "yes"
8186then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00008187elif test "$ac_cv_kthread" = "yes"
8188then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00008189elif test "$ac_cv_pthread" = "yes"
8190then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008191fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008192
Matthias Kloseb9621712010-04-24 17:59:49 +00008193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_t" >&5
8194$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008195have_pthread_t=no
Matthias Kloseb9621712010-04-24 17:59:49 +00008196cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008197/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008198
8199 #include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008200int
8201main ()
8202{
Guido van Rossum12580492000-09-24 16:47:19 +00008203pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008204 ;
8205 return 0;
8206}
Matthias Kloseb159a552010-04-25 21:00:44 +00008207
Martin v. Löwis11437992002-04-12 09:54:03 +00008208_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008209if ac_fn_c_try_compile "$LINENO"; then :
Trent Mick635f6fb2000-08-23 21:33:05 +00008210 have_pthread_t=yes
Trent Mick635f6fb2000-08-23 21:33:05 +00008211fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008212rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +00008213{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pthread_t" >&5
8214$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +00008215if test "$have_pthread_t" = yes ; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008216 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008217# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8218# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8219# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +00008220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of pthread_t" >&5
8221$as_echo_n "checking size of pthread_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008222if ${ac_cv_sizeof_pthread_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008223 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008224else
Matthias Kloseb9621712010-04-24 17:59:49 +00008225 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (pthread_t))" "ac_cv_sizeof_pthread_t" "
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008226#ifdef HAVE_PTHREAD_H
8227#include <pthread.h>
8228#endif
8229
Matthias Kloseb9621712010-04-24 17:59:49 +00008230"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008231
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008232else
Matthias Kloseb9621712010-04-24 17:59:49 +00008233 if test "$ac_cv_type_pthread_t" = yes; then
8234 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
8235$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008236as_fn_error 77 "cannot compute sizeof (pthread_t)
Victor Stinnere0be4232011-10-25 13:06:09 +02008237See \`config.log' for more details" "$LINENO" 5; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008238 else
8239 ac_cv_sizeof_pthread_t=0
8240 fi
Trent Mick635f6fb2000-08-23 21:33:05 +00008241fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008242
Trent Mick635f6fb2000-08-23 21:33:05 +00008243fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008244{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_pthread_t" >&5
8245$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008246
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008247
8248
Martin v. Löwis11437992002-04-12 09:54:03 +00008249cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008250#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008251_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00008252
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00008253
Trent Mick635f6fb2000-08-23 21:33:05 +00008254fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00008255CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00008256
Michael W. Hudson54241132001-12-07 15:38:26 +00008257
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008258case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008259 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008260 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
8261 ;;
8262 Darwin/*)
8263 OTHER_LIBTOOL_OPT=""
8264 ;;
8265esac
8266
8267
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008268ARCH_RUN_32BIT=""
8269
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008270case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00008271 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00008272 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
8273 if test "${enable_universalsdk}"; then
8274 :
8275 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008276 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008277 fi
Jack Jansenb36687a2004-07-16 08:43:47 +00008278 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008279 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00008280 Darwin/*)
Ronald Oussoren9812a6c2010-02-07 11:53:18 +00008281 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +00008282 if test ${gcc_version} '<' 4.0
8283 then
8284 LIBTOOL_CRUFT="-lcc_dynamic"
8285 else
8286 LIBTOOL_CRUFT=""
8287 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008288 if test "$cross_compiling" = yes; then :
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008289 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008290else
Matthias Kloseb9621712010-04-24 17:59:49 +00008291 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008292/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008293
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008294 #include <unistd.h>
8295 int main(int argc, char*argv[])
8296 {
8297 if (sizeof(long) == 4) {
8298 return 0;
8299 } else {
8300 return 1;
8301 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +00008302 }
8303
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008304_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008305if ac_fn_c_try_run "$LINENO"; then :
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008306 ac_osx_32bit=yes
8307else
Matthias Kloseb9621712010-04-24 17:59:49 +00008308 ac_osx_32bit=no
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008309fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008310rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8311 conftest.$ac_objext conftest.beam conftest.$ac_ext
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008312fi
8313
8314
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008315 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008316 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008317 i386)
8318 MACOSX_DEFAULT_ARCH="i386"
8319 ;;
8320 ppc)
8321 MACOSX_DEFAULT_ARCH="ppc"
8322 ;;
8323 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008324 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008325 ;;
8326 esac
8327 else
Ronald Oussorene3da75a2010-02-11 13:38:58 +00008328 case `/usr/bin/arch` in
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008329 i386)
8330 MACOSX_DEFAULT_ARCH="x86_64"
8331 ;;
8332 ppc)
8333 MACOSX_DEFAULT_ARCH="ppc64"
8334 ;;
8335 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008336 as_fn_error $? "Unexpected output of 'arch' on OSX" "$LINENO" 5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00008337 ;;
8338 esac
8339
8340 #ARCH_RUN_32BIT="true"
8341 fi
8342
8343 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +00008344 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008345 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008346esac
8347
Matthias Kloseb9621712010-04-24 17:59:49 +00008348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-framework" >&5
8349$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008350if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008351then
Skip Montanarodecc6a42003-01-01 20:07:49 +00008352 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00008353 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00008354 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008355
Matthias Kloseb9621712010-04-24 17:59:49 +00008356$as_echo "#define WITH_NEXT_FRAMEWORK 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008357
Matthias Kloseb9621712010-04-24 17:59:49 +00008358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8359$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +00008360 if test $enable_shared = "yes"
8361 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02008362 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 +00008363 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008364else
Matthias Kloseb9621712010-04-24 17:59:49 +00008365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8366$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008367fi
8368
Matthias Kloseb9621712010-04-24 17:59:49 +00008369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dyld" >&5
8370$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008371case $ac_sys_system/$ac_sys_release in
8372 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008373
Matthias Kloseb9621712010-04-24 17:59:49 +00008374$as_echo "#define WITH_DYLD 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008375
Matthias Kloseb9621712010-04-24 17:59:49 +00008376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: always on for Darwin" >&5
8377$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008378 ;;
8379 *)
Matthias Kloseb9621712010-04-24 17:59:49 +00008380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8381$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00008382 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00008383esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008384
Guido van Rossum0a516c91994-09-12 10:58:40 +00008385# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00008386
Michael W. Hudson54241132001-12-07 15:38:26 +00008387
8388
8389
8390
Benjamin Peterson99f03762010-04-11 22:15:28 +00008391
Thomas Wouters477c8d52006-05-27 19:21:47 +00008392
Guido van Rossum0a516c91994-09-12 10:58:40 +00008393# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00008394# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008395# (Shared libraries in this instance are shared modules to be loaded into
8396# Python, as opposed to building Python itself as a shared library.)
Matthias Kloseb9621712010-04-24 17:59:49 +00008397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDSHARED" >&5
8398$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008399if test -z "$LDSHARED"
8400then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008401 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008402 AIX*)
Georg Brandl9a829be2011-02-15 15:44:51 +00008403 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00008404 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008405 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00008406 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00008407 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00008408 SunOS/5*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008409 if test "$GCC" = "yes" ; then
8410 LDSHARED='$(CC) -shared'
8411 LDCXXSHARED='$(CXX) -shared'
8412 else
8413 LDSHARED='$(CC) -G'
8414 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a6632000-05-26 12:22:54 +00008415 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008416 hp*|HP*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008417 if test "$GCC" = "yes" ; then
8418 LDSHARED='$(CC) -shared'
8419 LDCXXSHARED='$(CXX) -shared'
8420 else
8421 LDSHARED='ld -b'
Thomas Hellerf44b9a12008-04-04 10:18:23 +00008422 fi ;;
Jack Jansen418c3b12001-11-14 10:59:57 +00008423 Darwin/1.3*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008424 LDSHARED='$(CC) -bundle'
8425 LDCXXSHARED='$(CXX) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +00008426 if test "$enable_framework" ; then
8427 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008428 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8429 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008430 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00008431 else
8432 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00008433 LDSHARED="$LDSHARED -undefined suppress"
Benjamin Peterson99f03762010-04-11 22:15:28 +00008434 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00008435 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008436 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008437 LDSHARED='$(CC) -bundle'
8438 LDCXXSHARED='$(CXX) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +00008439 if test "$enable_framework" ; then
8440 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008441 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8442 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008443 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008444 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00008445 # No framework, use the Python app as bundle-loader
8446 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00008447 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008448 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008449 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00008450 Darwin/*)
8451 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
8452 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +00008453
Benjamin Peterson14ae9592008-07-16 02:20:15 +00008454 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +00008455 then
Thomas Wouters477c8d52006-05-27 19:21:47 +00008456 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +00008457 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +00008458 fi
Antoine Pitroud4958c22010-10-13 17:01:10 +00008459 LDSHARED='$(CC) -bundle -undefined dynamic_lookup'
8460 LDCXXSHARED='$(CXX) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +00008461 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +00008462 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00008463 LDSHARED='$(CC) -bundle'
8464 LDCXXSHARED='$(CXX) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +00008465 if test "$enable_framework" ; then
8466 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +00008467 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
8468 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008469 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008470 else
8471 # No framework, use the Python app as bundle-loader
8472 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
8473 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Benjamin Peterson99f03762010-04-11 22:15:28 +00008474 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +00008475 fi
8476 fi
8477 ;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008478 Linux*|GNU*|QNX*)
8479 LDSHARED='$(CC) -shared'
8480 LDCXXSHARED='$(CXX) -shared';;
8481 BSD/OS*/4*)
8482 LDSHARED="gcc -shared"
8483 LDCXXSHARED="g++ -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008484 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00008485 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00008486 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008487 LDSHARED='$(CC) -shared'
8488 LDCXXSHARED='$(CXX) -shared'
Guido van Rossum0286ae82000-08-29 15:06:49 +00008489 else
Antoine Pitroud4958c22010-10-13 17:01:10 +00008490 LDSHARED="ld -Bshareable"
Guido van Rossum0286ae82000-08-29 15:06:49 +00008491 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008492 OpenBSD*)
8493 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8494 then
Antoine Pitroud4958c22010-10-13 17:01:10 +00008495 LDSHARED='$(CC) -shared $(CCSHARED)'
8496 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008497 else
8498 case `uname -r` in
8499 [01].* | 2.[0-7] | 2.[0-7].*)
8500 LDSHARED="ld -Bshareable ${LDFLAGS}"
8501 ;;
8502 *)
Antoine Pitroud4958c22010-10-13 17:01:10 +00008503 LDSHARED='$(CC) -shared $(CCSHARED)'
8504 LDCXXSHARED='$(CXX) -shared $(CCSHARED)'
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00008505 ;;
8506 esac
8507 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008508 NetBSD*|DragonFly*)
Antoine Pitrouece919e2011-01-02 20:45:21 +00008509 LDSHARED='$(CC) -shared'
8510 LDCXXSHARED='$(CXX) -shared';;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008511 OpenUNIX*|UnixWare*)
Benjamin Peterson99f03762010-04-11 22:15:28 +00008512 if test "$GCC" = "yes" ; then
8513 LDSHARED='$(CC) -shared'
8514 LDCXXSHARED='$(CXX) -shared'
8515 else
8516 LDSHARED='$(CC) -G'
8517 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00008518 fi;;
Benjamin Peterson99f03762010-04-11 22:15:28 +00008519 SCO_SV*)
8520 LDSHARED='$(CC) -Wl,-G,-Bexport'
8521 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
8522 CYGWIN*)
8523 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
8524 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008525 *) LDSHARED="ld";;
8526 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008527fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008528{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDSHARED" >&5
8529$as_echo "$LDSHARED" >&6; }
Benjamin Peterson99f03762010-04-11 22:15:28 +00008530LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008531BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00008532# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008533# library (module) -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CCSHARED" >&5
8535$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008536if test -z "$CCSHARED"
8537then
Guido van Rossum07397971997-04-29 21:49:50 +00008538 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00008539 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008540 then CCSHARED="-fPIC";
8541 elif test `uname -p` = sparc;
8542 then CCSHARED="-xcode=pic32";
8543 else CCSHARED="-Kpic";
8544 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00008545 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00008546 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00008547 else CCSHARED="+z";
8548 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008549 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008550 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008551 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008552 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00008553 if test "$GCC" = "yes"
8554 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00008555 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00008556 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008557 SCO_SV*)
8558 if test "$GCC" = "yes"
8559 then CCSHARED="-fPIC"
8560 else CCSHARED="-Kpic -belf"
8561 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008562 IRIX*/6*) case $CC in
8563 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00008564 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008565 esac;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008566 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008567fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008568{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
8569$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008570# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008571# the python executable -- this is only needed for a few systems
Matthias Kloseb9621712010-04-24 17:59:49 +00008572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LINKFORSHARED" >&5
8573$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008574if test -z "$LINKFORSHARED"
8575then
Guido van Rossum07397971997-04-29 21:49:50 +00008576 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00008577 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008578 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00008579 LINKFORSHARED="-Wl,-E -Wl,+s";;
8580# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00008581 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00008582 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00008583 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00008584 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +00008585 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +00008586 if test "$enable_framework"
8587 then
Jack Jansenda49e192005-01-07 13:08:22 +00008588 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00008589 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +00008590 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00008591 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00008592 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00008593 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +00008594 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +00008595 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
8596 then
8597 LINKFORSHARED="-Wl,--export-dynamic"
8598 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008599 SunOS/5*) case $CC in
8600 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00008601 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00008602 then
8603 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00008604 fi;;
8605 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00008606 CYGWIN*)
8607 if test $enable_shared = "no"
8608 then
8609 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
8610 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00008611 QNX*)
8612 # -Wl,-E causes the symbols to be added to the dynamic
8613 # symbol table so that they can be found when a module
8614 # is loaded. -N 2048K causes the stack size to be set
8615 # to 2048 kilobytes so that the stack doesn't overflow
8616 # when running test_compile.py.
8617 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +00008618 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00008619fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008620{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
8621$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +00008622
Michael W. Hudson54241132001-12-07 15:38:26 +00008623
Benjamin Peterson8f95cc22008-07-16 02:23:25 +00008624
Matthias Kloseb9621712010-04-24 17:59:49 +00008625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGSFORSHARED" >&5
8626$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008627if test ! "$LIBRARY" = "$LDLIBRARY"
8628then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00008629 case $ac_sys_system in
8630 CYGWIN*)
8631 # Cygwin needs CCSHARED when building extension DLLs
8632 # but not when building the interpreter DLL.
8633 CFLAGSFORSHARED='';;
8634 *)
8635 CFLAGSFORSHARED='$(CCSHARED)'
8636 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008637fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008638{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CFLAGSFORSHARED" >&5
8639$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00008640
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008641# SHLIBS are libraries (except -lc and -lm) to link to the python shared
8642# library (with --enable-shared).
8643# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008644# symbols, this must be set to $(LIBS) (expanded by make). We do this even
8645# if it is not required, since it creates a dependency of the shared library
8646# to LIBS. This, in turn, means that applications linking the shared libpython
8647# don't need to link LIBS explicitly. The default should be only changed
8648# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008649
Matthias Kloseb9621712010-04-24 17:59:49 +00008650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SHLIBS" >&5
8651$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008652case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008653 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00008654 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008655esac
Matthias Kloseb9621712010-04-24 17:59:49 +00008656{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLIBS" >&5
8657$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +00008658
8659
Guido van Rossum627b2d71993-12-24 10:39:16 +00008660# checks for libraries
Georg Brandl941f9562011-02-25 15:21:47 +00008661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sendfile in -lsendfile" >&5
8662$as_echo_n "checking for sendfile in -lsendfile... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008663if ${ac_cv_lib_sendfile_sendfile+:} false; then :
Georg Brandl941f9562011-02-25 15:21:47 +00008664 $as_echo_n "(cached) " >&6
8665else
8666 ac_check_lib_save_LIBS=$LIBS
8667LIBS="-lsendfile $LIBS"
8668cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8669/* end confdefs.h. */
8670
8671/* Override any GCC internal prototype to avoid an error.
8672 Use char because int might match the return type of a GCC
8673 builtin and then its argument prototype would still apply. */
8674#ifdef __cplusplus
8675extern "C"
8676#endif
8677char sendfile ();
8678int
8679main ()
8680{
8681return sendfile ();
8682 ;
8683 return 0;
8684}
8685_ACEOF
8686if ac_fn_c_try_link "$LINENO"; then :
8687 ac_cv_lib_sendfile_sendfile=yes
8688else
8689 ac_cv_lib_sendfile_sendfile=no
8690fi
8691rm -f core conftest.err conftest.$ac_objext \
8692 conftest$ac_exeext conftest.$ac_ext
8693LIBS=$ac_check_lib_save_LIBS
8694fi
8695{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_sendfile" >&5
8696$as_echo "$ac_cv_lib_sendfile_sendfile" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008697if test "x$ac_cv_lib_sendfile_sendfile" = xyes; then :
Georg Brandl941f9562011-02-25 15:21:47 +00008698 cat >>confdefs.h <<_ACEOF
8699#define HAVE_LIBSENDFILE 1
8700_ACEOF
8701
8702 LIBS="-lsendfile $LIBS"
8703
8704fi
8705
Matthias Kloseb9621712010-04-24 17:59:49 +00008706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
8707$as_echo_n "checking for dlopen in -ldl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008708if ${ac_cv_lib_dl_dlopen+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008709 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008710else
Martin v. Löwis11437992002-04-12 09:54:03 +00008711 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008712LIBS="-ldl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008713cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008714/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008715
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008716/* Override any GCC internal prototype to avoid an error.
8717 Use char because int might match the return type of a GCC
8718 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008719#ifdef __cplusplus
8720extern "C"
8721#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008722char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008723int
8724main ()
8725{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008726return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008727 ;
8728 return 0;
8729}
8730_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008731if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008732 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008733else
Matthias Kloseb9621712010-04-24 17:59:49 +00008734 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008735fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008736rm -f core conftest.err conftest.$ac_objext \
8737 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008738LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008739fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008740{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
8741$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008742if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008743 cat >>confdefs.h <<_ACEOF
8744#define HAVE_LIBDL 1
8745_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008746
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008747 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00008748
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008749fi
8750 # Dynamic linking for SunOS/Solaris and SYSV
Matthias Kloseb9621712010-04-24 17:59:49 +00008751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
8752$as_echo_n "checking for shl_load in -ldld... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008753if ${ac_cv_lib_dld_shl_load+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008754 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008755else
Martin v. Löwis11437992002-04-12 09:54:03 +00008756 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008757LIBS="-ldld $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008758cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008759/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008760
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008761/* Override any GCC internal prototype to avoid an error.
8762 Use char because int might match the return type of a GCC
8763 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008764#ifdef __cplusplus
8765extern "C"
8766#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008767char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008768int
8769main ()
8770{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008771return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008772 ;
8773 return 0;
8774}
8775_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008776if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008777 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008778else
Matthias Kloseb9621712010-04-24 17:59:49 +00008779 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00008780fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008781rm -f core conftest.err conftest.$ac_objext \
8782 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008783LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00008784fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008785{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
8786$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008787if test "x$ac_cv_lib_dld_shl_load" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008788 cat >>confdefs.h <<_ACEOF
8789#define HAVE_LIBDLD 1
8790_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00008791
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008792 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008793
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008794fi
8795 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00008796
Georg Brandlb1441c72009-01-03 22:33:39 +00008797# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +00008798if test "$with_threads" = "yes" -o -z "$with_threads"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00008799 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_init" >&5
8800$as_echo_n "checking for library containing sem_init... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008801if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008802 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008803else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008804 ac_func_search_save_LIBS=$LIBS
Matthias Kloseb9621712010-04-24 17:59:49 +00008805cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008806/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008807
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008808/* Override any GCC internal prototype to avoid an error.
8809 Use char because int might match the return type of a GCC
8810 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008811#ifdef __cplusplus
8812extern "C"
8813#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008814char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008815int
8816main ()
8817{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008818return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008819 ;
8820 return 0;
8821}
8822_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008823for ac_lib in '' pthread rt posix4; do
8824 if test -z "$ac_lib"; then
8825 ac_res="none required"
8826 else
8827 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008828 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008829 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008830 if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008831 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00008832fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008833rm -f core conftest.err conftest.$ac_objext \
8834 conftest$ac_exeext
Victor Stinnere0be4232011-10-25 13:06:09 +02008835 if ${ac_cv_search_sem_init+:} false; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008836 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008837fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008838done
Victor Stinnere0be4232011-10-25 13:06:09 +02008839if ${ac_cv_search_sem_init+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008840
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008841else
8842 ac_cv_search_sem_init=no
8843fi
8844rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00008845LIBS=$ac_func_search_save_LIBS
8846fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008847{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_init" >&5
8848$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008849ac_res=$ac_cv_search_sem_init
Matthias Kloseb9621712010-04-24 17:59:49 +00008850if test "$ac_res" != no; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008851 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008852
Martin v. Löwis41933dd2002-03-21 15:10:58 +00008853fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00008854 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00008855 # posix4 on Solaris 2.6
8856 # pthread (first!) on Linux
8857fi
8858
Martin v. Löwis19d17342003-06-14 21:03:05 +00008859# check if we need libintl for locale functions
Matthias Kloseb9621712010-04-24 17:59:49 +00008860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for textdomain in -lintl" >&5
8861$as_echo_n "checking for textdomain in -lintl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008862if ${ac_cv_lib_intl_textdomain+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008863 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +00008864else
8865 ac_check_lib_save_LIBS=$LIBS
8866LIBS="-lintl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008867cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008868/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008869
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008870/* Override any GCC internal prototype to avoid an error.
8871 Use char because int might match the return type of a GCC
8872 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00008873#ifdef __cplusplus
8874extern "C"
8875#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +00008876char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008877int
8878main ()
8879{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008880return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00008881 ;
8882 return 0;
8883}
8884_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008885if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008886 ac_cv_lib_intl_textdomain=yes
8887else
Matthias Kloseb9621712010-04-24 17:59:49 +00008888 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +00008889fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008890rm -f core conftest.err conftest.$ac_objext \
8891 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00008892LIBS=$ac_check_lib_save_LIBS
8893fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008894{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_textdomain" >&5
8895$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008896if test "x$ac_cv_lib_intl_textdomain" = xyes; then :
Martin v. Löwis19d17342003-06-14 21:03:05 +00008897
Matthias Kloseb9621712010-04-24 17:59:49 +00008898$as_echo "#define WITH_LIBINTL 1" >>confdefs.h
Martin v. Löwis19d17342003-06-14 21:03:05 +00008899
Brett Cannonc6d936e2009-06-07 20:09:53 +00008900 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +00008901fi
8902
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008903
8904# checks for system dependent C++ extensions support
8905case "$ac_sys_system" in
Matthias Kloseb9621712010-04-24 17:59:49 +00008906 AIX*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for genuine AIX C++ extensions support" >&5
8907$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
8908 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008909/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00008910
Georg Brandl59e87bd2011-02-15 19:48:59 +00008911 #include <load.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008912int
8913main ()
8914{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008915loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00008916 ;
8917 return 0;
8918}
Matthias Kloseb159a552010-04-25 21:00:44 +00008919
Martin v. Löwis11437992002-04-12 09:54:03 +00008920_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008921if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008922
Matthias Kloseb159a552010-04-25 21:00:44 +00008923
Matthias Kloseb9621712010-04-24 17:59:49 +00008924$as_echo "#define AIX_GENUINE_CPLUSPLUS 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00008925
Matthias Kloseb159a552010-04-25 21:00:44 +00008926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008927$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008928
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008929else
Matthias Kloseb159a552010-04-25 21:00:44 +00008930
8931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00008932$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00008933
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008934fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008935rm -f core conftest.err conftest.$ac_objext \
8936 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00008937 *) ;;
8938esac
8939
Guido van Rossum70c7f481998-03-26 18:44:10 +00008940# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Matthias Kloseb9621712010-04-24 17:59:49 +00008941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5
8942$as_echo_n "checking for t_open in -lnsl... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008943if ${ac_cv_lib_nsl_t_open+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008944 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008945else
Martin v. Löwis11437992002-04-12 09:54:03 +00008946 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008947LIBS="-lnsl $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008948cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008949/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008950
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008951/* Override any GCC internal prototype to avoid an error.
8952 Use char because int might match the return type of a GCC
8953 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008954#ifdef __cplusplus
8955extern "C"
8956#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008957char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008958int
8959main ()
8960{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008961return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008962 ;
8963 return 0;
8964}
8965_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00008966if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00008967 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008968else
Matthias Kloseb9621712010-04-24 17:59:49 +00008969 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008970fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008971rm -f core conftest.err conftest.$ac_objext \
8972 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008973LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008974fi
Matthias Kloseb9621712010-04-24 17:59:49 +00008975{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5
8976$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008977if test "x$ac_cv_lib_nsl_t_open" = xyes; then :
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008978 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +00008979fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +00008980 # SVR4
Matthias Kloseb9621712010-04-24 17:59:49 +00008981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
8982$as_echo_n "checking for socket in -lsocket... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02008983if ${ac_cv_lib_socket_socket+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00008984 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008985else
Martin v. Löwis11437992002-04-12 09:54:03 +00008986 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00008987LIBS="-lsocket $LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00008988cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00008989/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008990
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008991/* Override any GCC internal prototype to avoid an error.
8992 Use char because int might match the return type of a GCC
8993 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008994#ifdef __cplusplus
8995extern "C"
8996#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00008997char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00008998int
8999main ()
9000{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009001return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009002 ;
9003 return 0;
9004}
9005_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009006if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009007 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009008else
Matthias Kloseb9621712010-04-24 17:59:49 +00009009 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009010fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009011rm -f core conftest.err conftest.$ac_objext \
9012 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009013LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009014fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009015{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
9016$as_echo "$ac_cv_lib_socket_socket" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009017if test "x$ac_cv_lib_socket_socket" = xyes; then :
Guido van Rossumad678af1998-10-02 14:42:15 +00009018 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +00009019fi
9020 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +00009021
Matthias Kloseb9621712010-04-24 17:59:49 +00009022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libs" >&5
9023$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009024
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009025# Check whether --with-libs was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009026if test "${with_libs+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009027 withval=$with_libs;
Matthias Kloseb9621712010-04-24 17:59:49 +00009028{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $withval" >&5
9029$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +00009030LIBS="$withval $LIBS"
9031
9032else
Matthias Kloseb9621712010-04-24 17:59:49 +00009033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9034$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009035fi
9036
Guido van Rossum7f43da71994-08-01 12:15:30 +00009037
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009038if test -n "$ac_tool_prefix"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009039 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9040set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9042$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009043if ${ac_cv_path_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009044 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00009045else
9046 case $PKG_CONFIG in
9047 [\\/]* | ?:[\\/]*)
9048 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9049 ;;
9050 *)
9051 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9052for as_dir in $PATH
9053do
9054 IFS=$as_save_IFS
9055 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009056 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00009057 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009058 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00009059 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00009060 break 2
9061 fi
9062done
Matthias Kloseb9621712010-04-24 17:59:49 +00009063 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00009064IFS=$as_save_IFS
9065
9066 ;;
9067esac
9068fi
9069PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9070if test -n "$PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
9072$as_echo "$PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009073else
Matthias Kloseb9621712010-04-24 17:59:49 +00009074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9075$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009076fi
9077
9078
9079fi
9080if test -z "$ac_cv_path_PKG_CONFIG"; then
9081 ac_pt_PKG_CONFIG=$PKG_CONFIG
9082 # Extract the first word of "pkg-config", so it can be a program name with args.
9083set dummy pkg-config; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +00009084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9085$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009086if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009087 $as_echo_n "(cached) " >&6
Benjamin Petersond78735d2010-01-01 16:04:23 +00009088else
9089 case $ac_pt_PKG_CONFIG in
9090 [\\/]* | ?:[\\/]*)
9091 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9092 ;;
9093 *)
9094 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9095for as_dir in $PATH
9096do
9097 IFS=$as_save_IFS
9098 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +00009099 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +00009100 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009101 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
Matthias Kloseb9621712010-04-24 17:59:49 +00009102 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Benjamin Petersond78735d2010-01-01 16:04:23 +00009103 break 2
9104 fi
9105done
Matthias Kloseb9621712010-04-24 17:59:49 +00009106 done
Benjamin Petersond78735d2010-01-01 16:04:23 +00009107IFS=$as_save_IFS
9108
9109 ;;
9110esac
9111fi
9112ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9113if test -n "$ac_pt_PKG_CONFIG"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
9115$as_echo "$ac_pt_PKG_CONFIG" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009116else
Matthias Kloseb9621712010-04-24 17:59:49 +00009117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9118$as_echo "no" >&6; }
Benjamin Petersond78735d2010-01-01 16:04:23 +00009119fi
9120
9121 if test "x$ac_pt_PKG_CONFIG" = x; then
9122 PKG_CONFIG=""
9123 else
9124 case $cross_compiling:$ac_tool_warned in
9125yes:)
Matthias Kloseb9621712010-04-24 17:59:49 +00009126{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9127$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Benjamin Petersond78735d2010-01-01 16:04:23 +00009128ac_tool_warned=yes ;;
9129esac
9130 PKG_CONFIG=$ac_pt_PKG_CONFIG
9131 fi
9132else
9133 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9134fi
9135
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009136
9137# Check for use of the system expat library
Matthias Kloseb9621712010-04-24 17:59:49 +00009138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-expat" >&5
9139$as_echo_n "checking for --with-system-expat... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009140
9141# Check whether --with-system_expat was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009142if test "${with_system_expat+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009143 withval=$with_system_expat;
Benjamin Peterson79263252010-10-31 16:50:44 +00009144else
9145 with_system_expat="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009146fi
9147
9148
Matthias Kloseb9621712010-04-24 17:59:49 +00009149{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_expat" >&5
9150$as_echo "$with_system_expat" >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009151
9152# Check for use of the system libffi library
Matthias Kloseb9621712010-04-24 17:59:49 +00009153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-ffi" >&5
9154$as_echo_n "checking for --with-system-ffi... " >&6; }
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009155
9156# Check whether --with-system_ffi was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009157if test "${with_system_ffi+set}" = set; then :
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009158 withval=$with_system_ffi;
Benjamin Peterson79263252010-10-31 16:50:44 +00009159else
9160 with_system_ffi="no"
Benjamin Peterson0f64b0b2010-03-09 21:49:52 +00009161fi
9162
9163
9164if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Petersond78735d2010-01-01 16:04:23 +00009165 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
9166else
9167 LIBFFI_INCLUDEDIR=""
9168fi
9169
9170
Matthias Kloseb9621712010-04-24 17:59:49 +00009171{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_ffi" >&5
9172$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00009173
Stefan Krah60187b52012-03-23 19:06:27 +01009174# Check for use of the system libmpdec library
9175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-system-libmpdec" >&5
9176$as_echo_n "checking for --with-system-libmpdec... " >&6; }
9177
9178# Check whether --with-system_libmpdec was given.
9179if test "${with_system_libmpdec+set}" = set; then :
9180 withval=$with_system_libmpdec;
9181else
9182 with_system_libmpdec="no"
9183fi
9184
9185
9186{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_system_libmpdec" >&5
9187$as_echo "$with_system_libmpdec" >&6; }
9188
Benjamin Peterson076ed002010-10-31 17:11:02 +00009189# Check for support for loadable sqlite extensions
9190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --enable-loadable-sqlite-extensions" >&5
9191$as_echo_n "checking for --enable-loadable-sqlite-extensions... " >&6; }
9192# Check whether --enable-loadable-sqlite-extensions was given.
9193if test "${enable_loadable_sqlite_extensions+set}" = set; then :
9194 enableval=$enable_loadable_sqlite_extensions;
9195else
9196 enable_loadable_sqlite_extensions="no"
9197fi
9198
9199
9200{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_loadable_sqlite_extensions" >&5
9201$as_echo "$enable_loadable_sqlite_extensions" >&6; }
9202
Matthias Klose55708cc2009-04-30 08:06:49 +00009203# Check for --with-dbmliborder
Matthias Kloseb9621712010-04-24 17:59:49 +00009204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-dbmliborder" >&5
9205$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009206
9207# Check whether --with-dbmliborder was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009208if test "${with_dbmliborder+set}" = set; then :
Matthias Klose55708cc2009-04-30 08:06:49 +00009209 withval=$with_dbmliborder;
9210if test x$with_dbmliborder = xyes
9211then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009212as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009213else
9214 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
9215 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
9216 then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +02009217 as_fn_error $? "proper usage is --with-dbmliborder=db1:db2:..." "$LINENO" 5
Matthias Klose55708cc2009-04-30 08:06:49 +00009218 fi
9219 done
9220fi
9221fi
9222
Matthias Kloseb9621712010-04-24 17:59:49 +00009223{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_dbmliborder" >&5
9224$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +00009225
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00009226# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009227
9228
Matthias Kloseb9621712010-04-24 17:59:49 +00009229{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-signal-module" >&5
9230$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009231
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009232# Check whether --with-signal-module was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009233if test "${with_signal_module+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009234 withval=$with_signal_module;
9235fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009236
9237
9238if test -z "$with_signal_module"
9239then with_signal_module="yes"
9240fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009241{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_signal_module" >&5
9242$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00009243
9244if test "${with_signal_module}" = "yes"; then
9245 USE_SIGNAL_MODULE=""
9246 SIGNAL_OBJS=""
9247else
9248 USE_SIGNAL_MODULE="#"
9249 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
9250fi
9251
Guido van Rossum3d15bd82001-01-10 18:53:48 +00009252# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +00009253
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009254USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +00009255
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009256
Martin v. Löwis11437992002-04-12 09:54:03 +00009257
9258# Templates for things AC_DEFINEd more than once.
9259# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +00009260
9261
Martin v. Löwis11437992002-04-12 09:54:03 +00009262
Matthias Kloseb9621712010-04-24 17:59:49 +00009263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-threads" >&5
9264$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009265
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009266# Check whether --with-threads was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009267if test "${with_threads+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009268 withval=$with_threads;
9269fi
Guido van Rossumec2f0731997-01-22 20:54:01 +00009270
9271
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009272# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +00009273
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009274# Check whether --with-thread was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009275if test "${with_thread+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009276 withval=$with_thread; with_threads=$with_thread
9277fi
9278
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009279
9280if test -z "$with_threads"
9281then with_threads="yes"
9282fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009283{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_threads" >&5
9284$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009285
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009286
Barry Warsawc0d24d8b2000-06-29 16:12:00 +00009287if test "$with_threads" = "no"
9288then
9289 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009290elif test "$ac_cv_pthread_is_default" = yes
9291then
Matthias Kloseb9621712010-04-24 17:59:49 +00009292 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009293
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009294 # Defining _REENTRANT on system with POSIX threads should not hurt.
Matthias Kloseb9621712010-04-24 17:59:49 +00009295 $as_echo "#define _REENTRANT 1" >>confdefs.h
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009296
9297 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +00009298 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009299elif test "$ac_cv_kpthread" = "yes"
9300then
9301 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009302 if test "$ac_cv_cxx_thread" = "yes"; then
9303 CXX="$CXX -Kpthread"
9304 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009305 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum2242f2f2001-04-11 20:58:20 +00009306
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009307 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009308 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009309elif test "$ac_cv_kthread" = "yes"
9310then
9311 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009312 if test "$ac_cv_cxx_thread" = "yes"; then
9313 CXX="$CXX -Kthread"
9314 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009315 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009316
9317 posix_threads=yes
9318 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009319elif test "$ac_cv_pthread" = "yes"
9320then
9321 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +00009322 if test "$ac_cv_cxx_thread" = "yes"; then
9323 CXX="$CXX -pthread"
9324 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009325 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009326
9327 posix_threads=yes
9328 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009329else
9330 if test ! -z "$with_threads" -a -d "$with_threads"
9331 then LDFLAGS="$LDFLAGS -L$with_threads"
9332 fi
9333 if test ! -z "$withval" -a -d "$withval"
9334 then LDFLAGS="$LDFLAGS -L$withval"
9335 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009336
9337 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +00009338 # define _POSIX_THREADS in unistd.h. Some apparently don't
9339 # (e.g. gnu pth with pthread emulation)
Matthias Kloseb9621712010-04-24 17:59:49 +00009340 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _POSIX_THREADS in unistd.h" >&5
9341$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
9342 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009343/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009344
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009345#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009346#ifdef _POSIX_THREADS
9347yes
9348#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009349
9350_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009351if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009352 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009353 unistd_defines_pthreads=yes
9354else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009355 unistd_defines_pthreads=no
9356fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009357rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009358
Matthias Kloseb9621712010-04-24 17:59:49 +00009359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $unistd_defines_pthreads" >&5
9360$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009361
Matthias Kloseb9621712010-04-24 17:59:49 +00009362 $as_echo "#define _REENTRANT 1" >>confdefs.h
Guido van Rossum9caf77a1996-08-01 00:52:26 +00009363
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009364 # Just looking for pthread_create in libpthread is not enough:
9365 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
9366 # So we really have to include pthread.h, and then link.
9367 _libs=$LIBS
9368 LIBS="$LIBS -lpthread"
Matthias Kloseb9621712010-04-24 17:59:49 +00009369 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
9370$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
9371 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009372/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +01009373
9374#include <stdio.h>
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009375#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +00009376
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009377void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +00009378int
9379main ()
9380{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009381
9382pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +00009383 ;
9384 return 0;
9385}
9386_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009387if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009388
Matthias Kloseb9621712010-04-24 17:59:49 +00009389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9390$as_echo "yes" >&6; }
9391 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum02a1c402000-02-25 19:26:31 +00009392
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009393 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009394 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +00009395else
Martin v. Löwis11437992002-04-12 09:54:03 +00009396
Martin v. Löwis8158b5a2001-10-08 13:17:28 +00009397 LIBS=$_libs
Matthias Kloseb9621712010-04-24 17:59:49 +00009398 ac_fn_c_check_func "$LINENO" "pthread_detach" "ac_cv_func_pthread_detach"
Victor Stinnere0be4232011-10-25 13:06:09 +02009399if test "x$ac_cv_func_pthread_detach" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009400 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumad678af1998-10-02 14:42:15 +00009401
Martin v. Löwis69c0ff32001-10-15 14:34:42 +00009402 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009403 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +00009404else
Guido van Rossumad678af1998-10-02 14:42:15 +00009405
Matthias Kloseb9621712010-04-24 17:59:49 +00009406 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
9407$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009408if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009409 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009410else
Martin v. Löwis11437992002-04-12 09:54:03 +00009411 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009412LIBS="-lpthreads $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009413cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009414/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009415
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009416/* Override any GCC internal prototype to avoid an error.
9417 Use char because int might match the return type of a GCC
9418 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009419#ifdef __cplusplus
9420extern "C"
9421#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009422char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009423int
9424main ()
9425{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009426return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009427 ;
9428 return 0;
9429}
9430_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009431if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009432 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +00009433else
Matthias Kloseb9621712010-04-24 17:59:49 +00009434 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +00009435fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009436rm -f core conftest.err conftest.$ac_objext \
9437 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009438LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009439fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009440{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
9441$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009442if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009443 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Greg Steinadf63d62000-07-05 10:38:09 +00009444
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009445 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009446 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009447 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +00009448else
Greg Steinadf63d62000-07-05 10:38:09 +00009449
Matthias Kloseb9621712010-04-24 17:59:49 +00009450 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5
9451$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009452if ${ac_cv_lib_c_r_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009453 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +00009454else
Martin v. Löwis11437992002-04-12 09:54:03 +00009455 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +00009456LIBS="-lc_r $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009457cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009458/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009459
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009460/* Override any GCC internal prototype to avoid an error.
9461 Use char because int might match the return type of a GCC
9462 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009463#ifdef __cplusplus
9464extern "C"
9465#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009466char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009467int
9468main ()
9469{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009470return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009471 ;
9472 return 0;
9473}
9474_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009475if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009476 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +00009477else
Matthias Kloseb9621712010-04-24 17:59:49 +00009478 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +00009479fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009480rm -f core conftest.err conftest.$ac_objext \
9481 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009482LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +00009483fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009484{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5
9485$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009486if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009487 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum49545951997-12-02 19:28:29 +00009488
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009489 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009490 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009491 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009492else
Guido van Rossum07bd90e2000-05-08 13:41:38 +00009493
Matthias Kloseb9621712010-04-24 17:59:49 +00009494 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __pthread_create_system in -lpthread" >&5
9495$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009496if ${ac_cv_lib_pthread___pthread_create_system+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009497 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009498else
Martin v. Löwis11437992002-04-12 09:54:03 +00009499 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009500LIBS="-lpthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009501cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009502/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009503
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009504/* Override any GCC internal prototype to avoid an error.
9505 Use char because int might match the return type of a GCC
9506 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009507#ifdef __cplusplus
9508extern "C"
9509#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009510char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009511int
9512main ()
9513{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009514return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009515 ;
9516 return 0;
9517}
9518_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009519if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009520 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009521else
Matthias Kloseb9621712010-04-24 17:59:49 +00009522 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009523fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009524rm -f core conftest.err conftest.$ac_objext \
9525 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009526LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009527fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009528{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread___pthread_create_system" >&5
9529$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009530if test "x$ac_cv_lib_pthread___pthread_create_system" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009531 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009532
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009533 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009534 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009535 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009536else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00009537
Matthias Kloseb9621712010-04-24 17:59:49 +00009538 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lcma" >&5
9539$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009540if ${ac_cv_lib_cma_pthread_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009541 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +00009542else
Martin v. Löwis11437992002-04-12 09:54:03 +00009543 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009544LIBS="-lcma $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009545cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009546/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009547
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009548/* Override any GCC internal prototype to avoid an error.
9549 Use char because int might match the return type of a GCC
9550 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009551#ifdef __cplusplus
9552extern "C"
9553#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009554char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009555int
9556main ()
9557{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009558return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009559 ;
9560 return 0;
9561}
9562_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009563if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009564 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +00009565else
Matthias Kloseb9621712010-04-24 17:59:49 +00009566 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +00009567fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009568rm -f core conftest.err conftest.$ac_objext \
9569 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009570LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +00009571fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009572{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cma_pthread_create" >&5
9573$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009574if test "x$ac_cv_lib_cma_pthread_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009575 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossumb93a8621998-05-07 13:27:32 +00009576
Guido van Rossumd0b69ec2001-09-10 14:10:54 +00009577 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +00009578 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009579 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +00009580else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +00009581
Martin v. Löwis130fb172001-07-19 11:00:41 +00009582 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +00009583fi
9584
Guido van Rossum627b2d71993-12-24 10:39:16 +00009585
Guido van Rossum7b3853f1996-07-30 18:09:35 +00009586fi
9587
Guido van Rossum0be3e491997-05-22 20:33:33 +00009588fi
9589
Guido van Rossum49545951997-12-02 19:28:29 +00009590fi
9591
Guido van Rossumb93a8621998-05-07 13:27:32 +00009592fi
9593
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009594fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009595rm -f core conftest.err conftest.$ac_objext \
9596 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00009597
Matthias Kloseb9621712010-04-24 17:59:49 +00009598 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usconfig in -lmpc" >&5
9599$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009600if ${ac_cv_lib_mpc_usconfig+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009601 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009602else
Martin v. Löwis11437992002-04-12 09:54:03 +00009603 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009604LIBS="-lmpc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009605cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009606/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009607
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009608/* Override any GCC internal prototype to avoid an error.
9609 Use char because int might match the return type of a GCC
9610 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009611#ifdef __cplusplus
9612extern "C"
9613#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009614char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009615int
9616main ()
9617{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009618return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009619 ;
9620 return 0;
9621}
9622_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009623if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009624 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009625else
Matthias Kloseb9621712010-04-24 17:59:49 +00009626 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009627fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009628rm -f core conftest.err conftest.$ac_objext \
9629 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009630LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009631fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009632{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mpc_usconfig" >&5
9633$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009634if test "x$ac_cv_lib_mpc_usconfig" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009635 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009636
Martin v. Löwis130fb172001-07-19 11:00:41 +00009637 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009638 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009639 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009640fi
9641
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009642
Neal Norwitza978ab02002-11-02 16:58:05 +00009643 if test "$posix_threads" != "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009644 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thr_create in -lthread" >&5
9645$as_echo_n "checking for thr_create in -lthread... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009646if ${ac_cv_lib_thread_thr_create+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009647 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009648else
Martin v. Löwis11437992002-04-12 09:54:03 +00009649 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009650LIBS="-lthread $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +00009651cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009652/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009653
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009654/* Override any GCC internal prototype to avoid an error.
9655 Use char because int might match the return type of a GCC
9656 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009657#ifdef __cplusplus
9658extern "C"
9659#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009660char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009661int
9662main ()
9663{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009664return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009665 ;
9666 return 0;
9667}
9668_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009669if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +00009670 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009671else
Matthias Kloseb9621712010-04-24 17:59:49 +00009672 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009673fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009674rm -f core conftest.err conftest.$ac_objext \
9675 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009676LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009677fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009678{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_thread_thr_create" >&5
9679$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009680if test "x$ac_cv_lib_thread_thr_create" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009681 $as_echo "#define WITH_THREAD 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00009682
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009683 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +00009684 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009685 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +00009686fi
9687
Martin v. Löwis3d2b5492002-03-15 13:48:21 +00009688 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009689fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009690
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009691if test "$posix_threads" = "yes"; then
9692 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009693
Matthias Kloseb9621712010-04-24 17:59:49 +00009694$as_echo "#define _POSIX_THREADS 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009695
9696 fi
9697
9698 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
9699 case $ac_sys_system/$ac_sys_release in
Charles-François Natali996f6062011-07-21 19:45:31 +02009700 SunOS/5.6)
Matthias Kloseb9621712010-04-24 17:59:49 +00009701$as_echo "#define HAVE_PTHREAD_DESTRUCTOR 1" >>confdefs.h
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009702
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009703 ;;
9704 SunOS/5.8)
Matthias Kloseb9621712010-04-24 17:59:49 +00009705$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009706
9707 ;;
Charles-François Natali996f6062011-07-21 19:45:31 +02009708 AIX/*)
Matthias Kloseb9621712010-04-24 17:59:49 +00009709$as_echo "#define HAVE_BROKEN_POSIX_SEMAPHORES 1" >>confdefs.h
Christian Heimes7b3ce6a2008-01-31 14:31:45 +00009710
9711 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009712 esac
9713
Matthias Kloseb9621712010-04-24 17:59:49 +00009714 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
9715$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +02009716 if ${ac_cv_pthread_system_supported+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +00009717 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009718else
Matthias Kloseb9621712010-04-24 17:59:49 +00009719 if test "$cross_compiling" = yes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009720 ac_cv_pthread_system_supported=no
9721else
Matthias Kloseb9621712010-04-24 17:59:49 +00009722 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009723/* end confdefs.h. */
Stefan Krah7dba5942012-11-22 22:49:11 +01009724
9725 #include <stdio.h>
9726 #include <pthread.h>
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009727 void *foo(void *parm) {
9728 return NULL;
9729 }
9730 main() {
9731 pthread_attr_t attr;
9732 pthread_t id;
9733 if (pthread_attr_init(&attr)) exit(-1);
9734 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
9735 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
9736 exit(0);
9737 }
9738_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009739if ac_fn_c_try_run "$LINENO"; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009740 ac_cv_pthread_system_supported=yes
9741else
Matthias Kloseb9621712010-04-24 17:59:49 +00009742 ac_cv_pthread_system_supported=no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009743fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009744rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9745 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009746fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +00009747
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009748
Guido van Rossum627b2d71993-12-24 10:39:16 +00009749fi
9750
Matthias Kloseb9621712010-04-24 17:59:49 +00009751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_pthread_system_supported" >&5
9752$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009753 if test "$ac_cv_pthread_system_supported" = "yes"; then
9754
Matthias Kloseb9621712010-04-24 17:59:49 +00009755$as_echo "#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1" >>confdefs.h
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009756
9757 fi
Matthias Kloseb9621712010-04-24 17:59:49 +00009758 for ac_func in pthread_sigmask
9759do :
9760 ac_fn_c_check_func "$LINENO" "pthread_sigmask" "ac_cv_func_pthread_sigmask"
Victor Stinnere0be4232011-10-25 13:06:09 +02009761if test "x$ac_cv_func_pthread_sigmask" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009762 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009763#define HAVE_PTHREAD_SIGMASK 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009764_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +00009765 case $ac_sys_system in
9766 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009767
Matthias Kloseb9621712010-04-24 17:59:49 +00009768$as_echo "#define HAVE_BROKEN_PTHREAD_SIGMASK 1" >>confdefs.h
Jason Tishlerfac083d2003-07-22 15:20:49 +00009769
9770 ;;
9771 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009772fi
9773done
9774
9775fi
9776
9777
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009778# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +00009779
Matthias Kloseb9621712010-04-24 17:59:49 +00009780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --enable-ipv6 is specified" >&5
9781$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009782# Check whether --enable-ipv6 was given.
Matthias Kloseb9621712010-04-24 17:59:49 +00009783if test "${enable_ipv6+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009784 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009785 no)
Matthias Kloseb9621712010-04-24 17:59:49 +00009786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9787$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009788 ipv6=no
9789 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +00009790 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9791$as_echo "yes" >&6; }
9792 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009793
9794 ipv6=yes
9795 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009796 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009797else
Martin v. Löwis11437992002-04-12 09:54:03 +00009798
Matthias Kloseb9621712010-04-24 17:59:49 +00009799 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009800/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009801 /* AF_INET6 available check */
9802#include <sys/types.h>
9803#include <sys/socket.h>
Charles-François Natalif6fd7942013-01-08 19:49:42 +01009804int
9805main ()
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009806{
Charles-François Natalif6fd7942013-01-08 19:49:42 +01009807int domain = AF_INET6;
9808 ;
9809 return 0;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009810}
Martin v. Löwis11437992002-04-12 09:54:03 +00009811_ACEOF
Charles-François Natalif6fd7942013-01-08 19:49:42 +01009812if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009813
Matthias Kloseb9621712010-04-24 17:59:49 +00009814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9815$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009816 ipv6=yes
Matthias Kloseb159a552010-04-25 21:00:44 +00009817
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009818else
Matthias Kloseb159a552010-04-25 21:00:44 +00009819
Matthias Kloseb9621712010-04-24 17:59:49 +00009820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9821$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009822 ipv6=no
Matthias Kloseb159a552010-04-25 21:00:44 +00009823
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009824fi
Charles-François Natalif6fd7942013-01-08 19:49:42 +01009825rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009826
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009827if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009828 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if RFC2553 API is available" >&5
9829$as_echo_n "checking if RFC2553 API is available... " >&6; }
9830 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009831/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +00009832
9833 #include <sys/types.h>
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009834#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009835int
9836main ()
9837{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009838struct sockaddr_in6 x;
Matthias Kloseb159a552010-04-25 21:00:44 +00009839 x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +00009840 ;
9841 return 0;
9842}
Matthias Kloseb159a552010-04-25 21:00:44 +00009843
Martin v. Löwis11437992002-04-12 09:54:03 +00009844_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +00009845if ac_fn_c_try_compile "$LINENO"; then :
Matthias Kloseb159a552010-04-25 21:00:44 +00009846
9847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009848$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009849 ipv6=yes
9850
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009851else
Matthias Kloseb159a552010-04-25 21:00:44 +00009852
9853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +00009854$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +00009855 ipv6=no
9856
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009857fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009858rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009859fi
9860
9861if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009862 $as_echo "#define ENABLE_IPV6 1" >>confdefs.h
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +00009863
9864fi
9865
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009866fi
9867
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009868
9869ipv6type=unknown
9870ipv6lib=none
9871ipv6trylibc=no
9872
9873if test "$ipv6" = "yes"; then
Matthias Kloseb9621712010-04-24 17:59:49 +00009874 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
9875$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +00009876 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
9877 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009878 case $i in
9879 inria)
Matthias Kloseb9621712010-04-24 17:59:49 +00009880 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009881/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009882
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009883#include <netinet/in.h>
9884#ifdef IPV6_INRIA_VERSION
9885yes
9886#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009887_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009888if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009889 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009890 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009891fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009892rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009893
9894 ;;
9895 kame)
Matthias Kloseb9621712010-04-24 17:59:49 +00009896 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009897/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009898
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009899#include <netinet/in.h>
9900#ifdef __KAME__
9901yes
9902#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009903_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009904if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009905 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009906 ipv6type=$i;
9907 ipv6lib=inet6
9908 ipv6libdir=/usr/local/v6/lib
9909 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009910fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009911rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009912
9913 ;;
9914 linux-glibc)
Matthias Kloseb9621712010-04-24 17:59:49 +00009915 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009916/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009917
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009918#include <features.h>
9919#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
9920yes
9921#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009922_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009923if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009924 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009925 ipv6type=$i;
9926 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009927fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009928rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009929
9930 ;;
9931 linux-inet6)
9932 if test -d /usr/inet6; then
9933 ipv6type=$i
9934 ipv6lib=inet6
9935 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +00009936 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009937 fi
9938 ;;
9939 solaris)
9940 if test -f /etc/netconfig; then
Antoine Pitrouf3fcd9f2011-01-03 18:53:50 +00009941 if $GREP -q tcp6 /etc/netconfig; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009942 ipv6type=$i
9943 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009944 fi
9945 fi
9946 ;;
9947 toshiba)
Matthias Kloseb9621712010-04-24 17:59:49 +00009948 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009949/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009950
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009951#include <sys/param.h>
9952#ifdef _TOSHIBA_INET6
9953yes
9954#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009955_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009956if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009957 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009958 ipv6type=$i;
9959 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009960 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009961fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009962rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009963
9964 ;;
9965 v6d)
Matthias Kloseb9621712010-04-24 17:59:49 +00009966 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009967/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009968
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009969#include </usr/local/v6/include/sys/v6config.h>
9970#ifdef __V6D__
9971yes
9972#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009973_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009974if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009975 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009976 ipv6type=$i;
9977 ipv6lib=v6;
9978 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +00009979 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009980fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009981rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009982
9983 ;;
9984 zeta)
Matthias Kloseb9621712010-04-24 17:59:49 +00009985 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00009986/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00009987
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009988#include <sys/param.h>
9989#ifdef _ZETA_MINAMI_INET6
9990yes
9991#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00009992_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009993if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +00009994 $EGREP "yes" >/dev/null 2>&1; then :
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009995 ipv6type=$i;
9996 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +00009997 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +00009998fi
Matthias Klosec80c93f2010-04-24 17:04:35 +00009999rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010000
10001 ;;
10002 esac
10003 if test "$ipv6type" != "unknown"; then
10004 break
10005 fi
10006 done
Matthias Kloseb9621712010-04-24 17:59:49 +000010007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
10008$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000010009fi
10010
10011if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
10012 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
10013 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
10014 echo "using lib$ipv6lib"
10015 else
10016 if test $ipv6trylibc = "yes"; then
10017 echo "using libc"
10018 else
10019 echo 'Fatal: no $ipv6lib library found. cannot continue.'
10020 echo "You need to fetch lib$ipv6lib.a from appropriate"
10021 echo 'ipv6 kit and compile beforehand.'
10022 exit 1
10023 fi
10024 fi
10025fi
10026
Matthias Kloseb9621712010-04-24 17:59:49 +000010027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for OSX 10.5 SDK or later" >&5
10028$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
10029cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010030/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000010031
10032 #include <Carbon/Carbon.h>
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010033int
10034main ()
10035{
10036FSIORefNum fRef = 0
10037 ;
10038 return 0;
10039}
Matthias Kloseb159a552010-04-25 21:00:44 +000010040
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010041_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010042if ac_fn_c_try_compile "$LINENO"; then :
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010043
Matthias Kloseb159a552010-04-25 21:00:44 +000010044
Matthias Kloseb9621712010-04-24 17:59:49 +000010045$as_echo "#define HAVE_OSX105_SDK 1" >>confdefs.h
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010046
Matthias Kloseb9621712010-04-24 17:59:49 +000010047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10048$as_echo "yes" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000010049
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010050else
Matthias Kloseb159a552010-04-25 21:00:44 +000010051
Matthias Kloseb9621712010-04-24 17:59:49 +000010052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10053$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010054
10055fi
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000010056rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10057
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010058# Check for --with-doc-strings
Matthias Kloseb9621712010-04-24 17:59:49 +000010059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-doc-strings" >&5
10060$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010061
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010062# Check whether --with-doc-strings was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010063if test "${with_doc_strings+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010064 withval=$with_doc_strings;
10065fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010066
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010067
10068if test -z "$with_doc_strings"
10069then with_doc_strings="yes"
10070fi
10071if test "$with_doc_strings" != "no"
10072then
10073
Matthias Kloseb9621712010-04-24 17:59:49 +000010074$as_echo "#define WITH_DOC_STRINGS 1" >>confdefs.h
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010075
10076fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010077{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_doc_strings" >&5
10078$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000010079
Antoine Pitrou042b1282010-08-13 21:15:58 +000010080# Check if eval loop should use timestamp counter profiling
Matthias Kloseb9621712010-04-24 17:59:49 +000010081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-tsc" >&5
10082$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010083
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010084# Check whether --with-tsc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010085if test "${with_tsc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010086 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010087if test "$withval" != no
10088then
10089
Matthias Kloseb9621712010-04-24 17:59:49 +000010090$as_echo "#define WITH_TSC 1" >>confdefs.h
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010091
Matthias Kloseb9621712010-04-24 17:59:49 +000010092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10093$as_echo "yes" >&6; }
10094else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10095$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010096fi
10097else
Matthias Kloseb9621712010-04-24 17:59:49 +000010098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10099$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010100fi
10101
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000010102
10103# Check for Python-specific malloc support
Matthias Kloseb9621712010-04-24 17:59:49 +000010104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-pymalloc" >&5
10105$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010106
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010107# Check whether --with-pymalloc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010108if test "${with_pymalloc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010109 withval=$with_pymalloc;
10110fi
Michael W. Hudson54241132001-12-07 15:38:26 +000010111
Neil Schemenauera35c6882001-02-27 04:45:05 +000010112
Neil Schemenauer16c22972002-03-22 15:34:49 +000010113if test -z "$with_pymalloc"
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000010114then
10115 with_pymalloc="yes"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010116fi
10117if test "$with_pymalloc" != "no"
10118then
Martin v. Löwis11437992002-04-12 09:54:03 +000010119
Matthias Kloseb9621712010-04-24 17:59:49 +000010120$as_echo "#define WITH_PYMALLOC 1" >>confdefs.h
Neil Schemenauer16c22972002-03-22 15:34:49 +000010121
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010122 ABIFLAGS="${ABIFLAGS}m"
Neil Schemenauer16c22972002-03-22 15:34:49 +000010123fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010124{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_pymalloc" >&5
10125$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000010126
Benjamin Peterson05159c42009-12-03 03:01:27 +000010127# Check for Valgrind support
Matthias Kloseb9621712010-04-24 17:59:49 +000010128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-valgrind" >&5
10129$as_echo_n "checking for --with-valgrind... " >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010130
10131# Check whether --with-valgrind was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000010132if test "${with_valgrind+set}" = set; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010133 withval=$with_valgrind;
10134else
10135 with_valgrind=no
10136fi
10137
Matthias Kloseb9621712010-04-24 17:59:49 +000010138{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_valgrind" >&5
10139$as_echo "$with_valgrind" >&6; }
Benjamin Peterson05159c42009-12-03 03:01:27 +000010140if test "$with_valgrind" != no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010141 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 +020010142if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then :
Benjamin Peterson05159c42009-12-03 03:01:27 +000010143
Matthias Kloseb9621712010-04-24 17:59:49 +000010144$as_echo "#define WITH_VALGRIND 1" >>confdefs.h
Benjamin Peterson05159c42009-12-03 03:01:27 +000010145
10146else
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010147 as_fn_error $? "Valgrind support requested but headers not available" "$LINENO" 5
Benjamin Peterson05159c42009-12-03 03:01:27 +000010148
10149fi
10150
10151
Jeffrey Yasskin39370832010-05-03 19:29:34 +000010152 OPT="-DDYNAMIC_ANNOTATIONS_ENABLED=1 $OPT"
Benjamin Peterson05159c42009-12-03 03:01:27 +000010153fi
10154
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010155# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000010156
Guido van Rossum98935bf2001-09-05 19:13:16 +000010157DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000010158
Guido van Rossume97ee181999-12-20 21:27:22 +000010159# the dlopen() function means we might want to use dynload_shlib.o. some
10160# platforms, such as AIX, have dlopen(), but don't want to use it.
Thomas Wouters3a584202000-08-05 23:28:51 +000010161for ac_func in dlopen
Matthias Kloseb9621712010-04-24 17:59:49 +000010162do :
10163 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
Victor Stinnere0be4232011-10-25 13:06:09 +020010164if test "x$ac_cv_func_dlopen" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010165 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010166#define HAVE_DLOPEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010167_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000010168
Guido van Rossume97ee181999-12-20 21:27:22 +000010169fi
Thomas Wouters3a584202000-08-05 23:28:51 +000010170done
Guido van Rossume97ee181999-12-20 21:27:22 +000010171
Michael W. Hudson54241132001-12-07 15:38:26 +000010172
Guido van Rossume97ee181999-12-20 21:27:22 +000010173# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
10174# loading of modules.
10175
Matthias Kloseb9621712010-04-24 17:59:49 +000010176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking DYNLOADFILE" >&5
10177$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010178if test -z "$DYNLOADFILE"
10179then
10180 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000010181 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
10182 if test "$ac_cv_func_dlopen" = yes
10183 then DYNLOADFILE="dynload_shlib.o"
10184 else DYNLOADFILE="dynload_aix.o"
10185 fi
10186 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000010187 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000010188 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
10189 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000010190 *)
10191 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
10192 # out any dynamic loading
10193 if test "$ac_cv_func_dlopen" = yes
10194 then DYNLOADFILE="dynload_shlib.o"
10195 else DYNLOADFILE="dynload_stub.o"
10196 fi
10197 ;;
10198 esac
10199fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010200{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $DYNLOADFILE" >&5
10201$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000010202if test "$DYNLOADFILE" != "dynload_stub.o"
10203then
Martin v. Löwis11437992002-04-12 09:54:03 +000010204
Matthias Kloseb9621712010-04-24 17:59:49 +000010205$as_echo "#define HAVE_DYNAMIC_LOADING 1" >>confdefs.h
Guido van Rossume97ee181999-12-20 21:27:22 +000010206
10207fi
10208
Neil Schemenauer4e425612001-06-19 15:44:15 +000010209# MACHDEP_OBJS can be set to platform-specific object files needed by Python
10210
Michael W. Hudson54241132001-12-07 15:38:26 +000010211
Matthias Kloseb9621712010-04-24 17:59:49 +000010212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking MACHDEP_OBJS" >&5
10213$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000010214if test -z "$MACHDEP_OBJS"
10215then
Jack Jansene578a632001-08-15 01:27:14 +000010216 MACHDEP_OBJS=$extra_machdep_objs
10217else
10218 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000010219fi
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020010220if test -z "$MACHDEP_OBJS"; then
10221 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
10222$as_echo "none" >&6; }
10223else
10224 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MACHDEP_OBJS" >&5
10225$as_echo "$MACHDEP_OBJS" >&6; }
10226fi
Neil Schemenauer4e425612001-06-19 15:44:15 +000010227
Guido van Rossum627b2d71993-12-24 10:39:16 +000010228# checks for library functions
Antoine Pitroub1c54962010-10-14 15:05:38 +000010229for ac_func in alarm accept4 setitimer getitimer bind_textdomain_codeset chown \
Gregory P. Smith1577cf72012-01-21 18:21:56 -080010230 clock confstr ctermid execv faccessat fchmod fchmodat fchown fchownat \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010231 fexecve fdopendir fork fpathconf fstatat ftime ftruncate futimesat \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010232 futimens futimes gai_strerror \
10233 getgrouplist getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis7aed61a2009-11-27 14:09:49 +000010234 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Gregory P. Smith5ed2e772011-05-15 00:26:45 -070010235 if_nameindex \
Antoine Pitrouf0effe62011-11-26 01:11:02 +010010236 initgroups kill killpg lchmod lchown lockf linkat lstat lutimes mmap \
10237 memrchr mbrtowc mkdirat mkfifo \
Charles-François Natalidaafdd52011-05-29 20:07:40 +020010238 mkfifoat mknod mknodat mktime mremap nice openat pathconf pause pipe2 plock poll \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010239 posix_fallocate posix_fadvise pread \
Victor Stinnerb3e72192011-05-08 01:46:11 +020010240 pthread_init pthread_kill putenv pwrite readlink readlinkat readv realpath renameat \
Georg Brandl941f9562011-02-25 15:21:47 +000010241 select sem_open sem_timedwait sem_getvalue sem_unlink sendfile setegid seteuid \
Antoine Pitrou061cfb52011-02-28 22:25:22 +000010242 setgid sethostname \
Giampaolo Rodolà18e8bcb2011-02-25 20:57:54 +000010243 setlocale setregid setreuid setresuid setresgid setsid setpgid setpgrp setpriority setuid setvbuf \
Charles-François Nataliea0d5fc2011-09-06 19:03:35 +020010244 sched_get_priority_max sched_setaffinity sched_setscheduler sched_setparam \
10245 sched_rr_get_interval \
Ross Lagerwallbc808222011-06-25 12:13:40 +020010246 sigaction sigaltstack siginterrupt sigpending sigrelse \
10247 sigtimedwait sigwait sigwaitinfo snprintf strftime strlcpy symlinkat sync \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000010248 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Ross Lagerwall7807c352011-03-17 20:20:30 +020010249 truncate uname unlinkat unsetenv utimensat utimes waitid waitpid wait3 wait4 \
10250 wcscoll wcsftime wcsxfrm writev _getpty
Matthias Kloseb9621712010-04-24 17:59:49 +000010251do :
10252 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10253ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020010254if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000010255 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010256#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010257_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000010258
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010259fi
10260done
10261
Michael W. Hudson54241132001-12-07 15:38:26 +000010262
Gregory P. Smithdf300d52012-01-21 18:20:15 -080010263ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
10264 #include <dirent.h>
10265"
10266if test "x$ac_cv_have_decl_dirfd" = xyes; then :
10267
10268$as_echo "#define HAVE_DIRFD 1" >>confdefs.h
10269
10270fi
10271
10272
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010273# For some functions, having a definition is not sufficient, since
10274# we want to take their address.
Matthias Kloseb9621712010-04-24 17:59:49 +000010275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chroot" >&5
10276$as_echo_n "checking for chroot... " >&6; }
10277cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010278/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010279#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010280int
10281main ()
10282{
10283void *x=chroot
10284 ;
10285 return 0;
10286}
10287_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010288if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010289
Matthias Kloseb9621712010-04-24 17:59:49 +000010290$as_echo "#define HAVE_CHROOT 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010291
Matthias Kloseb159a552010-04-25 21:00:44 +000010292 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010293$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010294else
Matthias Kloseb9621712010-04-24 17:59:49 +000010295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10296$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010297
10298fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010299rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for link" >&5
10301$as_echo_n "checking for link... " >&6; }
10302cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010303/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010304#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010305int
10306main ()
10307{
10308void *x=link
10309 ;
10310 return 0;
10311}
10312_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010313if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010314
Matthias Kloseb9621712010-04-24 17:59:49 +000010315$as_echo "#define HAVE_LINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010316
Matthias Kloseb159a552010-04-25 21:00:44 +000010317 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010318$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010319else
Matthias Kloseb9621712010-04-24 17:59:49 +000010320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10321$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010322
10323fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010324rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for symlink" >&5
10326$as_echo_n "checking for symlink... " >&6; }
10327cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010328/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010329#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010330int
10331main ()
10332{
10333void *x=symlink
10334 ;
10335 return 0;
10336}
10337_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010338if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010339
Matthias Kloseb9621712010-04-24 17:59:49 +000010340$as_echo "#define HAVE_SYMLINK 1" >>confdefs.h
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010341
Matthias Kloseb159a552010-04-25 21:00:44 +000010342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010343$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010344else
Matthias Kloseb9621712010-04-24 17:59:49 +000010345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10346$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010347
10348fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010349rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fchdir" >&5
10351$as_echo_n "checking for fchdir... " >&6; }
10352cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010353/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010354#include <unistd.h>
10355int
10356main ()
10357{
10358void *x=fchdir
10359 ;
10360 return 0;
10361}
10362_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010363if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010364
Matthias Kloseb9621712010-04-24 17:59:49 +000010365$as_echo "#define HAVE_FCHDIR 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010366
Matthias Kloseb159a552010-04-25 21:00:44 +000010367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010368$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010369else
Matthias Kloseb9621712010-04-24 17:59:49 +000010370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10371$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010372
10373fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010374rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fsync" >&5
10376$as_echo_n "checking for fsync... " >&6; }
10377cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010378/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010379#include <unistd.h>
10380int
10381main ()
10382{
10383void *x=fsync
10384 ;
10385 return 0;
10386}
10387_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010388if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010389
Matthias Kloseb9621712010-04-24 17:59:49 +000010390$as_echo "#define HAVE_FSYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010391
Matthias Kloseb159a552010-04-25 21:00:44 +000010392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010393$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010394else
Matthias Kloseb9621712010-04-24 17:59:49 +000010395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10396$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010397
10398fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010399rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync" >&5
10401$as_echo_n "checking for fdatasync... " >&6; }
10402cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010403/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010404#include <unistd.h>
10405int
10406main ()
10407{
10408void *x=fdatasync
10409 ;
10410 return 0;
10411}
10412_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010413if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010414
Matthias Kloseb9621712010-04-24 17:59:49 +000010415$as_echo "#define HAVE_FDATASYNC 1" >>confdefs.h
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010416
Matthias Kloseb159a552010-04-25 21:00:44 +000010417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010418$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010419else
Matthias Kloseb9621712010-04-24 17:59:49 +000010420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10421$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000010422
10423fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010424rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll" >&5
10426$as_echo_n "checking for epoll... " >&6; }
10427cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010428/* end confdefs.h. */
10429#include <sys/epoll.h>
10430int
10431main ()
10432{
10433void *x=epoll_create
10434 ;
10435 return 0;
10436}
10437_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010438if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000010439
Matthias Kloseb9621712010-04-24 17:59:49 +000010440$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010441
Matthias Kloseb159a552010-04-25 21:00:44 +000010442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010443$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010444else
Matthias Kloseb9621712010-04-24 17:59:49 +000010445 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10446$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010447
10448fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010449rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson95c16622011-12-27 15:36:32 -060010450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for epoll_create1" >&5
10451$as_echo_n "checking for epoll_create1... " >&6; }
10452cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10453/* end confdefs.h. */
10454#include <sys/epoll.h>
10455int
10456main ()
10457{
10458void *x=epoll_create1
10459 ;
10460 return 0;
10461}
10462_ACEOF
10463if ac_fn_c_try_compile "$LINENO"; then :
10464
10465$as_echo "#define HAVE_EPOLL_CREATE1 1" >>confdefs.h
10466
10467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10468$as_echo "yes" >&6; }
10469else
10470 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10471$as_echo "no" >&6; }
10472
10473fi
10474rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000010475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kqueue" >&5
10476$as_echo_n "checking for kqueue... " >&6; }
10477cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010478/* end confdefs.h. */
10479
10480#include <sys/types.h>
10481#include <sys/event.h>
10482
10483int
10484main ()
10485{
10486int x=kqueue()
10487 ;
10488 return 0;
10489}
10490_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010491if ac_fn_c_try_compile "$LINENO"; then :
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010492
Matthias Kloseb9621712010-04-24 17:59:49 +000010493$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010494
Matthias Kloseb159a552010-04-25 21:00:44 +000010495 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010496$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010497else
Matthias Kloseb9621712010-04-24 17:59:49 +000010498 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10499$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010500
10501fi
Christian Heimes4fbc72b2008-03-22 00:47:35 +000010502rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000010503# On some systems (eg. FreeBSD 5), we would find a definition of the
10504# functions ctermid_r, setgroups in the library, but no prototype
10505# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
10506# address to avoid compiler warnings and potential miscompilations
10507# because of the missing prototypes.
10508
Matthias Kloseb9621712010-04-24 17:59:49 +000010509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ctermid_r" >&5
10510$as_echo_n "checking for ctermid_r... " >&6; }
10511cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010512/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000010513
Martin v. Löwisd5843682002-11-21 20:41:28 +000010514#include <stdio.h>
10515
Martin v. Löwisd5843682002-11-21 20:41:28 +000010516int
10517main ()
10518{
10519void* p = ctermid_r
10520 ;
10521 return 0;
10522}
10523_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010524if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000010525
Matthias Kloseb9621712010-04-24 17:59:49 +000010526$as_echo "#define HAVE_CTERMID_R 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000010527
Matthias Kloseb159a552010-04-25 21:00:44 +000010528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010529$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010530else
Matthias Kloseb9621712010-04-24 17:59:49 +000010531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10532$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000010533
10534fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010535rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10536
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock declaration" >&5
10538$as_echo_n "checking for flock declaration... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010539if ${ac_cv_flock_decl+:} false; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010540 $as_echo_n "(cached) " >&6
10541else
10542 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010543/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010544#include <sys/file.h>
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010545int
10546main ()
10547{
10548void* p = flock
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010549
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010550 ;
10551 return 0;
10552}
10553_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010554if ac_fn_c_try_compile "$LINENO"; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010555 ac_cv_flock_decl=yes
10556else
10557 ac_cv_flock_decl=no
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010558
10559fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010560rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroua3000072010-09-07 14:52:42 +000010561
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010562fi
10563{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_flock_decl" >&5
10564$as_echo "$ac_cv_flock_decl" >&6; }
10565if test "x${ac_cv_flock_decl}" = xyes; then
10566 for ac_func in flock
10567do :
10568 ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
Victor Stinnere0be4232011-10-25 13:06:09 +020010569if test "x$ac_cv_func_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010570 cat >>confdefs.h <<_ACEOF
10571#define HAVE_FLOCK 1
Antoine Pitroua3000072010-09-07 14:52:42 +000010572_ACEOF
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010573
Antoine Pitroua3000072010-09-07 14:52:42 +000010574else
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010575 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flock in -lbsd" >&5
Antoine Pitroua3000072010-09-07 14:52:42 +000010576$as_echo_n "checking for flock in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010577if ${ac_cv_lib_bsd_flock+:} false; then :
Antoine Pitroua3000072010-09-07 14:52:42 +000010578 $as_echo_n "(cached) " >&6
10579else
10580 ac_check_lib_save_LIBS=$LIBS
10581LIBS="-lbsd $LIBS"
10582cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10583/* end confdefs.h. */
10584
10585/* Override any GCC internal prototype to avoid an error.
10586 Use char because int might match the return type of a GCC
10587 builtin and then its argument prototype would still apply. */
10588#ifdef __cplusplus
10589extern "C"
10590#endif
10591char flock ();
10592int
10593main ()
10594{
10595return flock ();
10596 ;
10597 return 0;
10598}
10599_ACEOF
10600if ac_fn_c_try_link "$LINENO"; then :
10601 ac_cv_lib_bsd_flock=yes
10602else
10603 ac_cv_lib_bsd_flock=no
10604fi
10605rm -f core conftest.err conftest.$ac_objext \
10606 conftest$ac_exeext conftest.$ac_ext
10607LIBS=$ac_check_lib_save_LIBS
10608fi
10609{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_flock" >&5
10610$as_echo "$ac_cv_lib_bsd_flock" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010611if test "x$ac_cv_lib_bsd_flock" = xyes; then :
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010612 $as_echo "#define HAVE_FLOCK 1" >>confdefs.h
Antoine Pitroua3000072010-09-07 14:52:42 +000010613
10614
10615$as_echo "#define FLOCK_NEEDS_LIBBSD 1" >>confdefs.h
10616
10617
10618fi
10619
10620
10621fi
Antoine Pitroua4e4ae22010-09-10 18:39:00 +000010622done
10623
Antoine Pitroua3000072010-09-07 14:52:42 +000010624fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010625
Matthias Kloseb9621712010-04-24 17:59:49 +000010626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
10627$as_echo_n "checking for getpagesize... " >&6; }
10628cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010629/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010630
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010631#include <unistd.h>
10632
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010633int
10634main ()
10635{
10636void* p = getpagesize
10637 ;
10638 return 0;
10639}
10640_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010641if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010642
Matthias Kloseb9621712010-04-24 17:59:49 +000010643$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010644
Matthias Kloseb159a552010-04-25 21:00:44 +000010645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010646$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010647else
Matthias Kloseb9621712010-04-24 17:59:49 +000010648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10649$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010650
10651fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010652rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000010653
Victor Stinner984890f2011-11-24 13:53:38 +010010654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken unsetenv" >&5
10655$as_echo_n "checking for broken unsetenv... " >&6; }
10656cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10657/* end confdefs.h. */
10658
10659#include <stdlib.h>
10660
10661int
10662main ()
10663{
10664int res = unsetenv("DUMMY")
10665 ;
10666 return 0;
10667}
10668_ACEOF
10669if ac_fn_c_try_compile "$LINENO"; then :
10670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10671$as_echo "no" >&6; }
10672else
10673
10674$as_echo "#define HAVE_BROKEN_UNSETENV 1" >>confdefs.h
10675
10676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10677$as_echo "yes" >&6; }
10678
10679fi
10680rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10681
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010682for ac_prog in true
10683do
10684 # Extract the first word of "$ac_prog", so it can be a program name with args.
10685set dummy $ac_prog; ac_word=$2
Matthias Kloseb9621712010-04-24 17:59:49 +000010686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10687$as_echo_n "checking for $ac_word... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010688if ${ac_cv_prog_TRUE+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010689 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010690else
10691 if test -n "$TRUE"; then
10692 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
10693else
10694as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10695for as_dir in $PATH
10696do
10697 IFS=$as_save_IFS
10698 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000010699 for ac_exec_ext in '' $ac_executable_extensions; do
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000010700 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010701 ac_cv_prog_TRUE="$ac_prog"
Matthias Kloseb9621712010-04-24 17:59:49 +000010702 $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 +000010703 break 2
10704 fi
10705done
Matthias Kloseb9621712010-04-24 17:59:49 +000010706 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010707IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010708
10709fi
10710fi
10711TRUE=$ac_cv_prog_TRUE
10712if test -n "$TRUE"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TRUE" >&5
10714$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010715else
Matthias Kloseb9621712010-04-24 17:59:49 +000010716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10717$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010718fi
10719
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010720
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010721 test -n "$TRUE" && break
10722done
10723test -n "$TRUE" || TRUE="/bin/true"
10724
10725
Matthias Kloseb9621712010-04-24 17:59:49 +000010726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lc" >&5
10727$as_echo_n "checking for inet_aton in -lc... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010728if ${ac_cv_lib_c_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010729 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010730else
10731 ac_check_lib_save_LIBS=$LIBS
10732LIBS="-lc $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010733cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010734/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010735
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010736/* Override any GCC internal prototype to avoid an error.
10737 Use char because int might match the return type of a GCC
10738 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010739#ifdef __cplusplus
10740extern "C"
10741#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010742char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010743int
10744main ()
10745{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010746return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010747 ;
10748 return 0;
10749}
10750_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010751if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010752 ac_cv_lib_c_inet_aton=yes
10753else
Matthias Kloseb9621712010-04-24 17:59:49 +000010754 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010755fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010756rm -f core conftest.err conftest.$ac_objext \
10757 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010758LIBS=$ac_check_lib_save_LIBS
10759fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010760{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_inet_aton" >&5
10761$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010762if test "x$ac_cv_lib_c_inet_aton" = xyes; then :
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010763 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010764else
Matthias Kloseb9621712010-04-24 17:59:49 +000010765 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton in -lresolv" >&5
10766$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010767if ${ac_cv_lib_resolv_inet_aton+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010768 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010769else
10770 ac_check_lib_save_LIBS=$LIBS
10771LIBS="-lresolv $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010772cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010773/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010774
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010775/* Override any GCC internal prototype to avoid an error.
10776 Use char because int might match the return type of a GCC
10777 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010778#ifdef __cplusplus
10779extern "C"
10780#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010781char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010782int
10783main ()
10784{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010785return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010786 ;
10787 return 0;
10788}
10789_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010790if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010791 ac_cv_lib_resolv_inet_aton=yes
10792else
Matthias Kloseb9621712010-04-24 17:59:49 +000010793 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010794fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010795rm -f core conftest.err conftest.$ac_objext \
10796 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010797LIBS=$ac_check_lib_save_LIBS
10798fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010799{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_inet_aton" >&5
10800$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010801if test "x$ac_cv_lib_resolv_inet_aton" = xyes; then :
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010802 cat >>confdefs.h <<_ACEOF
10803#define HAVE_LIBRESOLV 1
10804_ACEOF
10805
10806 LIBS="-lresolv $LIBS"
10807
10808fi
10809
10810
10811fi
10812
10813
Christian Heimesd0764e22007-12-04 15:00:33 +000010814# On Tru64, chflags seems to be present, but calling it will
10815# exit Python
Matthias Kloseb9621712010-04-24 17:59:49 +000010816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for chflags" >&5
10817$as_echo_n "checking for chflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010818if ${ac_cv_have_chflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010819 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010820else
Matthias Kloseb9621712010-04-24 17:59:49 +000010821 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010822 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000010823else
Matthias Kloseb9621712010-04-24 17:59:49 +000010824 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000010825/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070010826
Christian Heimesd0764e22007-12-04 15:00:33 +000010827#include <sys/stat.h>
10828#include <unistd.h>
10829int main(int argc, char*argv[])
10830{
10831 if(chflags(argv[0], 0) != 0)
10832 return 1;
10833 return 0;
10834}
Ned Deily3eb67d52011-06-28 00:00:28 -070010835
Christian Heimesd0764e22007-12-04 15:00:33 +000010836_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010837if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010838 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010839else
Matthias Kloseb9621712010-04-24 17:59:49 +000010840 ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010841fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010842rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10843 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010844fi
10845
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010846
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010847fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_chflags" >&5
10849$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010850if test "$ac_cv_have_chflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010851 ac_fn_c_check_func "$LINENO" "chflags" "ac_cv_func_chflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020010852if test "x$ac_cv_func_chflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010853 ac_cv_have_chflags="yes"
10854else
10855 ac_cv_have_chflags="no"
10856fi
10857
10858fi
10859if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010860
Matthias Kloseb9621712010-04-24 17:59:49 +000010861$as_echo "#define HAVE_CHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010862
10863fi
10864
Matthias Kloseb9621712010-04-24 17:59:49 +000010865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lchflags" >&5
10866$as_echo_n "checking for lchflags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010867if ${ac_cv_have_lchflags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010868 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010869else
Matthias Kloseb9621712010-04-24 17:59:49 +000010870 if test "$cross_compiling" = yes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010871 ac_cv_have_lchflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000010872else
Matthias Kloseb9621712010-04-24 17:59:49 +000010873 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimesd0764e22007-12-04 15:00:33 +000010874/* end confdefs.h. */
Ned Deily3eb67d52011-06-28 00:00:28 -070010875
Christian Heimesd0764e22007-12-04 15:00:33 +000010876#include <sys/stat.h>
10877#include <unistd.h>
10878int main(int argc, char*argv[])
10879{
10880 if(lchflags(argv[0], 0) != 0)
10881 return 1;
10882 return 0;
10883}
Ned Deily3eb67d52011-06-28 00:00:28 -070010884
Christian Heimesd0764e22007-12-04 15:00:33 +000010885_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010886if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010887 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010888else
Matthias Kloseb9621712010-04-24 17:59:49 +000010889 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000010890fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010891rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10892 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti19142282009-07-17 23:11:52 +000010893fi
10894
10895
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010896fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010897{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_lchflags" >&5
10898$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010899if test "$ac_cv_have_lchflags" = cross ; then
Matthias Kloseb9621712010-04-24 17:59:49 +000010900 ac_fn_c_check_func "$LINENO" "lchflags" "ac_cv_func_lchflags"
Victor Stinnere0be4232011-10-25 13:06:09 +020010901if test "x$ac_cv_func_lchflags" = xyes; then :
Benjamin Petersoned68afa2010-01-30 19:36:43 +000010902 ac_cv_have_lchflags="yes"
10903else
10904 ac_cv_have_lchflags="no"
10905fi
10906
10907fi
10908if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010909
Matthias Kloseb9621712010-04-24 17:59:49 +000010910$as_echo "#define HAVE_LCHFLAGS 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000010911
10912fi
10913
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010914case $ac_sys_system/$ac_sys_release in
10915Darwin/*)
10916 _CUR_CFLAGS="${CFLAGS}"
10917 _CUR_LDFLAGS="${LDFLAGS}"
10918 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
10919 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
10920 ;;
10921esac
10922
Matthias Kloseb9621712010-04-24 17:59:49 +000010923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflateCopy in -lz" >&5
10924$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010925if ${ac_cv_lib_z_inflateCopy+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000010926 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010927else
10928 ac_check_lib_save_LIBS=$LIBS
10929LIBS="-lz $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000010930cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010931/* end confdefs.h. */
10932
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010933/* Override any GCC internal prototype to avoid an error.
10934 Use char because int might match the return type of a GCC
10935 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010936#ifdef __cplusplus
10937extern "C"
10938#endif
10939char inflateCopy ();
10940int
10941main ()
10942{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010943return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010944 ;
10945 return 0;
10946}
10947_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010948if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010949 ac_cv_lib_z_inflateCopy=yes
10950else
Matthias Kloseb9621712010-04-24 17:59:49 +000010951 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010952fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010953rm -f core conftest.err conftest.$ac_objext \
10954 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010955LIBS=$ac_check_lib_save_LIBS
10956fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010957{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflateCopy" >&5
10958$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020010959if test "x$ac_cv_lib_z_inflateCopy" = xyes; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010960
Matthias Kloseb9621712010-04-24 17:59:49 +000010961$as_echo "#define HAVE_ZLIB_COPY 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000010962
10963fi
10964
10965
10966case $ac_sys_system/$ac_sys_release in
10967Darwin/*)
10968 CFLAGS="${_CUR_CFLAGS}"
10969 LDFLAGS="${_CUR_LDFLAGS}"
10970 ;;
10971esac
10972
Matthias Kloseb9621712010-04-24 17:59:49 +000010973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror" >&5
10974$as_echo_n "checking for hstrerror... " >&6; }
10975cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000010976/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000010977
Martin v. Löwise9416172003-05-03 10:12:45 +000010978#include <netdb.h>
10979
Martin v. Löwise9416172003-05-03 10:12:45 +000010980int
10981main ()
10982{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000010983void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000010984 ;
10985 return 0;
10986}
10987_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000010988if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000010989
Matthias Kloseb9621712010-04-24 17:59:49 +000010990$as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000010991
Matthias Kloseb159a552010-04-25 21:00:44 +000010992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000010993$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010994else
Matthias Kloseb9621712010-04-24 17:59:49 +000010995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10996$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000010997
10998fi
Matthias Kloseb9621712010-04-24 17:59:49 +000010999rm -f core conftest.err conftest.$ac_objext \
11000 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011001
Matthias Kloseb9621712010-04-24 17:59:49 +000011002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5
11003$as_echo_n "checking for inet_aton... " >&6; }
11004cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011005/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011006
Martin v. Löwis86d66262006-02-17 08:40:11 +000011007#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011008#include <sys/socket.h>
11009#include <netinet/in.h>
11010#include <arpa/inet.h>
11011
Martin v. Löwise9416172003-05-03 10:12:45 +000011012int
11013main ()
11014{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000011015void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000011016 ;
11017 return 0;
11018}
11019_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011020if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011021
Matthias Kloseb9621712010-04-24 17:59:49 +000011022$as_echo "#define HAVE_INET_ATON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011023
Matthias Kloseb159a552010-04-25 21:00:44 +000011024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011025$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011026else
Matthias Kloseb9621712010-04-24 17:59:49 +000011027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11028$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011029
11030fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011031rm -f core conftest.err conftest.$ac_objext \
11032 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011033
Matthias Kloseb9621712010-04-24 17:59:49 +000011034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5
11035$as_echo_n "checking for inet_pton... " >&6; }
11036cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011037/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000011038
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011039#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000011040#include <sys/socket.h>
11041#include <netinet/in.h>
11042#include <arpa/inet.h>
11043
Martin v. Löwise9416172003-05-03 10:12:45 +000011044int
11045main ()
11046{
11047void* p = inet_pton
11048 ;
11049 return 0;
11050}
11051_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011052if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwise9416172003-05-03 10:12:45 +000011053
Matthias Kloseb9621712010-04-24 17:59:49 +000011054$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h
Martin v. Löwise9416172003-05-03 10:12:45 +000011055
Matthias Kloseb159a552010-04-25 21:00:44 +000011056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011057$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011058else
Matthias Kloseb9621712010-04-24 17:59:49 +000011059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11060$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000011061
11062fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011063rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000011064
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011065# On some systems, setgroups is in unistd.h, on others, in grp.h
Matthias Kloseb9621712010-04-24 17:59:49 +000011066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for setgroups" >&5
11067$as_echo_n "checking for setgroups... " >&6; }
11068cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011069/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000011070
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000011071#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000011072#ifdef HAVE_GRP_H
11073#include <grp.h>
11074#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000011075
Martin v. Löwisd5843682002-11-21 20:41:28 +000011076int
11077main ()
11078{
11079void* p = setgroups
11080 ;
11081 return 0;
11082}
11083_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011084if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd5843682002-11-21 20:41:28 +000011085
Matthias Kloseb9621712010-04-24 17:59:49 +000011086$as_echo "#define HAVE_SETGROUPS 1" >>confdefs.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000011087
Matthias Kloseb159a552010-04-25 21:00:44 +000011088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000011089$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011090else
Matthias Kloseb9621712010-04-24 17:59:49 +000011091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11092$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000011093
11094fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011095rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000011096
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011097# check for openpty and forkpty
11098
11099for ac_func in openpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011100do :
11101 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011102if test "x$ac_cv_func_openpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011103 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011104#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011105_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011106
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011107else
Matthias Kloseb9621712010-04-24 17:59:49 +000011108 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5
11109$as_echo_n "checking for openpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011110if ${ac_cv_lib_util_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011111 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011112else
Martin v. Löwis11437992002-04-12 09:54:03 +000011113 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011114LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011115cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011116/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011117
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011118/* Override any GCC internal prototype to avoid an error.
11119 Use char because int might match the return type of a GCC
11120 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011121#ifdef __cplusplus
11122extern "C"
11123#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011124char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011125int
11126main ()
11127{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011128return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011129 ;
11130 return 0;
11131}
11132_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011133if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011134 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011135else
Matthias Kloseb9621712010-04-24 17:59:49 +000011136 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011137fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011138rm -f core conftest.err conftest.$ac_objext \
11139 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011140LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011141fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011142{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5
11143$as_echo "$ac_cv_lib_util_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011144if test "x$ac_cv_lib_util_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011145 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011146 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011147else
Matthias Kloseb9621712010-04-24 17:59:49 +000011148 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lbsd" >&5
11149$as_echo_n "checking for openpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011150if ${ac_cv_lib_bsd_openpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011151 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011152else
11153 ac_check_lib_save_LIBS=$LIBS
11154LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011155cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011156/* end confdefs.h. */
11157
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011158/* Override any GCC internal prototype to avoid an error.
11159 Use char because int might match the return type of a GCC
11160 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011161#ifdef __cplusplus
11162extern "C"
11163#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011164char openpty ();
11165int
11166main ()
11167{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011168return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011169 ;
11170 return 0;
11171}
11172_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011173if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011174 ac_cv_lib_bsd_openpty=yes
11175else
Matthias Kloseb9621712010-04-24 17:59:49 +000011176 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011177fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011178rm -f core conftest.err conftest.$ac_objext \
11179 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011180LIBS=$ac_check_lib_save_LIBS
11181fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011182{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_openpty" >&5
11183$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011184if test "x$ac_cv_lib_bsd_openpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011185 $as_echo "#define HAVE_OPENPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011186 LIBS="$LIBS -lbsd"
11187fi
11188
11189
11190fi
11191
Fred Drake8cef4cf2000-06-28 16:40:38 +000011192
11193fi
11194done
11195
11196for ac_func in forkpty
Matthias Kloseb9621712010-04-24 17:59:49 +000011197do :
11198 ac_fn_c_check_func "$LINENO" "forkpty" "ac_cv_func_forkpty"
Victor Stinnere0be4232011-10-25 13:06:09 +020011199if test "x$ac_cv_func_forkpty" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011200 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011201#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011202_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000011203
Fred Drake8cef4cf2000-06-28 16:40:38 +000011204else
Matthias Kloseb9621712010-04-24 17:59:49 +000011205 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lutil" >&5
11206$as_echo_n "checking for forkpty in -lutil... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011207if ${ac_cv_lib_util_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011208 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000011209else
Martin v. Löwis11437992002-04-12 09:54:03 +000011210 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011211LIBS="-lutil $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011212cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011213/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011214
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011215/* Override any GCC internal prototype to avoid an error.
11216 Use char because int might match the return type of a GCC
11217 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011218#ifdef __cplusplus
11219extern "C"
11220#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011221char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011222int
11223main ()
11224{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011225return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011226 ;
11227 return 0;
11228}
11229_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011230if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011231 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000011232else
Matthias Kloseb9621712010-04-24 17:59:49 +000011233 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011234fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011235rm -f core conftest.err conftest.$ac_objext \
11236 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011237LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000011238fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011239{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_forkpty" >&5
11240$as_echo "$ac_cv_lib_util_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011241if test "x$ac_cv_lib_util_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011242 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Fred Drake8cef4cf2000-06-28 16:40:38 +000011243 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011244else
Matthias Kloseb9621712010-04-24 17:59:49 +000011245 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for forkpty in -lbsd" >&5
11246$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011247if ${ac_cv_lib_bsd_forkpty+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011248 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011249else
11250 ac_check_lib_save_LIBS=$LIBS
11251LIBS="-lbsd $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000011252cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011253/* end confdefs.h. */
11254
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011255/* Override any GCC internal prototype to avoid an error.
11256 Use char because int might match the return type of a GCC
11257 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011258#ifdef __cplusplus
11259extern "C"
11260#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011261char forkpty ();
11262int
11263main ()
11264{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011265return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011266 ;
11267 return 0;
11268}
11269_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011270if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011271 ac_cv_lib_bsd_forkpty=yes
11272else
Matthias Kloseb9621712010-04-24 17:59:49 +000011273 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000011274fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011275rm -f core conftest.err conftest.$ac_objext \
11276 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011277LIBS=$ac_check_lib_save_LIBS
11278fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011279{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_forkpty" >&5
11280$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011281if test "x$ac_cv_lib_bsd_forkpty" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011282 $as_echo "#define HAVE_FORKPTY 1" >>confdefs.h
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000011283 LIBS="$LIBS -lbsd"
11284fi
11285
11286
11287fi
11288
Fred Drake8cef4cf2000-06-28 16:40:38 +000011289
11290fi
11291done
11292
Jack Jansendd19cf82001-12-06 22:36:17 +000011293
Christian Heimesb186d002008-03-18 15:15:01 +000011294# Stuff for expat.
Christian Heimesb186d002008-03-18 15:15:01 +000011295for ac_func in memmove
Matthias Kloseb9621712010-04-24 17:59:49 +000011296do :
11297 ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove"
Victor Stinnere0be4232011-10-25 13:06:09 +020011298if test "x$ac_cv_func_memmove" = xyes; then :
Christian Heimesb186d002008-03-18 15:15:01 +000011299 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011300#define HAVE_MEMMOVE 1
Christian Heimesb186d002008-03-18 15:15:01 +000011301_ACEOF
11302
11303fi
11304done
11305
11306
Michael W. Hudson54241132001-12-07 15:38:26 +000011307# check for long file support functions
Fred Drake8cef4cf2000-06-28 16:40:38 +000011308for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
Matthias Kloseb9621712010-04-24 17:59:49 +000011309do :
11310 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11311ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011312if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011313 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011314#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011315_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000011316
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011317fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000011318done
11319
Michael W. Hudson54241132001-12-07 15:38:26 +000011320
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011321ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2"
Victor Stinnere0be4232011-10-25 13:06:09 +020011322if test "x$ac_cv_func_dup2" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011323 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
Martin v. Löwis1142de32002-03-29 16:28:31 +000011324
Martin v. Löwis1142de32002-03-29 16:28:31 +000011325else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011326 case " $LIBOBJS " in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011327 *" dup2.$ac_objext "* ) ;;
11328 *) LIBOBJS="$LIBOBJS dup2.$ac_objext"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011329 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011330esac
11331
Martin v. Löwis1142de32002-03-29 16:28:31 +000011332fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011333
11334ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd"
Victor Stinnere0be4232011-10-25 13:06:09 +020011335if test "x$ac_cv_func_getcwd" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011336 $as_echo "#define HAVE_GETCWD 1" >>confdefs.h
11337
11338else
11339 case " $LIBOBJS " in
11340 *" getcwd.$ac_objext "* ) ;;
11341 *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
11342 ;;
11343esac
11344
11345fi
11346
11347ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
Victor Stinnere0be4232011-10-25 13:06:09 +020011348if test "x$ac_cv_func_strdup" = xyes; then :
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020011349 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
11350
11351else
11352 case " $LIBOBJS " in
11353 *" strdup.$ac_objext "* ) ;;
11354 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
11355 ;;
11356esac
11357
11358fi
Martin v. Löwis1142de32002-03-29 16:28:31 +000011359
11360
11361for ac_func in getpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000011362do :
11363 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020011364if test "x$ac_cv_func_getpgrp" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011365 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011366#define HAVE_GETPGRP 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011367_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011368 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011369/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011370#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011371int
11372main ()
11373{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011374getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011375 ;
11376 return 0;
11377}
11378_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011379if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011380
Matthias Kloseb9621712010-04-24 17:59:49 +000011381$as_echo "#define GETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011382
Guido van Rossum627b2d71993-12-24 10:39:16 +000011383fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011384rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011385
Guido van Rossum627b2d71993-12-24 10:39:16 +000011386fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011387done
Guido van Rossum627b2d71993-12-24 10:39:16 +000011388
Jack Jansen150753c2003-03-29 22:07:47 +000011389for ac_func in setpgrp
Matthias Kloseb9621712010-04-24 17:59:49 +000011390do :
11391 ac_fn_c_check_func "$LINENO" "setpgrp" "ac_cv_func_setpgrp"
Victor Stinnere0be4232011-10-25 13:06:09 +020011392if test "x$ac_cv_func_setpgrp" = xyes; then :
Jack Jansen150753c2003-03-29 22:07:47 +000011393 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011394#define HAVE_SETPGRP 1
Jack Jansen150753c2003-03-29 22:07:47 +000011395_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011396 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011397/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000011398#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000011399int
11400main ()
11401{
11402setpgrp(0,0);
11403 ;
11404 return 0;
11405}
11406_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011407if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011408
Matthias Kloseb9621712010-04-24 17:59:49 +000011409$as_echo "#define SETPGRP_HAVE_ARG 1" >>confdefs.h
Skip Montanaro6dead952003-09-25 14:50:04 +000011410
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011411fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011412rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000011413
11414fi
11415done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000011416
Thomas Wouters3a584202000-08-05 23:28:51 +000011417for ac_func in gettimeofday
Matthias Kloseb9621712010-04-24 17:59:49 +000011418do :
11419 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday"
Victor Stinnere0be4232011-10-25 13:06:09 +020011420if test "x$ac_cv_func_gettimeofday" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011421 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011422#define HAVE_GETTIMEOFDAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011423_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011424 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011425/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011426#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011427int
11428main ()
11429{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011430gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011431 ;
11432 return 0;
11433}
11434_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011435if ac_fn_c_try_compile "$LINENO"; then :
11436
Guido van Rossum627b2d71993-12-24 10:39:16 +000011437else
Skip Montanaro6dead952003-09-25 14:50:04 +000011438
Matthias Kloseb9621712010-04-24 17:59:49 +000011439$as_echo "#define GETTIMEOFDAY_NO_TZ 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011440
Martin v. Löwis11437992002-04-12 09:54:03 +000011441
Guido van Rossum627b2d71993-12-24 10:39:16 +000011442fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011443rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011444
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011445fi
Thomas Wouters3a584202000-08-05 23:28:51 +000011446done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011447
Michael W. Hudson54241132001-12-07 15:38:26 +000011448
Victor Stinnere0be4232011-10-25 13:06:09 +020011449for ac_func in clock_gettime
11450do :
11451 ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
11452if test "x$ac_cv_func_clock_gettime" = xyes; then :
11453 cat >>confdefs.h <<_ACEOF
11454#define HAVE_CLOCK_GETTIME 1
11455_ACEOF
11456
11457else
11458
11459 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
11460$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
11461if ${ac_cv_lib_rt_clock_gettime+:} false; then :
11462 $as_echo_n "(cached) " >&6
11463else
11464 ac_check_lib_save_LIBS=$LIBS
11465LIBS="-lrt $LIBS"
11466cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11467/* end confdefs.h. */
11468
11469/* Override any GCC internal prototype to avoid an error.
11470 Use char because int might match the return type of a GCC
11471 builtin and then its argument prototype would still apply. */
11472#ifdef __cplusplus
11473extern "C"
11474#endif
11475char clock_gettime ();
11476int
11477main ()
11478{
11479return clock_gettime ();
11480 ;
11481 return 0;
11482}
11483_ACEOF
11484if ac_fn_c_try_link "$LINENO"; then :
11485 ac_cv_lib_rt_clock_gettime=yes
11486else
11487 ac_cv_lib_rt_clock_gettime=no
11488fi
11489rm -f core conftest.err conftest.$ac_objext \
11490 conftest$ac_exeext conftest.$ac_ext
11491LIBS=$ac_check_lib_save_LIBS
11492fi
11493{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
11494$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
11495if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
11496
11497 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
11498
11499
11500$as_echo "#define TIMEMODULE_LIB rt" >>confdefs.h
11501
11502
11503fi
11504
11505
11506fi
11507done
11508
11509
11510for ac_func in clock_getres
11511do :
11512 ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres"
11513if test "x$ac_cv_func_clock_getres" = xyes; then :
11514 cat >>confdefs.h <<_ACEOF
11515#define HAVE_CLOCK_GETRES 1
11516_ACEOF
11517
11518else
11519
11520 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_getres in -lrt" >&5
11521$as_echo_n "checking for clock_getres in -lrt... " >&6; }
11522if ${ac_cv_lib_rt_clock_getres+:} false; then :
11523 $as_echo_n "(cached) " >&6
11524else
11525 ac_check_lib_save_LIBS=$LIBS
11526LIBS="-lrt $LIBS"
11527cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11528/* end confdefs.h. */
11529
11530/* Override any GCC internal prototype to avoid an error.
11531 Use char because int might match the return type of a GCC
11532 builtin and then its argument prototype would still apply. */
11533#ifdef __cplusplus
11534extern "C"
11535#endif
11536char clock_getres ();
11537int
11538main ()
11539{
11540return clock_getres ();
11541 ;
11542 return 0;
11543}
11544_ACEOF
11545if ac_fn_c_try_link "$LINENO"; then :
11546 ac_cv_lib_rt_clock_getres=yes
11547else
11548 ac_cv_lib_rt_clock_getres=no
11549fi
11550rm -f core conftest.err conftest.$ac_objext \
11551 conftest$ac_exeext conftest.$ac_ext
11552LIBS=$ac_check_lib_save_LIBS
11553fi
11554{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_getres" >&5
11555$as_echo "$ac_cv_lib_rt_clock_getres" >&6; }
11556if test "x$ac_cv_lib_rt_clock_getres" = xyes; then :
11557
11558 $as_echo "#define HAVE_CLOCK_GETRES 1" >>confdefs.h
11559
11560
11561fi
11562
11563
11564fi
11565done
11566
11567
Matthias Kloseb9621712010-04-24 17:59:49 +000011568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for major" >&5
11569$as_echo_n "checking for major... " >&6; }
11570cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011571/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011572
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011573#if defined(MAJOR_IN_MKDEV)
11574#include <sys/mkdev.h>
11575#elif defined(MAJOR_IN_SYSMACROS)
11576#include <sys/sysmacros.h>
11577#else
11578#include <sys/types.h>
11579#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011580
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011581int
11582main ()
11583{
11584
11585 makedev(major(0),minor(0));
11586
11587 ;
11588 return 0;
11589}
11590_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011591if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011592
11593
Matthias Kloseb9621712010-04-24 17:59:49 +000011594$as_echo "#define HAVE_DEVICE_MACROS 1" >>confdefs.h
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011595
Matthias Kloseb9621712010-04-24 17:59:49 +000011596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11597$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011598
11599else
Skip Montanaro6dead952003-09-25 14:50:04 +000011600
Matthias Kloseb9621712010-04-24 17:59:49 +000011601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11602$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000011603
11604fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011605rm -f core conftest.err conftest.$ac_objext \
11606 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000011607
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011608# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000011609# for [no]getaddrinfo in netdb.h.
Matthias Kloseb9621712010-04-24 17:59:49 +000011610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5
11611$as_echo_n "checking for getaddrinfo... " >&6; }
11612cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011613/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011614
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011615#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011616#include <sys/socket.h>
11617#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000011618#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011619
Martin v. Löwis11437992002-04-12 09:54:03 +000011620int
11621main ()
11622{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011623getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000011624 ;
11625 return 0;
11626}
11627_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011628if ac_fn_c_try_link "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011629 have_getaddrinfo=yes
11630else
Matthias Kloseb9621712010-04-24 17:59:49 +000011631 have_getaddrinfo=no
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011632fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011633rm -f core conftest.err conftest.$ac_objext \
11634 conftest$ac_exeext conftest.$ac_ext
11635{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5
11636$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011637if test $have_getaddrinfo = yes
11638then
Matthias Kloseb9621712010-04-24 17:59:49 +000011639 { $as_echo "$as_me:${as_lineno-$LINENO}: checking getaddrinfo bug" >&5
11640$as_echo_n "checking getaddrinfo bug... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011641 if ${ac_cv_buggy_getaddrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011642 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011643else
Matthias Kloseb9621712010-04-24 17:59:49 +000011644 if test "$cross_compiling" = yes; then :
Matthias Klose96350132012-03-15 20:42:23 +010011645
11646if test "${enable_ipv6+set}" = set; then
11647 ac_cv_buggy_getaddrinfo="no -- configured with --(en|dis)able-ipv6"
11648else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011649 ac_cv_buggy_getaddrinfo=yes
Matthias Klose96350132012-03-15 20:42:23 +010011650fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011651else
Matthias Kloseb9621712010-04-24 17:59:49 +000011652 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011653/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011654
Stefan Krah19c21392012-11-22 23:47:32 +010011655#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011656#include <sys/types.h>
11657#include <netdb.h>
11658#include <string.h>
11659#include <sys/socket.h>
11660#include <netinet/in.h>
11661
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011662int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011663{
11664 int passive, gaierr, inet4 = 0, inet6 = 0;
11665 struct addrinfo hints, *ai, *aitop;
11666 char straddr[INET6_ADDRSTRLEN], strport[16];
11667
11668 for (passive = 0; passive <= 1; passive++) {
11669 memset(&hints, 0, sizeof(hints));
11670 hints.ai_family = AF_UNSPEC;
11671 hints.ai_flags = passive ? AI_PASSIVE : 0;
11672 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000011673 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011674 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
11675 (void)gai_strerror(gaierr);
11676 goto bad;
11677 }
11678 for (ai = aitop; ai; ai = ai->ai_next) {
11679 if (ai->ai_addr == NULL ||
11680 ai->ai_addrlen == 0 ||
11681 getnameinfo(ai->ai_addr, ai->ai_addrlen,
11682 straddr, sizeof(straddr), strport, sizeof(strport),
11683 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
11684 goto bad;
11685 }
11686 switch (ai->ai_family) {
11687 case AF_INET:
11688 if (strcmp(strport, "54321") != 0) {
11689 goto bad;
11690 }
11691 if (passive) {
11692 if (strcmp(straddr, "0.0.0.0") != 0) {
11693 goto bad;
11694 }
11695 } else {
11696 if (strcmp(straddr, "127.0.0.1") != 0) {
11697 goto bad;
11698 }
11699 }
11700 inet4++;
11701 break;
11702 case AF_INET6:
11703 if (strcmp(strport, "54321") != 0) {
11704 goto bad;
11705 }
11706 if (passive) {
11707 if (strcmp(straddr, "::") != 0) {
11708 goto bad;
11709 }
11710 } else {
11711 if (strcmp(straddr, "::1") != 0) {
11712 goto bad;
11713 }
11714 }
11715 inet6++;
11716 break;
11717 case AF_UNSPEC:
11718 goto bad;
11719 break;
11720 default:
11721 /* another family support? */
11722 break;
11723 }
11724 }
11725 }
11726
11727 if (!(inet4 == 0 || inet4 == 2))
11728 goto bad;
11729 if (!(inet6 == 0 || inet6 == 2))
11730 goto bad;
11731
11732 if (aitop)
11733 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011734 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011735
11736 bad:
11737 if (aitop)
11738 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011739 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011740}
11741
Martin v. Löwis11437992002-04-12 09:54:03 +000011742_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011743if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011744 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011745else
Matthias Kloseb9621712010-04-24 17:59:49 +000011746 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011747fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011748rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11749 conftest.$ac_objext conftest.beam conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011750fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011751
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011752fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011753
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011754fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011755
Benjamin Petersond4694ed2010-11-01 01:44:30 +000011756{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_getaddrinfo" >&5
11757$as_echo "$ac_cv_buggy_getaddrinfo" >&6; }
11758
doko@ubuntu.com9c7817e2012-06-30 17:05:13 +020011759if test $have_getaddrinfo = no || test "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000011760then
11761 if test $ipv6 = yes
11762 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011763 echo 'Fatal: You must get working getaddrinfo() function.'
11764 echo ' or you can specify "--disable-ipv6"'.
11765 exit 1
11766 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011767else
Martin v. Löwis11437992002-04-12 09:54:03 +000011768
Matthias Kloseb9621712010-04-24 17:59:49 +000011769$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h
Martin v. Löwis861a65b2001-10-24 14:36:00 +000011770
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011771fi
Benjamin Petersond4694ed2010-11-01 01:44:30 +000011772
Jack Jansen9a66b6d2001-08-08 13:56:14 +000011773for ac_func in getnameinfo
Matthias Kloseb9621712010-04-24 17:59:49 +000011774do :
11775 ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo"
Victor Stinnere0be4232011-10-25 13:06:09 +020011776if test "x$ac_cv_func_getnameinfo" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011777 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011778#define HAVE_GETNAMEINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011779_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011780
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000011781fi
11782done
11783
Michael W. Hudson54241132001-12-07 15:38:26 +000011784
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011785# checks for structures
Matthias Kloseb9621712010-04-24 17:59:49 +000011786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
11787$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011788if ${ac_cv_header_time+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011789 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011790else
Matthias Kloseb9621712010-04-24 17:59:49 +000011791 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011792/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011793#include <sys/types.h>
11794#include <sys/time.h>
11795#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011796
Martin v. Löwis11437992002-04-12 09:54:03 +000011797int
11798main ()
11799{
11800if ((struct tm *) 0)
11801return 0;
11802 ;
11803 return 0;
11804}
11805_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011806if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011807 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000011808else
Matthias Kloseb9621712010-04-24 17:59:49 +000011809 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011810fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011811rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011812fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011813{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
11814$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011815if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011816
Matthias Kloseb9621712010-04-24 17:59:49 +000011817$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011818
11819fi
11820
Matthias Kloseb9621712010-04-24 17:59:49 +000011821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
11822$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011823if ${ac_cv_struct_tm+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011824 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011825else
Matthias Kloseb9621712010-04-24 17:59:49 +000011826 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011827/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011828#include <sys/types.h>
11829#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011830
Martin v. Löwis11437992002-04-12 09:54:03 +000011831int
11832main ()
11833{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011834struct tm tm;
11835 int *p = &tm.tm_sec;
Matthias Kloseb9621712010-04-24 17:59:49 +000011836 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000011837 ;
11838 return 0;
11839}
11840_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011841if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011842 ac_cv_struct_tm=time.h
11843else
Matthias Kloseb9621712010-04-24 17:59:49 +000011844 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011845fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011846rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011847fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
11849$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011850if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011851
Matthias Kloseb9621712010-04-24 17:59:49 +000011852$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011853
11854fi
11855
Matthias Kloseb9621712010-04-24 17:59:49 +000011856ac_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 +000011857#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000011858
Matthias Kloseb9621712010-04-24 17:59:49 +000011859"
Victor Stinnere0be4232011-10-25 13:06:09 +020011860if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011861
11862cat >>confdefs.h <<_ACEOF
11863#define HAVE_STRUCT_TM_TM_ZONE 1
11864_ACEOF
11865
11866
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011867fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011868
Martin v. Löwis11437992002-04-12 09:54:03 +000011869if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
11870
Matthias Kloseb9621712010-04-24 17:59:49 +000011871$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011872
11873else
Matthias Kloseb9621712010-04-24 17:59:49 +000011874 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
11875"
Victor Stinnere0be4232011-10-25 13:06:09 +020011876if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011877 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011878else
Matthias Kloseb9621712010-04-24 17:59:49 +000011879 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011880fi
11881
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011882cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011883#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011884_ACEOF
11885
Matthias Kloseb9621712010-04-24 17:59:49 +000011886 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
11887$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011888if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011889 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011890else
Matthias Kloseb9621712010-04-24 17:59:49 +000011891 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000011892/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000011893#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011894#if !HAVE_DECL_TZNAME
11895extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000011896#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011897
Martin v. Löwis11437992002-04-12 09:54:03 +000011898int
11899main ()
11900{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011901return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000011902 ;
11903 return 0;
11904}
11905_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000011906if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011907 ac_cv_var_tzname=yes
11908else
Matthias Kloseb9621712010-04-24 17:59:49 +000011909 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011910fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011911rm -f core conftest.err conftest.$ac_objext \
11912 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000011913fi
Matthias Kloseb9621712010-04-24 17:59:49 +000011914{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
11915$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000011916 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011917
Matthias Kloseb9621712010-04-24 17:59:49 +000011918$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000011919
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011920 fi
11921fi
11922
Matthias Kloseb9621712010-04-24 17:59:49 +000011923ac_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 +020011924if test "x$ac_cv_member_struct_stat_st_rdev" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000011925
11926cat >>confdefs.h <<_ACEOF
11927#define HAVE_STRUCT_STAT_ST_RDEV 1
11928_ACEOF
11929
11930
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011931fi
11932
Matthias Kloseb9621712010-04-24 17:59:49 +000011933ac_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 +020011934if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011935
Martin v. Löwis11437992002-04-12 09:54:03 +000011936cat >>confdefs.h <<_ACEOF
11937#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
11938_ACEOF
11939
11940
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011941fi
11942
Matthias Kloseb9621712010-04-24 17:59:49 +000011943ac_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 +020011944if test "x$ac_cv_member_struct_stat_st_flags" = xyes; then :
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000011945
11946cat >>confdefs.h <<_ACEOF
11947#define HAVE_STRUCT_STAT_ST_FLAGS 1
11948_ACEOF
11949
11950
11951fi
11952
Matthias Kloseb9621712010-04-24 17:59:49 +000011953ac_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 +020011954if test "x$ac_cv_member_struct_stat_st_gen" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011955
11956cat >>confdefs.h <<_ACEOF
11957#define HAVE_STRUCT_STAT_ST_GEN 1
11958_ACEOF
11959
11960
11961fi
11962
Matthias Kloseb9621712010-04-24 17:59:49 +000011963ac_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 +020011964if test "x$ac_cv_member_struct_stat_st_birthtime" = xyes; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000011965
11966cat >>confdefs.h <<_ACEOF
11967#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
11968_ACEOF
11969
11970
11971fi
11972
Matthias Kloseb9621712010-04-24 17:59:49 +000011973ac_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 +020011974if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
Jack Jansendd19cf82001-12-06 22:36:17 +000011975
Martin v. Löwis11437992002-04-12 09:54:03 +000011976cat >>confdefs.h <<_ACEOF
11977#define HAVE_STRUCT_STAT_ST_BLOCKS 1
11978_ACEOF
11979
11980
Matthias Kloseb9621712010-04-24 17:59:49 +000011981$as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011982
11983else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011984 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000011985 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011986 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
11987 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011988esac
11989
Guido van Rossum98bf58f2001-10-18 20:34:25 +000011990fi
11991
Michael W. Hudson54241132001-12-07 15:38:26 +000011992
Martin v. Löwis11437992002-04-12 09:54:03 +000011993
Matthias Kloseb9621712010-04-24 17:59:49 +000011994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for time.h that defines altzone" >&5
11995$as_echo_n "checking for time.h that defines altzone... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020011996if ${ac_cv_header_time_altzone+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000011997 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011998else
Matthias Kloseb159a552010-04-25 21:00:44 +000011999
Matthias Kloseb9621712010-04-24 17:59:49 +000012000 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012001/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012002#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012003int
12004main ()
12005{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012006return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000012007 ;
12008 return 0;
12009}
12010_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012011if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012012 ac_cv_header_time_altzone=yes
12013else
Matthias Kloseb9621712010-04-24 17:59:49 +000012014 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000012015fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012016rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb159a552010-04-25 21:00:44 +000012017
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012018fi
12019
Matthias Kloseb9621712010-04-24 17:59:49 +000012020{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time_altzone" >&5
12021$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012022if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012023
Matthias Kloseb9621712010-04-24 17:59:49 +000012024$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012025
12026fi
12027
Guido van Rossumda88dad1995-01-26 00:46:29 +000012028was_it_defined=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/select.h and sys/time.h may both be included" >&5
12030$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
12031cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012032/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012033
12034#include <sys/types.h>
12035#include <sys/select.h>
12036#include <sys/time.h>
12037
Martin v. Löwis11437992002-04-12 09:54:03 +000012038int
12039main ()
12040{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012041;
Martin v. Löwis11437992002-04-12 09:54:03 +000012042 ;
12043 return 0;
12044}
12045_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012046if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012047
12048
Matthias Kloseb9621712010-04-24 17:59:49 +000012049$as_echo "#define SYS_SELECT_WITH_SYS_TIME 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012050
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012051 was_it_defined=yes
12052
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012053fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012054rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012055{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $was_it_defined" >&5
12056$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012057
Matthias Kloseb9621712010-04-24 17:59:49 +000012058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for addrinfo" >&5
12059$as_echo_n "checking for addrinfo... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012060if ${ac_cv_struct_addrinfo+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012061 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012062else
Matthias Kloseb9621712010-04-24 17:59:49 +000012063 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012064/* end confdefs.h. */
Matthias Kloseb159a552010-04-25 21:00:44 +000012065#include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012066int
12067main ()
12068{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012069struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000012070 ;
12071 return 0;
12072}
12073_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012074if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012075 ac_cv_struct_addrinfo=yes
12076else
Matthias Kloseb9621712010-04-24 17:59:49 +000012077 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012078fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012079rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12080fi
12081
Matthias Kloseb9621712010-04-24 17:59:49 +000012082{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_addrinfo" >&5
12083$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012084if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012085
Matthias Kloseb9621712010-04-24 17:59:49 +000012086$as_echo "#define HAVE_ADDRINFO 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012087
12088fi
12089
Matthias Kloseb9621712010-04-24 17:59:49 +000012090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sockaddr_storage" >&5
12091$as_echo_n "checking for sockaddr_storage... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012092if ${ac_cv_struct_sockaddr_storage+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012093 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012094else
Matthias Kloseb9621712010-04-24 17:59:49 +000012095 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012096/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012097
12098# include <sys/types.h>
12099# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012100int
12101main ()
12102{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012103struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000012104 ;
12105 return 0;
12106}
12107_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012108if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012109 ac_cv_struct_sockaddr_storage=yes
12110else
Matthias Kloseb9621712010-04-24 17:59:49 +000012111 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012112fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012113rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12114fi
12115
Matthias Kloseb9621712010-04-24 17:59:49 +000012116{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5
12117$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012118if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012119
Matthias Kloseb9621712010-04-24 17:59:49 +000012120$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012121
12122fi
12123
Guido van Rossum627b2d71993-12-24 10:39:16 +000012124# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000012125
Matthias Kloseb9621712010-04-24 17:59:49 +000012126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5
12127$as_echo_n "checking whether char is unsigned... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012128if ${ac_cv_c_char_unsigned+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012129 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000012130else
Matthias Kloseb9621712010-04-24 17:59:49 +000012131 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012132/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012133$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012134int
12135main ()
12136{
12137static int test_array [1 - 2 * !(((char) -1) < 0)];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012138test_array [0] = 0;
12139return test_array [0];
Martin v. Löwis11437992002-04-12 09:54:03 +000012140
12141 ;
12142 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000012143}
Martin v. Löwis11437992002-04-12 09:54:03 +000012144_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012145if ac_fn_c_try_compile "$LINENO"; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000012146 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012147else
Matthias Kloseb9621712010-04-24 17:59:49 +000012148 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012149fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012150rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012151fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012152{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5
12153$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012154if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Matthias Kloseb9621712010-04-24 17:59:49 +000012155 $as_echo "#define __CHAR_UNSIGNED__ 1" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012156
12157fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000012158
Matthias Kloseb9621712010-04-24 17:59:49 +000012159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
12160$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012161if ${ac_cv_c_const+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012162 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012163else
Matthias Kloseb9621712010-04-24 17:59:49 +000012164 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012165/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012166
Martin v. Löwis11437992002-04-12 09:54:03 +000012167int
12168main ()
12169{
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012170
Martin v. Löwis11437992002-04-12 09:54:03 +000012171#ifndef __cplusplus
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012172 /* Ultrix mips cc rejects this sort of thing. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012173 typedef int charset[2];
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012174 const charset cs = { 0, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000012175 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012176 char const *const *pcpcc;
12177 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000012178 /* NEC SVR4.0.2 mips cc rejects this. */
12179 struct point {int x, y;};
12180 static struct point const zero = {0,0};
12181 /* AIX XL C 1.02.0.0 rejects this.
12182 It does not let you subtract one const X* pointer from another in
12183 an arm of an if-expression whose if-part is not a constant
12184 expression */
12185 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012186 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000012187 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012188 ++pcpcc;
12189 ppc = (char**) pcpcc;
12190 pcpcc = (char const *const *) ppc;
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012191 { /* SCO 3.2v4 cc rejects this sort of thing. */
12192 char tx;
12193 char *t = &tx;
Martin v. Löwis11437992002-04-12 09:54:03 +000012194 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012195
Martin v. Löwis11437992002-04-12 09:54:03 +000012196 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012197 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012198 }
12199 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
12200 int x[] = {25, 17};
12201 const int *foo = &x[0];
12202 ++foo;
12203 }
12204 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12205 typedef const int *iptr;
12206 iptr p = 0;
12207 ++p;
12208 }
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012209 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
Martin v. Löwis11437992002-04-12 09:54:03 +000012210 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000012211 struct s { int j; const int *ap[3]; } bx;
12212 struct s *b = &bx; b->j = 5;
Martin v. Löwis11437992002-04-12 09:54:03 +000012213 }
12214 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12215 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012216 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012217 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012218 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000012219#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000012220
Martin v. Löwis11437992002-04-12 09:54:03 +000012221 ;
12222 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000012223}
Martin v. Löwis11437992002-04-12 09:54:03 +000012224_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012225if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012226 ac_cv_c_const=yes
12227else
Matthias Kloseb9621712010-04-24 17:59:49 +000012228 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012229fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012230rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012231fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012232{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
12233$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012234if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012235
Matthias Kloseb9621712010-04-24 17:59:49 +000012236$as_echo "#define const /**/" >>confdefs.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012237
12238fi
12239
Michael W. Hudson54241132001-12-07 15:38:26 +000012240
Guido van Rossumda88dad1995-01-26 00:46:29 +000012241works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5
12243$as_echo_n "checking for working volatile... " >&6; }
12244cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012245/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000012246
Martin v. Löwis11437992002-04-12 09:54:03 +000012247int
12248main ()
12249{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012250volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012251 ;
12252 return 0;
12253}
12254_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012255if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012256 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012257else
Skip Montanaro6dead952003-09-25 14:50:04 +000012258
Matthias Kloseb9621712010-04-24 17:59:49 +000012259$as_echo "#define volatile /**/" >>confdefs.h
Guido van Rossum627b2d71993-12-24 10:39:16 +000012260
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012261
Guido van Rossum627b2d71993-12-24 10:39:16 +000012262fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012263rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012264{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12265$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012266
Guido van Rossumda88dad1995-01-26 00:46:29 +000012267works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working signed char" >&5
12269$as_echo_n "checking for working signed char... " >&6; }
12270cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012271/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012272
Martin v. Löwis11437992002-04-12 09:54:03 +000012273int
12274main ()
12275{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012276signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000012277 ;
12278 return 0;
12279}
12280_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012281if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumda88dad1995-01-26 00:46:29 +000012282 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000012283else
Skip Montanaro6dead952003-09-25 14:50:04 +000012284
Matthias Kloseb9621712010-04-24 17:59:49 +000012285$as_echo "#define signed /**/" >>confdefs.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000012286
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012287
Guido van Rossum7f43da71994-08-01 12:15:30 +000012288fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012289rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012290{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12291$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000012292
Guido van Rossumda88dad1995-01-26 00:46:29 +000012293have_prototypes=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for prototypes" >&5
12295$as_echo_n "checking for prototypes... " >&6; }
12296cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012297/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012298int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012299int
12300main ()
12301{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012302return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000012303 ;
12304 return 0;
12305}
12306_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012307if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012308
Matthias Kloseb9621712010-04-24 17:59:49 +000012309$as_echo "#define HAVE_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012310
Matthias Kloseb159a552010-04-25 21:00:44 +000012311 have_prototypes=yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012312fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012313rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012314{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_prototypes" >&5
12315$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012316
Guido van Rossumda88dad1995-01-26 00:46:29 +000012317works=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for variable length prototypes and stdarg.h" >&5
12319$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
12320cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012321/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000012322
12323#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000012324int foo(int x, ...) {
12325 va_list va;
12326 va_start(va, x);
12327 va_arg(va, int);
12328 va_arg(va, char *);
12329 va_arg(va, double);
12330 return 0;
12331}
Guido van Rossum7f43da71994-08-01 12:15:30 +000012332
Martin v. Löwis11437992002-04-12 09:54:03 +000012333int
12334main ()
12335{
Guido van Rossum90eea071996-08-30 20:58:57 +000012336return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000012337 ;
12338 return 0;
12339}
12340_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012341if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012342
12343
Matthias Kloseb9621712010-04-24 17:59:49 +000012344$as_echo "#define HAVE_STDARG_PROTOTYPES 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012345
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012346 works=yes
12347
Guido van Rossum627b2d71993-12-24 10:39:16 +000012348fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012349rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012350{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $works" >&5
12351$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012352
Martin v. Löwisd6320502004-08-12 13:45:08 +000012353# check for socketpair
Matthias Kloseb9621712010-04-24 17:59:49 +000012354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socketpair" >&5
12355$as_echo_n "checking for socketpair... " >&6; }
12356cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012357/* end confdefs.h. */
12358
12359#include <sys/types.h>
12360#include <sys/socket.h>
12361
12362int
12363main ()
12364{
12365void *x=socketpair
12366 ;
12367 return 0;
12368}
12369_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012370if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisd6320502004-08-12 13:45:08 +000012371
Matthias Kloseb9621712010-04-24 17:59:49 +000012372$as_echo "#define HAVE_SOCKETPAIR 1" >>confdefs.h
Martin v. Löwisd6320502004-08-12 13:45:08 +000012373
Matthias Kloseb159a552010-04-25 21:00:44 +000012374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000012375$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012376else
Matthias Kloseb9621712010-04-24 17:59:49 +000012377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12378$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000012379
12380fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012381rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000012382
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012383# check if sockaddr has sa_len member
Matthias Kloseb9621712010-04-24 17:59:49 +000012384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr has sa_len member" >&5
12385$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
12386cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012387/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012388#include <sys/types.h>
12389#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012390int
12391main ()
12392{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012393struct sockaddr x;
12394x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012395 ;
12396 return 0;
12397}
12398_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012399if ac_fn_c_try_compile "$LINENO"; then :
12400 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12401$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012402
Matthias Kloseb9621712010-04-24 17:59:49 +000012403$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012404
12405else
Matthias Kloseb9621712010-04-24 17:59:49 +000012406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12407$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000012408
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012409fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012410rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000012411
Guido van Rossumda88dad1995-01-26 00:46:29 +000012412va_list_is_array=no
Matthias Kloseb9621712010-04-24 17:59:49 +000012413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_list is an array" >&5
12414$as_echo_n "checking whether va_list is an array... " >&6; }
12415cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012416/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012417
12418#ifdef HAVE_STDARG_PROTOTYPES
12419#include <stdarg.h>
12420#else
12421#include <varargs.h>
12422#endif
12423
Martin v. Löwis11437992002-04-12 09:54:03 +000012424int
12425main ()
12426{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012427va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000012428 ;
12429 return 0;
12430}
12431_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012432if ac_fn_c_try_compile "$LINENO"; then :
12433
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012434else
Skip Montanaro6dead952003-09-25 14:50:04 +000012435
Martin v. Löwis11437992002-04-12 09:54:03 +000012436
Matthias Kloseb9621712010-04-24 17:59:49 +000012437$as_echo "#define VA_LIST_IS_ARRAY 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012438
Guido van Rossumda88dad1995-01-26 00:46:29 +000012439 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000012440
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012441fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012442rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012443{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $va_list_is_array" >&5
12444$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012445
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012446# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000012447
12448
Matthias Kloseb9621712010-04-24 17:59:49 +000012449ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r"
Victor Stinnere0be4232011-10-25 13:06:09 +020012450if test "x$ac_cv_func_gethostbyname_r" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012451
Matthias Kloseb9621712010-04-24 17:59:49 +000012452 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000012453
Matthias Kloseb9621712010-04-24 17:59:49 +000012454 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 6 args" >&5
12455$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012456 OLD_CFLAGS=$CFLAGS
12457 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012458 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012459/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012460
12461# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012462
Martin v. Löwis11437992002-04-12 09:54:03 +000012463int
12464main ()
12465{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012466
12467 char *name;
12468 struct hostent *he, *res;
12469 char buffer[2048];
12470 int buflen = 2048;
12471 int h_errnop;
12472
12473 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012474
12475 ;
12476 return 0;
12477}
12478_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012479if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012480
Matthias Kloseb9621712010-04-24 17:59:49 +000012481 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012482
Martin v. Löwis11437992002-04-12 09:54:03 +000012483
Matthias Kloseb9621712010-04-24 17:59:49 +000012484$as_echo "#define HAVE_GETHOSTBYNAME_R_6_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012485
Matthias Kloseb9621712010-04-24 17:59:49 +000012486 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12487$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012488
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012489else
Skip Montanaro6dead952003-09-25 14:50:04 +000012490
Matthias Kloseb9621712010-04-24 17:59:49 +000012491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12492$as_echo "no" >&6; }
12493 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 5 args" >&5
12494$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
12495 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012496/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012497
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012498# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012499
Martin v. Löwis11437992002-04-12 09:54:03 +000012500int
12501main ()
12502{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012503
12504 char *name;
12505 struct hostent *he;
Matthias Kloseb159a552010-04-25 21:00:44 +000012506 char buffer[2048];
12507 int buflen = 2048;
12508 int h_errnop;
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012509
Matthias Kloseb159a552010-04-25 21:00:44 +000012510 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000012511
12512 ;
12513 return 0;
12514}
12515_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012516if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012517
Matthias Kloseb9621712010-04-24 17:59:49 +000012518 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000012519
Martin v. Löwis11437992002-04-12 09:54:03 +000012520
Matthias Kloseb159a552010-04-25 21:00:44 +000012521$as_echo "#define HAVE_GETHOSTBYNAME_R_5_ARG 1" >>confdefs.h
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012522
Matthias Kloseb9621712010-04-24 17:59:49 +000012523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12524$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012525
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012526else
Skip Montanaro6dead952003-09-25 14:50:04 +000012527
Matthias Kloseb9621712010-04-24 17:59:49 +000012528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12529$as_echo "no" >&6; }
Matthias Kloseb159a552010-04-25 21:00:44 +000012530 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gethostbyname_r with 3 args" >&5
12531$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
12532 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12533/* end confdefs.h. */
12534
12535# include <netdb.h>
12536
12537int
12538main ()
12539{
12540
12541 char *name;
12542 struct hostent *he;
12543 struct hostent_data data;
12544
12545 (void) gethostbyname_r(name, he, &data);
12546
12547 ;
12548 return 0;
12549}
12550_ACEOF
12551if ac_fn_c_try_compile "$LINENO"; then :
12552
12553 $as_echo "#define HAVE_GETHOSTBYNAME_R 1" >>confdefs.h
12554
12555
12556$as_echo "#define HAVE_GETHOSTBYNAME_R_3_ARG 1" >>confdefs.h
12557
12558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12559$as_echo "yes" >&6; }
12560
12561else
12562
12563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12564$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012565
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012566fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012567rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012568
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012569fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012570rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012571
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012572fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012573rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012574 CFLAGS=$OLD_CFLAGS
12575
12576else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012577
Matthias Kloseb9621712010-04-24 17:59:49 +000012578 for ac_func in gethostbyname
12579do :
12580 ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
Victor Stinnere0be4232011-10-25 13:06:09 +020012581if test "x$ac_cv_func_gethostbyname" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012582 cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012583#define HAVE_GETHOSTBYNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012584_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012585
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012586fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012587done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012588
Michael W. Hudson54241132001-12-07 15:38:26 +000012589
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000012590fi
12591
Michael W. Hudson54241132001-12-07 15:38:26 +000012592
12593
12594
12595
12596
12597
Guido van Rossum627b2d71993-12-24 10:39:16 +000012598# checks for system services
12599# (none yet)
12600
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012601# Linux requires this for correct f.p. operations
Matthias Kloseb9621712010-04-24 17:59:49 +000012602ac_fn_c_check_func "$LINENO" "__fpu_control" "ac_cv_func___fpu_control"
Victor Stinnere0be4232011-10-25 13:06:09 +020012603if test "x$ac_cv_func___fpu_control" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012604
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012605else
Matthias Kloseb9621712010-04-24 17:59:49 +000012606 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __fpu_control in -lieee" >&5
12607$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012608if ${ac_cv_lib_ieee___fpu_control+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012609 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012610else
Martin v. Löwis11437992002-04-12 09:54:03 +000012611 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012612LIBS="-lieee $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012613cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000012614/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012615
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012616/* Override any GCC internal prototype to avoid an error.
12617 Use char because int might match the return type of a GCC
12618 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012619#ifdef __cplusplus
12620extern "C"
12621#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012622char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012623int
12624main ()
12625{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012626return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012627 ;
12628 return 0;
12629}
12630_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012631if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012632 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000012633else
Matthias Kloseb9621712010-04-24 17:59:49 +000012634 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012635fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012636rm -f core conftest.err conftest.$ac_objext \
12637 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012638LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012639fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012640{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ieee___fpu_control" >&5
12641$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012642if test "x$ac_cv_lib_ieee___fpu_control" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000012643 cat >>confdefs.h <<_ACEOF
12644#define HAVE_LIBIEEE 1
12645_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012646
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012647 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012648
Guido van Rossum627b2d71993-12-24 10:39:16 +000012649fi
12650
Michael W. Hudson54241132001-12-07 15:38:26 +000012651
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000012652fi
12653
Michael W. Hudson54241132001-12-07 15:38:26 +000012654
Guido van Rossum7f253911997-05-09 02:42:48 +000012655# Check for --with-fpectl
Matthias Kloseb9621712010-04-24 17:59:49 +000012656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-fpectl" >&5
12657$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012658
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012659# Check whether --with-fpectl was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012660if test "${with_fpectl+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012661 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000012662if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000012663then
12664
Matthias Kloseb9621712010-04-24 17:59:49 +000012665$as_echo "#define WANT_SIGFPE_HANDLER 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000012666
Matthias Kloseb9621712010-04-24 17:59:49 +000012667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12668$as_echo "yes" >&6; }
12669else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12670$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012671fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000012672else
Matthias Kloseb9621712010-04-24 17:59:49 +000012673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12674$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012675fi
12676
Guido van Rossum7f253911997-05-09 02:42:48 +000012677
Guido van Rossum7f43da71994-08-01 12:15:30 +000012678# check for --with-libm=...
12679
Guido van Rossum563e7081996-09-10 18:20:48 +000012680case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000012681Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000012682*) LIBM=-lm
12683esac
Matthias Kloseb9621712010-04-24 17:59:49 +000012684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libm=STRING" >&5
12685$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012686
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012687# Check whether --with-libm was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012688if test "${with_libm+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012689 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000012690if test "$withval" = no
12691then LIBM=
Matthias Kloseb9621712010-04-24 17:59:49 +000012692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBM empty" >&5
12693$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012694elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012695then LIBM=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000012696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBM=\"$withval\"" >&5
12697$as_echo "set LIBM=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012698else as_fn_error $? "proper usage is --with-libm=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012699fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012700else
Matthias Kloseb9621712010-04-24 17:59:49 +000012701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBM=\"$LIBM\"" >&5
12702$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012703fi
12704
Guido van Rossum7f43da71994-08-01 12:15:30 +000012705
12706# check for --with-libc=...
12707
Matthias Kloseb9621712010-04-24 17:59:49 +000012708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-libc=STRING" >&5
12709$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012710
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012711# Check whether --with-libc was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000012712if test "${with_libc+set}" = set; then :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012713 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000012714if test "$withval" = no
12715then LIBC=
Matthias Kloseb9621712010-04-24 17:59:49 +000012716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: force LIBC empty" >&5
12717$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000012718elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000012719then LIBC=$withval
Matthias Kloseb9621712010-04-24 17:59:49 +000012720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: set LIBC=\"$withval\"" >&5
12721$as_echo "set LIBC=\"$withval\"" >&6; }
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020012722else as_fn_error $? "proper usage is --with-libc=STRING" "$LINENO" 5
Guido van Rossum7f43da71994-08-01 12:15:30 +000012723fi
Guido van Rossum7f253911997-05-09 02:42:48 +000012724else
Matthias Kloseb9621712010-04-24 17:59:49 +000012725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: default LIBC=\"$LIBC\"" >&5
12726$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012727fi
12728
Guido van Rossum7f43da71994-08-01 12:15:30 +000012729
Stefan Krah1919b7e2012-03-21 18:25:23 +010012730# **************************************
12731# * Check for gcc x64 inline assembler *
12732# **************************************
12733
12734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x64 gcc inline assembler" >&5
12735$as_echo_n "checking for x64 gcc inline assembler... " >&6; }
12736cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12737/* end confdefs.h. */
12738
12739int
12740main ()
12741{
12742
12743 __asm__ __volatile__ ("movq %rcx, %rax");
12744
12745 ;
12746 return 0;
12747}
12748_ACEOF
12749if ac_fn_c_try_compile "$LINENO"; then :
12750 have_gcc_asm_for_x64=yes
12751else
12752 have_gcc_asm_for_x64=no
12753fi
12754rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12755{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x64" >&5
12756$as_echo "$have_gcc_asm_for_x64" >&6; }
12757if test "$have_gcc_asm_for_x64" = yes
12758then
12759
12760$as_echo "#define HAVE_GCC_ASM_FOR_X64 1" >>confdefs.h
12761
12762fi
12763
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012764# **************************************************
12765# * Check for various properties of floating point *
12766# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000012767
Matthias Kloseb9621712010-04-24 17:59:49 +000012768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are little-endian IEEE 754 binary64" >&5
12769$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012770if ${ac_cv_little_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012771 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012772else
12773
Matthias Kloseb9621712010-04-24 17:59:49 +000012774if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012775 ac_cv_little_endian_double=no
12776else
Matthias Kloseb9621712010-04-24 17:59:49 +000012777 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012778/* end confdefs.h. */
12779
12780#include <string.h>
12781int main() {
12782 double x = 9006104071832581.0;
12783 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
12784 return 0;
12785 else
12786 return 1;
12787}
12788
12789_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012790if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012791 ac_cv_little_endian_double=yes
12792else
Matthias Kloseb9621712010-04-24 17:59:49 +000012793 ac_cv_little_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012794fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012795rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12796 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012797fi
12798
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012799fi
12800
Matthias Kloseb9621712010-04-24 17:59:49 +000012801{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_little_endian_double" >&5
12802$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012803if test "$ac_cv_little_endian_double" = yes
12804then
12805
Matthias Kloseb9621712010-04-24 17:59:49 +000012806$as_echo "#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012807
12808fi
12809
Matthias Kloseb9621712010-04-24 17:59:49 +000012810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are big-endian IEEE 754 binary64" >&5
12811$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012812if ${ac_cv_big_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012813 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012814else
12815
Matthias Kloseb9621712010-04-24 17:59:49 +000012816if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012817 ac_cv_big_endian_double=no
12818else
Matthias Kloseb9621712010-04-24 17:59:49 +000012819 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012820/* end confdefs.h. */
12821
12822#include <string.h>
12823int main() {
12824 double x = 9006104071832581.0;
12825 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
12826 return 0;
12827 else
12828 return 1;
12829}
12830
12831_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012832if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012833 ac_cv_big_endian_double=yes
12834else
Matthias Kloseb9621712010-04-24 17:59:49 +000012835 ac_cv_big_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012836fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012837rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12838 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012839fi
12840
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012841fi
12842
Matthias Kloseb9621712010-04-24 17:59:49 +000012843{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_big_endian_double" >&5
12844$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012845if test "$ac_cv_big_endian_double" = yes
12846then
12847
Matthias Kloseb9621712010-04-24 17:59:49 +000012848$as_echo "#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012849
12850fi
12851
12852# Some ARM platforms use a mixed-endian representation for doubles.
12853# While Python doesn't currently have full support for these platforms
12854# (see e.g., issue 1762561), we can at least make sure that float <-> string
12855# conversions work.
Matthias Kloseb9621712010-04-24 17:59:49 +000012856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
12857$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020012858if ${ac_cv_mixed_endian_double+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000012859 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012860else
12861
Matthias Kloseb9621712010-04-24 17:59:49 +000012862if test "$cross_compiling" = yes; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012863 ac_cv_mixed_endian_double=no
12864else
Matthias Kloseb9621712010-04-24 17:59:49 +000012865 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012866/* end confdefs.h. */
12867
12868#include <string.h>
12869int main() {
12870 double x = 9006104071832581.0;
12871 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
12872 return 0;
12873 else
12874 return 1;
12875}
12876
12877_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012878if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012879 ac_cv_mixed_endian_double=yes
12880else
Matthias Kloseb9621712010-04-24 17:59:49 +000012881 ac_cv_mixed_endian_double=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012882fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012883rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12884 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012885fi
12886
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012887fi
12888
Matthias Kloseb9621712010-04-24 17:59:49 +000012889{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mixed_endian_double" >&5
12890$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012891if test "$ac_cv_mixed_endian_double" = yes
12892then
12893
Matthias Kloseb9621712010-04-24 17:59:49 +000012894$as_echo "#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012895
12896fi
12897
Mark Dickinson7abf8d42009-04-18 20:17:52 +000012898# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000012899# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000012900# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000012901# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012902# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson10683072009-04-18 21:18:19 +000012903# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012904
12905# This inline assembler syntax may also work for suncc and icc,
12906# so we try it on all platforms.
12907
Matthias Kloseb9621712010-04-24 17:59:49 +000012908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
12909$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
12910cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012911/* end confdefs.h. */
12912
12913int
12914main ()
12915{
12916
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012917 unsigned short cw;
12918 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
12919 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012920
12921 ;
12922 return 0;
12923}
12924_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012925if ac_fn_c_try_compile "$LINENO"; then :
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012926 have_gcc_asm_for_x87=yes
12927else
Matthias Kloseb9621712010-04-24 17:59:49 +000012928 have_gcc_asm_for_x87=no
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012929fi
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012930rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000012931{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_asm_for_x87" >&5
12932$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinsonf4243f62009-11-15 13:47:27 +000012933if test "$have_gcc_asm_for_x87" = yes
12934then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012935
Matthias Kloseb9621712010-04-24 17:59:49 +000012936$as_echo "#define HAVE_GCC_ASM_FOR_X87 1" >>confdefs.h
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012937
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012938fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012939
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012940# Detect whether system arithmetic is subject to x87-style double
12941# rounding issues. The result of this test has little meaning on non
12942# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
12943# mode is round-to-nearest and double rounding issues are present, and
12944# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Matthias Kloseb9621712010-04-24 17:59:49 +000012945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for x87-style double rounding" >&5
12946$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012947# $BASECFLAGS may affect the result
12948ac_save_cc="$CC"
12949CC="$CC $BASECFLAGS"
Matthias Kloseb9621712010-04-24 17:59:49 +000012950if test "$cross_compiling" = yes; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012951 ac_cv_x87_double_rounding=no
12952else
Matthias Kloseb9621712010-04-24 17:59:49 +000012953 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012954/* end confdefs.h. */
12955
12956#include <stdlib.h>
12957#include <math.h>
12958int main() {
12959 volatile double x, y, z;
12960 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
12961 x = 0.99999999999999989; /* 1-2**-53 */
12962 y = 1./x;
12963 if (y != 1.)
12964 exit(0);
12965 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
12966 x = 1e16;
12967 y = 2.99999;
12968 z = x + y;
12969 if (z != 1e16+4.)
12970 exit(0);
12971 /* both tests show evidence of double rounding */
12972 exit(1);
12973}
12974
12975_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000012976if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012977 ac_cv_x87_double_rounding=no
12978else
Matthias Kloseb9621712010-04-24 17:59:49 +000012979 ac_cv_x87_double_rounding=yes
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012980fi
Matthias Kloseb9621712010-04-24 17:59:49 +000012981rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12982 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012983fi
12984
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012985CC="$ac_save_cc"
Matthias Kloseb9621712010-04-24 17:59:49 +000012986{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_x87_double_rounding" >&5
12987$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012988if test "$ac_cv_x87_double_rounding" = yes
12989then
12990
Matthias Kloseb9621712010-04-24 17:59:49 +000012991$as_echo "#define X87_DOUBLE_ROUNDING 1" >>confdefs.h
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000012992
12993fi
12994
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000012995# ************************************
12996# * Check for mathematical functions *
12997# ************************************
12998
12999LIBS_SAVE=$LIBS
13000LIBS="$LIBS $LIBM"
13001
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013002for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
13003do :
13004 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13005ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013006if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013007 cat >>confdefs.h <<_ACEOF
13008#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13009_ACEOF
13010
13011fi
13012done
13013
Victor Stinner8f9f8d62011-05-09 12:45:41 +020013014for ac_func in hypot lgamma log1p log2 round tgamma
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013015do :
13016 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13017ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013018if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013019 cat >>confdefs.h <<_ACEOF
13020#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13021_ACEOF
13022
13023fi
13024done
13025
13026ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include <math.h>
13027"
Victor Stinnere0be4232011-10-25 13:06:09 +020013028if test "x$ac_cv_have_decl_isinf" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013029 ac_have_decl=1
13030else
13031 ac_have_decl=0
13032fi
13033
13034cat >>confdefs.h <<_ACEOF
13035#define HAVE_DECL_ISINF $ac_have_decl
13036_ACEOF
13037ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include <math.h>
13038"
Victor Stinnere0be4232011-10-25 13:06:09 +020013039if test "x$ac_cv_have_decl_isnan" = xyes; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013040 ac_have_decl=1
13041else
13042 ac_have_decl=0
13043fi
13044
13045cat >>confdefs.h <<_ACEOF
13046#define HAVE_DECL_ISNAN $ac_have_decl
13047_ACEOF
13048ac_fn_c_check_decl "$LINENO" "isfinite" "ac_cv_have_decl_isfinite" "#include <math.h>
13049"
Victor Stinnere0be4232011-10-25 13:06:09 +020013050if test "x$ac_cv_have_decl_isfinite" = 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_ISFINITE $ac_have_decl
13058_ACEOF
13059
13060
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013061# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
13062# -0. on some architectures.
Matthias Kloseb9621712010-04-24 17:59:49 +000013063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tanh preserves the sign of zero" >&5
13064$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013065if ${ac_cv_tanh_preserves_zero_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013066 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013067else
13068
Matthias Kloseb9621712010-04-24 17:59:49 +000013069if test "$cross_compiling" = yes; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013070 ac_cv_tanh_preserves_zero_sign=no
13071else
Matthias Kloseb9621712010-04-24 17:59:49 +000013072 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013073/* end confdefs.h. */
13074
13075#include <math.h>
13076#include <stdlib.h>
13077int main() {
13078 /* return 0 if either negative zeros don't exist
13079 on this platform or if negative zeros exist
13080 and tanh(-0.) == -0. */
13081 if (atan2(0., -1.) == atan2(-0., -1.) ||
13082 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
13083 else exit(1);
13084}
13085
13086_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013087if ac_fn_c_try_run "$LINENO"; then :
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013088 ac_cv_tanh_preserves_zero_sign=yes
13089else
Matthias Kloseb9621712010-04-24 17:59:49 +000013090 ac_cv_tanh_preserves_zero_sign=no
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013091fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013092rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13093 conftest.$ac_objext conftest.beam conftest.$ac_ext
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013094fi
13095
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013096fi
13097
Matthias Kloseb9621712010-04-24 17:59:49 +000013098{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_tanh_preserves_zero_sign" >&5
13099$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013100if test "$ac_cv_tanh_preserves_zero_sign" = yes
13101then
13102
Matthias Kloseb9621712010-04-24 17:59:49 +000013103$as_echo "#define TANH_PRESERVES_ZERO_SIGN 1" >>confdefs.h
Christian Heimes81ee3ef2008-05-04 22:42:01 +000013104
13105fi
13106
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013107if test "$ac_cv_func_log1p" = yes
13108then
13109 # On some versions of AIX, log1p(-0.) returns 0. instead of
13110 # -0. See issue #9920.
13111 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether log1p drops the sign of negative zero" >&5
13112$as_echo_n "checking whether log1p drops the sign of negative zero... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013113 if ${ac_cv_log1p_drops_zero_sign+:} false; then :
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013114 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013115else
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013116
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013117 if test "$cross_compiling" = yes; then :
13118 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013119else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013120 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13121/* end confdefs.h. */
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013122
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013123 #include <math.h>
13124 #include <stdlib.h>
13125 int main() {
13126 /* Fail if the signs of log1p(-0.) and -0. can be
13127 distinguished. */
13128 if (atan2(log1p(-0.), -1.) == atan2(-0., -1.))
13129 return 0;
13130 else
13131 return 1;
13132 }
13133
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013134_ACEOF
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013135if ac_fn_c_try_run "$LINENO"; then :
13136 ac_cv_log1p_drops_zero_sign=no
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013137else
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013138 ac_cv_log1p_drops_zero_sign=yes
13139fi
13140rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13141 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013142fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013143
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013144fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013145
Mark Dickinsonec0d3552010-11-20 10:29:12 +000013146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_log1p_drops_zero_sign" >&5
13147$as_echo "$ac_cv_log1p_drops_zero_sign" >&6; }
13148fi
13149if test "$ac_cv_log1p_drops_zero_sign" = yes
13150then
13151
13152$as_echo "#define LOG1P_DROPS_ZERO_SIGN 1" >>confdefs.h
13153
13154fi
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000013155
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000013156LIBS=$LIBS_SAVE
13157
Mark Dickinsona614f042009-11-28 12:48:43 +000013158# For multiprocessing module, check that sem_open
13159# actually works. For FreeBSD versions <= 7.2,
13160# the kernel module that provides POSIX semaphores
13161# isn't loaded by default, so an attempt to call
13162# sem_open results in a 'Signal 12' error.
Matthias Kloseb9621712010-04-24 17:59:49 +000013163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX semaphores are enabled" >&5
13164$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013165if ${ac_cv_posix_semaphores_enabled+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013166 $as_echo_n "(cached) " >&6
Mark Dickinsona614f042009-11-28 12:48:43 +000013167else
Matthias Kloseb9621712010-04-24 17:59:49 +000013168 if test "$cross_compiling" = yes; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013169 ac_cv_posix_semaphores_enabled=yes
13170else
Matthias Kloseb9621712010-04-24 17:59:49 +000013171 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013172/* end confdefs.h. */
13173
13174#include <unistd.h>
13175#include <fcntl.h>
13176#include <stdio.h>
13177#include <semaphore.h>
13178#include <sys/stat.h>
13179
13180int main(void) {
13181 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
13182 if (a == SEM_FAILED) {
13183 perror("sem_open");
13184 return 1;
13185 }
13186 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013187 sem_unlink("/autoconf");
Mark Dickinsona614f042009-11-28 12:48:43 +000013188 return 0;
13189}
13190
13191_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013192if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinsona614f042009-11-28 12:48:43 +000013193 ac_cv_posix_semaphores_enabled=yes
13194else
Matthias Kloseb9621712010-04-24 17:59:49 +000013195 ac_cv_posix_semaphores_enabled=no
Mark Dickinsona614f042009-11-28 12:48:43 +000013196fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013197rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13198 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinsona614f042009-11-28 12:48:43 +000013199fi
13200
13201
Mark Dickinsona614f042009-11-28 12:48:43 +000013202fi
13203
Matthias Kloseb9621712010-04-24 17:59:49 +000013204{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_posix_semaphores_enabled" >&5
13205$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinsona614f042009-11-28 12:48:43 +000013206if test $ac_cv_posix_semaphores_enabled = no
13207then
13208
Matthias Kloseb9621712010-04-24 17:59:49 +000013209$as_echo "#define POSIX_SEMAPHORES_NOT_ENABLED 1" >>confdefs.h
Mark Dickinsona614f042009-11-28 12:48:43 +000013210
13211fi
13212
Mark Dickinson10683072009-04-18 21:18:19 +000013213# Multiprocessing check for broken sem_getvalue
Matthias Kloseb9621712010-04-24 17:59:49 +000013214{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken sem_getvalue" >&5
13215$as_echo_n "checking for broken sem_getvalue... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013216if ${ac_cv_broken_sem_getvalue+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013217 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013218else
Matthias Kloseb9621712010-04-24 17:59:49 +000013219 if test "$cross_compiling" = yes; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013220 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000013221else
Matthias Kloseb9621712010-04-24 17:59:49 +000013222 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson10683072009-04-18 21:18:19 +000013223/* end confdefs.h. */
13224
13225#include <unistd.h>
13226#include <fcntl.h>
13227#include <stdio.h>
13228#include <semaphore.h>
13229#include <sys/stat.h>
13230
13231int main(void){
Mark Dickinsonba79b352009-12-13 21:10:57 +000013232 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000013233 int count;
13234 int res;
13235 if(a==SEM_FAILED){
13236 perror("sem_open");
13237 return 1;
13238
13239 }
13240 res = sem_getvalue(a, &count);
13241 sem_close(a);
Mark Dickinsonba79b352009-12-13 21:10:57 +000013242 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000013243 return res==-1 ? 1 : 0;
13244}
13245
Mark Dickinson10683072009-04-18 21:18:19 +000013246_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013247if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013248 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000013249else
Matthias Kloseb9621712010-04-24 17:59:49 +000013250 ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013251fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013252rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13253 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013254fi
13255
Alexandre Vassalotti19142282009-07-17 23:11:52 +000013256
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013257fi
13258
Matthias Kloseb9621712010-04-24 17:59:49 +000013259{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_sem_getvalue" >&5
13260$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013261if test $ac_cv_broken_sem_getvalue = yes
13262then
13263
Matthias Kloseb9621712010-04-24 17:59:49 +000013264$as_echo "#define HAVE_BROKEN_SEM_GETVALUE 1" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013265
13266fi
13267
Mark Dickinsonbd792642009-03-18 20:06:12 +000013268# determine what size digit to use for Python's longs
Matthias Kloseb9621712010-04-24 17:59:49 +000013269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking digit size for Python's longs" >&5
13270$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013271# Check whether --enable-big-digits was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000013272if test "${enable_big_digits+set}" = set; then :
Mark Dickinsonbd792642009-03-18 20:06:12 +000013273 enableval=$enable_big_digits; case $enable_big_digits in
13274yes)
13275 enable_big_digits=30 ;;
13276no)
13277 enable_big_digits=15 ;;
1327815|30)
13279 ;;
13280*)
Victor Stinnere0be4232011-10-25 13:06:09 +020013281 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 +000013282esac
Matthias Kloseb9621712010-04-24 17:59:49 +000013283{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_big_digits" >&5
13284$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013285
13286cat >>confdefs.h <<_ACEOF
13287#define PYLONG_BITS_IN_DIGIT $enable_big_digits
13288_ACEOF
13289
13290
13291else
Matthias Kloseb9621712010-04-24 17:59:49 +000013292 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
13293$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000013294fi
13295
13296
Guido van Rossumef2255b2000-03-10 22:30:29 +000013297# check for wchar.h
Matthias Kloseb9621712010-04-24 17:59:49 +000013298ac_fn_c_check_header_mongrel "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default"
Victor Stinnere0be4232011-10-25 13:06:09 +020013299if test "x$ac_cv_header_wchar_h" = xyes; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013300
13301
Matthias Kloseb9621712010-04-24 17:59:49 +000013302$as_echo "#define HAVE_WCHAR_H 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013303
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013304 wchar_h="yes"
13305
Guido van Rossumef2255b2000-03-10 22:30:29 +000013306else
Martin v. Löwis11437992002-04-12 09:54:03 +000013307 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000013308
13309fi
13310
Michael W. Hudson54241132001-12-07 15:38:26 +000013311
Martin v. Löwis11437992002-04-12 09:54:03 +000013312
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013313# determine wchar_t size
13314if test "$wchar_h" = yes
13315then
Matthias Kloseb9621712010-04-24 17:59:49 +000013316 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013317# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13318# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13319# This bug is HP SR number 8606223364.
Matthias Kloseb9621712010-04-24 17:59:49 +000013320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5
13321$as_echo_n "checking size of wchar_t... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013322if ${ac_cv_sizeof_wchar_t+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013323 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013324else
Matthias Kloseb9621712010-04-24 17:59:49 +000013325 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "#include <wchar.h>
13326"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013327
Martin v. Löwis11437992002-04-12 09:54:03 +000013328else
Matthias Kloseb9621712010-04-24 17:59:49 +000013329 if test "$ac_cv_type_wchar_t" = yes; then
13330 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13331$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013332as_fn_error 77 "cannot compute sizeof (wchar_t)
Victor Stinnere0be4232011-10-25 13:06:09 +020013333See \`config.log' for more details" "$LINENO" 5; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013334 else
13335 ac_cv_sizeof_wchar_t=0
13336 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013337fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013338
Martin v. Löwis11437992002-04-12 09:54:03 +000013339fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013340{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5
13341$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013342
13343
13344
Martin v. Löwis11437992002-04-12 09:54:03 +000013345cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013346#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013347_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013348
Michael W. Hudson54241132001-12-07 15:38:26 +000013349
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013350fi
13351
Matthias Kloseb9621712010-04-24 17:59:49 +000013352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for UCS-4 tcl" >&5
13353$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013354have_ucs4_tcl=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013355cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013356/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013357
13358#include <tcl.h>
13359#if TCL_UTF_MAX != 6
13360# error "NOT UCS4_TCL"
13361#endif
13362int
13363main ()
13364{
13365
13366 ;
13367 return 0;
13368}
13369_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013370if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013371
13372
Matthias Kloseb9621712010-04-24 17:59:49 +000013373$as_echo "#define HAVE_UCS4_TCL 1" >>confdefs.h
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013374
13375 have_ucs4_tcl=yes
13376
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013377fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013378rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013379{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ucs4_tcl" >&5
13380$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000013381
Skip Montanaro6dead952003-09-25 14:50:04 +000013382# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013383if test "$wchar_h" = yes
13384then
13385 # check whether wchar_t is signed or not
Matthias Kloseb9621712010-04-24 17:59:49 +000013386 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wchar_t is signed" >&5
13387$as_echo_n "checking whether wchar_t is signed... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013388 if ${ac_cv_wchar_t_signed+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013389 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013390else
13391
Matthias Kloseb9621712010-04-24 17:59:49 +000013392 if test "$cross_compiling" = yes; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013393 ac_cv_wchar_t_signed=yes
13394else
Matthias Kloseb9621712010-04-24 17:59:49 +000013395 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013396/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013397
13398 #include <wchar.h>
13399 int main()
13400 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000013401 /* Success: exit code 0 */
13402 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013403 }
13404
13405_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013406if ac_fn_c_try_run "$LINENO"; then :
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013407 ac_cv_wchar_t_signed=yes
13408else
Matthias Kloseb9621712010-04-24 17:59:49 +000013409 ac_cv_wchar_t_signed=no
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013410fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013411rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13412 conftest.$ac_objext conftest.beam conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013413fi
13414
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000013415fi
13416
Matthias Kloseb9621712010-04-24 17:59:49 +000013417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_wchar_t_signed" >&5
13418$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013419fi
13420
Georg Brandl52d168a2008-01-07 18:10:24 +000013421# wchar_t is only usable if it maps to an unsigned type
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013422if test "$ac_cv_sizeof_wchar_t" -ge 2 \
Matthias Klose7dbeed72004-12-24 08:22:17 +000013423 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000013424then
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013425 HAVE_USABLE_WCHAR_T="yes"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013426
Matthias Kloseb9621712010-04-24 17:59:49 +000013427$as_echo "#define HAVE_USABLE_WCHAR_T 1" >>confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +000013428
Georg Brandl52d168a2008-01-07 18:10:24 +000013429else
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013430 HAVE_USABLE_WCHAR_T="no usable wchar_t found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000013431fi
Martin v. Löwisd63a3b82011-09-28 07:41:54 +020013432{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAVE_USABLE_WCHAR_T" >&5
13433$as_echo "$HAVE_USABLE_WCHAR_T" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000013434
13435# check for endianness
Matthias Kloseb9621712010-04-24 17:59:49 +000013436 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13437$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013438if ${ac_cv_c_bigendian+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013439 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000013440else
Matthias Kloseb9621712010-04-24 17:59:49 +000013441 ac_cv_c_bigendian=unknown
13442 # See if we're dealing with a universal compiler.
13443 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13444/* end confdefs.h. */
13445#ifndef __APPLE_CC__
13446 not a universal capable compiler
13447 #endif
13448 typedef int dummy;
13449
Skip Montanaro6dead952003-09-25 14:50:04 +000013450_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013451if ac_fn_c_try_compile "$LINENO"; then :
13452
13453 # Check for potential -arch flags. It is not universal unless
13454 # there are at least two -arch flags with different values.
13455 ac_arch=
13456 ac_prev=
13457 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13458 if test -n "$ac_prev"; then
13459 case $ac_word in
13460 i?86 | x86_64 | ppc | ppc64)
13461 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
13462 ac_arch=$ac_word
13463 else
13464 ac_cv_c_bigendian=universal
13465 break
13466 fi
13467 ;;
13468 esac
13469 ac_prev=
13470 elif test "x$ac_word" = "x-arch"; then
13471 ac_prev=arch
13472 fi
13473 done
13474fi
13475rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13476 if test $ac_cv_c_bigendian = unknown; then
13477 # See if sys/param.h defines the BYTE_ORDER macro.
13478 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013479/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013480#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000013481 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013482
Martin v. Löwis11437992002-04-12 09:54:03 +000013483int
13484main ()
13485{
Matthias Kloseb9621712010-04-24 17:59:49 +000013486#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13487 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13488 && LITTLE_ENDIAN)
13489 bogus endian macros
13490 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013491
13492 ;
13493 return 0;
13494}
13495_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013496if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013497 # It does; now see whether it defined to BIG_ENDIAN or not.
Matthias Kloseb9621712010-04-24 17:59:49 +000013498 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013499/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000013500#include <sys/types.h>
Matthias Kloseb9621712010-04-24 17:59:49 +000013501 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000013502
Martin v. Löwis11437992002-04-12 09:54:03 +000013503int
13504main ()
13505{
Guido van Rossumef2255b2000-03-10 22:30:29 +000013506#if BYTE_ORDER != BIG_ENDIAN
Matthias Kloseb9621712010-04-24 17:59:49 +000013507 not big endian
13508 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013509
13510 ;
13511 return 0;
13512}
13513_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013514if ac_fn_c_try_compile "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013515 ac_cv_c_bigendian=yes
13516else
Matthias Kloseb9621712010-04-24 17:59:49 +000013517 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000013518fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013519rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Matthias Kloseb9621712010-04-24 17:59:49 +000013520fi
13521rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13522 fi
13523 if test $ac_cv_c_bigendian = unknown; then
13524 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13525 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013526/* end confdefs.h. */
Matthias Kloseb9621712010-04-24 17:59:49 +000013527#include <limits.h>
13528
Martin v. Löwis11437992002-04-12 09:54:03 +000013529int
13530main ()
13531{
Matthias Kloseb9621712010-04-24 17:59:49 +000013532#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13533 bogus endian macros
13534 #endif
13535
Martin v. Löwis11437992002-04-12 09:54:03 +000013536 ;
13537 return 0;
13538}
13539_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013540if ac_fn_c_try_compile "$LINENO"; then :
13541 # It does; now see whether it defined to _BIG_ENDIAN or not.
13542 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13543/* end confdefs.h. */
13544#include <limits.h>
13545
13546int
13547main ()
13548{
13549#ifndef _BIG_ENDIAN
13550 not big endian
13551 #endif
13552
13553 ;
13554 return 0;
13555}
13556_ACEOF
13557if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013558 ac_cv_c_bigendian=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013559else
Matthias Kloseb9621712010-04-24 17:59:49 +000013560 ac_cv_c_bigendian=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013561fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013562rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13563fi
13564rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13565 fi
13566 if test $ac_cv_c_bigendian = unknown; then
13567 # Compile a test program.
13568 if test "$cross_compiling" = yes; then :
13569 # Try to guess by grepping values from an object file.
13570 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13571/* end confdefs.h. */
13572short int ascii_mm[] =
13573 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13574 short int ascii_ii[] =
13575 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13576 int use_ascii (int i) {
13577 return ascii_mm[i] + ascii_ii[i];
13578 }
13579 short int ebcdic_ii[] =
13580 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13581 short int ebcdic_mm[] =
13582 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13583 int use_ebcdic (int i) {
13584 return ebcdic_mm[i] + ebcdic_ii[i];
13585 }
13586 extern int foo;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013587
Matthias Kloseb9621712010-04-24 17:59:49 +000013588int
13589main ()
13590{
13591return use_ascii (foo) == use_ebcdic (foo);
13592 ;
13593 return 0;
13594}
13595_ACEOF
13596if ac_fn_c_try_compile "$LINENO"; then :
13597 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
13598 ac_cv_c_bigendian=yes
13599 fi
13600 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
13601 if test "$ac_cv_c_bigendian" = unknown; then
13602 ac_cv_c_bigendian=no
13603 else
13604 # finding both strings is unlikely to happen, but who knows?
13605 ac_cv_c_bigendian=unknown
13606 fi
13607 fi
13608fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013609rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013610else
Matthias Kloseb9621712010-04-24 17:59:49 +000013611 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013612/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013613$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013614int
13615main ()
13616{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013617
Matthias Kloseb9621712010-04-24 17:59:49 +000013618 /* Are we little or big endian? From Harbison&Steele. */
13619 union
13620 {
13621 long int l;
13622 char c[sizeof (long int)];
13623 } u;
13624 u.l = 1;
13625 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013626
13627 ;
13628 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000013629}
Martin v. Löwis11437992002-04-12 09:54:03 +000013630_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013631if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumef2255b2000-03-10 22:30:29 +000013632 ac_cv_c_bigendian=no
13633else
Matthias Kloseb9621712010-04-24 17:59:49 +000013634 ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000013635fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013636rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13637 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000013638fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013639
Matthias Kloseb9621712010-04-24 17:59:49 +000013640 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013641fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013642{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
13643$as_echo "$ac_cv_c_bigendian" >&6; }
13644 case $ac_cv_c_bigendian in #(
13645 yes)
13646 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
13647;; #(
13648 no)
13649 ;; #(
13650 universal)
Ronald Oussoren74f29b42009-09-20 20:09:26 +000013651
Matthias Kloseb9621712010-04-24 17:59:49 +000013652$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013653
Matthias Kloseb9621712010-04-24 17:59:49 +000013654 ;; #(
13655 *)
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013656 as_fn_error $? "unknown endianness
Victor Stinnere0be4232011-10-25 13:06:09 +020013657 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000013658 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000013659
Michael W. Hudson54241132001-12-07 15:38:26 +000013660
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013661# ABI version string for Python extension modules. This appears between the
13662# periods in shared library file names, e.g. foo.<SOABI>.so. It is calculated
13663# from the following attributes which affect the ABI of this Python build (in
13664# this order):
13665#
13666# * The Python implementation (always 'cpython-' for us)
13667# * The major and minor version numbers
13668# * --with-pydebug (adds a 'd')
13669# * --with-pymalloc (adds a 'm')
13670# * --with-wide-unicode (adds a 'u')
13671#
13672# Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
Benjamin Petersond7f73e92010-09-05 00:09:07 +000013673# would get a shared library ABI version tag of 'cpython-32dmu' and shared
13674# libraries would be named 'foo.cpython-32dmu.so'.
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013675
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ABIFLAGS" >&5
13677$as_echo_n "checking ABIFLAGS... " >&6; }
13678{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ABIFLAGS" >&5
13679$as_echo "$ABIFLAGS" >&6; }
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SOABI" >&5
13681$as_echo_n "checking SOABI... " >&6; }
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013682SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013683{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SOABI" >&5
13684$as_echo "$SOABI" >&6; }
13685
Barry Warsaw8cf4eae2010-10-16 01:04:07 +000013686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
13687$as_echo_n "checking LDVERSION... " >&6; }
13688LDVERSION='$(VERSION)$(ABIFLAGS)'
13689{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDVERSION" >&5
13690$as_echo "$LDVERSION" >&6; }
13691
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013692# SO is the extension of shared libraries `(including the dot!)
13693# -- usually .so, .sl on HP-UX, .dll on Cygwin
13694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking SO" >&5
13695$as_echo_n "checking SO... " >&6; }
13696if test -z "$SO"
13697then
13698 case $ac_sys_system in
13699 hp*|HP*)
13700 case `uname -m` in
13701 ia64) SO=.so;;
13702 *) SO=.sl;;
13703 esac
13704 ;;
13705 CYGWIN*) SO=.dll;;
Barry Warsaw278266f2010-10-14 17:38:46 +000013706 Linux*|GNU*)
13707 SO=.${SOABI}.so;;
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013708 *) SO=.so;;
13709 esac
13710else
13711 # this might also be a termcap variable, see #610332
Benjamin Petersond7f73e92010-09-05 00:09:07 +000013712 echo
13713 echo '====================================================================='
13714 echo '+ +'
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013715 echo '+ WARNING: You have set SO in your environment. +'
Benjamin Petersond7f73e92010-09-05 00:09:07 +000013716 echo '+ Do you really mean to change the extension for shared libraries? +'
13717 echo '+ Continuing in 10 seconds to let you to ponder. +'
13718 echo '+ +'
13719 echo '====================================================================='
Barry Warsaw35f3a2c2010-09-03 18:30:30 +000013720 sleep 10
13721fi
13722{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SO" >&5
13723$as_echo "$SO" >&6; }
13724
Stefan Krah8c8adf62013-01-17 20:41:56 +010013725
13726cat >>confdefs.h <<_ACEOF
13727#define SHLIB_EXT "$SO"
13728_ACEOF
13729
13730
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013731# Check whether right shifting a negative integer extends the sign bit
13732# or fills with zeros (like the Cray J90, according to Tim Peters).
Matthias Kloseb9621712010-04-24 17:59:49 +000013733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether right shift extends the sign bit" >&5
13734$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013735if ${ac_cv_rshift_extends_sign+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013736 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000013737else
Martin v. Löwis11437992002-04-12 09:54:03 +000013738
Matthias Kloseb9621712010-04-24 17:59:49 +000013739if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000013740 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013741else
Matthias Kloseb9621712010-04-24 17:59:49 +000013742 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013743/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013744
13745int main()
13746{
Vladimir Marangozova6180282000-07-12 05:05:06 +000013747 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013748}
13749
Martin v. Löwis11437992002-04-12 09:54:03 +000013750_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013751if ac_fn_c_try_run "$LINENO"; then :
Vladimir Marangozova6180282000-07-12 05:05:06 +000013752 ac_cv_rshift_extends_sign=yes
13753else
Matthias Kloseb9621712010-04-24 17:59:49 +000013754 ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000013755fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013756rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13757 conftest.$ac_objext conftest.beam conftest.$ac_ext
Vladimir Marangozova6180282000-07-12 05:05:06 +000013758fi
13759
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013760fi
13761
Matthias Kloseb9621712010-04-24 17:59:49 +000013762{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rshift_extends_sign" >&5
13763$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000013764if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013765then
Martin v. Löwis11437992002-04-12 09:54:03 +000013766
Matthias Kloseb9621712010-04-24 17:59:49 +000013767$as_echo "#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1" >>confdefs.h
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013768
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013769fi
13770
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013771# check for getc_unlocked and related locking functions
Matthias Kloseb9621712010-04-24 17:59:49 +000013772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getc_unlocked() and friends" >&5
13773$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013774if ${ac_cv_have_getc_unlocked+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013775 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013776else
Martin v. Löwis11437992002-04-12 09:54:03 +000013777
Matthias Kloseb9621712010-04-24 17:59:49 +000013778cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013779/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013780#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013781int
13782main ()
13783{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013784
13785 FILE *f = fopen("/dev/null", "r");
13786 flockfile(f);
13787 getc_unlocked(f);
13788 funlockfile(f);
13789
Martin v. Löwis11437992002-04-12 09:54:03 +000013790 ;
13791 return 0;
13792}
13793_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013794if ac_fn_c_try_link "$LINENO"; then :
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013795 ac_cv_have_getc_unlocked=yes
13796else
Matthias Kloseb9621712010-04-24 17:59:49 +000013797 ac_cv_have_getc_unlocked=no
13798fi
13799rm -f core conftest.err conftest.$ac_objext \
13800 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013801fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013802
Matthias Kloseb9621712010-04-24 17:59:49 +000013803{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getc_unlocked" >&5
13804$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013805if test "$ac_cv_have_getc_unlocked" = yes
13806then
Martin v. Löwis11437992002-04-12 09:54:03 +000013807
Matthias Kloseb9621712010-04-24 17:59:49 +000013808$as_echo "#define HAVE_GETC_UNLOCKED 1" >>confdefs.h
Guido van Rossumcadfaec2001-01-05 14:45:49 +000013809
13810fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000013811
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013812# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000013813# save the value of LIBS so we don't actually link Python with readline
13814LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013815
Gregory P. Smith18820942008-09-07 06:24:49 +000013816# On some systems we need to link readline to a termcap compatible
13817# library. NOTE: Keep the precedence of listed libraries synchronised
13818# with setup.py.
13819py_cv_lib_readline=no
Matthias Kloseb9621712010-04-24 17:59:49 +000013820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link readline libs" >&5
13821$as_echo_n "checking how to link readline libs... " >&6; }
doko@ubuntu.comf2967c72012-06-30 17:32:23 +020013822for py_libtermcap in "" tinfo ncursesw ncurses curses termcap; do
Gregory P. Smith18820942008-09-07 06:24:49 +000013823 if test -z "$py_libtermcap"; then
13824 READLINE_LIBS="-lreadline"
13825 else
13826 READLINE_LIBS="-lreadline -l$py_libtermcap"
13827 fi
13828 LIBS="$READLINE_LIBS $LIBS_no_readline"
Matthias Kloseb9621712010-04-24 17:59:49 +000013829 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013830/* end confdefs.h. */
13831
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013832/* Override any GCC internal prototype to avoid an error.
13833 Use char because int might match the return type of a GCC
13834 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013835#ifdef __cplusplus
13836extern "C"
13837#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013838char readline ();
13839int
13840main ()
13841{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013842return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013843 ;
13844 return 0;
13845}
13846_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013847if ac_fn_c_try_link "$LINENO"; then :
Gregory P. Smith18820942008-09-07 06:24:49 +000013848 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013849fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013850rm -f core conftest.err conftest.$ac_objext \
13851 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000013852 if test $py_cv_lib_readline = yes; then
13853 break
13854 fi
13855done
13856# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
13857#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000013858if test $py_cv_lib_readline = no; then
Matthias Kloseb9621712010-04-24 17:59:49 +000013859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
13860$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000013861else
Matthias Kloseb9621712010-04-24 17:59:49 +000013862 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINE_LIBS" >&5
13863$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000013864
Matthias Kloseb9621712010-04-24 17:59:49 +000013865$as_echo "#define HAVE_LIBREADLINE 1" >>confdefs.h
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013866
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000013867fi
13868
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013869# check for readline 2.1
Matthias Kloseb9621712010-04-24 17:59:49 +000013870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_callback_handler_install in -lreadline" >&5
13871$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013872if ${ac_cv_lib_readline_rl_callback_handler_install+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013873 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013874else
13875 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013876LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013877cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013878/* end confdefs.h. */
13879
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013880/* Override any GCC internal prototype to avoid an error.
13881 Use char because int might match the return type of a GCC
13882 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013883#ifdef __cplusplus
13884extern "C"
13885#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013886char rl_callback_handler_install ();
13887int
13888main ()
13889{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013890return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013891 ;
13892 return 0;
13893}
13894_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013895if ac_fn_c_try_link "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013896 ac_cv_lib_readline_rl_callback_handler_install=yes
13897else
Matthias Kloseb9621712010-04-24 17:59:49 +000013898 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013899fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013900rm -f core conftest.err conftest.$ac_objext \
13901 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013902LIBS=$ac_check_lib_save_LIBS
13903fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013904{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
13905$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013906if test "x$ac_cv_lib_readline_rl_callback_handler_install" = xyes; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013907
Matthias Kloseb9621712010-04-24 17:59:49 +000013908$as_echo "#define HAVE_RL_CALLBACK 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013909
13910fi
13911
13912
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013913# check for readline 2.2
Matthias Kloseb9621712010-04-24 17:59:49 +000013914cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013915/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013916#include <readline/readline.h>
13917_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013918if ac_fn_c_try_cpp "$LINENO"; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013919 have_readline=yes
13920else
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013921 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000013922
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013923fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020013924rm -f conftest.err conftest.i conftest.$ac_ext
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013925if test $have_readline = yes
13926then
Matthias Kloseb9621712010-04-24 17:59:49 +000013927 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013928/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013929#include <readline/readline.h>
13930
13931_ACEOF
13932if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013933 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then :
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013934
Matthias Kloseb9621712010-04-24 17:59:49 +000013935$as_echo "#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1" >>confdefs.h
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013936
13937fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013938rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013939
Matthias Kloseb9621712010-04-24 17:59:49 +000013940 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroud5131772009-10-26 19:22:14 +000013941/* end confdefs.h. */
13942#include <readline/readline.h>
13943
13944_ACEOF
13945if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000013946 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then :
Antoine Pitroud5131772009-10-26 19:22:14 +000013947
Matthias Kloseb9621712010-04-24 17:59:49 +000013948$as_echo "#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1" >>confdefs.h
Antoine Pitroud5131772009-10-26 19:22:14 +000013949
13950fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000013951rm -f conftest*
Antoine Pitroud5131772009-10-26 19:22:14 +000013952
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000013953fi
13954
Martin v. Löwis0daad592001-09-30 21:09:59 +000013955# check for readline 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000013956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_pre_input_hook in -lreadline" >&5
13957$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013958if ${ac_cv_lib_readline_rl_pre_input_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000013959 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000013960else
Martin v. Löwis11437992002-04-12 09:54:03 +000013961 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000013962LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000013963cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000013964/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013965
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013966/* Override any GCC internal prototype to avoid an error.
13967 Use char because int might match the return type of a GCC
13968 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013969#ifdef __cplusplus
13970extern "C"
13971#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013972char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013973int
13974main ()
13975{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013976return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013977 ;
13978 return 0;
13979}
13980_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000013981if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000013982 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000013983else
Matthias Kloseb9621712010-04-24 17:59:49 +000013984 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000013985fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013986rm -f core conftest.err conftest.$ac_objext \
13987 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013988LIBS=$ac_check_lib_save_LIBS
13989fi
Matthias Kloseb9621712010-04-24 17:59:49 +000013990{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
13991$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020013992if test "x$ac_cv_lib_readline_rl_pre_input_hook" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000013993
Matthias Kloseb9621712010-04-24 17:59:49 +000013994$as_echo "#define HAVE_RL_PRE_INPUT_HOOK 1" >>confdefs.h
Martin v. Löwis0daad592001-09-30 21:09:59 +000013995
Martin v. Löwis0daad592001-09-30 21:09:59 +000013996fi
13997
Michael W. Hudson54241132001-12-07 15:38:26 +000013998
Thomas Wouters89d996e2007-09-08 17:39:28 +000013999# also in 4.0
Matthias Kloseb9621712010-04-24 17:59:49 +000014000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_display_matches_hook in -lreadline" >&5
14001$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014002if ${ac_cv_lib_readline_rl_completion_display_matches_hook+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014003 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000014004else
14005 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014006LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014007cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014008/* end confdefs.h. */
14009
14010/* Override any GCC internal prototype to avoid an error.
14011 Use char because int might match the return type of a GCC
14012 builtin and then its argument prototype would still apply. */
14013#ifdef __cplusplus
14014extern "C"
14015#endif
14016char rl_completion_display_matches_hook ();
14017int
14018main ()
14019{
14020return rl_completion_display_matches_hook ();
14021 ;
14022 return 0;
14023}
14024_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014025if ac_fn_c_try_link "$LINENO"; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014026 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
14027else
Matthias Kloseb9621712010-04-24 17:59:49 +000014028 ac_cv_lib_readline_rl_completion_display_matches_hook=no
Thomas Wouters89d996e2007-09-08 17:39:28 +000014029fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014030rm -f core conftest.err conftest.$ac_objext \
14031 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters89d996e2007-09-08 17:39:28 +000014032LIBS=$ac_check_lib_save_LIBS
14033fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014034{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
14035$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014036if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = xyes; then :
Thomas Wouters89d996e2007-09-08 17:39:28 +000014037
Matthias Kloseb9621712010-04-24 17:59:49 +000014038$as_echo "#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1" >>confdefs.h
Thomas Wouters89d996e2007-09-08 17:39:28 +000014039
14040fi
14041
14042
Martin v. Löwis0daad592001-09-30 21:09:59 +000014043# check for readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_completion_matches in -lreadline" >&5
14045$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014046if ${ac_cv_lib_readline_rl_completion_matches+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014047 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000014048else
Martin v. Löwis11437992002-04-12 09:54:03 +000014049 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000014050LIBS="-lreadline $READLINE_LIBS $LIBS"
Matthias Kloseb9621712010-04-24 17:59:49 +000014051cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014052/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014053
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014054/* Override any GCC internal prototype to avoid an error.
14055 Use char because int might match the return type of a GCC
14056 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014057#ifdef __cplusplus
14058extern "C"
14059#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014060char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014061int
14062main ()
14063{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014064return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014065 ;
14066 return 0;
14067}
14068_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014069if ac_fn_c_try_link "$LINENO"; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000014070 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000014071else
Matthias Kloseb9621712010-04-24 17:59:49 +000014072 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000014073fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014074rm -f core conftest.err conftest.$ac_objext \
14075 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014076LIBS=$ac_check_lib_save_LIBS
14077fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014078{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_completion_matches" >&5
14079$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014080if test "x$ac_cv_lib_readline_rl_completion_matches" = xyes; then :
Michael W. Hudson54241132001-12-07 15:38:26 +000014081
Matthias Kloseb9621712010-04-24 17:59:49 +000014082$as_echo "#define HAVE_RL_COMPLETION_MATCHES 1" >>confdefs.h
Guido van Rossum353ae582001-07-10 16:45:32 +000014083
Guido van Rossum353ae582001-07-10 16:45:32 +000014084fi
14085
Jack Jansendd19cf82001-12-06 22:36:17 +000014086
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014087# also in readline 4.2
Matthias Kloseb9621712010-04-24 17:59:49 +000014088cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014089/* end confdefs.h. */
14090#include <readline/readline.h>
14091_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014092if ac_fn_c_try_cpp "$LINENO"; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014093 have_readline=yes
14094else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014095 have_readline=no
Matthias Kloseb159a552010-04-25 21:00:44 +000014096
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014097fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020014098rm -f conftest.err conftest.i conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014099if test $have_readline = yes
14100then
Matthias Kloseb9621712010-04-24 17:59:49 +000014101 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014102/* end confdefs.h. */
14103#include <readline/readline.h>
14104
14105_ACEOF
14106if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Matthias Kloseb9621712010-04-24 17:59:49 +000014107 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then :
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014108
Matthias Kloseb9621712010-04-24 17:59:49 +000014109$as_echo "#define HAVE_RL_CATCH_SIGNAL 1" >>confdefs.h
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014110
14111fi
Matthias Klosec80c93f2010-04-24 17:04:35 +000014112rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014113
14114fi
14115
Martin v. Löwis82bca632006-02-10 20:49:30 +000014116# End of readline checks: restore LIBS
14117LIBS=$LIBS_no_readline
14118
Matthias Kloseb9621712010-04-24 17:59:49 +000014119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken nice()" >&5
14120$as_echo_n "checking for broken nice()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014121if ${ac_cv_broken_nice+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014122 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014123else
Martin v. Löwis11437992002-04-12 09:54:03 +000014124
Matthias Kloseb9621712010-04-24 17:59:49 +000014125if test "$cross_compiling" = yes; then :
Guido van Rossum3065c942001-09-17 04:03:14 +000014126 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014127else
Matthias Kloseb9621712010-04-24 17:59:49 +000014128 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014129/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014130
14131int main()
14132{
14133 int val1 = nice(1);
14134 if (val1 != -1 && val1 == nice(2))
14135 exit(0);
14136 exit(1);
14137}
14138
Martin v. Löwis11437992002-04-12 09:54:03 +000014139_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014140if ac_fn_c_try_run "$LINENO"; then :
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014141 ac_cv_broken_nice=yes
14142else
Matthias Kloseb9621712010-04-24 17:59:49 +000014143 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014144fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014145rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14146 conftest.$ac_objext conftest.beam conftest.$ac_ext
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014147fi
14148
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014149fi
14150
Matthias Kloseb9621712010-04-24 17:59:49 +000014151{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_nice" >&5
14152$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014153if test "$ac_cv_broken_nice" = yes
14154then
Martin v. Löwis11437992002-04-12 09:54:03 +000014155
Matthias Kloseb9621712010-04-24 17:59:49 +000014156$as_echo "#define HAVE_BROKEN_NICE 1" >>confdefs.h
Thomas Wouterse38b2f12001-07-11 22:35:31 +000014157
14158fi
14159
Matthias Kloseb9621712010-04-24 17:59:49 +000014160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken poll()" >&5
14161$as_echo_n "checking for broken poll()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014162if ${ac_cv_broken_poll+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014163 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014164else
Matthias Kloseb9621712010-04-24 17:59:49 +000014165 if test "$cross_compiling" = yes; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014166 ac_cv_broken_poll=no
14167else
Matthias Kloseb9621712010-04-24 17:59:49 +000014168 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014169/* end confdefs.h. */
14170
14171#include <poll.h>
14172
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014173int main()
14174{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014175 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014176 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014177
14178 close (42);
14179
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014180 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014181 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014182 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014183 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014184 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014185 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014186 return 1;
14187}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014188
14189_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014190if ac_fn_c_try_run "$LINENO"; then :
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014191 ac_cv_broken_poll=yes
14192else
Matthias Kloseb9621712010-04-24 17:59:49 +000014193 ac_cv_broken_poll=no
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014194fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014195rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14196 conftest.$ac_objext conftest.beam conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014197fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014198
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014199fi
14200
Matthias Kloseb9621712010-04-24 17:59:49 +000014201{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_poll" >&5
14202$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014203if test "$ac_cv_broken_poll" = yes
14204then
14205
Matthias Kloseb9621712010-04-24 17:59:49 +000014206$as_echo "#define HAVE_BROKEN_POLL 1" >>confdefs.h
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014207
14208fi
14209
Brett Cannon43802422005-02-10 20:48:03 +000014210# 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 +000014211# (which is not required by ISO C or UNIX spec) and/or if we support
14212# tzname[]
Matthias Kloseb9621712010-04-24 17:59:49 +000014213ac_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 +000014214#include <$ac_cv_struct_tm>
14215
Matthias Kloseb9621712010-04-24 17:59:49 +000014216"
Victor Stinnere0be4232011-10-25 13:06:09 +020014217if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
Brett Cannon43802422005-02-10 20:48:03 +000014218
14219cat >>confdefs.h <<_ACEOF
14220#define HAVE_STRUCT_TM_TM_ZONE 1
14221_ACEOF
14222
14223
14224fi
14225
14226if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14227
Matthias Kloseb9621712010-04-24 17:59:49 +000014228$as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014229
14230else
Matthias Kloseb9621712010-04-24 17:59:49 +000014231 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
14232"
Victor Stinnere0be4232011-10-25 13:06:09 +020014233if test "x$ac_cv_have_decl_tzname" = xyes; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014234 ac_have_decl=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014235else
Matthias Kloseb9621712010-04-24 17:59:49 +000014236 ac_have_decl=0
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014237fi
14238
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014239cat >>confdefs.h <<_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014240#define HAVE_DECL_TZNAME $ac_have_decl
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014241_ACEOF
14242
Matthias Kloseb9621712010-04-24 17:59:49 +000014243 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
14244$as_echo_n "checking for tzname... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014245if ${ac_cv_var_tzname+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014246 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014247else
Matthias Kloseb9621712010-04-24 17:59:49 +000014248 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014249/* end confdefs.h. */
14250#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014251#if !HAVE_DECL_TZNAME
14252extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000014253#endif
14254
14255int
14256main ()
14257{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014258return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000014259 ;
14260 return 0;
14261}
14262_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014263if ac_fn_c_try_link "$LINENO"; then :
Brett Cannon43802422005-02-10 20:48:03 +000014264 ac_cv_var_tzname=yes
14265else
Matthias Kloseb9621712010-04-24 17:59:49 +000014266 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000014267fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014268rm -f core conftest.err conftest.$ac_objext \
14269 conftest$ac_exeext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000014270fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014271{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
14272$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000014273 if test $ac_cv_var_tzname = yes; then
14274
Matthias Kloseb9621712010-04-24 17:59:49 +000014275$as_echo "#define HAVE_TZNAME 1" >>confdefs.h
Brett Cannon43802422005-02-10 20:48:03 +000014276
14277 fi
14278fi
14279
Nicholas Bastine62c5c82004-03-21 23:45:42 +000014280
Martin v. Löwis1d459062005-03-14 21:23:33 +000014281# check tzset(3) exists and works like we expect it to
Matthias Kloseb9621712010-04-24 17:59:49 +000014282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working tzset()" >&5
14283$as_echo_n "checking for working tzset()... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014284if ${ac_cv_working_tzset+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014285 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014286else
14287
Matthias Kloseb9621712010-04-24 17:59:49 +000014288if test "$cross_compiling" = yes; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014289 ac_cv_working_tzset=no
14290else
Matthias Kloseb9621712010-04-24 17:59:49 +000014291 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014292/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014293
14294#include <stdlib.h>
14295#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000014296#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000014297
14298#if HAVE_TZNAME
14299extern char *tzname[];
14300#endif
14301
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014302int main()
14303{
Brett Cannon18367812003-09-19 00:59:16 +000014304 /* Note that we need to ensure that not only does tzset(3)
14305 do 'something' with localtime, but it works as documented
14306 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000014307 This includes making sure that tzname is set properly if
14308 tm->tm_zone does not exist since it is the alternative way
14309 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000014310
14311 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000014312 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000014313 */
14314
Martin v. Löwis1d459062005-03-14 21:23:33 +000014315 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000014316 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
14317
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014318 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014319 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014320 if (localtime(&groundhogday)->tm_hour != 0)
14321 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014322#if HAVE_TZNAME
14323 /* For UTC, tzname[1] is sometimes "", sometimes " " */
14324 if (strcmp(tzname[0], "UTC") ||
14325 (tzname[1][0] != 0 && tzname[1][0] != ' '))
14326 exit(1);
14327#endif
Brett Cannon18367812003-09-19 00:59:16 +000014328
Neal Norwitz7f2588c2003-04-11 15:35:53 +000014329 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014330 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000014331 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014332 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014333#if HAVE_TZNAME
14334 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
14335 exit(1);
14336#endif
Brett Cannon18367812003-09-19 00:59:16 +000014337
14338 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
14339 tzset();
14340 if (localtime(&groundhogday)->tm_hour != 11)
14341 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014342#if HAVE_TZNAME
14343 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
14344 exit(1);
14345#endif
14346
14347#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000014348 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
14349 exit(1);
14350 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
14351 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000014352#endif
Brett Cannon18367812003-09-19 00:59:16 +000014353
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014354 exit(0);
14355}
14356
14357_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014358if ac_fn_c_try_run "$LINENO"; then :
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014359 ac_cv_working_tzset=yes
14360else
Matthias Kloseb9621712010-04-24 17:59:49 +000014361 ac_cv_working_tzset=no
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014362fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014363rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14364 conftest.$ac_objext conftest.beam conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014365fi
14366
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014367fi
14368
Matthias Kloseb9621712010-04-24 17:59:49 +000014369{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_tzset" >&5
14370$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014371if test "$ac_cv_working_tzset" = yes
14372then
14373
Matthias Kloseb9621712010-04-24 17:59:49 +000014374$as_echo "#define HAVE_WORKING_TZSET 1" >>confdefs.h
Guido van Rossumd11b62e2003-03-14 21:51:36 +000014375
14376fi
14377
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014378# Look for subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000014379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec in struct stat" >&5
14380$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014381if ${ac_cv_stat_tv_nsec+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014382 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014383else
Matthias Kloseb9621712010-04-24 17:59:49 +000014384 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014385/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014386#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014387int
14388main ()
14389{
14390
14391struct stat st;
14392st.st_mtim.tv_nsec = 1;
14393
14394 ;
14395 return 0;
14396}
14397_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014398if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisa32c9942002-09-09 16:17:47 +000014399 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014400else
Matthias Kloseb9621712010-04-24 17:59:49 +000014401 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014402fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014403rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14404fi
14405
Matthias Kloseb9621712010-04-24 17:59:49 +000014406{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec" >&5
14407$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014408if test "$ac_cv_stat_tv_nsec" = yes
14409then
14410
Matthias Kloseb9621712010-04-24 17:59:49 +000014411$as_echo "#define HAVE_STAT_TV_NSEC 1" >>confdefs.h
Martin v. Löwis94717ed2002-09-09 14:24:16 +000014412
14413fi
14414
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014415# Look for BSD style subsecond timestamps in struct stat
Matthias Kloseb9621712010-04-24 17:59:49 +000014416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tv_nsec2 in struct stat" >&5
14417$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014418if ${ac_cv_stat_tv_nsec2+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014419 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014420else
Matthias Kloseb9621712010-04-24 17:59:49 +000014421 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014422/* end confdefs.h. */
14423#include <sys/stat.h>
14424int
14425main ()
14426{
14427
14428struct stat st;
14429st.st_mtimespec.tv_nsec = 1;
14430
14431 ;
14432 return 0;
14433}
14434_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014435if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014436 ac_cv_stat_tv_nsec2=yes
14437else
Matthias Kloseb9621712010-04-24 17:59:49 +000014438 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014439fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014440rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14441fi
14442
Matthias Kloseb9621712010-04-24 17:59:49 +000014443{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_stat_tv_nsec2" >&5
14444$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014445if test "$ac_cv_stat_tv_nsec2" = yes
14446then
14447
Matthias Kloseb9621712010-04-24 17:59:49 +000014448$as_echo "#define HAVE_STAT_TV_NSEC2 1" >>confdefs.h
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000014449
14450fi
14451
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020014452ac_save_cppflags="$CPPFLAGS"
14453CPPFLAGS="$CPPFLAGS -I/usr/include/ncursesw"
Jack Jansen666b1e72001-10-31 12:11:48 +000014454# On HP/UX 11.0, mvwdelch is a block with a return statement
Matthias Kloseb9621712010-04-24 17:59:49 +000014455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mvwdelch is an expression" >&5
14456$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014457if ${ac_cv_mvwdelch_is_expression+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014458 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014459else
Matthias Kloseb9621712010-04-24 17:59:49 +000014460 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014461/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014462#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014463int
14464main ()
14465{
Jack Jansen666b1e72001-10-31 12:11:48 +000014466
14467 int rtn;
14468 rtn = mvwdelch(0,0,0);
14469
Martin v. Löwis11437992002-04-12 09:54:03 +000014470 ;
14471 return 0;
14472}
14473_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014474if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014475 ac_cv_mvwdelch_is_expression=yes
14476else
Matthias Kloseb9621712010-04-24 17:59:49 +000014477 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014478fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014479rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14480fi
14481
Matthias Kloseb9621712010-04-24 17:59:49 +000014482{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_mvwdelch_is_expression" >&5
14483$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000014484
14485if test "$ac_cv_mvwdelch_is_expression" = yes
14486then
Martin v. Löwis11437992002-04-12 09:54:03 +000014487
Matthias Kloseb9621712010-04-24 17:59:49 +000014488$as_echo "#define MVWDELCH_IS_EXPRESSION 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014489
14490fi
14491
Matthias Kloseb9621712010-04-24 17:59:49 +000014492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether WINDOW has _flags" >&5
14493$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014494if ${ac_cv_window_has_flags+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014495 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000014496else
Matthias Kloseb9621712010-04-24 17:59:49 +000014497 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014498/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000014499#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014500int
14501main ()
14502{
Jack Jansen666b1e72001-10-31 12:11:48 +000014503
14504 WINDOW *w;
14505 w->_flags = 0;
14506
Martin v. Löwis11437992002-04-12 09:54:03 +000014507 ;
14508 return 0;
14509}
14510_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014511if ac_fn_c_try_compile "$LINENO"; then :
Jack Jansen666b1e72001-10-31 12:11:48 +000014512 ac_cv_window_has_flags=yes
14513else
Matthias Kloseb9621712010-04-24 17:59:49 +000014514 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000014515fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014516rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14517fi
14518
Matthias Kloseb9621712010-04-24 17:59:49 +000014519{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_window_has_flags" >&5
14520$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000014521
Jack Jansen666b1e72001-10-31 12:11:48 +000014522
14523if test "$ac_cv_window_has_flags" = yes
14524then
Martin v. Löwis11437992002-04-12 09:54:03 +000014525
Matthias Kloseb9621712010-04-24 17:59:49 +000014526$as_echo "#define WINDOW_HAS_FLAGS 1" >>confdefs.h
Jack Jansen666b1e72001-10-31 12:11:48 +000014527
14528fi
14529
Matthias Kloseb9621712010-04-24 17:59:49 +000014530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for is_term_resized" >&5
14531$as_echo_n "checking for is_term_resized... " >&6; }
14532cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014533/* end confdefs.h. */
14534#include <curses.h>
14535int
14536main ()
14537{
14538void *x=is_term_resized
14539 ;
14540 return 0;
14541}
14542_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014543if ac_fn_c_try_compile "$LINENO"; then :
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014544
Matthias Kloseb9621712010-04-24 17:59:49 +000014545$as_echo "#define HAVE_CURSES_IS_TERM_RESIZED 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014546
Matthias Kloseb159a552010-04-25 21:00:44 +000014547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014548$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014549else
Matthias Kloseb9621712010-04-24 17:59:49 +000014550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14551$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014552
14553fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014554rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14555
Matthias Kloseb9621712010-04-24 17:59:49 +000014556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resize_term" >&5
14557$as_echo_n "checking for resize_term... " >&6; }
14558cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014559/* end confdefs.h. */
14560#include <curses.h>
14561int
14562main ()
14563{
14564void *x=resize_term
14565 ;
14566 return 0;
14567}
14568_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014569if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014570
Matthias Kloseb9621712010-04-24 17:59:49 +000014571$as_echo "#define HAVE_CURSES_RESIZE_TERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014572
Matthias Kloseb159a552010-04-25 21:00:44 +000014573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014574$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014575else
Matthias Kloseb9621712010-04-24 17:59:49 +000014576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14577$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014578
14579fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014580rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14581
Matthias Kloseb9621712010-04-24 17:59:49 +000014582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for resizeterm" >&5
14583$as_echo_n "checking for resizeterm... " >&6; }
14584cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014585/* end confdefs.h. */
14586#include <curses.h>
14587int
14588main ()
14589{
14590void *x=resizeterm
14591 ;
14592 return 0;
14593}
14594_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014595if ac_fn_c_try_compile "$LINENO"; then :
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014596
Matthias Kloseb9621712010-04-24 17:59:49 +000014597$as_echo "#define HAVE_CURSES_RESIZETERM 1" >>confdefs.h
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014598
Matthias Kloseb159a552010-04-25 21:00:44 +000014599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000014600$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014601else
Matthias Kloseb9621712010-04-24 17:59:49 +000014602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14603$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000014604
14605fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014606rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
doko@ubuntu.com9dc823d2012-07-07 03:06:42 +020014607# last curses configure check
14608CPPFLAGS=$ac_save_cppflags
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014609
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for device files" >&5
14611$as_echo "$as_me: checking for device files" >&6;}
14612
14613if test "x$cross_compiling" = xyes; then
14614 if test "${ac_cv_file__dev_ptmx+set}" != set; then
14615 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14616$as_echo_n "checking for /dev/ptmx... " >&6; }
14617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14618$as_echo "not set" >&6; }
14619 as_fn_error $? "set ac_cv_file__dev_ptmx to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14620 fi
14621 if test "${ac_cv_file__dev_ptc+set}" != set; then
14622 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14623$as_echo_n "checking for /dev/ptc... " >&6; }
14624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not set" >&5
14625$as_echo "not set" >&6; }
14626 as_fn_error $? "set ac_cv_file__dev_ptc to yes/no in your CONFIG_SITE file when cross compiling" "$LINENO" 5
14627 fi
14628fi
14629
Matthias Kloseb9621712010-04-24 17:59:49 +000014630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptmx" >&5
14631$as_echo_n "checking for /dev/ptmx... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014632if ${ac_cv_file__dev_ptmx+:} false; then :
14633 $as_echo_n "(cached) " >&6
14634else
14635 test "$cross_compiling" = yes &&
14636 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14637if test -r "/dev/ptmx"; then
14638 ac_cv_file__dev_ptmx=yes
14639else
14640 ac_cv_file__dev_ptmx=no
14641fi
14642fi
14643{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptmx" >&5
14644$as_echo "$ac_cv_file__dev_ptmx" >&6; }
14645if test "x$ac_cv_file__dev_ptmx" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000014646
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014647fi
14648
14649if test "x$ac_cv_file__dev_ptmx" = xyes; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014650
Matthias Kloseb9621712010-04-24 17:59:49 +000014651$as_echo "#define HAVE_DEV_PTMX 1" >>confdefs.h
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014652
Martin v. Löwis24a880b2002-12-31 12:55:15 +000014653fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/ptc" >&5
14655$as_echo_n "checking for /dev/ptc... " >&6; }
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014656if ${ac_cv_file__dev_ptc+:} false; then :
14657 $as_echo_n "(cached) " >&6
14658else
14659 test "$cross_compiling" = yes &&
14660 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
14661if test -r "/dev/ptc"; then
14662 ac_cv_file__dev_ptc=yes
14663else
14664 ac_cv_file__dev_ptc=no
14665fi
14666fi
14667{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_ptc" >&5
14668$as_echo "$ac_cv_file__dev_ptc" >&6; }
14669if test "x$ac_cv_file__dev_ptc" = xyes; then :
Thomas Wouters89f507f2006-12-13 04:49:30 +000014670
doko@ubuntu.comb457b9b2012-06-30 19:28:16 +020014671fi
14672
14673if test "x$ac_cv_file__dev_ptc" = xyes; then
Neal Norwitz865400f2003-03-21 01:42:58 +000014674
Matthias Kloseb9621712010-04-24 17:59:49 +000014675$as_echo "#define HAVE_DEV_PTC 1" >>confdefs.h
Neal Norwitz865400f2003-03-21 01:42:58 +000014676
Neal Norwitz865400f2003-03-21 01:42:58 +000014677fi
14678
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014679if test "$have_long_long" = yes
14680then
Matthias Kloseb9621712010-04-24 17:59:49 +000014681 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for %lld and %llu printf() format support" >&5
14682$as_echo_n "checking for %lld and %llu printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014683 if ${ac_cv_have_long_long_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014684 $as_echo_n "(cached) " >&6
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014685else
Matthias Kloseb9621712010-04-24 17:59:49 +000014686 if test "$cross_compiling" = yes; then :
Matthias Klose3b739b12012-03-15 19:31:06 +010014687 ac_cv_have_long_long_format="cross -- assuming no"
14688 if test x$GCC = xyes; then
14689 save_CFLAGS=$CFLAGS
14690 CFLAGS="$CFLAGS -Werror -Wformat"
14691 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14692/* end confdefs.h. */
14693
14694 #include <stdio.h>
14695 #include <stddef.h>
14696
14697int
14698main ()
14699{
14700
14701 char *buffer;
14702 sprintf(buffer, "%lld", (long long)123);
14703 sprintf(buffer, "%lld", (long long)-123);
14704 sprintf(buffer, "%llu", (unsigned long long)123);
14705
14706 ;
14707 return 0;
14708}
14709_ACEOF
14710if ac_fn_c_try_compile "$LINENO"; then :
14711 ac_cv_have_long_long_format=yes
14712
14713fi
14714rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14715 CFLAGS=$save_CFLAGS
14716 fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014717else
Matthias Kloseb9621712010-04-24 17:59:49 +000014718 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014719/* end confdefs.h. */
14720
14721 #include <stdio.h>
14722 #include <stddef.h>
14723 #include <string.h>
14724
14725 #ifdef HAVE_SYS_TYPES_H
14726 #include <sys/types.h>
14727 #endif
14728
14729 int main()
14730 {
14731 char buffer[256];
14732
14733 if (sprintf(buffer, "%lld", (long long)123) < 0)
14734 return 1;
14735 if (strcmp(buffer, "123"))
14736 return 1;
14737
14738 if (sprintf(buffer, "%lld", (long long)-123) < 0)
14739 return 1;
14740 if (strcmp(buffer, "-123"))
14741 return 1;
14742
14743 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
14744 return 1;
14745 if (strcmp(buffer, "123"))
14746 return 1;
14747
14748 return 0;
14749 }
14750
14751_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014752if ac_fn_c_try_run "$LINENO"; then :
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014753 ac_cv_have_long_long_format=yes
14754else
Matthias Kloseb9621712010-04-24 17:59:49 +000014755 ac_cv_have_long_long_format=no
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014756fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014757rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14758 conftest.$ac_objext conftest.beam conftest.$ac_ext
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014759fi
14760
14761
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014762fi
14763
Matthias Kloseb9621712010-04-24 17:59:49 +000014764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_long_long_format" >&5
14765$as_echo "$ac_cv_have_long_long_format" >&6; }
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014766fi
14767
Mark Dickinson89d7d412009-12-31 20:50:59 +000014768if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014769then
14770
Matthias Kloseb9621712010-04-24 17:59:49 +000014771$as_echo "#define PY_FORMAT_LONG_LONG \"ll\"" >>confdefs.h
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014772
14773fi
14774
Ronald Oussoren3c1928a2009-11-19 17:15:31 +000014775if test $ac_sys_system = Darwin
14776then
14777 LIBS="$LIBS -framework CoreFoundation"
14778fi
Mark Dickinson6ce4a9a2009-11-16 17:00:11 +000014779
Matthias Kloseb9621712010-04-24 17:59:49 +000014780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for %zd printf() format support" >&5
14781$as_echo_n "checking for %zd printf() format support... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014782if ${ac_cv_have_size_t_format+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014783 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014784else
Matthias Kloseb9621712010-04-24 17:59:49 +000014785 if test "$cross_compiling" = yes; then :
Benjamin Peterson8f326b22009-12-13 02:10:36 +000014786 ac_cv_have_size_t_format="cross -- assuming yes"
14787
Thomas Wouters477c8d52006-05-27 19:21:47 +000014788else
Matthias Kloseb9621712010-04-24 17:59:49 +000014789 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000014790/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014791
Thomas Wouters477c8d52006-05-27 19:21:47 +000014792#include <stdio.h>
14793#include <stddef.h>
14794#include <string.h>
14795
Christian Heimes2c181612007-12-17 20:04:13 +000014796#ifdef HAVE_SYS_TYPES_H
14797#include <sys/types.h>
14798#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000014799
14800#ifdef HAVE_SSIZE_T
14801typedef ssize_t Py_ssize_t;
14802#elif SIZEOF_VOID_P == SIZEOF_LONG
14803typedef long Py_ssize_t;
14804#else
14805typedef int Py_ssize_t;
14806#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000014807
Christian Heimes2c181612007-12-17 20:04:13 +000014808int main()
14809{
14810 char buffer[256];
14811
Thomas Wouters477c8d52006-05-27 19:21:47 +000014812 if(sprintf(buffer, "%zd", (size_t)123) < 0)
14813 return 1;
14814
Thomas Wouters89f507f2006-12-13 04:49:30 +000014815 if (strcmp(buffer, "123"))
14816 return 1;
14817
14818 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
14819 return 1;
14820
14821 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000014822 return 1;
14823
14824 return 0;
14825}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014826
Thomas Wouters477c8d52006-05-27 19:21:47 +000014827_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014828if ac_fn_c_try_run "$LINENO"; then :
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014829 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014830else
Matthias Kloseb9621712010-04-24 17:59:49 +000014831 ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000014832fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014833rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14834 conftest.$ac_objext conftest.beam conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014835fi
14836
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014837fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014838{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t_format" >&5
14839$as_echo "$ac_cv_have_size_t_format" >&6; }
Benjamin Peterson8f326b22009-12-13 02:10:36 +000014840if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014841
Matthias Kloseb9621712010-04-24 17:59:49 +000014842$as_echo "#define PY_FORMAT_SIZE_T \"z\"" >>confdefs.h
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014843
14844fi
14845
Matthias Kloseb9621712010-04-24 17:59:49 +000014846ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
Martin v. Löwis01c04012002-11-11 14:58:44 +000014847#ifdef HAVE_SYS_TYPES_H
14848#include <sys/types.h>
14849#endif
14850#ifdef HAVE_SYS_SOCKET_H
14851#include <sys/socket.h>
14852#endif
14853
Matthias Kloseb9621712010-04-24 17:59:49 +000014854"
Victor Stinnere0be4232011-10-25 13:06:09 +020014855if test "x$ac_cv_type_socklen_t" = xyes; then :
Martin v. Löwis01c04012002-11-11 14:58:44 +000014856
Martin v. Löwis11437992002-04-12 09:54:03 +000014857else
Guido van Rossum95713eb2000-05-18 20:53:31 +000014858
Matthias Kloseb9621712010-04-24 17:59:49 +000014859$as_echo "#define socklen_t int" >>confdefs.h
Guido van Rossum95713eb2000-05-18 20:53:31 +000014860
14861fi
14862
Michael W. Hudson54241132001-12-07 15:38:26 +000014863
Matthias Kloseb9621712010-04-24 17:59:49 +000014864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken mbstowcs" >&5
14865$as_echo_n "checking for broken mbstowcs... " >&6; }
Victor Stinnere0be4232011-10-25 13:06:09 +020014866if ${ac_cv_broken_mbstowcs+:} false; then :
Matthias Kloseb9621712010-04-24 17:59:49 +000014867 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014868else
Matthias Kloseb9621712010-04-24 17:59:49 +000014869 if test "$cross_compiling" = yes; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000014870 ac_cv_broken_mbstowcs=no
14871else
Matthias Kloseb9621712010-04-24 17:59:49 +000014872 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000014873/* end confdefs.h. */
14874
Stefan Krah19c21392012-11-22 23:47:32 +010014875#include <stdio.h>
Antoine Pitroufff95302008-09-03 18:58:51 +000014876#include<stdlib.h>
14877int main() {
14878 size_t len = -1;
14879 const char *str = "text";
14880 len = mbstowcs(NULL, str, 0);
14881 return (len != 4);
14882}
14883
14884_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000014885if ac_fn_c_try_run "$LINENO"; then :
Antoine Pitroufff95302008-09-03 18:58:51 +000014886 ac_cv_broken_mbstowcs=no
14887else
Matthias Kloseb9621712010-04-24 17:59:49 +000014888 ac_cv_broken_mbstowcs=yes
Antoine Pitroufff95302008-09-03 18:58:51 +000014889fi
Matthias Kloseb9621712010-04-24 17:59:49 +000014890rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14891 conftest.$ac_objext conftest.beam conftest.$ac_ext
Antoine Pitroufff95302008-09-03 18:58:51 +000014892fi
14893
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014894fi
14895
Matthias Kloseb9621712010-04-24 17:59:49 +000014896{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_broken_mbstowcs" >&5
14897$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000014898if test "$ac_cv_broken_mbstowcs" = yes
14899then
14900
Matthias Kloseb9621712010-04-24 17:59:49 +000014901$as_echo "#define HAVE_BROKEN_MBSTOWCS 1" >>confdefs.h
Antoine Pitroufff95302008-09-03 18:58:51 +000014902
14903fi
14904
Antoine Pitroub52ec782009-01-25 16:34:23 +000014905# Check for --with-computed-gotos
Matthias Kloseb9621712010-04-24 17:59:49 +000014906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --with-computed-gotos" >&5
14907$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014908
14909# Check whether --with-computed-gotos was given.
Matthias Kloseb9621712010-04-24 17:59:49 +000014910if test "${with_computed_gotos+set}" = set; then :
Antoine Pitroub52ec782009-01-25 16:34:23 +000014911 withval=$with_computed_gotos;
Antoine Pitrou042b1282010-08-13 21:15:58 +000014912if test "$withval" = yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000014913then
14914
Matthias Kloseb9621712010-04-24 17:59:49 +000014915$as_echo "#define USE_COMPUTED_GOTOS 1" >>confdefs.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000014916
Matthias Kloseb9621712010-04-24 17:59:49 +000014917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14918$as_echo "yes" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014919fi
Antoine Pitrou042b1282010-08-13 21:15:58 +000014920if test "$withval" = no
14921then
14922
14923$as_echo "#define USE_COMPUTED_GOTOS 0" >>confdefs.h
14924
Matthias Kloseb9621712010-04-24 17:59:49 +000014925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14926$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000014927fi
14928
Antoine Pitrou042b1282010-08-13 21:15:58 +000014929else
14930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no value specified" >&5
14931$as_echo "no value specified" >&6; }
14932fi
14933
Antoine Pitroub52ec782009-01-25 16:34:23 +000014934
Matthias Kloseb17289e2012-03-15 19:51:34 +010014935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports computed gotos" >&5
14936$as_echo_n "checking whether $CC supports computed gotos... " >&6; }
14937if ${ac_cv_computed_gotos+:} false; then :
14938 $as_echo_n "(cached) " >&6
14939else
14940 if test "$cross_compiling" = yes; then :
14941 if test "${with_computed_gotos+set}" = set; then
14942 ac_cv_computed_gotos="$with_computed_gotos -- configured --with(out)-computed-gotos"
14943 else
14944 ac_cv_computed_gotos=no
14945 fi
14946else
14947 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14948/* end confdefs.h. */
14949
14950int main(int argc, char **argv)
14951{
14952 static void *targets[1] = { &&LABEL1 };
14953 goto LABEL2;
14954LABEL1:
14955 return 0;
14956LABEL2:
14957 goto *targets[0];
14958 return 1;
14959}
14960
14961_ACEOF
14962if ac_fn_c_try_run "$LINENO"; then :
14963 ac_cv_computed_gotos=yes
14964else
14965 ac_cv_computed_gotos=no
14966fi
14967rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14968 conftest.$ac_objext conftest.beam conftest.$ac_ext
14969fi
14970
14971fi
14972
14973{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_computed_gotos" >&5
14974$as_echo "$ac_cv_computed_gotos" >&6; }
14975case "$ac_cv_computed_gotos" in yes*)
14976
14977$as_echo "#define HAVE_COMPUTED_GOTOS 1" >>confdefs.h
14978
14979esac
14980
Benjamin Petersond8d835b2010-10-15 23:14:46 +000014981case $ac_sys_system in
14982AIX*)
14983
14984$as_echo "#define HAVE_BROKEN_PIPE_BUF 1" >>confdefs.h
14985 ;;
14986esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000014987
Michael W. Hudson54241132001-12-07 15:38:26 +000014988
Mark Dickinsonb2153e92010-05-05 22:31:36 +000014989
14990
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000014991for h in `(cd $srcdir;echo Python/thread_*.h)`
14992do
14993 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
14994done
14995
Michael W. Hudson54241132001-12-07 15:38:26 +000014996
Neal Norwitzd24499d2005-12-18 21:36:39 +000014997SRCDIRS="Parser Grammar Objects Python Modules Mac"
Matthias Kloseb9621712010-04-24 17:59:49 +000014998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for build directories" >&5
14999$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015000for dir in $SRCDIRS; do
15001 if test ! -d $dir; then
15002 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000015003 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015004done
Matthias Kloseb9621712010-04-24 17:59:49 +000015005{ $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
15006$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000015007
Stefan Krah1919b7e2012-03-21 18:25:23 +010015008# Availability of -O2:
15009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -O2" >&5
15010$as_echo_n "checking for -O2... " >&6; }
15011saved_cflags="$CFLAGS"
15012CFLAGS="-O2"
15013cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15014/* end confdefs.h. */
15015
15016int
15017main ()
15018{
15019
15020
15021 ;
15022 return 0;
15023}
15024_ACEOF
15025if ac_fn_c_try_compile "$LINENO"; then :
15026 have_O2=yes
15027else
15028 have_O2=no
15029fi
15030rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15031{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_O2" >&5
15032$as_echo "$have_O2" >&6; }
15033CFLAGS="$saved_cflags"
15034
15035# _FORTIFY_SOURCE wrappers for memmove and bcopy are incorrect:
15036# http://sourceware.org/ml/libc-alpha/2010-12/msg00009.html
15037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for glibc _FORTIFY_SOURCE/memmove bug" >&5
15038$as_echo_n "checking for glibc _FORTIFY_SOURCE/memmove bug... " >&6; }
15039saved_cflags="$CFLAGS"
15040CFLAGS="-O2 -D_FORTIFY_SOURCE=2"
15041if test "$have_O2" = no; then
15042 CFLAGS=""
15043fi
15044if test "$cross_compiling" = yes; then :
15045 have_glibc_memmove_bug=undefined
15046else
15047 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15048/* end confdefs.h. */
15049
15050#include <stdio.h>
15051#include <stdlib.h>
15052#include <string.h>
15053void foo(void *p, void *q) { memmove(p, q, 19); }
15054int main() {
15055 char a[32] = "123456789000000000";
15056 foo(&a[9], a);
15057 if (strcmp(a, "123456789123456789000000000") != 0)
15058 return 1;
15059 foo(a, &a[9]);
15060 if (strcmp(a, "123456789000000000") != 0)
15061 return 1;
15062 return 0;
15063}
15064
15065_ACEOF
15066if ac_fn_c_try_run "$LINENO"; then :
15067 have_glibc_memmove_bug=no
15068else
15069 have_glibc_memmove_bug=yes
15070fi
15071rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15072 conftest.$ac_objext conftest.beam conftest.$ac_ext
15073fi
15074
15075CFLAGS="$saved_cflags"
15076{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_glibc_memmove_bug" >&5
15077$as_echo "$have_glibc_memmove_bug" >&6; }
15078if test "$have_glibc_memmove_bug" = yes; then
15079
15080$as_echo "#define HAVE_GLIBC_MEMMOVE_BUG 1" >>confdefs.h
15081
15082fi
15083
15084if test "$have_gcc_asm_for_x87" = yes; then
15085 # Some versions of gcc miscompile inline asm:
15086 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
15087 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
15088 case $CC in
15089 *gcc*)
15090 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc ipa-pure-const bug" >&5
15091$as_echo_n "checking for gcc ipa-pure-const bug... " >&6; }
15092 saved_cflags="$CFLAGS"
15093 CFLAGS="-O2"
15094 if test "$cross_compiling" = yes; then :
15095 have_ipa_pure_const_bug=undefined
15096else
15097 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15098/* end confdefs.h. */
15099
15100 __attribute__((noinline)) int
15101 foo(int *p) {
15102 int r;
15103 asm ( "movl \$6, (%1)\n\t"
15104 "xorl %0, %0\n\t"
15105 : "=r" (r) : "r" (p) : "memory"
15106 );
15107 return r;
15108 }
15109 int main() {
15110 int p = 8;
15111 if ((foo(&p) ? : p) != 6)
15112 return 1;
15113 return 0;
15114 }
15115
15116_ACEOF
15117if ac_fn_c_try_run "$LINENO"; then :
15118 have_ipa_pure_const_bug=no
15119else
15120 have_ipa_pure_const_bug=yes
15121fi
15122rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15123 conftest.$ac_objext conftest.beam conftest.$ac_ext
15124fi
15125
15126 CFLAGS="$saved_cflags"
15127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_ipa_pure_const_bug" >&5
15128$as_echo "$have_ipa_pure_const_bug" >&6; }
15129 if test "$have_ipa_pure_const_bug" = yes; then
15130
15131$as_echo "#define HAVE_IPA_PURE_CONST_BUG 1" >>confdefs.h
15132
15133 fi
15134 ;;
15135 esac
15136fi
15137
Guido van Rossum627b2d71993-12-24 10:39:16 +000015138# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000015139ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000015140
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015141ac_config_files="$ac_config_files Modules/ld_so_aix"
15142
Martin v. Löwis11437992002-04-12 09:54:03 +000015143cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015144# This file is a shell script that caches the results of configure
15145# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000015146# scripts and configure runs, see configure's option --config-cache.
15147# It is not useful on other systems. If it contains results you don't
15148# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015149#
Martin v. Löwis11437992002-04-12 09:54:03 +000015150# config.status only pays attention to the cache file if you give it
15151# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015152#
Skip Montanaro6dead952003-09-25 14:50:04 +000015153# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000015154# loading this file, other *unset* `ac_cv_foo' will be assigned the
15155# following values.
15156
15157_ACEOF
15158
Guido van Rossumf78abae1997-01-21 22:02:36 +000015159# The following way of writing the cache mishandles newlines in values,
15160# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015161# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015162# Ultrix sh set writes to stderr and can't be redirected directly,
15163# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015164(
15165 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
15166 eval ac_val=\$$ac_var
15167 case $ac_val in #(
15168 *${as_nl}*)
15169 case $ac_var in #(
Matthias Kloseb9621712010-04-24 17:59:49 +000015170 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
15171$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015172 esac
15173 case $ac_var in #(
15174 _ | IFS | as_nl) ;; #(
Matthias Kloseb9621712010-04-24 17:59:49 +000015175 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
15176 *) { eval $ac_var=; unset $ac_var;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015177 esac ;;
15178 esac
15179 done
15180
Martin v. Löwis11437992002-04-12 09:54:03 +000015181 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015182 case $as_nl`(ac_space=' '; set) 2>&1` in #(
15183 *${as_nl}ac_space=\ *)
Matthias Kloseb9621712010-04-24 17:59:49 +000015184 # `set' does not quote correctly, so add quotes: double-quote
15185 # substitution turns \\\\ into \\, and sed turns \\ into \.
Martin v. Löwis11437992002-04-12 09:54:03 +000015186 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015187 "s/'/'\\\\''/g;
15188 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015189 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000015190 *)
15191 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015192 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000015193 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015194 esac |
15195 sort
15196) |
Martin v. Löwis11437992002-04-12 09:54:03 +000015197 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015198 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000015199 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015200 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000015201 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
15202 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015203 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
15204 :end' >>confcache
15205if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
15206 if test -w "$cache_file"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020015207 if test "x$cache_file" != "x/dev/null"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015208 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
15209$as_echo "$as_me: updating cache $cache_file" >&6;}
Victor Stinnere0be4232011-10-25 13:06:09 +020015210 if test ! -f "$cache_file" || test -h "$cache_file"; then
15211 cat confcache >"$cache_file"
15212 else
15213 case $cache_file in #(
15214 */* | ?:*)
15215 mv -f confcache "$cache_file"$$ &&
15216 mv -f "$cache_file"$$ "$cache_file" ;; #(
15217 *)
15218 mv -f confcache "$cache_file" ;;
15219 esac
15220 fi
15221 fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015222 else
Matthias Kloseb9621712010-04-24 17:59:49 +000015223 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
15224$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015225 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015226fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015227rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000015228
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015229test "x$prefix" = xNONE && prefix=$ac_default_prefix
15230# Let make expand exec_prefix.
15231test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000015232
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015233DEFS=-DHAVE_CONFIG_H
15234
Skip Montanaro6dead952003-09-25 14:50:04 +000015235ac_libobjs=
15236ac_ltlibobjs=
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015237U=
Skip Montanaro6dead952003-09-25 14:50:04 +000015238for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
15239 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015240 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Matthias Kloseb9621712010-04-24 17:59:49 +000015241 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015242 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
15243 # will be set to the directory where LIBOBJS objects are built.
Matthias Kloseb9621712010-04-24 17:59:49 +000015244 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
15245 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000015246done
15247LIBOBJS=$ac_libobjs
15248
15249LTLIBOBJS=$ac_ltlibobjs
15250
15251
Martin v. Löwis11437992002-04-12 09:54:03 +000015252
Matthias Kloseb9621712010-04-24 17:59:49 +000015253
Victor Stinnere0be4232011-10-25 13:06:09 +020015254: "${CONFIG_STATUS=./config.status}"
Matthias Kloseb9621712010-04-24 17:59:49 +000015255ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000015256ac_clean_files_save=$ac_clean_files
15257ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Matthias Kloseb9621712010-04-24 17:59:49 +000015258{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
15259$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
15260as_write_fail=0
15261cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015262#! $SHELL
15263# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015264# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015265# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000015266# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000015267
Martin v. Löwis11437992002-04-12 09:54:03 +000015268debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000015269ac_cs_recheck=false
15270ac_cs_silent=false
Jack Jansendd19cf82001-12-06 22:36:17 +000015271
Matthias Kloseb9621712010-04-24 17:59:49 +000015272SHELL=\${CONFIG_SHELL-$SHELL}
15273export SHELL
15274_ASEOF
15275cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
15276## -------------------- ##
15277## M4sh Initialization. ##
15278## -------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000015279
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015280# Be more Bourne compatible
15281DUALCASE=1; export DUALCASE # for MKS sh
Matthias Kloseb9621712010-04-24 17:59:49 +000015282if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Martin v. Löwis11437992002-04-12 09:54:03 +000015283 emulate sh
15284 NULLCMD=:
Matthias Kloseb9621712010-04-24 17:59:49 +000015285 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000015286 # is contrary to our usage. Disable this feature.
15287 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015288 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015289else
Matthias Kloseb9621712010-04-24 17:59:49 +000015290 case `(set -o) 2>/dev/null` in #(
15291 *posix*) :
15292 set -o posix ;; #(
15293 *) :
15294 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015295esac
Michael W. Hudson54241132001-12-07 15:38:26 +000015296fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000015297
15298
Matthias Kloseb9621712010-04-24 17:59:49 +000015299as_nl='
15300'
15301export as_nl
15302# Printing a long string crashes Solaris 7 /usr/bin/printf.
15303as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
15304as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
15305as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
15306# Prefer a ksh shell builtin over an external printf program on Solaris,
15307# but without wasting forks for bash or zsh.
15308if test -z "$BASH_VERSION$ZSH_VERSION" \
15309 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
15310 as_echo='print -r --'
15311 as_echo_n='print -rn --'
15312elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
15313 as_echo='printf %s\n'
15314 as_echo_n='printf %s'
15315else
15316 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
15317 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
15318 as_echo_n='/usr/ucb/echo -n'
15319 else
15320 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
15321 as_echo_n_body='eval
15322 arg=$1;
15323 case $arg in #(
15324 *"$as_nl"*)
15325 expr "X$arg" : "X\\(.*\\)$as_nl";
15326 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
15327 esac;
15328 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
15329 '
15330 export as_echo_n_body
15331 as_echo_n='sh -c $as_echo_n_body as_echo'
15332 fi
15333 export as_echo_body
15334 as_echo='sh -c $as_echo_body as_echo'
15335fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015336
15337# The user is always right.
15338if test "${PATH_SEPARATOR+set}" != set; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015339 PATH_SEPARATOR=:
15340 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
15341 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
15342 PATH_SEPARATOR=';'
15343 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015344fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015345
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015346
15347# IFS
15348# We need space, tab and new line, in precisely that order. Quoting is
15349# there to prevent editors from complaining about space-tab.
15350# (If _AS_PATH_WALK were called with IFS unset, it would disable word
15351# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015352IFS=" "" $as_nl"
15353
15354# Find who we are. Look in the path if we contain no directory separator.
Victor Stinnere0be4232011-10-25 13:06:09 +020015355as_myself=
Matthias Kloseb9621712010-04-24 17:59:49 +000015356case $0 in #((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015357 *[\\/]* ) as_myself=$0 ;;
15358 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000015359for as_dir in $PATH
15360do
15361 IFS=$as_save_IFS
15362 test -z "$as_dir" && as_dir=.
Matthias Kloseb9621712010-04-24 17:59:49 +000015363 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
15364 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015365IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000015366
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015367 ;;
15368esac
15369# We did not find ourselves, most probably we were run as `sh COMMAND'
15370# in which case we are not to be found in the path.
15371if test "x$as_myself" = x; then
15372 as_myself=$0
15373fi
15374if test ! -f "$as_myself"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015375 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
15376 exit 1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015377fi
15378
Matthias Kloseb9621712010-04-24 17:59:49 +000015379# Unset variables that we do not need and which cause bugs (e.g. in
15380# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
15381# suppresses any "Segmentation fault" message there. '((' could
15382# trigger a bug in pdksh 5.2.14.
15383for as_var in BASH_ENV ENV MAIL MAILPATH
15384do eval test x\${$as_var+set} = xset \
15385 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015386done
15387PS1='$ '
15388PS2='> '
15389PS4='+ '
15390
15391# NLS nuisances.
Matthias Kloseb9621712010-04-24 17:59:49 +000015392LC_ALL=C
15393export LC_ALL
15394LANGUAGE=C
15395export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015396
Matthias Kloseb9621712010-04-24 17:59:49 +000015397# CDPATH.
15398(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
15399
15400
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015401# as_fn_error STATUS ERROR [LINENO LOG_FD]
15402# ----------------------------------------
Matthias Kloseb9621712010-04-24 17:59:49 +000015403# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
15404# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015405# script with STATUS, using 1 if that was 0.
Matthias Kloseb9621712010-04-24 17:59:49 +000015406as_fn_error ()
15407{
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015408 as_status=$1; test $as_status -eq 0 && as_status=1
15409 if test "$4"; then
15410 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
15411 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
Matthias Kloseb9621712010-04-24 17:59:49 +000015412 fi
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015413 $as_echo "$as_me: error: $2" >&2
Matthias Kloseb9621712010-04-24 17:59:49 +000015414 as_fn_exit $as_status
15415} # as_fn_error
15416
15417
15418# as_fn_set_status STATUS
15419# -----------------------
15420# Set $? to STATUS, without forking.
15421as_fn_set_status ()
15422{
15423 return $1
15424} # as_fn_set_status
15425
15426# as_fn_exit STATUS
15427# -----------------
15428# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
15429as_fn_exit ()
15430{
15431 set +e
15432 as_fn_set_status $1
15433 exit $1
15434} # as_fn_exit
15435
15436# as_fn_unset VAR
15437# ---------------
15438# Portably unset VAR.
15439as_fn_unset ()
15440{
15441 { eval $1=; unset $1;}
15442}
15443as_unset=as_fn_unset
15444# as_fn_append VAR VALUE
15445# ----------------------
15446# Append the text in VALUE to the end of the definition contained in VAR. Take
15447# advantage of any shell optimizations that allow amortized linear growth over
15448# repeated appends, instead of the typical quadratic growth present in naive
15449# implementations.
15450if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
15451 eval 'as_fn_append ()
15452 {
15453 eval $1+=\$2
15454 }'
15455else
15456 as_fn_append ()
15457 {
15458 eval $1=\$$1\$2
15459 }
15460fi # as_fn_append
15461
15462# as_fn_arith ARG...
15463# ------------------
15464# Perform arithmetic evaluation on the ARGs, and store the result in the
15465# global $as_val. Take advantage of shells that can avoid forks. The arguments
15466# must be portable across $(()) and expr.
15467if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
15468 eval 'as_fn_arith ()
15469 {
15470 as_val=$(( $* ))
15471 }'
15472else
15473 as_fn_arith ()
15474 {
15475 as_val=`expr "$@" || test $? -eq 1`
15476 }
15477fi # as_fn_arith
15478
15479
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015480if expr a : '\(a\)' >/dev/null 2>&1 &&
15481 test "X`expr 00001 : '.*\(...\)'`" = X001; then
15482 as_expr=expr
15483else
15484 as_expr=false
15485fi
15486
15487if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
15488 as_basename=basename
15489else
15490 as_basename=false
15491fi
15492
Matthias Kloseb9621712010-04-24 17:59:49 +000015493if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
15494 as_dirname=dirname
15495else
15496 as_dirname=false
15497fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015498
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015499as_me=`$as_basename -- "$0" ||
15500$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
15501 X"$0" : 'X\(//\)$' \| \
15502 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000015503$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015504 sed '/^.*\/\([^/][^/]*\)\/*$/{
15505 s//\1/
15506 q
15507 }
15508 /^X\/\(\/\/\)$/{
15509 s//\1/
15510 q
15511 }
15512 /^X\/\(\/\).*/{
15513 s//\1/
15514 q
15515 }
15516 s/.*/./; q'`
15517
Matthias Kloseb9621712010-04-24 17:59:49 +000015518# Avoid depending upon Character Ranges.
15519as_cr_letters='abcdefghijklmnopqrstuvwxyz'
15520as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15521as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15522as_cr_digits='0123456789'
15523as_cr_alnum=$as_cr_Letters$as_cr_digits
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015524
15525ECHO_C= ECHO_N= ECHO_T=
Matthias Kloseb9621712010-04-24 17:59:49 +000015526case `echo -n x` in #(((((
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015527-n*)
Matthias Kloseb9621712010-04-24 17:59:49 +000015528 case `echo 'xy\c'` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015529 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Matthias Kloseb9621712010-04-24 17:59:49 +000015530 xy) ECHO_C='\c';;
15531 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
15532 ECHO_T=' ';;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015533 esac;;
15534*)
15535 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000015536esac
Ronald Oussoren74f29b42009-09-20 20:09:26 +000015537
Martin v. Löwis11437992002-04-12 09:54:03 +000015538rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015539if test -d conf$$.dir; then
15540 rm -f conf$$.dir/conf$$.file
15541else
15542 rm -f conf$$.dir
Matthias Kloseb9621712010-04-24 17:59:49 +000015543 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015544fi
Matthias Kloseb9621712010-04-24 17:59:49 +000015545if (echo >conf$$.file) 2>/dev/null; then
15546 if ln -s conf$$.file conf$$ 2>/dev/null; then
15547 as_ln_s='ln -s'
15548 # ... but there are two gotchas:
15549 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
15550 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015551 # In both cases, we have to default to `cp -pR'.
Matthias Kloseb9621712010-04-24 17:59:49 +000015552 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015553 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000015554 elif ln conf$$.file conf$$ 2>/dev/null; then
15555 as_ln_s=ln
15556 else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015557 as_ln_s='cp -pR'
Matthias Kloseb9621712010-04-24 17:59:49 +000015558 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015559else
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015560 as_ln_s='cp -pR'
Martin v. Löwis11437992002-04-12 09:54:03 +000015561fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015562rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
15563rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000015564
Matthias Kloseb9621712010-04-24 17:59:49 +000015565
15566# as_fn_mkdir_p
15567# -------------
15568# Create "$as_dir" as a directory, including parents if necessary.
15569as_fn_mkdir_p ()
15570{
15571
15572 case $as_dir in #(
15573 -*) as_dir=./$as_dir;;
15574 esac
15575 test -d "$as_dir" || eval $as_mkdir_p || {
15576 as_dirs=
15577 while :; do
15578 case $as_dir in #(
15579 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
15580 *) as_qdir=$as_dir;;
15581 esac
15582 as_dirs="'$as_qdir' $as_dirs"
15583 as_dir=`$as_dirname -- "$as_dir" ||
15584$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15585 X"$as_dir" : 'X\(//\)[^/]' \| \
15586 X"$as_dir" : 'X\(//\)$' \| \
15587 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
15588$as_echo X"$as_dir" |
15589 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15590 s//\1/
15591 q
15592 }
15593 /^X\(\/\/\)[^/].*/{
15594 s//\1/
15595 q
15596 }
15597 /^X\(\/\/\)$/{
15598 s//\1/
15599 q
15600 }
15601 /^X\(\/\).*/{
15602 s//\1/
15603 q
15604 }
15605 s/.*/./; q'`
15606 test -d "$as_dir" && break
15607 done
15608 test -z "$as_dirs" || eval "mkdir $as_dirs"
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015609 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
Matthias Kloseb9621712010-04-24 17:59:49 +000015610
15611
15612} # as_fn_mkdir_p
Skip Montanaro6dead952003-09-25 14:50:04 +000015613if mkdir -p . 2>/dev/null; then
Matthias Kloseb9621712010-04-24 17:59:49 +000015614 as_mkdir_p='mkdir -p "$as_dir"'
Skip Montanaro6dead952003-09-25 14:50:04 +000015615else
Skip Montanarof0d5f792004-08-15 14:08:23 +000015616 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000015617 as_mkdir_p=false
15618fi
15619
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015620
15621# as_fn_executable_p FILE
15622# -----------------------
15623# Test if FILE is an executable regular file.
15624as_fn_executable_p ()
15625{
15626 test -f "$1" && test -x "$1"
15627} # as_fn_executable_p
15628as_test_x='test -x'
15629as_executable_p=as_fn_executable_p
Martin v. Löwis11437992002-04-12 09:54:03 +000015630
15631# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015632as_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 +000015633
15634# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000015635as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015636
15637
Martin v. Löwis11437992002-04-12 09:54:03 +000015638exec 6>&1
Matthias Kloseb9621712010-04-24 17:59:49 +000015639## ----------------------------------- ##
15640## Main body of $CONFIG_STATUS script. ##
15641## ----------------------------------- ##
15642_ASEOF
15643test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015644
Matthias Kloseb9621712010-04-24 17:59:49 +000015645cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15646# Save the log message, to keep $0 and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000015647# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015648# values after options handling.
15649ac_log="
Georg Brandl3ebb6b32011-02-20 10:37:07 +000015650This file was extended by python $as_me 3.3, which was
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015651generated by GNU Autoconf 2.69. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000015652
15653 CONFIG_FILES = $CONFIG_FILES
15654 CONFIG_HEADERS = $CONFIG_HEADERS
15655 CONFIG_LINKS = $CONFIG_LINKS
15656 CONFIG_COMMANDS = $CONFIG_COMMANDS
15657 $ $0 $@
15658
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015659on `(hostname || uname -n) 2>/dev/null | sed 1q`
15660"
15661
Martin v. Löwis11437992002-04-12 09:54:03 +000015662_ACEOF
15663
Matthias Kloseb9621712010-04-24 17:59:49 +000015664case $ac_config_files in *"
15665"*) set x $ac_config_files; shift; ac_config_files=$*;;
15666esac
15667
15668case $ac_config_headers in *"
15669"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
15670esac
15671
15672
15673cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015674# Files that config.status was made for.
Charles-François Natali6613c182011-11-27 12:41:06 +010015675config_files="$ac_config_files"
15676config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000015677
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015678_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015679
Matthias Kloseb9621712010-04-24 17:59:49 +000015680cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000015681ac_cs_usage="\
Matthias Kloseb9621712010-04-24 17:59:49 +000015682\`$as_me' instantiates files and other configuration actions
15683from templates according to the current configuration. Unless the files
15684and actions are specified as TAGs, all are instantiated by default.
Martin v. Löwis11437992002-04-12 09:54:03 +000015685
Matthias Kloseb9621712010-04-24 17:59:49 +000015686Usage: $0 [OPTION]... [TAG]...
Martin v. Löwis11437992002-04-12 09:54:03 +000015687
15688 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015689 -V, --version print version number and configuration settings, then exit
Matthias Kloseb9621712010-04-24 17:59:49 +000015690 --config print configuration, then exit
15691 -q, --quiet, --silent
15692 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000015693 -d, --debug don't remove temporary files
15694 --recheck update $as_me by reconfiguring in the same conditions
Matthias Kloseb9621712010-04-24 17:59:49 +000015695 --file=FILE[:TEMPLATE]
15696 instantiate the configuration file FILE
15697 --header=FILE[:TEMPLATE]
15698 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000015699
15700Configuration files:
15701$config_files
15702
15703Configuration headers:
15704$config_headers
15705
Matthias Kloseb9621712010-04-24 17:59:49 +000015706Report bugs to <http://bugs.python.org/>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015707
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015708_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015709cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15710ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Martin v. Löwis11437992002-04-12 09:54:03 +000015711ac_cs_version="\\
Georg Brandl3ebb6b32011-02-20 10:37:07 +000015712python config.status 3.3
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015713configured by $0, generated by GNU Autoconf 2.69,
Matthias Kloseb9621712010-04-24 17:59:49 +000015714 with options \\"\$ac_cs_config\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000015715
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015716Copyright (C) 2012 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000015717This config.status script is free software; the Free Software Foundation
15718gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015719
15720ac_pwd='$ac_pwd'
15721srcdir='$srcdir'
15722INSTALL='$INSTALL'
Matthias Klose93a0ef12012-03-15 18:08:34 +010015723MKDIR_P='$MKDIR_P'
Matthias Kloseb9621712010-04-24 17:59:49 +000015724test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000015725_ACEOF
15726
Matthias Kloseb9621712010-04-24 17:59:49 +000015727cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15728# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000015729ac_need_defaults=:
15730while test $# != 0
15731do
15732 case $1 in
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015733 --*=?*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015734 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15735 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000015736 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000015737 ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015738 --*=)
15739 ac_option=`expr "X$1" : 'X\([^=]*\)='`
15740 ac_optarg=
15741 ac_shift=:
15742 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015743 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000015744 ac_option=$1
15745 ac_optarg=$2
15746 ac_shift=shift
15747 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015748 esac
15749
Skip Montanaro6dead952003-09-25 14:50:04 +000015750 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000015751 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000015752 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
15753 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015754 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Matthias Kloseb9621712010-04-24 17:59:49 +000015755 $as_echo "$ac_cs_version"; exit ;;
15756 --config | --confi | --conf | --con | --co | --c )
15757 $as_echo "$ac_cs_config"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015758 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000015759 debug=: ;;
15760 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000015761 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000015762 case $ac_optarg in
15763 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015764 '') as_fn_error $? "missing file argument" ;;
Matthias Kloseb9621712010-04-24 17:59:49 +000015765 esac
15766 as_fn_append CONFIG_FILES " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015767 ac_need_defaults=false;;
15768 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000015769 $ac_shift
Matthias Kloseb9621712010-04-24 17:59:49 +000015770 case $ac_optarg in
15771 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
15772 esac
15773 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000015774 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015775 --he | --h)
15776 # Conflict between --help and --header
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015777 as_fn_error $? "ambiguous option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000015778Try \`$0 --help' for more information.";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015779 --help | --hel | -h )
Matthias Kloseb9621712010-04-24 17:59:49 +000015780 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000015781 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
15782 | -silent | --silent | --silen | --sile | --sil | --si | --s)
15783 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015784
15785 # This is an error.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015786 -*) as_fn_error $? "unrecognized option: \`$1'
Matthias Kloseb9621712010-04-24 17:59:49 +000015787Try \`$0 --help' for more information." ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015788
Matthias Kloseb9621712010-04-24 17:59:49 +000015789 *) as_fn_append ac_config_targets " $1"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015790 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015791
15792 esac
15793 shift
15794done
15795
Skip Montanaro6dead952003-09-25 14:50:04 +000015796ac_configure_extra_args=
15797
15798if $ac_cs_silent; then
15799 exec 6>/dev/null
15800 ac_configure_extra_args="$ac_configure_extra_args --silent"
15801fi
15802
15803_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015804cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000015805if \$ac_cs_recheck; then
Ross Lagerwall1b863eb2012-10-29 17:31:54 +000015806 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Matthias Kloseb9621712010-04-24 17:59:49 +000015807 shift
15808 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
15809 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015810 export CONFIG_SHELL
Matthias Kloseb9621712010-04-24 17:59:49 +000015811 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000015812fi
15813
Martin v. Löwis11437992002-04-12 09:54:03 +000015814_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015815cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015816exec 5>>config.log
15817{
15818 echo
15819 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
15820## Running $as_me. ##
15821_ASBOX
Matthias Kloseb9621712010-04-24 17:59:49 +000015822 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015823} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015824
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015825_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015826cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015827_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015828
Matthias Kloseb9621712010-04-24 17:59:49 +000015829cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015830
15831# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000015832for ac_config_target in $ac_config_targets
15833do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015834 case $ac_config_target in
15835 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
15836 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
15837 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000015838 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
15839 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015840 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
15841 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000015842 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000015843 "Modules/ld_so_aix") CONFIG_FILES="$CONFIG_FILES Modules/ld_so_aix" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015844
Victor Stinnere0be4232011-10-25 13:06:09 +020015845 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015846 esac
15847done
15848
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015849
Martin v. Löwis11437992002-04-12 09:54:03 +000015850# If the user did not use the arguments to specify the items to instantiate,
15851# then the envvar interface is used. Set only those that are not.
15852# We use the long form for the default assignment because of an extremely
15853# bizarre bug on SunOS 4.1.3.
15854if $ac_need_defaults; then
15855 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
15856 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
15857fi
15858
Skip Montanaro6dead952003-09-25 14:50:04 +000015859# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015860# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000015861# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015862# Hook for its removal unless debugging.
15863# Note that there is a small window in which the directory will not be cleaned:
15864# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000015865$debug ||
15866{
Victor Stinnere0be4232011-10-25 13:06:09 +020015867 tmp= ac_tmp=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015868 trap 'exit_status=$?
Victor Stinnere0be4232011-10-25 13:06:09 +020015869 : "${ac_tmp:=$tmp}"
15870 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015871' 0
Matthias Kloseb9621712010-04-24 17:59:49 +000015872 trap 'as_fn_exit 1' 1 2 13 15
Martin v. Löwis11437992002-04-12 09:54:03 +000015873}
Martin v. Löwis11437992002-04-12 09:54:03 +000015874# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000015875
Martin v. Löwis11437992002-04-12 09:54:03 +000015876{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015877 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Victor Stinnere0be4232011-10-25 13:06:09 +020015878 test -d "$tmp"
Martin v. Löwis11437992002-04-12 09:54:03 +000015879} ||
15880{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015881 tmp=./conf$$-$RANDOM
15882 (umask 077 && mkdir "$tmp")
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015883} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020015884ac_tmp=$tmp
Martin v. Löwis11437992002-04-12 09:54:03 +000015885
Matthias Kloseb9621712010-04-24 17:59:49 +000015886# Set up the scripts for CONFIG_FILES section.
15887# No need to generate them if there are no CONFIG_FILES.
15888# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015889if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015890
Matthias Kloseb9621712010-04-24 17:59:49 +000015891
15892ac_cr=`echo X | tr X '\015'`
15893# On cygwin, bash can eat \r inside `` if the user requested igncr.
15894# But we know of no other shell where ac_cr would be empty at this
15895# point, so we can use a bashism as a fallback.
15896if test "x$ac_cr" = x; then
15897 eval ac_cr=\$\'\\r\'
15898fi
15899ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
15900if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015901 ac_cs_awk_cr='\\r'
Matthias Kloseb9621712010-04-24 17:59:49 +000015902else
15903 ac_cs_awk_cr=$ac_cr
15904fi
15905
Victor Stinnere0be4232011-10-25 13:06:09 +020015906echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000015907_ACEOF
15908
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015909
Matthias Kloseb9621712010-04-24 17:59:49 +000015910{
15911 echo "cat >conf$$subs.awk <<_ACEOF" &&
15912 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
15913 echo "_ACEOF"
15914} >conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015915 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
15916ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015917ac_delim='%!_!# '
15918for ac_last_try in false false false false false :; do
Matthias Kloseb9621712010-04-24 17:59:49 +000015919 . ./conf$$subs.sh ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015920 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015921
Matthias Kloseb9621712010-04-24 17:59:49 +000015922 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
15923 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015924 break
15925 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020015926 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015927 else
15928 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000015929 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015930done
Matthias Kloseb9621712010-04-24 17:59:49 +000015931rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015932
Matthias Kloseb9621712010-04-24 17:59:49 +000015933cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Victor Stinnere0be4232011-10-25 13:06:09 +020015934cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015935_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000015936sed -n '
15937h
15938s/^/S["/; s/!.*/"]=/
15939p
15940g
15941s/^[^!]*!//
15942:repl
15943t repl
15944s/'"$ac_delim"'$//
15945t delim
15946:nl
15947h
15948s/\(.\{148\}\)..*/\1/
15949t more1
15950s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
15951p
15952n
15953b repl
15954:more1
15955s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15956p
15957g
15958s/.\{148\}//
15959t nl
15960:delim
15961h
15962s/\(.\{148\}\)..*/\1/
15963t more2
15964s/["\\]/\\&/g; s/^/"/; s/$/"/
15965p
15966b
15967:more2
15968s/["\\]/\\&/g; s/^/"/; s/$/"\\/
15969p
15970g
15971s/.\{148\}//
15972t delim
15973' <conf$$subs.awk | sed '
15974/^[^""]/{
15975 N
15976 s/\n//
15977}
15978' >>$CONFIG_STATUS || ac_write_fail=1
15979rm -f conf$$subs.awk
15980cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15981_ACAWK
Victor Stinnere0be4232011-10-25 13:06:09 +020015982cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
Matthias Kloseb9621712010-04-24 17:59:49 +000015983 for (key in S) S_is_set[key] = 1
15984 FS = ""
15985
15986}
15987{
15988 line = $ 0
15989 nfields = split(line, field, "@")
15990 substed = 0
15991 len = length(field[1])
15992 for (i = 2; i < nfields; i++) {
15993 key = field[i]
15994 keylen = length(key)
15995 if (S_is_set[key]) {
15996 value = S[key]
15997 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
15998 len += length(value) + length(field[++i])
15999 substed = 1
16000 } else
16001 len += 1 + keylen
16002 }
16003
16004 print line
16005}
16006
16007_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016008_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016009cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16010if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
16011 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
16012else
16013 cat
Victor Stinnere0be4232011-10-25 13:06:09 +020016014fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016015 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Ronald Oussoren74f29b42009-09-20 20:09:26 +000016016_ACEOF
16017
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016018# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
16019# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016020# trailing colons and then remove the whole line if VPATH becomes empty
16021# (actually we leave an empty line to preserve line numbers).
16022if test "x$srcdir" = x.; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016023 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
16024h
16025s///
16026s/^/:/
16027s/[ ]*$/:/
16028s/:\$(srcdir):/:/g
16029s/:\${srcdir}:/:/g
16030s/:@srcdir@:/:/g
16031s/^:*//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016032s/:*$//
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016033x
16034s/\(=[ ]*\).*/\1/
16035G
16036s/\n//
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016037s/^[^=]*=[ ]*$//
16038}'
16039fi
16040
Matthias Kloseb9621712010-04-24 17:59:49 +000016041cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016042fi # test -n "$CONFIG_FILES"
16043
Matthias Kloseb9621712010-04-24 17:59:49 +000016044# Set up the scripts for CONFIG_HEADERS section.
16045# No need to generate them if there are no CONFIG_HEADERS.
16046# This happens for instance with `./config.status Makefile'.
16047if test -n "$CONFIG_HEADERS"; then
Victor Stinnere0be4232011-10-25 13:06:09 +020016048cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016049BEGIN {
16050_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016051
Matthias Kloseb9621712010-04-24 17:59:49 +000016052# Transform confdefs.h into an awk script `defines.awk', embedded as
16053# here-document in config.status, that substitutes the proper values into
16054# config.h.in to produce config.h.
16055
16056# Create a delimiter string that does not exist in confdefs.h, to ease
16057# handling of long lines.
16058ac_delim='%!_!# '
16059for ac_last_try in false false :; do
Victor Stinnere0be4232011-10-25 13:06:09 +020016060 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
16061 if test -z "$ac_tt"; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016062 break
16063 elif $ac_last_try; then
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016064 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016065 else
16066 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
16067 fi
16068done
16069
16070# For the awk script, D is an array of macro values keyed by name,
16071# likewise P contains macro parameters if any. Preserve backslash
16072# newline sequences.
16073
16074ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
16075sed -n '
16076s/.\{148\}/&'"$ac_delim"'/g
16077t rset
16078:rset
16079s/^[ ]*#[ ]*define[ ][ ]*/ /
16080t def
16081d
16082:def
16083s/\\$//
16084t bsnl
16085s/["\\]/\\&/g
16086s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16087D["\1"]=" \3"/p
16088s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
16089d
16090:bsnl
16091s/["\\]/\\&/g
16092s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
16093D["\1"]=" \3\\\\\\n"\\/p
16094t cont
16095s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
16096t cont
16097d
16098:cont
16099n
16100s/.\{148\}/&'"$ac_delim"'/g
16101t clear
16102:clear
16103s/\\$//
16104t bsnlc
16105s/["\\]/\\&/g; s/^/"/; s/$/"/p
16106d
16107:bsnlc
16108s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
16109b cont
16110' <confdefs.h | sed '
16111s/'"$ac_delim"'/"\\\
16112"/g' >>$CONFIG_STATUS || ac_write_fail=1
16113
16114cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16115 for (key in D) D_is_set[key] = 1
16116 FS = ""
16117}
16118/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
16119 line = \$ 0
16120 split(line, arg, " ")
16121 if (arg[1] == "#") {
16122 defundef = arg[2]
16123 mac1 = arg[3]
16124 } else {
16125 defundef = substr(arg[1], 2)
16126 mac1 = arg[2]
16127 }
16128 split(mac1, mac2, "(") #)
16129 macro = mac2[1]
16130 prefix = substr(line, 1, index(line, defundef) - 1)
16131 if (D_is_set[macro]) {
16132 # Preserve the white space surrounding the "#".
16133 print prefix "define", macro P[macro] D[macro]
16134 next
16135 } else {
16136 # Replace #undef with comments. This is necessary, for example,
16137 # in the case of _POSIX_SOURCE, which is predefined and required
16138 # on some systems where configure will not decide to define it.
16139 if (defundef == "undef") {
16140 print "/*", prefix defundef, macro, "*/"
16141 next
16142 }
16143 }
16144}
16145{ print }
16146_ACAWK
16147_ACEOF
16148cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016149 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016150fi # test -n "$CONFIG_HEADERS"
16151
16152
16153eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
16154shift
16155for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016156do
16157 case $ac_tag in
16158 :[FHLC]) ac_mode=$ac_tag; continue;;
16159 esac
16160 case $ac_mode$ac_tag in
16161 :[FHL]*:*);;
Victor Stinnere0be4232011-10-25 13:06:09 +020016162 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016163 :[FH]-) ac_tag=-:-;;
16164 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
16165 esac
16166 ac_save_IFS=$IFS
16167 IFS=:
16168 set x $ac_tag
16169 IFS=$ac_save_IFS
16170 shift
16171 ac_file=$1
16172 shift
16173
16174 case $ac_mode in
16175 :L) ac_source=$1;;
16176 :[FH])
16177 ac_file_inputs=
16178 for ac_f
16179 do
16180 case $ac_f in
Victor Stinnere0be4232011-10-25 13:06:09 +020016181 -) ac_f="$ac_tmp/stdin";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016182 *) # Look for the file first in the build tree, then in the source tree
16183 # (if the path is not absolute). The absolute path cannot be DOS-style,
16184 # because $ac_f cannot contain `:'.
16185 test -f "$ac_f" ||
16186 case $ac_f in
16187 [\\/$]*) false;;
16188 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
16189 esac ||
Victor Stinnere0be4232011-10-25 13:06:09 +020016190 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016191 esac
Matthias Kloseb9621712010-04-24 17:59:49 +000016192 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
16193 as_fn_append ac_file_inputs " '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016194 done
16195
16196 # Let's still pretend it is `configure' which instantiates (i.e., don't
16197 # use $as_me), people would be surprised to read:
16198 # /* config.h. Generated by config.status. */
Matthias Kloseb9621712010-04-24 17:59:49 +000016199 configure_input='Generated from '`
16200 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
16201 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016202 if test x"$ac_file" != x-; then
16203 configure_input="$ac_file. $configure_input"
Matthias Kloseb9621712010-04-24 17:59:49 +000016204 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
16205$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016206 fi
Matthias Kloseb9621712010-04-24 17:59:49 +000016207 # Neutralize special characters interpreted by sed in replacement strings.
16208 case $configure_input in #(
16209 *\&* | *\|* | *\\* )
16210 ac_sed_conf_input=`$as_echo "$configure_input" |
16211 sed 's/[\\\\&|]/\\\\&/g'`;; #(
16212 *) ac_sed_conf_input=$configure_input;;
16213 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016214
16215 case $ac_tag in
Victor Stinnere0be4232011-10-25 13:06:09 +020016216 *:-:* | *:-) cat >"$ac_tmp/stdin" \
16217 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016218 esac
16219 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016220 esac
16221
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016222 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000016223$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016224 X"$ac_file" : 'X\(//\)[^/]' \| \
16225 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016226 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Matthias Kloseb9621712010-04-24 17:59:49 +000016227$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016228 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16229 s//\1/
16230 q
16231 }
16232 /^X\(\/\/\)[^/].*/{
16233 s//\1/
16234 q
16235 }
16236 /^X\(\/\/\)$/{
16237 s//\1/
16238 q
16239 }
16240 /^X\(\/\).*/{
16241 s//\1/
16242 q
16243 }
16244 s/.*/./; q'`
Matthias Kloseb9621712010-04-24 17:59:49 +000016245 as_dir="$ac_dir"; as_fn_mkdir_p
Martin v. Löwis11437992002-04-12 09:54:03 +000016246 ac_builddir=.
16247
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016248case "$ac_dir" in
16249.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
16250*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016251 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016252 # A ".." for each directory in $ac_dir_suffix.
Matthias Kloseb9621712010-04-24 17:59:49 +000016253 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016254 case $ac_top_builddir_sub in
16255 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
16256 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
16257 esac ;;
16258esac
16259ac_abs_top_builddir=$ac_pwd
16260ac_abs_builddir=$ac_pwd$ac_dir_suffix
16261# for backward compatibility:
16262ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000016263
16264case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016265 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000016266 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016267 ac_top_srcdir=$ac_top_builddir_sub
16268 ac_abs_top_srcdir=$ac_pwd ;;
16269 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000016270 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016271 ac_top_srcdir=$srcdir
16272 ac_abs_top_srcdir=$srcdir ;;
16273 *) # Relative name.
16274 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
16275 ac_top_srcdir=$ac_top_build_prefix$srcdir
16276 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016277esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016278ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000016279
Martin v. Löwis11437992002-04-12 09:54:03 +000016280
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016281 case $ac_mode in
16282 :F)
16283 #
16284 # CONFIG_FILE
16285 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016286
16287 case $INSTALL in
16288 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016289 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016290 esac
Matthias Klose93a0ef12012-03-15 18:08:34 +010016291 ac_MKDIR_P=$MKDIR_P
16292 case $MKDIR_P in
16293 [\\/$]* | ?:[\\/]* ) ;;
16294 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
16295 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000016296_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016297
Matthias Kloseb9621712010-04-24 17:59:49 +000016298cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016299# If the template does not know about datarootdir, expand it.
16300# FIXME: This hack should be removed a few years after 2.60.
16301ac_datarootdir_hack=; ac_datarootdir_seen=
Matthias Kloseb9621712010-04-24 17:59:49 +000016302ac_sed_dataroot='
16303/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016304 p
16305 q
16306}
16307/@datadir@/p
16308/@docdir@/p
16309/@infodir@/p
16310/@localedir@/p
Matthias Kloseb9621712010-04-24 17:59:49 +000016311/@mandir@/p'
16312case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016313*datarootdir*) ac_datarootdir_seen=yes;;
16314*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Matthias Kloseb9621712010-04-24 17:59:49 +000016315 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
16316$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016317_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016318cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016319 ac_datarootdir_hack='
16320 s&@datadir@&$datadir&g
16321 s&@docdir@&$docdir&g
16322 s&@infodir@&$infodir&g
16323 s&@localedir@&$localedir&g
16324 s&@mandir@&$mandir&g
Matthias Kloseb9621712010-04-24 17:59:49 +000016325 s&\\\${datarootdir}&$datarootdir&g' ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016326esac
16327_ACEOF
16328
16329# Neutralize VPATH when `$srcdir' = `.'.
16330# Shell code in configure.ac might set extrasub.
16331# FIXME: do we really want to maintain this feature?
Matthias Kloseb9621712010-04-24 17:59:49 +000016332cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16333ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000016334$extrasub
16335_ACEOF
Matthias Kloseb9621712010-04-24 17:59:49 +000016336cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000016337:t
16338/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Matthias Kloseb9621712010-04-24 17:59:49 +000016339s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016340s&@top_builddir@&$ac_top_builddir_sub&;t t
Matthias Kloseb9621712010-04-24 17:59:49 +000016341s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016342s&@srcdir@&$ac_srcdir&;t t
16343s&@abs_srcdir@&$ac_abs_srcdir&;t t
16344s&@top_srcdir@&$ac_top_srcdir&;t t
16345s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
16346s&@builddir@&$ac_builddir&;t t
16347s&@abs_builddir@&$ac_abs_builddir&;t t
16348s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
16349s&@INSTALL@&$ac_INSTALL&;t t
Matthias Klose93a0ef12012-03-15 18:08:34 +010016350s&@MKDIR_P@&$ac_MKDIR_P&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016351$ac_datarootdir_hack
Matthias Kloseb9621712010-04-24 17:59:49 +000016352"
Victor Stinnere0be4232011-10-25 13:06:09 +020016353eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
16354 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016355
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016356test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Victor Stinnere0be4232011-10-25 13:06:09 +020016357 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
16358 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
16359 "$ac_tmp/out"`; test -z "$ac_out"; } &&
Matthias Kloseb9621712010-04-24 17:59:49 +000016360 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016361which seems to be undefined. Please make sure it is defined" >&5
Matthias Kloseb9621712010-04-24 17:59:49 +000016362$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016363which seems to be undefined. Please make sure it is defined" >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000016364
Victor Stinnere0be4232011-10-25 13:06:09 +020016365 rm -f "$ac_tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000016366 case $ac_file in
Victor Stinnere0be4232011-10-25 13:06:09 +020016367 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
16368 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
Matthias Kloseb9621712010-04-24 17:59:49 +000016369 esac \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016370 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016371 ;;
16372 :H)
16373 #
16374 # CONFIG_HEADER
16375 #
Martin v. Löwis11437992002-04-12 09:54:03 +000016376 if test x"$ac_file" != x-; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016377 {
16378 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020016379 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
16380 } >"$ac_tmp/config.h" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016381 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Victor Stinnere0be4232011-10-25 13:06:09 +020016382 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
Matthias Kloseb9621712010-04-24 17:59:49 +000016383 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
16384$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016385 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016386 rm -f "$ac_file"
Victor Stinnere0be4232011-10-25 13:06:09 +020016387 mv "$ac_tmp/config.h" "$ac_file" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016388 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016389 fi
16390 else
Matthias Kloseb9621712010-04-24 17:59:49 +000016391 $as_echo "/* $configure_input */" \
Victor Stinnere0be4232011-10-25 13:06:09 +020016392 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016393 || as_fn_error $? "could not create -" "$LINENO" 5
Martin v. Löwis11437992002-04-12 09:54:03 +000016394 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016395 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000016396
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016397
16398 esac
16399
Antoine Pitrou8e6b4072010-09-10 19:44:44 +000016400
16401 case $ac_file$ac_mode in
16402 "Modules/ld_so_aix":F) chmod +x Modules/ld_so_aix ;;
16403
16404 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016405done # for ac_tag
16406
Guido van Rossum627b2d71993-12-24 10:39:16 +000016407
Matthias Kloseb9621712010-04-24 17:59:49 +000016408as_fn_exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +000016409_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016410ac_clean_files=$ac_clean_files_save
16411
Matthias Kloseb9621712010-04-24 17:59:49 +000016412test $ac_write_fail = 0 ||
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016413 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
Matthias Kloseb9621712010-04-24 17:59:49 +000016414
Martin v. Löwis11437992002-04-12 09:54:03 +000016415
16416# configure is writing to config.log, and then calls config.status.
16417# config.status does its own redirection, appending to config.log.
16418# Unfortunately, on DOS this fails, as config.log is still kept open
16419# by configure, so config.status won't be able to write to it; its
16420# output is simply discarded. So we exec the FD to /dev/null,
16421# effectively closing config.log, so it can be properly (re)opened and
16422# appended to by config.status. When coming back to configure, we
16423# need to make the FD available again.
16424if test "$no_create" != yes; then
16425 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000016426 ac_config_status_args=
16427 test "$silent" = yes &&
16428 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000016429 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000016430 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000016431 exec 5>>config.log
16432 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
16433 # would make configure fail if this is the last instruction.
Ross Lagerwallb0ae53d2011-06-10 07:30:30 +020016434 $ac_cs_success || as_fn_exit 1
Matthias Kloseb9621712010-04-24 17:59:49 +000016435fi
16436if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
16437 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
16438$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016439fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000016440
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016441
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000016442echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016443if test ! -f Modules/Setup
16444then
16445 cp $srcdir/Modules/Setup.dist Modules/Setup
16446fi
16447
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000016448echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000016449if test ! -f Modules/Setup.local
16450then
16451 echo "# Edit this file for local setup changes" >Modules/Setup.local
16452fi
16453
16454echo "creating Makefile"
16455$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
16456 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000016457 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000016458mv config.c Modules